Refactor IdeContextStore (#8278)

This commit is contained in:
Tommaso Sciortino
2025-09-11 11:22:20 -07:00
committed by GitHub
parent 538e6cd19a
commit d892cde0b0
10 changed files with 92 additions and 114 deletions

View File

@@ -29,7 +29,7 @@ import {
type UserTierId,
DEFAULT_GEMINI_FLASH_MODEL,
IdeClient,
ideContext,
ideContextStore,
getErrorMessage,
getAllGeminiMdFilenames,
AuthType,
@@ -707,8 +707,8 @@ Logging in with Google... Please restart Gemini CLI to continue.
}, [terminalWidth, refreshStatic]);
useEffect(() => {
const unsubscribe = ideContext.subscribeToIdeContext(setIdeContextState);
setIdeContextState(ideContext.getIdeContext());
const unsubscribe = ideContextStore.subscribe(setIdeContextState);
setIdeContextState(ideContextStore.get());
return unsubscribe;
}, []);