fix(weixin): accept voice transcription text#1864
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e9e73afc3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const conversationId = msg.from_user_id ?? ''; | ||
| const text = textItem?.text_item?.text ?? ''; | ||
| const text = [textItem?.text_item?.text?.trim(), ...voiceTextItems.map((item) => item.voice_item?.text?.trim())] |
There was a problem hiding this comment.
Do not trim inbound message text before dispatch
This change now calls .trim() on the regular text_item.text before sending it to agent.chat, which is a behavior regression for all existing text messages (even when no voice item is present). Leading/trailing spaces and newlines are user input and may be meaningful (e.g., formatting, prompts, or command-like content), so stripping them can change intent compared with previous behavior where text was forwarded verbatim.
Useful? React with 👍 / 👎.
Code Review:fix(weixin): accept voice transcription text (#1864)变更概述本 PR 为微信频道( 方案评估结论:✅ 方案合理 方案直接在现有消息处理管道内扩展,增加 问题清单✅ 未发现任何问题,代码质量良好。 汇总无问题。 结论✅ 批准合并 — 无阻塞性问题。逻辑正确,测试覆盖充分,codecov 确认所有改动行均有覆盖,方案与项目现有架构一致。 CONCLUSION: APPROVED 本报告由本地 |
|
✅ 已自动 review,无阻塞性问题,正在触发自动合并。 |
Summary
Testing