MoonshotAI / MoonshotAI/kimi-code
Image paste (Ctrl-V) does not work in Ghostty terminal on macOS
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Description
Image paste via Ctrl-V does not work in Ghostty terminal on macOS. The feature is documented (clipboard-image-hint.ts shows "Image in clipboard — Ctrl+V to paste"), but pressing Ctrl-V after copying an image to the clipboard does nothing.
Additionally, drag-and-drop is not supported in TUI mode, which is expected for a terminal app. However, Claude Code (same Ink-based TUI framework) supports Ctrl-V image paste reliably in the same terminal.
Environment
- kimi-code: 0.31.1
- OS: macOS 15.5 (Darwin 25.5.0, arm64)
- Terminal: Ghostty (xterm-ghostty)
- Model: K3 with
image_incapability enabled
Steps to Reproduce
- Copy an image to clipboard (Cmd-C on a file in Finder, or screenshot with Cmd-Shift-4)
- Switch to kimi-code TUI in Ghostty
- Press Ctrl-V
- Nothing happens — no hint appears, no image is pasted
Expected Behavior
- A hint "Image in clipboard — Ctrl+V to paste" should appear
- Pressing Ctrl-V should attach the image to the next message
- This works correctly in Claude Code with the same terminal setup
Workaround
We implemented a hook-based workaround: user types "看图" (Chinese for "look at image"), the hook extracts the clipboard image via pngpaste/osascript, saves it to a temp file, and injects the path for ReadMediaFile. But this should not be necessary.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with clipboard-image-hint.ts, which documents the expected Ctrl-V behavior, then trace the TUI input path for image clipboard handling on macOS. Reproduce the issue in Ghostty with an image on the clipboard and verify that the hint appears and the image is attached to the next message without the workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100