feat(tui-go): transcript message-jump + OSC52 copy
ctrl+↑/↓ jumps between your sent (user) messages in the transcript: ctrl+↑ from the bottom selects the most recent, steps to older ones (clamping); ctrl+↓ steps back and drops to tail-follow past the last. The selected message is highlighted and scrolled into view (routerRows tracks per-message row offsets and windows to the selection). `y` yanks the selected message — or the latest turn when none is selected — to the system clipboard over OSC52 (go-osc52, tmux-wrapped under $TMUX), which is SSH/Termius- safe unlike a mouse drag. A brief "✓ copied" footer note animates out (and self-stops the tick). esc drops the selection; switching sessions clears it. Tests cover the user-message jump/clamp/tail and the copy-text selection. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -241,6 +241,11 @@ type Model struct {
|
||||
routerMessages map[string][]RouterEntry
|
||||
routerConnected bool
|
||||
chatMode string
|
||||
// transcriptSel is the index (into the selected session's transcript) of the message
|
||||
// the operator has navigated to with ctrl+↑/↓; -1 = no selection (tail-follow). A
|
||||
// selected message is highlighted, scrolled into view, and is what `y` copies.
|
||||
transcriptSel int
|
||||
copiedFlash int // frame at which a copy happened, for a brief "copied" footer note
|
||||
|
||||
// provider
|
||||
currentModel string
|
||||
@@ -353,6 +358,7 @@ func NewModel(client *ws.Client) Model {
|
||||
providerType: "LOCAL",
|
||||
snapshotPhase: true,
|
||||
eventStripShown: true,
|
||||
transcriptSel: -1,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user