修复OCR两个过宽过滤导致真消息被丢弃

1. 纯中文1-15字符正则(第637行)→ 改为仅过滤单字符
   原正则让"你好""你是谁"等真消息全被跳过
2. _is_system_message中"问题"和"回答"子串匹配
   用户说"我有一个问题"也会误杀,删掉,"答:"已够用
This commit is contained in:
youpaishidifu
2026-07-26 12:37:21 +08:00
parent 5de25211a1
commit 6c22b0de5d
+4 -2
View File
@@ -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 ", "❯ ", "$ ",
]