feat(send_message): add Feishu image/media sending support#6421
Open
dreamworld wants to merge 4 commits into
Open
feat(send_message): add Feishu image/media sending support#6421dreamworld wants to merge 4 commits into
dreamworld wants to merge 4 commits into
Conversation
- Pass media_files to _send_feishu() which was previously missing - Add Feishu to supported media platforms alongside Telegram - Only send media with the last chunk to avoid duplicate sends
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Feishu support for sending media attachments via send_message, aligning behavior with Telegram by attaching media only to the final chunk of a chunked message.
Changes:
- Allow Feishu as a media-capable platform and permit media-only sends for Feishu.
- Pass
media_filesthrough to_send_feishu()(only on the last chunk). - Add warning/error gating for media on platforms that don’t support native media sends.
Comments suppressed due to low confidence (1)
tools/send_message_tool.py:375
- The error/warning strings still say media delivery is "only supported for telegram", but this change adds Feishu support too. Update the messages to include Feishu (and ideally derive the platform list from
_media_supported_platformsso it stays accurate).
if media_files and not message.strip():
if platform not in _media_supported_platforms:
return {
"error": (
f"send_message MEDIA delivery is currently only supported for telegram; "
f"target {platform.value} had only media attachments"
)
}
warning = None
if media_files and platform not in _media_supported_platforms:
warning = (
f"MEDIA attachments were omitted for {platform.value}; "
"native send_message media delivery is currently only supported for telegram"
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 3 commits
April 9, 2026 14:21
…dle_send The previous PR added media_files passing to _send_feishu(), but the root cause was that media_files was never read from args in _handle_send(). This fix reads media_files from args and converts string paths to the (path, is_voice) tuple format expected by the sending logic.
…orted_platforms - Update error/warning messages to include Feishu alongside Telegram - Use dynamic platform name derivation to keep messages accurate
1. Use enumerate index instead of chunk comparison to detect last chunk (fixes false positive when duplicate chunks exist) 2. Add unit tests for Feishu media on last chunk and media-only send Copilot review: NousResearch#6421
Author
|
✅ Resolved in commit ba48b08:
Both issues fixed and tests pass. |
Author
Collaborator
1 similar comment
Collaborator
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.
Pass media_files to _send_feishu() which was previously missing, add Feishu to supported media platforms alongside Telegram, and only send media with the last chunk to avoid duplicate sends.