MoonshotAI / MoonshotAI/kimi-cli
VS Code Integrated Terminal: Ctrl+V paste image does nothing (Windows)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
Bug Description
In VS Code's integrated terminal on Windows, pressing Ctrl+V (or right-click Paste) after copying an image to the clipboard has no effect — no placeholder is inserted, no error is shown, and the input remains empty.
This makes it impossible to paste images into Kimi Code CLI when running inside VS Code Terminal, which is a very common workflow for developers.
Steps to Reproduce
- Open VS Code on Windows.
- Open integrated terminal (`Ctrl+``).
- Run
kimito start Kimi Code CLI. - Copy any image to clipboard (e.g., from Snipping Tool, browser, or file explorer).
- Press
Ctrl+Vin the Kimi CLI input box. - Expected: An
[image:xxx.png,WxH]placeholder appears in the input box. - Actual: Nothing happens. No placeholder, no text, no error message.
Environment
- OS: Windows 10/11
- Kimi CLI version: 1.44.0
- Terminal: VS Code Integrated Terminal
- Shell: PowerShell (with conda base env)
Root Cause Analysis (from source code inspection)
I inspected kimi_cli/ui/shell/prompt.py and kimi_cli/utils/clipboard.py:
prompt.pybindsc-vto_try_paste_media()->grab_media_from_clipboard().- On Windows,
grab_media_from_clipboard()usesPIL.ImageGrab.grabclipboard(). - However, VS Code's integrated terminal intercepts
Ctrl+Vat the terminal emulator level and only supports text paste. Binary/image clipboard data is silently dropped and never reaches the Kimi CLI keybinding handler.
So the c-v shortcut in prompt_toolkit is effectively shadowed by VS Code Terminal's own paste behavior for non-text content.
Workarounds Tried
Ctrl+Vwith image data: ❌ No reaction- Right-click → Paste: ❌ No reaction
Ctrl+Oexternal editor (VS Code): ❌ External editor opens a temp text file; binary image data cannot be embedded, so saving does not transfer the image back to Kimi CLI.
Suggested Solutions
- Document this limitation in the FAQ or IDE guide, since VS Code Terminal is an extremely common environment.
- Consider a slash command like
/attach <path>or drag-and-drop support for file paths as an alternative when running in terminals that cannot handle image paste. - Enhance
@autocompletion to make it more discoverable that users can reference image files in the working directory as a substitute for clipboard paste.
Related
- Documentation mentions
Ctrl+Vsupports images: https://moonshotai.github.io/kimi-cli/zh/reference/keyboard.md - FAQ mentions "Current model does not support image input" but does not cover terminal emulator limitations.
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 by reviewing the Ctrl+V behavior in kimi_cli/ui/shell/prompt.py and kimi_cli/utils/clipboard.py, then compare it with the keyboard reference and FAQ. Done means documenting the Windows VS Code Terminal limitation and an available workaround without implying that image paste works there.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100