Allow for slash commands to opt-out of autocompletion and /help discovery.#7847
Merged
Allow for slash commands to opt-out of autocompletion and /help discovery.#7847
Conversation
This change introduces an optional 'hidden' property to slash commands, allowing them to be excluded from help and autocomplete suggestions. - The `SlashCommand` interface is updated with an optional `hidden` property. - The `/help` command and autocomplete logic now filter out hidden commands. - Unit tests are added to verify that hidden commands are not displayed in help or autocomplete, but can still be executed. - An unrelated failing test in `contentGenerator.test.ts` was also fixed.
|
Size Change: +10.9 kB (+0.09%) Total Size: 12.5 MB
ℹ️ View Unchanged
|
Collaborator
Author
|
Apologies for the extra review, @jacob314, but I wanted to redo this one slightly. This new PR updates the previous changes and cleans up where the logic happens. Includes tests of the new approach, and rollback earlier changes. Will mark as "ready for review" as soon as integration tests pass. |
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
…ash-commands # Conflicts: # packages/cli/src/ui/components/Help.tsx
5a28440 to
be2fcc5
Compare
Contributor
giraffe-tree
pushed a commit
to giraffe-tree/gemini-cli
that referenced
this pull request
Oct 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

TLDR
Allow for slash commands to opt-out of autocompletion and /help discovery.
Dive Deeper
As slash commands become more numerous allow for a command to opt out if it's unnecessary to advertise them on a case-by-case basis.
Reviewer Test Plan
Confirm that hidden commands no longer appear in /help or in / autocompletions.
Testing Matrix
Linked issues / bugs
Closes #7796