From 8480fb35e1286f7e0a46bdb289279b54ae60c7eb 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', [])