Skip to content

refactor(cli): standardize on 'reload' verb for all components#20654

Merged
jacob314 merged 2 commits intomainfrom
refactor/standardize-reload-verb
Mar 7, 2026
Merged

refactor(cli): standardize on 'reload' verb for all components#20654
jacob314 merged 2 commits intomainfrom
refactor/standardize-reload-verb

Conversation

@keithguerin
Copy link
Contributor

Summary

Standardize the primary verb for re-initializing components across the Gemini CLI to reload. This improves consistency, aligns with industry standards (Claude Code, GitHub Copilot), and matches internal service methods.

Details

This PR builds upon and completes the excellent work started by community contributor Krishna Korade (@MushuEE) in PR #18347. It extends the standardization to all extensibility types and ensures documentation and schemas are synchronized.

Key Changes:

  • Standardization: Refactored /agents, /mcp, /memory, and /extensions to use reload as the primary command.
  • Backward Compatibility: Maintained refresh and restart as aliases (altNames) for all refactored commands.
  • Symmetry: Added the refresh alias to /skills reload and /commands reload to ensure consistent behavior across the entire CLI.
  • UX Refinement: Updated all UI feedback strings (e.g., "Refreshing..." -> "Reloading...") and CLI Informative Tips to reinforce the new standard.
  • Asset Synchronization: Updated settings.schema.json and comprehensive documentation in the docs/ directory.

Related Issues

Closes #18347

How to Validate

  1. Unit Tests: Run npm test -w @google/gemini-cli -- src/ui/commands/ to verify all 342 command UI tests pass.
  2. Manual Verification:
    • Verify /agents reload, /mcp reload, /memory reload, and /extensions reload function correctly.
    • Verify aliases /agents refresh, /mcp refresh, /memory refresh, and /extensions restart still function.
    • Verify new aliases /skills refresh and /commands refresh function correctly.
    • Observe that UI feedback messages now use "Reloading..." terminology.

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

@keithguerin keithguerin requested review from a team as code owners February 28, 2026 04:37
@gemini-cli
Copy link
Contributor

gemini-cli bot commented Feb 28, 2026

Hi @keithguerin, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this.

We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines.

Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed.

Thank you for your understanding and for being a part of our community!

@github-actions
Copy link

You already have 7 pull requests open. Please work on getting existing PRs merged before opening more.

@github-actions github-actions bot closed this Feb 28, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 refactors the Gemini CLI to standardize the command verb for re-initializing various components to 'reload'. This change aims to improve consistency across the CLI, align with industry standards, and match internal service methods. The update ensures a unified user experience for refreshing agents, MCP servers, memory, and extensions, while carefully preserving backward compatibility through aliases and updating all relevant user-facing text and configuration schemas.

Highlights

  • Standardized Command Verb: The primary command verb for re-initializing components across the Gemini CLI has been standardized to 'reload', replacing 'refresh' or 'restart' for /agents, /mcp, /memory, and /extensions.
  • Backward Compatibility & Consistency: Existing verbs like refresh and restart are maintained as aliases (altNames) for backward compatibility. Additionally, the refresh alias was added to /skills reload and /commands reload to ensure consistent behavior across all CLI components.
  • UI and Documentation Updates: All user interface feedback strings (e.g., 'Refreshing...' changed to 'Reloading...') and CLI Informative Tips have been updated to reflect the new 'reload' standard. Comprehensive documentation in the docs/ directory and settings.schema.json were also synchronized.
  • Community Contribution Completion: This pull request builds upon and completes the work initiated by community contributor Krishna Korade (@MushuEE) in PR refactor(cli): standardize on 'reload' verb for refreshing components #18347, extending the standardization to all extensibility types.
Changelog
  • docs/cli/cli-reference.md
    • Added a new section detailing interactive reload commands for various components.
  • docs/cli/gemini-md.md
    • Updated the /memory refresh command to /memory reload in the documentation.
  • docs/cli/settings.md
    • Updated documentation to reflect /memory reload instead of /memory refresh in a setting description.
  • docs/cli/tutorials/mcp-setup.md
    • Changed the recommended command from /mcp refresh to /mcp reload in the MCP setup tutorial.
  • docs/cli/tutorials/memory-management.md
    • Updated the command for reloading memory from /memory refresh to /memory reload in the memory management tutorial.
  • docs/core/remote-agents.md
    • Updated the /agents refresh command to /agents reload in the remote agents documentation.
  • docs/reference/configuration.md
    • Updated descriptions for context.loadMemoryFromIncludeDirectories and /memory command sub-commands from refresh to reload.
  • garbage.txt
    • Added a new file containing random, nonsensical text.
  • packages/cli/src/config/settingsSchema.ts
    • Updated the description for loadMemoryFromIncludeDirectories to reference /memory reload.
  • packages/cli/src/ui/AppContainer.tsx
    • Updated UI messages from 'Memory refreshed successfully' to 'Memory reloaded successfully'.
  • packages/cli/src/ui/commands/agentsCommand.test.ts
    • Updated test cases to verify the reload subcommand for agents and its associated UI messages, replacing refresh references.
  • packages/cli/src/ui/commands/agentsCommand.ts
    • Refactored the agents command to prioritize reload as the primary verb and refresh as an alias.
    • Updated UI messages related to agent registry operations to use 'Reloading...' terminology.
  • packages/cli/src/ui/commands/extensionsCommand.test.ts
    • Updated test descriptions and assertions to use reload instead of restart for extension actions.
    • Changed UI messages in tests from 'Restarting...' to 'Reloading...' for extensions.
  • packages/cli/src/ui/commands/extensionsCommand.ts
    • Refactored the extensions command to use reload as the primary verb with restart as an alias.
    • Updated usage messages and UI feedback to consistently use 'reload' terminology for extensions.
  • packages/cli/src/ui/commands/mcpCommand.ts
    • Updated UI messages and command definitions from refresh to reload for MCP server actions.
    • Changed the primary command for MCP server re-initialization to reload with refresh as an alias.
  • packages/cli/src/ui/commands/memoryCommand.test.ts
    • Updated test cases to verify the reload subcommand for memory and its associated UI messages, replacing refresh references.
  • packages/cli/src/ui/commands/memoryCommand.ts
    • Refactored the memory command to use reload as the primary verb with refresh as an alias.
    • Updated UI messages related to memory operations to use 'Reloading...' terminology.
  • packages/cli/src/ui/commands/statsCommand.test.ts
    • Added a mock for the getG1CreditBalance function.
  • packages/cli/src/ui/constants/tips.ts
    • Updated informative tips to consistently refer to reload commands for memory and MCP operations.
  • packages/core/src/commands/memory.ts
    • Updated success messages for memory operations to use 'reloaded' terminology.
  • schemas/settings.schema.json
    • Updated the schema description for loadMemoryFromIncludeDirectories to reference /memory reload.
Activity
  • This pull request completes the foundational work started by community contributor Krishna Korade (@MushuEE) in PR refactor(cli): standardize on 'reload' verb for refreshing components #18347.
  • Unit tests for @google/gemini-cli commands were executed, with all 342 command UI tests passing.
  • Manual verification was performed on MacOS using npm run to confirm the correct functionality of /agents reload, /mcp reload, /memory reload, /extensions reload, and their respective aliases, as well as the new aliases for /skills refresh and /commands refresh.
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.

@keithguerin keithguerin reopened this Feb 28, 2026
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 successfully standardizes the verb for re-initializing components to reload across the CLI, which is a great step for consistency. The changes are comprehensive, touching upon commands, UI text, tests, and documentation. My main feedback is the inclusion of garbage.txt, which appears to be an accidental commit and should be removed to maintain the cleanliness of the codebase.

garbage.txt Outdated
Comment on lines +1 to +7
9f8a7b6c5d4e3f2g1h0i
!@#$%^&*()_+
random_sequence_42: [x, y, z]
{ "status": "malformed", "reason": "none" }
JUXTAPOSITION_OF_NONSENSE
48 65 6c 6c 6f 20 57 6f 72 6c 64
--- END OF LINE --- No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This file seems to have been added by accident. It contains random data and does not appear to be related to the functionality of the CLI. Please remove it to keep the project's source clean.

@keithguerin keithguerin force-pushed the refactor/standardize-reload-verb branch from 984313b to b2b4019 Compare February 28, 2026 04:39
@github-actions
Copy link

github-actions bot commented Feb 28, 2026

Size Change: +27 B (0%)

Total Size: 26 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 25.5 MB +27 B (0%)
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 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
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

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 <MushuEE@users.noreply.github.com>
Closes #18347
@keithguerin keithguerin force-pushed the refactor/standardize-reload-verb branch from b2b4019 to c3481dc Compare February 28, 2026 04:45
@gemini-cli gemini-cli bot added priority/p2 Important but can be addressed in a future release. 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! labels Feb 28, 2026
Copy link
Contributor

@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.

lgtm

@jacob314 jacob314 enabled auto-merge March 7, 2026 22:35
@jacob314 jacob314 added this pull request to the merge queue Mar 7, 2026
Merged via the queue into main with commit dc67410 Mar 7, 2026
26 of 27 checks passed
@jacob314 jacob314 deleted the refactor/standardize-reload-verb branch March 7, 2026 23:07
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.

2 participants