feat(Yuanbao): support wechat forward msg#43508
Merged
Merged
Conversation
tonydwb
approved these changes
Jun 10, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Overview
Feature PR adding WeChat forward message support to the Yuanbao platform adapter.
Looks Good
- Clean platform extension with proper type hints throughout
- Uses standard library modules appropriately (base64, binascii, enum)
- Well-structured with dedicated decode_forward_msg_data helper
- Adds cache_video_from_bytes for media handling
- Test coverage present (test_yuanbao_pipeline.py)
- No hardcoded secrets or security concerns
Reviewed by Hermes Agent
Collaborator
|
Reviewed by Hermes Agent — deferred to maintainer for product sign-off. Feature PRs ( Hermes Agent triage |
AIalliAI
added a commit
to AIalliAI/Hermes
that referenced
this pull request
Jun 12, 2026
Brings in NousResearch#44776 (/credits command), NousResearch#44778 (Teams DOCUMENT attachments), NousResearch#43508 (Yuanbao wechat forward msg), NousResearch#44792 (profile-scope Channels endpoints + per-profile .env seeding).
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.
What
End-to-end support for WeChat forwarded chat records ("聊天记录" cards) on the Yuanbao adapter. Previously these messages were dropped.
The forward payload arrives as a
TIMCustomElemwithelem_type=1009, carrying a base64-encodedForwardMsgDataprotobuf inMsgContent.ext_map.Changes
yuanbao_proto.py: hand-written protobuf codec forForwardMsgData(no new deps).yuanbao.py: newForwardedRecordsParseMiddlewarein the inbound pipeline — flattens forwards into a text prompt and resolves embedded images / files / videos into the existing media-cache placeholder scheme. Addsvideoto resolvable media kinds. Non-@bot group turns get an eager forward summary written to the transcript at observe time.tests/test_yuanbao_pipeline.py: covers the new middleware.Diff: 3 files, +540 / -40.
Design
QuoteContextMiddlewareandMediaResolveMiddleware, so injected media references reuse the existing resolver — no duplicate download path.YuanbaoMessageType.CHAT_RECORDis coerced back toMessageType.TEXTat dispatch, keeping the public adapter contract unchanged.ctx.raw_textuntouched (= previous behavior).Test