diff --git a/monitor.py b/monitor.py index a6b0066..173c3c4 100644 --- a/monitor.py +++ b/monitor.py @@ -679,7 +679,7 @@ class MessageMonitor: # 退回 c9acd7e 裁剪: 25% 覆盖消息面板两侧(对方+自己消息都可见) # 右边界 78% 排除群成员侧栏(~80%+), md 过滤负责拦截 bot 的 md 格式回复 cap_left = int(left + win_w * 0.25) - cap_top = top + max(40, int(win_h * 0.04)) # 标题栏下方 + cap_top = top + max(80, int(win_h * 0.06)) # 跳过标题栏+群名头栏 cap_right = int(left + win_w * 0.78) # 跳过右栏群成员列表(~80%+) 和滚动条 cap_bottom = bottom - max(100, int(win_h * 0.10)) # 输入框上方 if cap_right <= cap_left or cap_bottom <= cap_top: @@ -790,6 +790,11 @@ class MessageMonitor: if re.search(r'群成员|索群成员|搜索成员', line): logger.debug(f"[qq] OCR 过滤: 群成员侧栏 line={line[:60]!r}") continue + # 聊天面板顶部群名头栏:群名(角色〕/ 【群名】/ 群名[标签] + # 特有签名:使用 `〕` `」` `】` 等非日常聊天中出现的闭合括号 + if re.match(r'^[^)】〕」]{2,40}[(【〔「][^)】〕」]{1,15}[)】〕」]', line): + logger.debug(f"[qq] OCR 过滤: 群名头栏 line={line[:60]!r}") + continue # 纯中文短文本(1 字符)— UI 噪声碎片 if re.match(r'^[一-鿿]{1}$', line): continue