From ad21c109882286b38f996b297daeee4fb8531a49 Mon Sep 17 00:00:00 2001 From: Tommaso Sciortino Date: Thu, 11 Sep 2025 12:59:38 -0700 Subject: [PATCH] Fix MCP prompt slash commands not appearing. (#8290) --- packages/cli/src/ui/AppContainer.tsx | 1 + packages/cli/src/ui/hooks/slashCommandProcessor.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/ui/AppContainer.tsx b/packages/cli/src/ui/AppContainer.tsx index b2781648a0..81725ed3b0 100644 --- a/packages/cli/src/ui/AppContainer.tsx +++ b/packages/cli/src/ui/AppContainer.tsx @@ -435,6 +435,7 @@ Logging in with Google... Please restart Gemini CLI to continue. setIsProcessing, setGeminiMdFileCount, slashCommandActions, + isConfigInitialized, ); const performMemoryRefresh = useCallback(async () => { diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts index c4dbc8d129..86c309989b 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts @@ -59,6 +59,7 @@ export const useSlashCommandProcessor = ( setIsProcessing: (isProcessing: boolean) => void, setGeminiMdFileCount: (count: number) => void, actions: SlashCommandProcessorActions, + isConfigInitialized: boolean, ) => { const session = useSessionStats(); const [commands, setCommands] = useState([]); @@ -255,7 +256,7 @@ export const useSlashCommandProcessor = ( return () => { controller.abort(); }; - }, [config, reloadTrigger]); + }, [config, reloadTrigger, isConfigInitialized]); const handleSlashCommand = useCallback( async (