Skip to content

File drag-and-drop into Pi TUI is interpreted as a slash command #3478

@allcounter

Description

@allcounter

Bug

When dragging a file (e.g. a screenshot from Desktop) into the Pi input field, the file path is interpreted as a slash command:

Error: Unknown command: /Users/name/Desktop/WireView Screenshot 2026-04-03 at 14.53.49.png
Type /help for available commands.

Expected behavior

The file path should either:

  1. Attach the file (image) to the current message, or
  2. Insert the path as plain text in the input field

It should not be parsed as a /command.

Context: this worked in GSD v1

In GSD v1 (Claude Code), drag-and-drop of images into Warp terminal worked — the image was attached to the message. This was a frequently used workflow: take a screenshot on iPhone → WireView mirrors it to Desktop → drag into CC → visual context for the agent.

The main friction was that screenshots are large in context (macOS Retina PNGs). I built a Raycast Script Command (compress-clipboard.raycast.sh) that:

  1. Exports clipboard image
  2. Converts PNG/HEIF → real JPEG (quality 80)
  3. Downscales to max 1568px (Claude API's internal resize limit — anything above is wasted tokens)
  4. Puts compressed JPEG back on clipboard

This gave ~70% filesize reduction and up to 75% token savings. But it only works for clipboard paste, not drag-and-drop. Never fully cracked the drag-and-drop compression pipeline.

Also broken: screenshot to clipboard paste

Copying a screenshot to clipboard on macOS (Cmd+Ctrl+Shift+4) and pasting into Pi with either Cmd+V or Ctrl+V doesn't work — the image is not recognized as an attachment. In GSD v1/Claude Code this worked (after the Raycast compression step).

Bonus feature request: It would be great if Pi could:

  • Accept drag-and-drop files (especially images) as message attachments
  • Accept pasted clipboard images (Cmd+V or Ctrl+V after screenshot-to-clipboard)
  • Optionally auto-compress images before sending (downscale to 1568px, JPEG q80) to save context tokens
  • This was the gsd command is an existing built-in alias for git svn dcommit #1 workflow improvement I wanted in GSD v1 but never fully solved

Repro

  1. Take a screenshot or have any file on Desktop
  2. Drag-and-drop it into the Pi TUI input → Error: Unknown command
  3. Or: Cmd+Ctrl+Shift+4 → select area → Cmd+V or Ctrl+V in Pi → nothing happens

Environment

  • Pi installed via npm (gsd-pi)
  • macOS Sequoia
  • Terminal: Warp
  • Files with paths starting with / trigger the drag-drop issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions