fix: preserve quote context (ref_msg) for voice messages#49
Open
gaoyangz77 wants to merge 1 commit intoTencent:mainfrom
Open
fix: preserve quote context (ref_msg) for voice messages#49gaoyangz77 wants to merge 1 commit intoTencent:mainfrom
gaoyangz77 wants to merge 1 commit intoTencent:mainfrom
Conversation
Voice messages with STT text that quote/reply to a previous message now include the quoted context, matching the existing TEXT behavior. Previously bodyFromItemList only checked ref_msg for TEXT items, returning voice_item.text directly and dropping the quote. Extract shared ref_msg handling into applyRefMsg helper used by both paths. Closes Tencent#48
Author
|
Friendly ping / 轻轻 bump 一下~ 这个 PR 修复了语音消息引用时上下文不正确的问题,能让引用内容更准确,减少聊天场景里的理解偏差;同时也 closes #48。 This PR fixes the incorrect context used in voice message quoting, which should make quoted voice replies more accurate and reduce confusion in chat flows; it also closes #48. CI is already passing, so it should be ready for review when convenient. Thanks! |
Author
|
Gentle ping / 再轻轻 bump 一下~ This PR is still ready for review when convenient. CI has been passing, and the change is scoped to fixing quote context ( 有空的时候麻烦帮看一下,感谢! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ref_msghandling from the TEXT branch ofbodyFromItemListinto a reusableapplyRefMsghelperPreviously, when a user sent a voice message quoting a previous message, the agent only received the STT transcription with no indication of the quoted message. Now the output matches the TEXT behavior:
[引用: <quoted content>]\n<voice text>.Closes #48
Changes
src/messaging/inbound.tsBefore:
After:
Test plan
[引用: ...]prefix