Skip to content

fix(patch): cherry-pick 69f93f8 to release/v0.8.0-preview.1-pr-10629 to patch version v0.8.0-preview.1 and create version 0.8.0-preview.2#10642

Merged
chrstnb merged 1 commit into
release/v0.8.0-preview.1-pr-10629from
hotfix/v0.8.0-preview.1/0.8.0-preview.2/preview/cherry-pick-69f93f8/pr-10629
Oct 7, 2025
Merged

fix(patch): cherry-pick 69f93f8 to release/v0.8.0-preview.1-pr-10629 to patch version v0.8.0-preview.1 and create version 0.8.0-preview.2#10642
chrstnb merged 1 commit into
release/v0.8.0-preview.1-pr-10629from
hotfix/v0.8.0-preview.1/0.8.0-preview.2/preview/cherry-pick-69f93f8/pr-10629

Conversation

@gemini-cli-robot

Copy link
Copy Markdown
Collaborator

This PR automatically cherry-picks commit 69f93f8 to patch version v0.8.0-preview.1 in the preview release to create version 0.8.0-preview.2.

@gemini-cli-robot gemini-cli-robot requested a review from a team as a code owner October 7, 2025 15:38
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @gemini-cli-robot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement to the gemini-cli's extensions new command by making the template argument optional. Previously, a template was always required to create a new extension. Now, users can simply provide a path, and the CLI will initialize a new extension directory with a basic gemini-extension.json manifest, offering greater flexibility for developers who prefer to start from scratch. This change is part of an automated cherry-pick operation to update a preview release.

Highlights

  • Optional Template Argument: The template argument for the gemini extensions new command is now optional, allowing users to create an extension without specifying a boilerplate.
  • Default Extension Creation: When no template is provided, the new command will now create an empty directory at the specified path and generate a basic gemini-extension.json file with default name and version.
  • Test Suite Updates: The test suite for the new command has been updated to reflect the optional template argument and to verify the new default extension creation behavior.
  • Example Manifest Cleanup: The contextFileName field has been removed from the gemini-extension.json example manifest, simplifying the example configuration.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the extensions new command by making the template argument optional. When no template is provided, it now creates a new directory with a basic gemini-extension.json manifest. The implementation looks good, with a logical refactoring to separate directory creation from template copying. I've added one comment regarding an incomplete test case for the new functionality, which should be addressed to ensure the changes are fully verified.

Comment on lines +37 to 49
it('should create directory when no template is provided', async () => {
mockedFs.access.mockRejectedValue(new Error('ENOENT'));
mockedFs.mkdir.mockResolvedValue(undefined);

const parser = yargs([]).command(newCommand).fail(false);

await parser.parseAsync('new /some/path');

expect(mockedFs.mkdir).toHaveBeenCalledWith('/some/path', {
recursive: true,
});
expect(mockedFs.cp).not.toHaveBeenCalled();
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The test case for creating an extension without a template is incomplete. It verifies directory creation but misses the crucial step of checking if the gemini-extension.json manifest file is created. This is a core part of the new functionality and should be covered by tests to prevent future regressions.

  it('should create directory and manifest when no template is provided', async () => {
    mockedFs.access.mockRejectedValue(new Error('ENOENT'));
    mockedFs.mkdir.mockResolvedValue(undefined);
    mockedFs.writeFile.mockResolvedValue(undefined);

    const parser = yargs([]).command(newCommand).fail(false);

    await parser.parseAsync('new /some/path');

    expect(mockedFs.mkdir).toHaveBeenCalledWith('/some/path', {
      recursive: true,
    });
    expect(mockedFs.writeFile).toHaveBeenCalledWith(
      path.join('/some/path', 'gemini-extension.json'),
      JSON.stringify({ name: 'path', version: '1.0.0' }, null, 2)
    );
    expect(mockedFs.cp).not.toHaveBeenCalled();
  });

@chrstnb chrstnb enabled auto-merge (squash) October 7, 2025 15:40
@github-actions

github-actions Bot commented Oct 7, 2025

Copy link
Copy Markdown

Size Change: +555 B (0%)

Total Size: 17.5 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 17.4 MB +555 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 830 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B

compressed-size-action

@chrstnb chrstnb merged commit 97f8268 into release/v0.8.0-preview.1-pr-10629 Oct 7, 2025
20 checks passed
@chrstnb chrstnb deleted the hotfix/v0.8.0-preview.1/0.8.0-preview.2/preview/cherry-pick-69f93f8/pr-10629 branch October 7, 2025 15:49
@sripasg sripasg added the size/m A medium sized PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m A medium sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants