fix: early stop on invalid tool call (#458)

This commit is contained in:
tanzhenxin
2025-08-26 20:22:44 +08:00
committed by GitHub
parent 472df045d3
commit 1b38f96eaa

View File

@@ -644,8 +644,9 @@ export const useGeminiStream = (
options?: { isContinuation: boolean }, options?: { isContinuation: boolean },
prompt_id?: string, prompt_id?: string,
) => { ) => {
// Prevent concurrent executions of submitQuery // Prevent concurrent executions of submitQuery, but allow continuations
if (isSubmittingQueryRef.current) { // which are part of the same logical flow (tool responses)
if (isSubmittingQueryRef.current && !options?.isContinuation) {
return; return;
} }