Skip to content

fix: add missing pyperclip dependency#869

Open
longzhang83 wants to merge 2 commits intoMoonshotAI:mainfrom
longzhang83:fix/pyperclip-dependency
Open

fix: add missing pyperclip dependency#869
longzhang83 wants to merge 2 commits intoMoonshotAI:mainfrom
longzhang83:fix/pyperclip-dependency

Conversation

@longzhang83
Copy link

@longzhang83 longzhang83 commented Feb 3, 2026

Bug Description

The clipboard paste functionality (Ctrl+V/Alt+V for pasting images and text) requires pyperclip, but it was not declared in pyproject.toml dependencies.

This causes clipboard operations to fail when the package is not already installed in the user's environment.

Root Cause

In src/kimi_cli/ui/shell/prompt.py:
python from prompt_toolkit.clipboard.pyperclip import PyperclipClipboard

The PyperclipClipboard class from prompt-toolkit requires pyperclip to be installed, but it's an optional dependency.

Fix

Add pyperclip>=1.8.0 to the project dependencies in pyproject.toml.

Testing

  • Verified that clipboard paste works after installing pyperclip
  • Confirmed that is_clipboard_available() returns True with pyperclip installed

Related Issues

This bug causes issues like #867 where users cannot paste images from clipboard.


Open with Devin

…ode)

Add Alt+V as an alternative shortcut for pasting clipboard content,
in addition to the existing Ctrl+V. This provides compatibility with
Claude Code users who are accustomed to using Alt+V for pasting images.

Changes:
- Bind Alt+V (escape+v) to the same paste handler as Ctrl+V
- Update keyboard documentation (zh/en) to reflect the new shortcut
- Update interaction guides to mention both shortcuts
- Update slash command help text

Fixes MoonshotAI#867
The clipboard paste functionality (Ctrl+V/Alt+V for images) requires
pyperclip, but it was not declared in pyproject.toml dependencies.
This caused clipboard operations to fail when the package was not
already installed in the environment.

Fixes the issue where users cannot paste images or text from clipboard.
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional flags.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant