fix: allow query submission abort (#392)

This commit is contained in:
Mingholy
2025-08-20 17:21:44 +08:00
committed by GitHub
parent 0ffd7c06d7
commit a7c8c4c2fa

View File

@@ -192,6 +192,7 @@ export const useGeminiStream = (
return; return;
} }
turnCancelledRef.current = true; turnCancelledRef.current = true;
isSubmittingQueryRef.current = false;
abortControllerRef.current?.abort(); abortControllerRef.current?.abort();
if (pendingHistoryItemRef.current) { if (pendingHistoryItemRef.current) {
addItem(pendingHistoryItemRef.current, Date.now()); addItem(pendingHistoryItemRef.current, Date.now());