-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Describe the feature or problem you'd like to solve
When using GitHub Copilot CLI in WSL (Windows Subsystem for Linux), users cannot paste images directly from the Windows clipboard using Ctrl+V or Alt+V. This creates a significant workflow disruption when trying to share screenshots or copied images with Copilot. Current Behavior: - Native Windows Terminal: Image paste works ✓ - WSL environment: Image paste does not work ✗ Environment: - OS: Windows 10/11 with WSL2 - Terminal: Windows Terminal - Shell: Bash/Zsh in WSL
Proposed solution
Implement clipboard image detection for WSL environments similar to other AI CLI tools (Claude Code, OpenAI Codex).
Technical Approach:
WSL can access the Windows clipboard through PowerShell. When a user attempts to paste with Ctrl+V or Alt+V, the CLI should:
- Detect if running in WSL environment
- Check Windows clipboard for image data via PowerShell:
powershell.exe -Command "Get-Clipboard -Format Image"
- If image exists:
- Save to temporary file (e.g.,
/tmp/copilot-clipboard-image-{timestamp}.png) - Attach the image to the conversation
- Display confirmation message
- Save to temporary file (e.g.,
Expected Behavior:
- User takes screenshot in Windows (Win+Shift+S or Win+PrintScreen)
- In WSL terminal, press Ctrl+V or Alt+V in Copilot CLI
- Image is automatically detected, saved, and attached
- User can continue conversation with the image context
Benefits:
- Seamless workflow for WSL users
- Consistent experience across Windows native and WSL
- No need to manually save and reference screenshot files
Example prompts or workflows
Typical User Workflow:
- User is debugging code in WSL terminal with Copilot CLI
- Encounters an error message displayed on screen
- Takes screenshot using Win+Shift+S
- Returns to terminal and presses Ctrl+V or Alt+V
- Screenshot is automatically attached and user asks: "What's causing this error?"
Another Use Case:
- User has UI mockup or diagram on Windows desktop
- Copies image to clipboard (right-click → Copy)
- In WSL Copilot CLI, presses Alt+V
- Asks: "Generate React components matching this design"
Additional context
Related Issues:
- Similar functionality already implemented in Issue Feature request: Hit
Alt+Vto paste image from Clipboard #476 for Windows native terminal - Issue Support drag/drop and copy paste of images into CLI #363 discusses drag/drop and clipboard paste support (this extends it to WSL)
Reference Implementations:
- Claude Code has a similar feature request in issue [BUG] Bug/Feature: Clipboard image paste not working in WSL anthropics/claude-code#13738 (not yet implemented)
- OpenAI Codex has already implemented WSL clipboard support using Ctrl+Alt+V
Technical Notes:
- PowerShell bridge is already available in WSL by default
- No additional dependencies required for users
- Works with both WSL1 and WSL2
- Compatible with all major Windows versions (10/11)
Impact:
Many developers use WSL as their primary development environment. This feature would significantly improve their workflow when working with visual debugging, UI development, or sharing screenshots of errors/configurations.