Skip to content

Comments

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

Merged
penso merged 1 commit intomainfrom
maximilize/feat/send-image-tool
Feb 23, 2026
Merged

feat(tools): add send_image tool for channel image delivery#224
penso merged 1 commit intomainfrom
maximilize/feat/send-image-tool

Conversation

@penso
Copy link
Collaborator

@penso penso commented Feb 23, 2026

Summary

  • Adds a send_image tool that lets the LLM agent send local image files (PNG, JPEG, GIF, WebP) to the current conversation's channel (e.g. Telegram)
  • Threads an optional caption parameter through to send_screenshot_to_channels
  • Fixes hardcoded image/png MIME type — now parses the actual MIME from the data URI, supporting all image formats

Validation

Completed

  • cargo check compiles
  • Unit tests cover: MIME lookup, missing/invalid params, unsupported extensions, directory rejection, oversized files, valid encoding with and without caption

Remaining

  • just release-preflight
  • cargo test
  • Manual QA: send an image via Telegram channel and verify it arrives with correct format and caption

Manual QA

  1. Start gateway with a Telegram channel configured
  2. Ask the agent to send an image file (e.g. a chart or screenshot)
  3. Verify the image arrives in Telegram with correct format
  4. Verify caption appears when provided

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.
@codspeed-hq
Copy link
Contributor

codspeed-hq bot commented Feb 23, 2026

Merging this PR will improve performance by 52.06%

⚡ 1 improved benchmark
✅ 38 untouched benchmarks
⏩ 5 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
env_substitution 18.4 µs 12.1 µs +52.06%

Comparing maximilize/feat/send-image-tool (4a87448) with main (58b3148)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@penso penso merged commit efcaa0c into main Feb 23, 2026
24 checks passed
@penso penso deleted the maximilize/feat/send-image-tool branch February 23, 2026 16:53
@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/chat/src/lib.rs 0.00% 22 Missing ⚠️
crates/gateway/src/server.rs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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