Copying an assistant response out of the TUI to paste elsewhere is painful: terminal selection drags in glamour styling (ANSI codes, box-drawing, wrapped/indented lines), so the pasted text is mangled. The clean source already exists — the transcript stores each assistant item's raw markdown in transcriptItem.Text, separate from the glamour-rendered transcriptItem.Rendered (cmd/glue/tui/transcript.go:38-42, finalized in handleTurnDone at cmd/glue/tui/tui.go:1206-1211). We just need to plumb that raw text to the clipboard.
Plan:
/copy [N] slash command — copies the most recent assistant reply's raw markdown, or reply N (1-based over assistant turns) when an argument is given. Added to slashSpecs() so it shows in /help and the / picker.
Ctrl+Y keybinding — copies the most recent assistant reply instantly, no typing.
- Delivery via OSC 52 (
github.com/aymanbagabas/go-osc52/v2, already an indirect dep → promote to direct). Works locally and over SSH with no external binary, unlike atotto/clipboard. Sequence is written to the tty so it doesn't fight bubbletea's alt-screen stdout renderer.
- A
· copied reply N (1234 chars) to clipboard system line confirms; friendly messages when there's no assistant reply yet or N is out of range.
Pointers: cmd/glue/tui/tui.go:657 (handleInputKey, add Ctrl+Y near the Ctrl+C block), :945 (handleSlash dispatch), cmd/glue/tui/commands.go:56 (slashSpecs).
Copying an assistant response out of the TUI to paste elsewhere is painful: terminal selection drags in glamour styling (ANSI codes, box-drawing, wrapped/indented lines), so the pasted text is mangled. The clean source already exists — the transcript stores each assistant item's raw markdown in
transcriptItem.Text, separate from the glamour-renderedtranscriptItem.Rendered(cmd/glue/tui/transcript.go:38-42, finalized inhandleTurnDoneatcmd/glue/tui/tui.go:1206-1211). We just need to plumb that raw text to the clipboard.Plan:
/copy [N]slash command — copies the most recent assistant reply's raw markdown, or reply N (1-based over assistant turns) when an argument is given. Added toslashSpecs()so it shows in/helpand the/picker.Ctrl+Ykeybinding — copies the most recent assistant reply instantly, no typing.github.com/aymanbagabas/go-osc52/v2, already an indirect dep → promote to direct). Works locally and over SSH with no external binary, unlikeatotto/clipboard. Sequence is written to the tty so it doesn't fight bubbletea's alt-screen stdout renderer.· copied reply N (1234 chars) to clipboardsystem line confirms; friendly messages when there's no assistant reply yet or N is out of range.Pointers:
cmd/glue/tui/tui.go:657(handleInputKey, add Ctrl+Y near the Ctrl+C block),:945(handleSlashdispatch),cmd/glue/tui/commands.go:56(slashSpecs).