新增功能:
- HermesAccessibilityService 支持广播 extras quoteText / atSender
- quoteText: 在聊天页找文本含此 substring 的 bkl 气泡 → 长按 → 点「引用」
菜单项 → 输入回复文本 → 点发送
- atSender: 在输入框先打「@」触发选人面板 → 找匹配成员点击 → 追加回复
实测路径完整跑通(msgId 1409 验证):
1. 广播触发 A11y service
2. 进入聊天页("already in correct chat" 或经过搜索)
3. findBubbleByPartialText 在 bkl 列表里倒序匹配
4. dispatchGesture 派发 800ms 合成长按手势(ACTION_LONG_CLICK 在 WeChat
GestureDetector 实现上不触发菜单,必须用 gesture 派发)
5. 等 1.2s 后用 findClickableByTextAllWindows 搜「引用」 — 关键:菜单在
popup window 不在 active window,必须遍历 getWindows() 才能找到
6. 点击引用 → 引用 chip 注入到输入框 → 写文本 → 点发送
7. DB 写入的 message 是 type=57 (微信内部引用回复消息类型)
关键依赖(Android AccessibilityService):
- accessibility_service_config.xml 必须设 canPerformGestures="true"
否则 dispatchGesture 不回调 onCompleted
群聊路径:
- auto-reply.js handleMessage 在 replyType=group-at/group-quote 时自动
从触发消息 content 解析 bubbleText 当 quoteText,senderName 当 atSender
- android-wechat-sender.js sendTextMessageBroadcast 接受 options.quoteText
/ options.atSender,拼到 am broadcast --es 参数里
测试覆盖(在 Pixel 实测):
- ✅ 私聊回归:plain text 路径不影响(msgId 1408)
- ✅ 引用回复:私聊场景已验证(msgId 1409 type=57)
- ⏸ 群聊 + @ 群成员:代码已写完,需要真实群消息触发才能测
APK 已重编 + 用 debug.keystore 签 + adb install -r 升级(A11y 权限保留)。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>