Skip to content

Comments

feat(tools): add send_image tool for channel image delivery#215

Closed
maximilize wants to merge 1 commit intomoltis-org:mainfrom
maximilize:feat/send-image-tool
Closed

feat(tools): add send_image tool for channel image delivery#215
maximilize wants to merge 1 commit intomoltis-org:mainfrom
maximilize:feat/send-image-tool

Conversation

@maximilize
Copy link
Contributor

Summary

  • Add send_image tool that lets skills send local image files (PNG, JPEG, GIF, WebP) to channel targets like Telegram
  • Reuses the existing screenshot pipeline — returns a data: URI in the screenshot key, which the chat runner picks up automatically
  • Supports optional caption parameter sent as the media message text
  • 20 MB file size guard (Telegram limit)
  • Fix send_screenshot_to_channels to parse actual MIME type from the data URI instead of hardcoding image/png

Validation

Completed

  • cargo check passes
  • cargo test — all tests pass (7 new unit tests for SendImageTool)
  • cargo +nightly-2025-11-30 fmt --all -- --check passes
  • cargo +nightly-2025-11-30 clippy --workspace --all-targets -- -D warnings passes

Remaining

  • ./scripts/local-validate.sh (requires CI environment)

Manual QA

  1. Create a skill that saves an image to /tmp/test.png
  2. Call send_image with path: "/tmp/test.png"
  3. Verify Telegram receives the image
  4. Repeat with .jpg, .gif, .webp to confirm MIME handling
  5. Test with caption parameter — verify caption appears in Telegram
  6. Test with file > 20 MB — verify rejection
  7. Test with unsupported extension (.bmp) — verify rejection

Lets skills send local image files (PNG, JPEG, GIF, WebP) to channel
targets like Telegram. Reuses the existing screenshot pipeline with
MIME-aware encoding and optional captions.

Also fixes send_screenshot_to_channels to parse the actual MIME type
from the data URI instead of hardcoding image/png.
@penso
Copy link
Collaborator

penso commented Feb 23, 2026

Thanks, rewrote because of conflicts in #224

@penso penso closed this Feb 23, 2026
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.

2 participants