add file/image paste to the Claude composer via native clipboard
Flutter's clipboard is text-only and tmux/send-keys carry text only, so a pasted file or image must reach Claude as an @path reference (per the T-134 spike). A native clide/clipboard MethodChannel reads the non-text clipboard: GTK (gtk_clipboard_wait_for_image/uris) on Linux, NSPasteboard on macOS. The composer overrides PasteTextIntent — Ctrl/Cmd+V resolves a file path or writes a clipboard image to a cache dir, inserts the @path, and falls back to plain-text paste otherwise. No new package dependency. macOS handler is written but unverified on this Linux box — needs a build on a Mac. Linux path builds and is covered by tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,10 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit.
|
||||
conversation and press Enter to send (Shift+Enter for a newline);
|
||||
input reaches Claude over `pane.write`. Multi-line text is sent as a
|
||||
bracketed paste so it submits as one message.
|
||||
- File and image paste in the composer (T-138) — Ctrl/Cmd+V of a copied
|
||||
file or a clipboard image inserts an `@path` reference (images are
|
||||
saved to a cache dir first); plain text pastes inline. Backed by a
|
||||
native `clide/clipboard` channel (GTK + macOS).
|
||||
- Claude pane renders natively from the transcript (T-137, D-75) — the
|
||||
conversation shows as native cards (user / assistant markdown /
|
||||
thinking / tool-use / result) instead of a terminal, with text
|
||||
|
||||
Reference in New Issue
Block a user