Fix bug where tool scheduler was repeatedly created. (#11767)

This commit is contained in:
Jacob Richman
2025-10-23 09:35:32 -07:00
committed by GitHub
parent 8ad72ec1ae
commit 9e91aafe40
4 changed files with 131 additions and 16 deletions
+11 -2
View File
@@ -582,6 +582,15 @@ Logging in with Google... Please restart Gemini CLI to continue.
const cancelHandlerRef = useRef<() => void>(() => {});
const getPreferredEditor = useCallback(
() => settings.merged.general?.preferredEditor as EditorType,
[settings.merged.general?.preferredEditor],
);
const onCancelSubmit = useCallback(() => {
cancelHandlerRef.current();
}, []);
const {
streamingState,
submitQuery,
@@ -601,13 +610,13 @@ Logging in with Google... Please restart Gemini CLI to continue.
setDebugMessage,
handleSlashCommand,
shellModeActive,
() => settings.merged.general?.preferredEditor as EditorType,
getPreferredEditor,
onAuthError,
performMemoryRefresh,
modelSwitchedFromQuotaError,
setModelSwitchedFromQuotaError,
refreshStatic,
() => cancelHandlerRef.current(),
onCancelSubmit,
setEmbeddedShellFocused,
terminalWidth,
terminalHeight,