fix: add missing pyperclip dependency#869
Open
longzhang83 wants to merge 2 commits intoMoonshotAI:mainfrom
Open
fix: add missing pyperclip dependency#869longzhang83 wants to merge 2 commits intoMoonshotAI:mainfrom
longzhang83 wants to merge 2 commits intoMoonshotAI:mainfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 PyperclipClipboardThe 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
Related Issues
This bug causes issues like #867 where users cannot paste images from clipboard.