From 8c801b60aa5caf759c59d64f575cb1998c19f5ab Mon Sep 17 00:00:00 2001 From: hmo Date: Mon, 15 Jun 2026 02:29:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E6=B6=88=E6=81=AF=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=9B=9E=E7=8E=AF=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gateway/scripts/xmpp_bot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gateway/scripts/xmpp_bot.py b/gateway/scripts/xmpp_bot.py index 54fbb7f..132df95 100644 --- a/gateway/scripts/xmpp_bot.py +++ b/gateway/scripts/xmpp_bot.py @@ -541,9 +541,11 @@ def on_group_message(msg): nickname = full_from.split("/")[1] if "/" in full_from else "" bot_nick = JID.split("@")[0] - # Self-message echo from MUC — let through to LLM with prefix - # so LLM can see @mentions and observer protocol applies. + # Self-message echo — skip error loops, let rest through if nickname == bot_nick: + if "模型无响应" in body or "命令循环次数超限" in body: + log(f"(self-msg error, skipped) {body[:60]}") + return log(f"(self-msg to LLM) {body[:80]}") body = f"(自言自语) {body}"