Skip to content

feat: add DingTalk media message support (image, file, voice, video)#343

Open
nap-liu wants to merge 1 commit intodataelement:mainfrom
nap-liu:pr/dingtalk-media-support
Open

feat: add DingTalk media message support (image, file, voice, video)#343
nap-liu wants to merge 1 commit intodataelement:mainfrom
nap-liu:pr/dingtalk-media-support

Conversation

@nap-liu
Copy link
Copy Markdown

@nap-liu nap-liu commented Apr 8, 2026

Summary

  • Receive: download images/files/audio/video via DingTalk downloadCode API, save to workspace
  • Vision: encode images as base64, inject into LLM context with [image_data:] markers
  • Rich text: parse richText messages with inline images
  • Send back: _upload_dingtalk_media() + _send_dingtalk_media_message() for agent-initiated media
  • Thinking reaction: visual indicator while processing (add on receive, recall after reply)
  • History: rehydrate_image_messages() re-injects images from disk for multi-turn context
  • Channel file sender: ContextVar integration for agent tools to send files via DingTalk

Test plan

  • DingTalk E2E: image received → downloaded → saved → rehydrated in history
  • Thinking reaction: added on message, recalled after reply (confirmed in logs)
  • Rich text: image extracted and processed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant