Skip to content

Pasting images not working over TTY/PTY connection 📋 #58

@GordonBeeming

Description

@GordonBeeming

Description

When interacting with copilot_here, we are attached to a Docker container using a Pseudo-Terminal (PTY). Because this connection only understands a stream of text characters, it cannot handle binary image data from the host's clipboard.

⚠️ Technical Details

  • PTY Protocol Limits: The docker attach or docker exec -it commands use a standard TTY connection. This protocol is designed for text input/output and has no native concept of "files" or "images" being sent via a paste command.
  • Clipboard Redirection: Unlike RDP or SSH with X11 forwarding, a standard Docker PTY doesn't redirect the system clipboard. When you hit paste, the terminal tries to send text, but since it's an image, nothing is sent through the pipe.
  • Lack of OSC Support: Some modern terminals use "Operating System Commands" (OSC) sequences to handle files, but these aren't currently supported or wired up through the container wrapper.

Expected Behavior

  1. Copy an image on the host.
  2. Paste into the copilot_here session.
  3. The image is correctly received by the application inside the container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions