Uh oh!
There was an error while loading. Please reload this page.
fix(opencode): support macOS cmd+v image paste in tui - #22197
fix(opencode): support macOS cmd+v image paste in tui#22197hernandezsanti wants to merge 1 commit into
Conversation
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
rekram1-node
commented
May 15, 2026
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes#22194
Type of change
What does this PR do?
On macOS, clipboard image paste in the TUI only worked reliably through the existing
input_pastepath, socmd+vcould miss image attachments depending on the terminal.This change adds a small
probePaste()helper for macOScmd+v, reuses one clipboard attachment path for both keydown and empty paste events, and avoids double-attaching when the key event and paste event happen back-to-back.It works because image attachment now happens through the same code path whether the terminal reports paste as
ctrl+v,meta/super+v, or an empty paste event.How did you verify your code works?
bun test test/cli/cmd/tui/paste-key.test.tsbun run typecheckcmd+v, and confirmed the image attached in the promptScreenshots / recordings
N/A for this bug fix.
Checklist