Add cursor-triggered image previews for macOS and Ghostty - #14
Merged
Merged
Conversation
added 8 commits
October 3, 2026 08:30
karanb192
marked this pull request as ready for review
October 3, 2026 05:31
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
image-peekfor macOS: moving the prompt cursor onto a pasted image marker opens a large dark preview pane; moving away hides it. Request up to about 72% of the window width, adjusted for image proportions. Keep an above-prompt fallback in narrow windows./image-peek on|off.Details
The prompt API exposes marker text and cursor position but not draft attachment bytes. Capture therefore happens after detecting a new native image marker. Copying a different image before capture can produce the wrong preview; the README asks users to wait for each preview before copying another image. Simultaneous unseen markers fail closed. This first version supports clipboard image paste, not attachment paths or drag-and-drop.
The plugin starts only local processes and makes no model or network calls. Its README includes the validator footprint, cache permissions and limits, and the five-line threat model.
iTerm2 3.7.3+ and local Herdr 0.9.1+ are experimental routes. Their graphics prerequisites and the
CLAUDE_CODE_FORCE_TERMINAL_IMAGES=1launch override are documented; the mod does not change environment variables, terminal settings or the user's theme. End-to-end image pixels in these terminals have not been visually verified.A user-provided Ghostty screenshot confirms the large image and dark canvas. Claude's theme controls the outer frame; the README explains why Light theme can leave bright strips in a dark terminal, without changing the user's theme. In a controlled 180-column, 48-row CLI probe, the inline layout fitted the same image into 50 by 14 cells, while a 128-column pane fitted it into 126 by 34 cells. The interactive CLI check verified native paste, cursor entry/exit, hot reload and exit cleanup. The landing-page change has not been visually inspected or deployed.
Test plan
claude plugin validate plugins/image-peek --strictclaude plugin validate .claude-plugin/marketplace.jsonclaude plugin test plugins/image-peek: 17 passingsite/index.html; after the normal site deployment, check its Image Peek card and installation command.