Skip to content

refactor(cli): standardize on 'reload' verb for refreshing components#18347

Closed
MushuEE wants to merge 1 commit intogoogle-gemini:mainfrom
MushuEE:refactor/standardize-reload-command
Closed

refactor(cli): standardize on 'reload' verb for refreshing components#18347
MushuEE wants to merge 1 commit intogoogle-gemini:mainfrom
MushuEE:refactor/standardize-reload-command

Conversation

@MushuEE
Copy link
Copy Markdown
Contributor

@MushuEE MushuEE commented Feb 4, 2026

Summary

This PR standardizes the primary verb for re-initializing components across the CLI to reload. Previously, the CLI used a mix of refresh, restart, and reload across various namespaces, leading to inconsistent help menus and autocomplete behavior.

Details

The following subcommands have been updated to use reload as their primary name, while preserving the original verbs as altNames to ensure full backwards compatibility for existing users and scripts:

  • MCP: /mcp refresh -> /mcp reload (alias: refresh)
  • Agents: /agents refresh -> /agents reload (alias: refresh)
  • Extensions: /extensions restart -> /extensions reload (alias: restart)
  • Memory: /memory refresh -> /memory reload (alias: refresh)

Additionally, subcommand descriptions, usage strings, and interactive feedback messages (e.g., "Reloading...") have been updated to match this new standard.

Related Issues

Closes #18345

How to Validate

  1. Verify primary names: Run /mcp reload, /agents reload, /extensions reload, and /memory reload. Each should function correctly and display "Reloading..." or "Reloaded..." messages.
  2. Verify aliases: Run /mcp refresh, /agents refresh, /extensions restart, and /memory refresh. These should still work silently and execute the same logic.
  3. Verify help/autocomplete: Type /mcp [TAB] or /extensions --help and confirm that reload is the suggested/displayed subcommand.
  4. Run tests: npm test -w @google/gemini-cli -- src/ui/commands/ should pass all 320 tests.

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

@MushuEE MushuEE requested a review from a team as a code owner February 4, 2026 22:34
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @MushuEE, 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 significantly improves the consistency and user experience of the CLI by standardizing the verb used for re-initializing various components. By consolidating 'refresh', 'restart', and 'reload' into a single 'reload' verb, the CLI's command structure becomes more predictable and easier to navigate. This change is implemented while ensuring that existing scripts and user habits are not broken through the intelligent use of aliases, providing a smooth transition for all users.

Highlights

  • Standardized Verb: The primary CLI verb for re-initializing components has been standardized to 'reload' across the application.
  • Backward Compatibility: Original verbs like 'refresh' and 'restart' are preserved as 'altNames' for the new 'reload' verb, ensuring existing scripts and user habits remain functional.
  • Affected Subcommands: This change impacts the MCP, Agents, Extensions, and Memory subcommands, where 'refresh' or 'restart' have been replaced by 'reload'.
  • UI/UX Updates: Subcommand descriptions, usage strings, and interactive feedback messages (e.g., 'Reloading...') have been updated for consistency with the new 'reload' standard.
Changelog
  • packages/cli/src/ui/commands/agentsCommand.test.ts
    • Updated test descriptions to reflect the reload subcommand instead of refresh.
    • Changed references from refreshCommand to reloadCommand in tests.
    • Modified expected success message from 'Agents refreshed successfully.' to 'Agents reloaded successfully.'.
  • packages/cli/src/ui/commands/agentsCommand.ts
    • Renamed agentsRefreshCommand to agentsReloadCommand.
    • Added refresh as an altName to the new agentsReloadCommand.
    • Updated UI messages from 'Refreshing agent registry...' to 'Reloading agent registry...' and 'Agents refreshed successfully.' to 'Agents reloaded successfully.'.
    • Replaced agentsRefreshCommand with agentsReloadCommand in the main agentsCommand's subCommands list.
  • packages/cli/src/ui/commands/extensionsCommand.test.ts
    • Updated test descriptions and variable names from restart to reload.
    • Modified mockContext.invocation!.name from 'restart' to 'reload'.
    • Changed expected UI messages from 'Restarting X extensions...' to 'Reloading X extensions...' and 'X extensions restarted successfully.' to 'X extensions reloaded successfully.'.
    • Updated usage error message to reflect /extensions reload.
    • Changed error message for failed operations from 'Failed to restart some extensions' to 'Failed to reload some extensions'.
  • packages/cli/src/ui/commands/extensionsCommand.ts
    • Updated the usage string in restartAction (now effectively reloadAction) from /extensions restart to /extensions reload.
    • Modified UI messages related to restarting extensions to use 'Reloading' instead of 'Restarting'.
    • Added reload to the context.invocation?.name check for filtering active extensions in completeExtensions.
    • Renamed restartCommand to reloadExtensionsCommand.
    • Added restart as an altName to the new reloadExtensionsCommand.
    • Updated the description of the command to 'Reload and restart all extensions'.
    • Replaced restartCommand with reloadExtensionsCommand in the main extensionsCommand's subCommands list.
  • packages/cli/src/ui/commands/mcpCommand.ts
    • Renamed refreshCommand to reloadCommand.
    • Added refresh as an altName to the new reloadCommand.
    • Updated the description from 'Restarts MCP servers' to 'Reloads and restarts MCP servers'.
    • Replaced refreshCommand with reloadCommand in the main mcpCommand's subCommands list.
  • packages/cli/src/ui/commands/memoryCommand.test.ts
    • Updated the type definition for getSubCommand to include reload instead of refresh.
    • Changed test descriptions and variable names from refresh to reload.
    • Modified expected UI messages from 'Refreshing memory from source files...' to 'Reloading memory from source files...' and 'Error refreshing memory:' to 'Error reloading memory:'.
  • packages/cli/src/ui/commands/memoryCommand.ts
    • Renamed the refresh subcommand to reload.
    • Added refresh as an altName to the new reload subcommand.
    • Updated the description from 'Refresh the memory from the source' to 'Reload the memory from the source'.
    • Modified UI messages from 'Refreshing memory from source files...' to 'Reloading memory from source files...' and 'Error refreshing memory:' to 'Error reloading memory:'.
Activity
  • The pull request was created by MushuEE.
  • The author provided a detailed summary, outlining the purpose, affected subcommands, and validation steps.
  • The pre-merge checklist indicates that relevant documentation and tests were updated, and the changes were validated on Linux (npm run).
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
Copy Markdown
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 is a good refactoring that standardizes the verb for re-initializing components to reload across several CLI commands. The changes are consistent and correctly use aliases for backward compatibility. I've found a couple of minor inconsistencies where the refactoring could be made more complete: one in an internal function name and another in a user-facing message. Addressing these will ensure full consistency with the new standard.

@MushuEE MushuEE force-pushed the refactor/standardize-reload-command branch from bfff8d1 to eec74fc Compare February 4, 2026 22:39
@MushuEE MushuEE requested a review from a team as a code owner February 4, 2026 22:39
@MushuEE MushuEE force-pushed the refactor/standardize-reload-command branch 3 times, most recently from bfdfc4b to e24193f Compare February 4, 2026 22:41
@MushuEE MushuEE force-pushed the refactor/standardize-reload-command branch from e24193f to ae364ac Compare February 4, 2026 22:45
@gemini-cli gemini-cli bot added area/core Issues related to User Interface, OS Support, Core Functionality priority/p2 Important but can be addressed in a future release. help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Feb 4, 2026
keithguerin added a commit that referenced this pull request Feb 28, 2026
This commit standardizes the primary verb for re-initializing components
(skills, agents, commands, memory, mcp, and extensions) to 'reload'.
It maintains 'refresh' and 'restart' as aliases for backward compatibility.

- Updates all UI feedback strings to 'Reloading...'
- Updates Informative Tips in the UI
- Synchronizes documentation and settings schemas
- Ensures full symmetry across all extensibility types

Co-authored-by: Krishna Korade <[email protected]>
Closes #18347
keithguerin added a commit that referenced this pull request Feb 28, 2026
This commit standardizes the primary verb for re-initializing components
(skills, agents, commands, memory, mcp, and extensions) to 'reload'.
It maintains 'refresh' and 'restart' as aliases for backward compatibility.

- Updates all UI feedback strings to 'Reloading...'
- Updates Informative Tips in the UI
- Synchronizes documentation and settings schemas
- Ensures full symmetry across all extensibility types

Co-authored-by: Krishna Korade <[email protected]>
Closes #18347
keithguerin added a commit that referenced this pull request Feb 28, 2026
This commit standardizes the primary verb for re-initializing components
(skills, agents, commands, memory, mcp, and extensions) to 'reload'.
It maintains 'refresh' and 'restart' as aliases for backward compatibility.

- Updates all UI feedback strings to 'Reloading...'
- Updates Informative Tips in the UI
- Synchronizes documentation and settings schemas
- Ensures full symmetry across all extensibility types

Co-authored-by: Krishna Korade <[email protected]>
Closes #18347
keithguerin added a commit that referenced this pull request Feb 28, 2026
This commit standardizes the primary verb for re-initializing components
(skills, agents, commands, memory, mcp, and extensions) to 'reload'.
It maintains 'refresh' and 'restart' as aliases for backward compatibility.

- Updates all UI feedback strings to 'Reloading...'
- Updates Informative Tips in the UI
- Synchronizes documentation and settings schemas
- Ensures full symmetry across all extensibility types

Co-authored-by: Krishna Korade <[email protected]>
Closes #18347
keithguerin added a commit that referenced this pull request Feb 28, 2026
This commit standardizes the primary verb for re-initializing components
(skills, agents, commands, memory, mcp, and extensions) to 'reload'.
It maintains 'refresh' and 'restart' as aliases for backward compatibility.

- Updates all UI feedback strings to 'Reloading...'
- Updates Informative Tips in the UI
- Synchronizes documentation and settings schemas
- Ensures full symmetry across all extensibility types

Co-authored-by: Krishna Korade <[email protected]>
Closes #18347
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! priority/p2 Important but can be addressed in a future release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC: Standardize "Reload/Refresh" Command Naming Conventions

1 participant