transcript

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package transcript is the full-screen pager over the conversation (cockpit-research.md rule 6.2). It is pushed onto the app router's stack by ctrl+o and is the replacement for terminal find: the alternate screen hides the session from Cmd-F and tmux copy-mode, so the app must search it itself.

Keys follow less, because less is the muscle memory every terminal user already has. The conversation is a VALUE snapshot of the conversation screen's transcript model: blocks re-render at any width, so the pager re-flows on resize without anyone rebuilding it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Screen

type Screen struct {
	Theme theme.Theme
	Tier  theme.Tier
	// contains filtered or unexported fields
}

Screen is the transcript-mode pager.

func NewPager

func NewPager(t theme.Theme, tier theme.Tier, snapshot conv.Model) Screen

NewPager builds the pager over a conversation snapshot.

func (*Screen) ClearSelection added in v0.1.2

func (s *Screen) ClearSelection()

ClearSelection drops any selection and its highlight.

func (Screen) HasSelection added in v0.1.2

func (s Screen) HasSelection() bool

HasSelection reports whether a selection is active.

func (Screen) Init

func (s Screen) Init() tea.Cmd

func (Screen) SelectedText added in v0.1.2

func (s Screen) SelectedText() string

SelectedText returns the plain stream text between anchor and focus over the visible rows. Pager rows are already plain text; styles are stripped defensively so a future styled row cannot leak sequences into the clipboard.

func (Screen) Selection added in v0.1.2

func (s Screen) Selection() sel.Selection

Selection reports the current selection, including the armed anchor.

func (Screen) SelectionRect added in v0.1.2

func (s Screen) SelectionRect() sel.Rect

SelectionRect returns the pager body's absolute screen rect.

func (*Screen) SelectionRegions added in v0.1.2

func (s *Screen) SelectionRegions() []sel.RegionEntry

SelectionRegions implements sel.RegionsScreen for the router. The handle is a pointer into the live stack entry: deliverTop replaces the slot after each Update, and only that slot's state renders.

func (*Screen) SetSelection added in v0.1.2

func (s *Screen) SetSelection(x sel.Selection)

SetSelection records the live drag selection in viewport-local cells, copying first so the previously published copies keep painting the state they were rendered with.

func (Screen) Update

func (s Screen) Update(msg tea.Msg) (app.Screen, tea.Cmd)

Update handles keys, the wheel, resizes, and the completion messages of the two handover commands.

func (Screen) View

func (s Screen) View() string

View draws the pager: a window of conversation rows with every search match highlighted, and one status line. The status line is search bar and match count while a search is open, and the key hint otherwise.

func (Screen) ViewFlags

func (s Screen) ViewFlags() app.ViewFlags

ViewFlags reports the handover contract: the pager holds the alternate screen except while the conversation is written into native scrollback, where holding it would hide exactly what was written.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL