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}"