allow aborting of shell mode (!) commands, similar to shell tool commands. fix bug that prevented aborts after first abort. more robust killing logic (#616)

This commit is contained in:
Olcan
2025-05-30 00:46:43 -07:00
committed by GitHub
parent b0aeeb53b1
commit 8935a248f6
3 changed files with 92 additions and 31 deletions

View File

@@ -199,7 +199,7 @@ export const useGeminiStream = (
return { queryToSend: null, shouldProceed: false }; // Handled by scheduling the tool
}
if (shellModeActive && handleShellCommand(trimmedQuery)) {
if (shellModeActive && handleShellCommand(trimmedQuery, signal)) {
return { queryToSend: null, shouldProceed: false };
}
@@ -492,7 +492,7 @@ export const useGeminiStream = (
const userMessageTimestamp = Date.now();
setShowHelp(false);
abortControllerRef.current ??= new AbortController();
abortControllerRef.current = new AbortController();
const signal = abortControllerRef.current.signal;
const { queryToSend, shouldProceed } = await prepareQueryForGemini(