mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix tool cancellation while executing (#575)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user