From e9556438da6a35039c27fad2b334f95c4c69a04d Mon Sep 17 00:00:00 2001 From: Kailigithub Date: Mon, 1 Jun 2026 03:12:03 +0800 Subject: [PATCH] fix(wechat): check abort flag in streaming loop to honor /stop command --- frontends/wechatapp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontends/wechatapp.py b/frontends/wechatapp.py index aff57bf16..f07cd1862 100644 --- a/frontends/wechatapp.py +++ b/frontends/wechatapp.py @@ -371,7 +371,9 @@ def _send(show): try: done = []; turn = 1 while True: - item = dq.get(timeout=300) + if _task_aborted.get(uid): break + try: item = dq.get(timeout=300) + except queue.Empty: continue if 'done' in item: break if item.get('turn', turn) > turn: outputs = item.get('outputs', [])