anthropics / anthropics/claude-code

Channels: allow an image param on notifications/claude/channel

Đang mở
#93,361 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:plugins enhancement
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

## Request

`notifications/claude/channel` takes `params: { content: string, meta?: Record }`. A channel plugin that bridges a chat network (Telegram in our case) receives photos with captions, but can only deliver the caption as text; the model then has to call a tool to fetch the file and a second one to read it.

Precedent already in the binary: `notifications/message` (Chrome extension) accepts `params.image: { type: "base64", media_type: image/jpeg|png|gif|webp, data }`. The same optional field on `notifications/claude/channel` would let a channel deliver a photo as a real image block in the same turn as its caption.

## Why it matters

Chat channels are image-heavy (screenshots, photos of whiteboards, receipts). Today every image costs two extra tool calls and a round trip before the model can see it. Channel prompts are also enqueued with `skipAttachments: true`, so an `@path` mention in `content` is not expanded either, which is fine for trust reasons but leaves no path to a native image block.

## Proposal

- `params.image?: { type: "base64", media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp", data: string }` (or `images?: [...]`), rendered as an image block after the `` text.
- Apply the existing image size limits; ignore or reject unsupported types.
- Document it on the channels reference page next to `content` and `meta`.

Version: Claude Code 2.1.267 (Bun single-file build on Linux).

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start by reading the existing notifications/message image handling and the notifications/claude/channel parameter path, then inspect the channels reference page. Done means channel prompts can carry the supported base64 image types alongside content, existing size limits apply, unsupported types are handled, and the reference documents the field.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
api, documentation
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
64/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.