Skip to content

[Feature Request] Support clipboard image paste in WSL from Windows #1217

@jim51

Description

@jim51

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:

  1. Detect if running in WSL environment
  2. Check Windows clipboard for image data via PowerShell:
    powershell.exe -Command "Get-Clipboard -Format Image"
  3. If image exists:
    • Save to temporary file (e.g., /tmp/copilot-clipboard-image-{timestamp}.png)
    • Attach the image to the conversation
    • Display confirmation message

Expected Behavior:

  1. User takes screenshot in Windows (Win+Shift+S or Win+PrintScreen)
  2. In WSL terminal, press Ctrl+V or Alt+V in Copilot CLI
  3. Image is automatically detected, saved, and attached
  4. 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:

  1. User is debugging code in WSL terminal with Copilot CLI
  2. Encounters an error message displayed on screen
  3. Takes screenshot using Win+Shift+S
  4. Returns to terminal and presses Ctrl+V or Alt+V
  5. Screenshot is automatically attached and user asks: "What's causing this error?"

Another Use Case:

  1. User has UI mockup or diagram on Windows desktop
  2. Copies image to clipboard (right-click → Copy)
  3. In WSL Copilot CLI, presses Alt+V
  4. Asks: "Generate React components matching this design"

Additional context

Related Issues:

Reference Implementations:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions