MoonshotAI / MoonshotAI/kimi-code

kimi cli cant paste img

Open
#3,744 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

What version of Kimi Code is running?

0.42.0

What platform is your computer?

Windows 10 + WSL (WSL 2.6.3, Debian), running Kimi Code inside Windows Terminal.

What issue are you seeing?

Clipboard image paste does not work in WSL: after Win+Shift+S, pressing Ctrl+V attaches nothing and no "image in clipboard" hint appears. This is the same symptom as #2722, but on 0.42.0 which should include the #2735 fix.

Diagnostics
  1. Ctrl+V reaches the WSL process correctly: raw-mode stdin read returns b'\x16' (16).
  2. powershell.exe invoked from WSL reads the Windows clipboard image successfully (System.Windows.Forms.Clipboard.GetImage() returns a bitmap).
  3. wl-paste --list-types after a screenshot shows ONLY image/bmp — WSLg exposes no image/png.
  4. WSLg is present and healthy: WAYLAND_DISPLAY=wayland-0, /mnt/wslg mounted.
Expected behavior

Since WSLg only offers image/bmp, the PowerShell fallback added in #2735 should kick in and attach the clipboard image. It does not — the paste silently falls back to nothing. Suspect the clipboard detection path doesn't recognize image/bmp as an image type, so the fallback is never triggered.

Workaround

Saving the clipboard image via PowerShell to a PNG file, then either @-referencing the file or wl-copy -t image/png < file.png, works fine.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the clipboard detection and image-paste handling paths, reproducing the issue with wl-paste --list-types in WSLg and confirming the PowerShell fallback can read the bitmap. Check whether image/bmp is recognized as an image type; done means Ctrl+V attaches the clipboard image when WSLg exposes only image/bmp.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.