The OpenTUI renderer owns mouse input when useMouse is enabled, so terminal
native drag selection cannot reliably copy transcript text. The TUI should use
OpenTUI selection state directly and write selected text to the clipboard when a
selection ends.
Ctrl+C copies the current OpenTUI selection when one exists; otherwise it
starts the TUI exit confirmation. The user must press Ctrl+C again in the
confirmation window to exit.Ctrl+Y copies the current OpenTUI selection without exiting.The TUI package must not call platform clipboard commands directly. It exposes a
TuiWriteClipboardText option and only reports selection copy intent. The CLI
composition layer provides the Node clipboard adapter.
The Node clipboard adapter writes OSC 52 to the TUI stdout when available, then attempts a native platform fallback:
pbcopywl-copy, xclip, then xselSet-ClipboardOSC 52 keeps remote and terminal-integrated clipboard flows working, while the native fallback covers terminals that do not accept OSC 52.