Skip to content

feat(cli): image pasting support via Ctrl+V and /paste command#2823

Open
Stranmor wants to merge 1 commit intoantinomyhq:mainfrom
Stranmor:pr/image-pasting
Open

feat(cli): image pasting support via Ctrl+V and /paste command#2823
Stranmor wants to merge 1 commit intoantinomyhq:mainfrom
Stranmor:pr/image-pasting

Conversation

@Stranmor
Copy link
Copy Markdown

@Stranmor Stranmor commented Apr 3, 2026

Closes #2811

This PR adds support for inserting images directly into the chat prompt from the clipboard.

Features

  • Binds Ctrl+V in the prompt to read an image from the clipboard.
  • Adds /paste slash command as an alternative way to paste images.
  • Images are saved as PNG in ~/.local/share/forge/images and inserted as @[/path/to/image.png].
  • Implements a robust clipboard fetching fallback:
    1. Tries native Wayland/X11 tools (wl-paste, xclip) for accurate pixel extraction.
    2. Falls back to arboard if native tools aren't present.
    3. Checks if the clipboard contains file URIs (file://...) or absolute paths if the user copied image files directly from a file manager.

@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Apr 3, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 3, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Passing images from clipboard to the agent

2 participants