diff --git a/docs/specs/mouse-and-clipboard.md b/docs/specs/mouse-and-clipboard.md index a1958d4f..ebb2b58e 100644 --- a/docs/specs/mouse-and-clipboard.md +++ b/docs/specs/mouse-and-clipboard.md @@ -267,7 +267,7 @@ Paste reads the clipboard in three tiers, falling through in order: 2. **Plain text.** `navigator.clipboard.readText()`. If non-empty, the string is written to the PTY (with bracketed-paste wrapping when enabled by the inside program). 3. **Raw image data.** If neither of the above matches and the clipboard holds image bytes (e.g. a `Cmd+Shift+4` screenshot), the bytes are written to a newly-created private temp directory as `.png` and that single path is pasted as in tier 1. On Unix-like systems the temp directory is owner-only and the image file is written owner-readable/writable to avoid exposing clipboard screenshots to other local users. -Each tier is implemented by a shared Node module (`standalone/sidecar/clipboard-ops.js`) that shells out to the OS-native clipboard tool: `osascript` on macOS, `Get-Clipboard` on Windows, `wl-paste`/`xclip` on Linux. The Tauri build reaches it through the existing sidecar; the VSCode build calls into the same module from its extension host. If every tier comes back empty, paste is a silent no-op. +Each tier is implemented by one of two backends. The **VSCode build** (all platforms) and the **standalone/Tauri build on macOS and Linux** use a shared Node module (`standalone/sidecar/clipboard-ops.js`) that shells out to the OS-native clipboard tool: `osascript` on macOS, `Get-Clipboard` on Windows, `wl-paste`/`xclip` on Linux โ€” reached through the sidecar (Tauri) or the extension host (VSCode). The **standalone/Tauri build on Windows** instead reads the Win32 clipboard directly in Rust (`standalone/src-tauri/src/clipboard_win.rs`: `CF_HDROP` for file paths, `CF_UNICODETEXT` for text, `CF_DIB` for an image saved as a `.bmp` temp file โ€” note the extension differs from the sidecar path's `.png`), because the sidecar's `Get-Clipboard` spawns a `powershell.exe` child that pops a console window on the windowless GUI process โ€” several per paste. If every tier comes back empty, paste is a silent no-op. Content-aware transformations, paste history, credential warnings, and middle-click (X11 PRIMARY) paste remain out of scope (see ยง9).