fix: bug when cancelling tasks, tool call message subkind

This commit is contained in:
Shivering Ocelot committed 2026-09-20 17:29:50 -05:00
1 parent 248146056a
commit 7e68348368
2 files changed
+7 -3

No files matched your search

+4 -1
View File
@@ -148,7 +148,7 @@ class Agent:
thread_id=message.thread_id,
content=stream,
kind="log",
subkind="reasoning",
subkind="tool-call",
)
run.emit_event('chat-message', {
'messageId': new_message['id'],
@@ -220,7 +220,10 @@ class AgentRun:
self.reasoning = None
# Cancellation tracking
# You should use 'cancelled', task and thread are for
# external tasks that cannot be cancelled reliably
self.task = None # For asyncio tasks
self.thread = None
self.cancelled = False
app.tmp.runs[self.id] = self