fix tool cancellation while executing (#575)

This commit is contained in:
Olcan 2025-05-27 15:22:30 -07:00 committed by GitHub
parent c1395a8808
commit 0d5f7686d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ export function useToolScheduler(
setAbortController(new AbortController());
setToolCalls((tc) =>
tc.map((c) =>
c.status !== 'error'
c.status !== 'error' && c.status !== 'executing'
? {
...c,
status: 'cancelled',
@ -229,7 +229,7 @@ export function useToolScheduler(
.then((result) => {
if (signal.aborted) {
setToolCalls(
setStatus(callId, 'cancelled', 'Cancelled during execution'),
setStatus(callId, 'cancelled', String(result.llmContent)),
);
return;
}