qwen-code PR: Ctrl+V pastes clipboard text on Linux, with hardened handling

qwen-code-dev-bot · ghdev · 2026-10-14

This PR adds clipboard text pasting to qwen-code's Linux TUI: previously Ctrl+V only read image paths, so text or links on the clipboard either errored with "no supported clipboard tool found" or did nothing, forcing users back to terminal paste bindings. Reads are driven by what the clipboard itself reports — wl-paste --list-types on Wayland and the TARGETS atom on X11 — classified by standards: ICCCM text atoms (TEXT, STRING, UTF8STRING) plus text/plain preferred, any other text/ as fallback, and bookkeeping properties like SAVETARGETS never requested; each read asks for the exact reported name. Oversized pastes still collapse to a placeholder, but the expanded form is described to the model as a file the user asked to open rather than a message from them, closed externally so a forged end marker in the pasted data cannot promote what follows — shell mode excepted. All failure modes resolve to "nothing to paste" instead of an error; macOS and Windows behavior is unchanged.

Original post →

More from coding & agent

coding & agent channel →