Skip to content

feat(cli): unify /chat and /resume command UX#20256

Merged
LyalinDotCom merged 5 commits intomainfrom
chat-resume-merge
Mar 8, 2026
Merged

feat(cli): unify /chat and /resume command UX#20256
LyalinDotCom merged 5 commits intomainfrom
chat-resume-merge

Conversation

@LyalinDotCom
Copy link
Collaborator

@LyalinDotCom LyalinDotCom commented Feb 25, 2026

Summary

  • Unify /chat and /resume into one alias-based chat surface for phase one.
  • Add grouped slash menu sections for auto sessions and checkpoints.
  • Make the auto list entry selectable and keep prefix behavior consistent (for example /resu).
  • Merge and align docs for the consolidated command experience.

Validation

  • npm test -w @google/gemini-cli -- src/ui/commands/chatCommand.test.ts src/ui/commands/resumeCommand.test.ts src/services/BuiltinCommandLoader.test.ts src/ui/components/SuggestionsDisplay.test.tsx src/ui/hooks/useSlashCompletion.test.ts
  • npm test -w @google/gemini-cli -- src/ui/hooks/useSlashCompletion.test.ts src/ui/hooks/useCommandCompletion.test.tsx src/ui/components/InputPrompt.test.tsx
  • npm run typecheck -w @google/gemini-cli

Closes #20255

@LyalinDotCom LyalinDotCom requested review from a team as code owners February 25, 2026 04:11
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @LyalinDotCom, 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 refactors the command-line interface by unifying the /chat and /resume commands. The primary goal is to streamline the user experience by consolidating session management and checkpoint functionalities under a single, alias-based system. This change introduces a more organized slash command menu with distinct sections for auto-saved sessions and manual checkpoints, improving discoverability and consistency.

Highlights

  • Unified Command Experience: The /chat and /resume commands have been unified into a single alias-based system, streamlining session management and checkpoint functionalities under a consistent user experience.
  • Grouped Slash Menus: Slash command completion now features grouped menus with distinct sections for 'auto' sessions (session browser) and 'checkpoints' (manual tagged checkpoints), enhancing command discoverability and organization.
  • Consistent Prefix Behavior: Partial command inputs, such as /resum or /cha, now consistently resolve to the full command's grouped menu, maintaining intuitive behavior for users.
  • Documentation Alignment: All relevant documentation, including session management guides and command references, has been updated to reflect the consolidated command structure and new UI elements.
  • Enhanced Command Completion: The command completion and suggestion display mechanisms have been improved to support grouped sections, canonical command text insertion, and direct submission of suggested commands.
Changelog
  • docs/cli/session-management.md
    • Updated documentation for /resume and /chat commands to describe new grouped menu sections.
    • Added details on manual chat checkpoints and compatibility aliases.
  • docs/cli/tutorials/session-management.md
    • Updated tutorial examples to use /resume for saving and resuming checkpoints.
    • Revised command reference link to reflect unified commands.
  • docs/reference/commands.md
    • Updated /chat command description to indicate it is an alias for /resume.
    • Detailed the new grouped menu layout for /chat and /resume.
    • Added equivalent /resume usage for /chat subcommands.
    • Expanded /resume command description and features to include chat checkpoint management.
    • Listed /resume subcommands and their compatibility alias.
  • packages/cli/src/services/BuiltinCommandLoader.test.ts
    • Updated mock command definitions for /chat and /resume to include all subcommands.
    • Extended debug subcommand tests to cover both /chat and /resume and their nested checkpoints.
  • packages/cli/src/services/BuiltinCommandLoader.ts
    • Implemented a function to dynamically add the debug subcommand to /chat and /resume and their nested checkpoint subcommands.
    • Applied this function during command loading for both commands.
  • packages/cli/src/ui/commands/chatCommand.test.ts
    • Updated chatCommand test expectations for description, autoExecute, and subcommand count.
    • Corrected error messages to reference /resume for checkpoint operations.
  • packages/cli/src/ui/commands/chatCommand.ts
    • Refactored chatCommand to be an alias for /resume, opening the session browser by default.
    • Introduced grouped checkpoint subcommands and updated descriptions to refer to /resume.
    • Added a hidden compatibility command for /checkpoints.
  • packages/cli/src/ui/commands/resumeCommand.test.ts
    • Added new tests to verify /resume opens the session browser and exposes unified subcommands.
    • Confirmed the presence of a hidden /resume checkpoints compatibility alias.
  • packages/cli/src/ui/commands/resumeCommand.ts
    • Updated resumeCommand to include chat checkpoint management and expose unified subcommands.
  • packages/cli/src/ui/commands/types.ts
    • Added suggestionGroup property to SlashCommand interface.
    • Updated a comment to reflect /resume command usage.
  • packages/cli/src/ui/components/InputPrompt.tsx
    • Added logic to handle submitValue from suggestions for direct command execution.
  • packages/cli/src/ui/components/SuggestionsDisplay.test.tsx
    • Added a test to verify rendering of section separators for grouped slash command suggestions.
  • packages/cli/src/ui/components/SuggestionsDisplay.tsx
    • Extended Suggestion interface with insertValue, sectionTitle, submitValue.
    • Implemented rendering of section headers for grouped suggestions.
  • packages/cli/src/ui/constants/tips.ts
    • Updated informative tips to use /resume instead of /chat for checkpoint commands.
  • packages/cli/src/ui/hooks/useCommandCompletion.test.tsx
    • Added a test to ensure insertValue is used for canonical command text insertion during autocompletion.
  • packages/cli/src/ui/hooks/useCommandCompletion.tsx
    • Modified autocompletion logic to prioritize insertValue from suggestions.
  • packages/cli/src/ui/hooks/useSlashCompletion.test.ts
    • Added tests for consistent grouped menu display for /chat and /resume and correct prefix handling.
    • Verified the presence of the 'auto' session entry.
  • packages/cli/src/ui/hooks/useSlashCompletion.ts
    • Implemented prefix descent logic for /chat and /resume to show grouped menus.
    • Added usedPrefixParentDescent to parser results.
    • Modified suggestion generation to include insertValue, sectionTitle, and an 'auto' session entry.
    • Adjusted completion position and perfect match logic based on prefix descent.
Activity
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.

@github-actions
Copy link

github-actions bot commented Feb 25, 2026

Size Change: +4.96 kB (+0.02%)

Total Size: 26 MB

Filename Size Change
./bundle/gemini.js 25.5 MB +4.96 kB (+0.02%)
ℹ️ View Unchanged
Filename Size
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB
./bundle/sandbox-macos-strict-open.sb 4.82 kB
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB

compressed-size-action

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 unifies the user experience for the /chat and /resume commands by making /chat an alias and introducing a new grouped menu for subcommands. The changes are comprehensive, covering documentation, command definitions, UI components, and the underlying completion logic. The implementation appears solid and is well-supported by both updated and newly added tests. I did not identify any issues of high or critical severity in this review.

@gemini-cli gemini-cli bot added area/core Issues related to User Interface, OS Support, Core Functionality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. labels Mar 5, 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.

Code Review

Summary
This PR elegantly unifies the /chat and /resume commands, aligning their UX and enabling the grouped sub-command features. The implementation is solid and well-tested.

Findings

  • Correctness: The integration of the shared chatResumeSubCommands into both commands is clean. The update to BuiltinCommandLoader safely injects the debug subcommand for nightly builds across the new shared hierarchy, including the checkpoints hidden alias.
  • Maintainability: The use of suggestionGroup cleanly separates the domain of command definitions from UI presentation (sectionTitle in SuggestionsDisplay).
  • User Experience: The special-case prefix descent for chat and resume in useSlashCompletion.ts is a nice touch to eliminate friction during the phase-one alias UX. The special auto section suggestion also acts as a great entry point.
  • Testing: Test coverage was updated appropriately, and the logic around the checkpoints compatibility layer and rendering grouped suggestions is fully covered.

Conclusion
Approved. Excellent work on simplifying and unifying the session management commands!

@LyalinDotCom LyalinDotCom added this pull request to the merge queue Mar 8, 2026
Merged via the queue into main with commit d41735d Mar 8, 2026
26 of 27 checks passed
@LyalinDotCom LyalinDotCom deleted the chat-resume-merge branch March 8, 2026 23:03
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 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate /chat and /resume into one chat experience

2 participants