Add clipboard image paste support via Alt+V and /paste-image#1525
Add clipboard image paste support via Alt+V and /paste-image#1525PatilSharvil wants to merge 1 commit into
Conversation
401e0e1 to
3634338
Compare
|
Hi @PatilSharvil,Thank you so much for this well-thought-out PR and the detailed documentation! We really appreciate the effort you've put into implementing cross-platform clipboard image paste support. 🙏However, after careful consideration, we've decided not to merge this PR at this time. Here are the reasons: |
Pull Request: Clipboard Image Paste Support
PR Title
PR Description
Problem
Currently, sharing visual content (screenshots, diagrams, error messages) with Qwen Code requires:
@path/to/image.pngsyntax to reference itThis friction discourages users from sharing visual context, reducing the AI's ability to help with UI bugs, error screenshots, and design feedback.
Solution
This PR introduces native clipboard image pasting - a seamless way to share images directly from the system clipboard.
Features
/paste-imagecommandAlt+Vkeyboard shortcut.qwen-clipboard/directoryUser Experience
The image reference is automatically inserted into the input field, ready for the user to add their question.
Implementation Details
Architecture
Files Changed
packages/cli/src/ui/utils/clipboardUtils.tspackages/cli/src/ui/utils/clipboardUtils.test.tspackages/cli/src/ui/commands/pasteImageCommand.ts/paste-imageslash command implementationpackages/cli/src/ui/components/InputPrompt.tsxAlt+Vkeybinding handlerpackages/cli/src/ui/hooks/slashCommandProcessor.tsupdate_inputaction typepackages/cli/src/ui/commands/types.tsupdate_inputactiondocs/clipboard-paste-feature.mdPlatform-Specific Implementation
Windows:
System.Windows.Forms.Clipboard(more reliable thanPresentationCore)-staflag for COM compatibilitySystem.Drawing.ImagingmacOS:
Linux:
xclip,xsel) and Wayland (wl-paste)Testing
Automated
npm run preflightpasses (build, lint, type-check, tests)Manual
Security Considerations
.qwen-clipboard/)Documentation
Full user documentation added at
docs/clipboard-paste-feature.mdincluding:Breaking Changes
None. This is a purely additive feature.
Checklist
Demo