Conversation
Author
|
Any interest for image sending and receiving support? I have found it very useful to send screenshots back to the concierge to show how something looks or how I want it to look. |
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.
Summary
Add image support to the existing Telegram bridge, without a separate service or harness-specific prompt protocol.
$H2_DIR/attachments/<bridge-name>/directory, then deliver the caption and local image path through the existing agent-message route.h2 send <bridge> --image ./image.png [caption], including--closessupport. Image uploads use an optionalbridge.ImageSendercapability; text-only bridges are unchanged.send-imagesocket operation so an older bridge rejects the request instead of silently discarding the image.Safety and scope
Verification
make check— pass (gofmt, go vet, staticcheck).make test— pass.make test-external— pass with inheritedH2_*session variables removed and temporary h2 roots. An initial run inheritedH2_POD=ops, which filtered pod-list fixtures; rerunning in the isolated environment passed.go test -race ./internal/bridge/telegram ./internal/bridgeservice -count=1— pass.make build— pass.New tests cover multipart upload, captionless sends and
--closes, routing, file validation, chat authorization, size/path/redirect errors, error redaction, and socket capability handling. A synthetic-image integration test goes through Bot API polling → local attachment → agent socket → bridge socket → Bot API upload. The HTTP API and agent are test doubles; the Telegram implementation and bridge service are real.The broader CLI race build was stopped while instrumenting the large treesitter Bash grammar to avoid exhausting the development host's memory; the CLI is covered by the normal full and external suites, while the transport packages passed race testing.
Usage and retention/privacy details:
docs/telegram-images.md.