mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-20 10:10:56 -07:00
Allow for slash commands to opt-out of autocompletion and /help discovery. (#7847)
This commit is contained in:
@@ -225,7 +225,7 @@ function useCommandSuggestions(
|
||||
if (partial === '') {
|
||||
// If no partial query, show all available commands
|
||||
potentialSuggestions = commandsToSearch.filter(
|
||||
(cmd) => cmd.description,
|
||||
(cmd) => cmd.description && !cmd.hidden,
|
||||
);
|
||||
} else {
|
||||
// Use fuzzy search for non-empty partial queries with fallback
|
||||
@@ -400,7 +400,7 @@ export function useSlashCompletion(props: UseSlashCompletionProps): {
|
||||
const commandMap = new Map<string, SlashCommand>();
|
||||
|
||||
commands.forEach((cmd) => {
|
||||
if (cmd.description) {
|
||||
if (cmd.description && !cmd.hidden) {
|
||||
commandItems.push(cmd.name);
|
||||
commandMap.set(cmd.name, cmd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user