fix(agent): address session and streaming concurrency bugs

This commit is contained in:
hamb1y
2026-05-28 22:54:46 +08:00
committed by Xubin Ren
parent 1a4ae8994d
commit 0df60416ba
10 changed files with 250 additions and 39 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ async def cmd_stop(ctx: CommandContext) -> OutboundMessage:
"""Cancel all active tasks and subagents for the session."""
loop = ctx.loop
msg = ctx.msg
total = await loop._cancel_active_tasks(msg.session_key)
total = await loop._cancel_active_tasks(ctx.key)
content = f"Stopped {total} task(s)." if total else "No active task to stop."
return OutboundMessage(
channel=msg.channel, chat_id=msg.chat_id, content=content,