fix tool cancellation while executing (#575)
This commit is contained in:
parent
c1395a8808
commit
0d5f7686d7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue