From 6c22b0de5d000e77c5218933c6678be41cd6ea6a Mon Sep 17 00:00:00 2001 From: youpaishidifu Date: Sun, 26 Jul 2026 12:37:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DOCR=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E8=BF=87=E5=AE=BD=E8=BF=87=E6=BB=A4=E5=AF=BC=E8=87=B4=E7=9C=9F?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E8=A2=AB=E4=B8=A2=E5=BC=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 纯中文1-15字符正则(第637行)→ 改为仅过滤单字符 原正则让"你好""你是谁"等真消息全被跳过 2. _is_system_message中"问题"和"回答"子串匹配 用户说"我有一个问题"也会误杀,删掉,"答:"已够用 --- monitor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/monitor.py b/monitor.py index fed37a0..de73978 100644 --- a/monitor.py +++ b/monitor.py @@ -634,7 +634,9 @@ class MessageMonitor: continue if self._is_system_message(line): continue - if re.match(r'^[一-鿿·A-Za-z0-9_\-]{1,15}$', line): + # ⭐ 纯中文短文本不一定是消息正文——但 1-15 过滤太宽会杀真消息 + # 改为只过滤单字符纯中文,多字符的 UI 噪声由 _is_system_message 处理 + if re.match(r'^[一-鿿]{1}$', line): continue if re.match(r'^\d{1,2}[::\s]\d{2}', line): continue @@ -948,7 +950,7 @@ class MessageMonitor: "🤖", "找不到联系人", "当前会话回复", "自动回复触发", "匹配度", # KB 文档内容格式(机器人回复内容特征) - "答:", "问题", "回答", + "答:", # 纯系统命令反馈 "PS ", "❯ ", "$ ", ]