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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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