Refactor: Memoize hook callbacks, update dependencies, and fix lint errors (#268)

Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
Allen Hutchison
2025-05-06 14:48:49 -07:00
committed by GitHub
parent e26c436d5c
commit adeda6a5b3
4 changed files with 54 additions and 41 deletions

View File

@@ -101,7 +101,7 @@ export const useGeminiStream = (
);
}
}
}, [config.getApiKey(), config.getModel()]);
}, [config]);
// Input Handling Effect (remains the same)
useInput((input, key) => {
@@ -532,10 +532,13 @@ export const useGeminiStream = (
getNextMessageId,
updateGeminiMessage,
handleSlashCommand,
handleShellCommand,
// handleAtCommand is implicitly included via its direct call
setDebugMessage, // Added dependency for handleAtCommand & passthrough
setStreamingState, // Added dependency for handlePassthroughCommand
updateAndAddGeminiMessageContent,
setShowHelp,
toolRegistry,
],
);