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
kimi to start Kimi Code CLI.
- Copy any image to clipboard (e.g., from Snipping Tool, browser, or file explorer).
- Press
Ctrl+V in 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.py binds c-v to _try_paste_media() -> grab_media_from_clipboard().
- On Windows,
grab_media_from_clipboard() uses PIL.ImageGrab.grabclipboard().
- However, VS Code's integrated terminal intercepts
Ctrl+V at 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+V with image data: ❌ No reaction
- Right-click → Paste: ❌ No reaction
Ctrl+O external 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
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
kimito start Kimi Code CLI.Ctrl+Vin the Kimi CLI input box.[image:xxx.png,WxH]placeholder appears in the input box.Environment
Root Cause Analysis (from source code inspection)
I inspected
kimi_cli/ui/shell/prompt.pyandkimi_cli/utils/clipboard.py:prompt.pybindsc-vto_try_paste_media()->grab_media_from_clipboard().grab_media_from_clipboard()usesPIL.ImageGrab.grabclipboard().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-vshortcut 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 reactionCtrl+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
/attach <path>or drag-and-drop support for file paths as an alternative when running in terminals that cannot handle image paste.@autocompletion to make it more discoverable that users can reference image files in the working directory as a substitute for clipboard paste.Related
Ctrl+Vsupports images: https://moonshotai.github.io/kimi-cli/zh/reference/keyboard.md