feat: parse merged-forward (chat history) messages#159
Open
kyan-du wants to merge 1 commit intothisnick:mainfrom
Open
feat: parse merged-forward (chat history) messages#159kyan-du wants to merge 1 commit intothisnick:mainfrom
kyan-du wants to merge 1 commit intothisnick:mainfrom
Conversation
Parse appmsg subtype 19 (merged forward / chat history) by extracting the XML-escaped <recorditem> content and rendering each <dataitem> as 'sender: message'. Previously only the title was shown, making these messages opaque to agents. Closes thisnick#126
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
Parse appmsg subtype 19 (merged forward / "Combine and Forward" / chat history) messages by extracting the XML-escaped
<recorditem>content and rendering each<dataitem>assender: message.Before: Agents only see the title, e.g.
Chat History of Group X— the actual forwarded messages are invisible.After: Each forwarded message is extracted and rendered:
Changes
packages/agent-server-rust/src/tools/wechat_messages.rs: Add match arm for appmsg subtype 19<recorditem>(<→<, etc.)<dataitem>blocks, extract<sourcename>/<displayname>and<datatitle>/<datadesc>[media]when no text content is available<dataitem>blocks are foundTesting
Tested in production with real merged-forward messages from WeChat group chats containing 100+ messages, mixed media types, and nested forwards. The agent now correctly reads and responds to forwarded conversation content.
Closes #126