Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jakemac53
Copy link
Contributor

@jakemac53 jakemac53 commented Nov 7, 2025

Summary

Now that we have all extension reloading features working, this adds an /extensions restart command to explicitly restart extensions.

This command exists currently without opting into the extension reloading experiment - so that experiment just makes it automatic, but there is a way to restart extensions generally without opting in to anything.

Details

Also adds an event for the extensions update state reducer to update the "(updated, needs restart)" message for extensions after they have been updated.

Related Issues

Related to #11108

How to Validate

Update an extension and then restart it - you should see all the new features and also if you do /extensions list you should see its updated state is now green.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@jakemac53 jakemac53 requested a review from a team as a code owner November 7, 2025 21:57
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jakemac53, 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 new /extensions restart command, empowering users to manually refresh the state of their extensions. This functionality is available regardless of whether the automatic extension reloading experiment is active, offering a consistent method for applying updates or resolving issues. The change also includes updates to the extension state management, ensuring the user interface accurately reflects when an extension has been successfully restarted.

Highlights

  • New /extensions restart Command: Introduced a new command to explicitly restart extensions, allowing users to refresh extension states manually.
  • Independent of Auto-Reloading: This command functions even when automatic extension reloading is not enabled, providing a universal way to restart extensions.
  • UI State Update: Implemented a new RESTARTED event to update the UI, changing an extension's status from "updated, needs restart" to "updated" after a successful restart.
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.

Copy link
Contributor

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

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 introduces a new /extensions restart command, which is a valuable addition for managing extensions. The implementation is solid and includes comprehensive tests. I've identified one high-severity issue related to user feedback when no extensions match the restart criteria, which could lead to confusion. Addressing this will improve the user experience of the new command.

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Size Change: +3.89 kB (+0.02%)

Total Size: 20.5 MB

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

compressed-size-action

@jakemac53 jakemac53 requested a review from jacob314 November 7, 2025 22:07
@jacob314
Copy link
Collaborator

jacob314 commented Nov 7, 2025

LGTM! The implementation of /extensions restart is solid.

One minor suggestion for UX improvement:

In packages/cli/src/ui/commands/extensionsCommand.ts, if a user provides an invalid extension name, it seems it will just be silently ignored. It might be helpful to warn the user if any of the specified extensions were not found or not active.


context.ui.addItem(
{
type: MessageType.INFO,
Copy link
Collaborator

Choose a reason for hiding this comment

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

group the messages together. seeing two info icons here is ugly.

Image

Copy link
Collaborator

Choose a reason for hiding this comment

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

or tweak so the info icon isn't used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unnamed

This is what it looks like now PTAL

Copy link
Collaborator

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

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

Approved once the multiple info messages are cleaned up and there is a clearer error for invalid extension names.

@jakemac53
Copy link
Contributor Author

Note that this should also be very useful when working locally on a linked extension - you can edit the main repo and then restart the extension to see your changes.

@jakemac53 jakemac53 enabled auto-merge November 7, 2025 23:01
const infoItem: HistoryItemInfo = {
type: MessageType.INFO,
text: `${extensionsToRestart.length} extension${s} restarted successfully.`,
icon: ' ',
Copy link
Collaborator

Choose a reason for hiding this comment

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

'. ' is not an icon. make the api clearer or at least defined a constant like OMIT_ICON

Copy link
Collaborator

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

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

UI looks much more polished with these updates. Thanks for the fixes.

@jakemac53 jakemac53 added this pull request to the merge queue Nov 7, 2025
Merged via the queue into main with commit bafbcbb Nov 7, 2025
22 checks passed
@jakemac53 jakemac53 deleted the extensions-restart-command branch November 7, 2025 23:28
thacio added a commit to thacio/auditaria that referenced this pull request Nov 8, 2025
danpalmer pushed a commit to danpalmer/gemini-cli that referenced this pull request Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants