From 945b4d7e9e7cefabb2da730b8f943e4375e3eed3 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 301f10c62..4ceb7e8af 100644 --- a/frontends/wechatapp.py +++ b/frontends/wechatapp.py @@ -393,7 +393,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', [])