[Bug]: generate_image send:// outbound is only delivered on Feishu
Issue Origin
Inferred by an AI agent and not observed or reproduced
Bug Description
generate_image writes the file under the bot data images/ directory and publishes an OutboundMessage whose content is send://<filename> (send_to_user defaults to true). Feishu parses send:// via BaseChannel._parse_data_uri and uploads the image. Telegram, Discord, and Slack do not.
Steps to Reproduce
- Enable the Telegram, Discord, or Slack channel on VikingBot.
- Ask the agent to generate an image.
- Watch the same chat for the reply.
Expected Behavior
The generated image is posted as an image on the channel the user spoke on.
Actual Behavior
- Telegram:
extract_image_pathstreatssend://uuid.pngas a local path (Path(...).suffix == .png).read_image_filefails. The originalsend://...string is then sent as text. - Discord:
send()POSTs JSON{content: msg.content}only.extract_image_pathsis imported and unused. - Slack:
chat_postMessage(text=msg.content)only. - The tool still returns "(已发送给用户)".
Feishu _extract_and_upload_images is the working consumer of the same protocol.
OpenViking Version
origin/main @ a8380147a
Python Version
3.10+
Operating System
macOS
Additional Context
Inferred from bot/vikingbot/agent/tools/image.py, channels/base.py _parse_data_uri, channels/feishu.py, channels/telegram.py, channels/discord.py, channels/slack.py. Not reproduced against live Telegram/Discord/Slack.
I am willing to contribute. Proposed fix: shared helper on BaseChannel that uses existing _parse_data_uri to turn send:// into bytes; Telegram send_photo, Discord multipart attachments, Slack files_upload_v2. Do not teach extract_image_paths to parse send://. Leave Feishu, QQ, WhatsApp, DingTalk unchanged.
Proposed fix in https://github.com/volcengine/OpenViking/pull/4660 — shared _extract_send_images on BaseChannel; Telegram send_photo, Discord attachments, Slack files_upload_v2.