Documentation
¶
Overview ¶
Package tui is the terminal front end of `ant beta:sessions connect`: a scrolling transcript above a composer, with a status bar on top and key hints below. Events arrive from internal/sessions/live and are folded into transcript nodes by internal/sessions/timeline.
Files: model.go owns state and the bubbletea loop, input.go the keys and the composer/approval strip, transcript.go the scrolling body, chrome.go the fixed rows around it, and markdown.go, format.go and styles.go the helpers they share.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Verbose starts with tool bodies and token usage expanded (Ctrl-O toggles it).
Verbose bool
// ConsoleURL is the session's page in the web Console, shown in the footer.
ConsoleURL string
}
Options configures what the TUI shows.
type Session ¶
type Session interface {
Updates() <-chan live.Update
Snapshot() []live.Event
Session() *anthropic.BetaManagedAgentsSession
SendMessage(ctx context.Context, text string) error
Interrupt(ctx context.Context) error
Confirm(ctx context.Context, toolUseID string, allow bool, denyMessage string) error
}
Session is what the TUI needs from an attached session; *live.Conn is one. The three senders block on the network and are only called from tea.Cmds.