Documentation
¶
Index ¶
- type AgentsView
- func (v *AgentsView) Cursor() int
- func (v *AgentsView) Selected() *agent.Agent
- func (v *AgentsView) SetAgents(agents []agent.Agent)
- func (v *AgentsView) SetFilter(f string)
- func (v *AgentsView) SetSize(w, h int)
- func (v *AgentsView) SortField() string
- func (v *AgentsView) Update(msg tea.Msg)
- func (v *AgentsView) View() string
- type AnnotationMsg
- type CostsView
- type HeaderView
- type HelpView
- type LaunchCancelMsg
- type LaunchMsg
- type LaunchResumeMsg
- type LauncherView
- type LogsView
- func (v *LogsView) Annotations() map[int]string
- func (v *LogsView) FilePath() string
- func (v *LogsView) HasActiveFilter() bool
- func (v *LogsView) NoteInput() (string, int)
- func (v *LogsView) NoteMode() bool
- func (v *LogsView) Notes() map[int]string
- func (v *LogsView) Reload()
- func (v *LogsView) SetAnnotations(a map[int]string)
- func (v *LogsView) SetFilePath(path string)
- func (v *LogsView) SetNotes(n map[int]string)
- func (v *LogsView) SetSessionCost(cost float64)
- func (v *LogsView) SetSize(w, h int)
- func (v *LogsView) SetWarning(msg string)
- func (v *LogsView) Turns() []TraceTurn
- func (v *LogsView) Update(msg tea.Msg) tea.Cmd
- func (v *LogsView) View() string
- type PTYExitMsg
- type PTYOutputMsg
- type PreviewPane
- type ProviderOptions
- type RecentDirEntry
- type SessionAnnotateMsg
- type SessionBulkDeleteMsg
- type SessionDeleteMsg
- type SessionNoteMsg
- type SessionResumeMsg
- type SessionTagMsg
- type SessionToggleScopeMsg
- type SessionView
- func (sv *SessionView) Active() bool
- func (sv *SessionView) Agent() *agent.Agent
- func (sv *SessionView) Close()
- func (sv *SessionView) HandleOutput(data []byte) tea.Cmd
- func (sv *SessionView) Open(a *agent.Agent, backend terminal.SessionBackend) (tea.Cmd, error)
- func (sv *SessionView) SendKey(key string)
- func (sv *SessionView) SetSize(w, h int)
- func (sv *SessionView) TermView() *terminal.TermView
- func (sv *SessionView) View() string
- type SessionsView
- func (v *SessionsView) CurrentDir() string
- func (v *SessionsView) HasActiveFilter() bool
- func (v *SessionsView) HasActiveInput() bool
- func (v *SessionsView) SelectedSession() *history.Session
- func (v *SessionsView) SetCurrentDir(dir string)
- func (v *SessionsView) SetSessions(sessions []history.Session)
- func (v *SessionsView) SetSize(w, h int)
- func (v *SessionsView) SetTagVocab(vocab []string)
- func (v *SessionsView) SetTraceParser(parser TraceParser)
- func (v *SessionsView) ShowAll() bool
- func (v *SessionsView) Update(msg tea.Msg) tea.Cmd
- func (v *SessionsView) View() string
- type SortField
- type TeamsView
- type ToolSpan
- type TraceParser
- type TraceTurn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentsView ¶
type AgentsView struct {
// contains filtered or unexported fields
}
AgentsView renders the main agents table with columns.
func (*AgentsView) Cursor ¶
func (v *AgentsView) Cursor() int
Cursor returns the current cursor position.
func (*AgentsView) Selected ¶
func (v *AgentsView) Selected() *agent.Agent
Selected returns the currently selected agent, or nil. If the cursor is on a child row, the parent session agent is returned.
func (*AgentsView) SetAgents ¶
func (v *AgentsView) SetAgents(agents []agent.Agent)
SetAgents updates the list of agents with stable sort order. Preserves cursor position by tracking the selected PID across refreshes.
func (*AgentsView) SetFilter ¶
func (v *AgentsView) SetFilter(f string)
SetFilter sets a filter string for agents.
func (*AgentsView) SetSize ¶
func (v *AgentsView) SetSize(w, h int)
SetSize sets the available width and height.
func (*AgentsView) SortField ¶
func (v *AgentsView) SortField() string
SortField returns the current sort field name.
func (*AgentsView) Update ¶
func (v *AgentsView) Update(msg tea.Msg)
Update handles key messages for navigation.
func (*AgentsView) View ¶
func (v *AgentsView) View() string
View renders the agents table with headers and status icons.
type AnnotationMsg ¶
type AnnotationMsg struct {
Turn int
Label string // "" means remove
Note string // free-text rationale (set via 'n' key)
}
AnnotationMsg is emitted when the user annotates a turn. app.go handles persistence; this view only tracks the label in memory.
type CostsView ¶
type CostsView struct {
// contains filtered or unexported fields
}
CostsView renders a cost dashboard aggregated by project.
type HeaderView ¶
type HeaderView struct {
// contains filtered or unexported fields
}
HeaderView renders a header with info boxes and ASCII logo.
func (*HeaderView) Height ¶
func (h *HeaderView) Height() int
Height returns the rendered height of the header (for layout calculations). Must match the actual number of newlines in View() output.
func (*HeaderView) SetAgents ¶
func (h *HeaderView) SetAgents(agents []agent.Agent)
SetAgents updates the agent list used for stats.
func (*HeaderView) SetCrumbs ¶
func (h *HeaderView) SetCrumbs(crumbs []string)
SetCrumbs updates the breadcrumb trail.
func (*HeaderView) SetHint ¶
func (h *HeaderView) SetHint(hint string)
SetHint sets the contextual key hint bar text.
func (*HeaderView) SetWidth ¶
func (h *HeaderView) SetWidth(w int)
SetWidth sets the available width.
type HelpView ¶
type HelpView struct {
// contains filtered or unexported fields
}
HelpView renders the help overlay.
type LaunchCancelMsg ¶
type LaunchCancelMsg struct{}
LaunchCancelMsg is emitted when the user cancels the launcher.
type LaunchMsg ¶
type LaunchMsg struct {
Provider string
Dir string
Model string
Mode string
Runtime string
OTELEnabled bool // true if OTEL tracing should be injected
}
LaunchMsg is emitted when the user confirms the launch configuration.
type LaunchResumeMsg ¶ added in v0.5.0
LaunchResumeMsg is emitted when the user picks a session to resume from the launcher.
type LauncherView ¶
type LauncherView struct {
// contains filtered or unexported fields
}
LauncherView renders the agent launcher overlay.
func NewLauncherView ¶
func NewLauncherView(recentDirs []RecentDirEntry, providerOpts map[string]ProviderOptions, otelAvailable bool) *LauncherView
NewLauncherView creates a new launcher overlay. providerOpts maps provider names to their available models and modes. otelAvailable is true if the OTEL receiver is running (shows toggle in options).
func (*LauncherView) SetSize ¶
func (l *LauncherView) SetSize(w, h int)
SetSize sets the available dimensions for the overlay.
func (*LauncherView) Update ¶
func (l *LauncherView) Update(msg tea.Msg) tea.Cmd
Update handles key messages and returns a tea.Cmd if the launcher emits a LaunchMsg or LaunchCancelMsg.
func (*LauncherView) View ¶
func (l *LauncherView) View() string
View renders the launcher overlay as a full-screen replacement.
type LogsView ¶
type LogsView struct {
// contains filtered or unexported fields
}
LogsView renders a structured conversation trace grouped by turns. Each turn shows INPUT (user), ACTIONS (tools), and OUTPUT (assistant) sections inspired by MLflow/Braintrust trace UIs.
func NewLogsView ¶
func NewLogsView(pid int, filePath string, parser TraceParser) *LogsView
NewLogsView creates a new LogsView for the given PID and log file path. The parser function is called during Reload() to parse the session file into structured trace turns. If parser is nil, Reload returns no turns.
func (*LogsView) Annotations ¶
Annotations returns the current annotations map.
func (*LogsView) HasActiveFilter ¶
HasActiveFilter returns true if the logs view has a filter, note input, or filter mode active.
func (*LogsView) Reload ¶
func (v *LogsView) Reload()
Reload reads and parses the session file into turns using the provider's parser. Preserves the cursor position unless new turns were added while the cursor was at the bottom (auto-follow mode).
func (*LogsView) SetAnnotations ¶
SetAnnotations loads a set of turn annotations from external storage.
func (*LogsView) SetFilePath ¶
SetFilePath updates the file path for the trace data source. Used when the session file isn't available at creation time but is discovered later (e.g., newly launched agents).
func (*LogsView) SetSessionCost ¶ added in v0.2.0
SetSessionCost sets the session-level cost for the trace summary.
func (*LogsView) SetWarning ¶
SetWarning sets a provider-specific warning shown above the trace turns.
type PTYOutputMsg ¶
type PTYOutputMsg struct {
Data []byte
}
PTYOutputMsg carries raw output data from the PTY subprocess.
type PreviewPane ¶
type PreviewPane struct {
// contains filtered or unexported fields
}
PreviewPane renders a read-only conversation preview for the right side of a split pane layout. It shows the conversation trace of the currently selected agent, parsed from its session JSONL file.
func (*PreviewPane) Reload ¶
func (p *PreviewPane) Reload()
Reload re-reads the session file and refreshes the conversation trace.
func (*PreviewPane) SetAgent ¶
func (p *PreviewPane) SetAgent(a *agent.Agent)
SetAgent updates the agent whose conversation is displayed. It reloads the conversation from the agent's SessionFile only if the agent changed. If the agent is nil or has no SessionFile, the pane shows a placeholder.
func (*PreviewPane) SetParser ¶
func (p *PreviewPane) SetParser(parser TraceParser)
SetParser updates the trace parser used for creating LogsViews. Called by app.go when the selected agent changes and the provider's ParseTrace method should be used.
func (*PreviewPane) SetSize ¶
func (p *PreviewPane) SetSize(w, h int)
SetSize sets the available width and height for the preview pane.
func (*PreviewPane) View ¶
func (p *PreviewPane) View() string
View renders the preview pane with a left border, header, and conversation.
type ProviderOptions ¶
ProviderOptions holds the models and modes for a specific provider.
type RecentDirEntry ¶
type RecentDirEntry struct {
Path string
Display string // shortened display name
Provider string
Age string // "2m ago", "1h ago"
}
RecentDirEntry is a directory entry for the recent dirs list.
type SessionAnnotateMsg ¶ added in v0.5.0
SessionAnnotateMsg is emitted when the user changes a session annotation.
type SessionBulkDeleteMsg ¶ added in v0.6.0
SessionBulkDeleteMsg is emitted when the user confirms bulk deletion.
type SessionDeleteMsg ¶ added in v0.5.0
SessionDeleteMsg is emitted when the user confirms deleting a session.
type SessionNoteMsg ¶ added in v0.5.0
SessionNoteMsg is emitted when the user updates the note on a session.
type SessionResumeMsg ¶ added in v0.5.0
type SessionResumeMsg struct {
SessionID string
WorkingDir string
FilePath string // path to the session JSONL (for trace pane)
}
SessionResumeMsg is emitted when the user wants to resume a session.
type SessionTagMsg ¶ added in v0.5.0
SessionTagMsg is emitted when the user updates tags on a session.
type SessionToggleScopeMsg ¶ added in v0.5.0
type SessionToggleScopeMsg struct {
ShowAll bool
}
SessionToggleScopeMsg is emitted when the user toggles between current directory and all projects.
type SessionView ¶
type SessionView struct {
// contains filtered or unexported fields
}
SessionView provides a full-screen interactive terminal view. It wraps a session backend (direct PTY or tmux mirror) and a VT terminal emulator to render output within the Bubble Tea TUI. The user interacts with the subprocess directly; keystrokes are forwarded to the backend.
func NewSessionView ¶
func NewSessionView() *SessionView
NewSessionView creates a new SessionView in an inactive state.
func (*SessionView) Active ¶
func (sv *SessionView) Active() bool
Active returns true if the session view is currently running.
func (*SessionView) Agent ¶
func (sv *SessionView) Agent() *agent.Agent
Agent returns the agent associated with this session, or nil.
func (*SessionView) Close ¶
func (sv *SessionView) Close()
Close terminates the PTY session and marks the view as inactive.
func (*SessionView) HandleOutput ¶
func (sv *SessionView) HandleOutput(data []byte) tea.Cmd
HandleOutput feeds raw data into the VT emulator (for direct PTY backends) and returns a tea.Cmd to continue reading. For DirectRenderer backends (tmux), the data is ignored since Render() provides the content directly.
func (*SessionView) Open ¶
func (sv *SessionView) Open(a *agent.Agent, backend terminal.SessionBackend) (tea.Cmd, error)
Open starts an interactive session using the given backend (direct PTY or tmux mirror). It starts a background goroutine to read output and returns a tea.Cmd that delivers the first PTYOutputMsg.
func (*SessionView) SendKey ¶
func (sv *SessionView) SendKey(key string)
SendKey forwards a keystroke to the PTY subprocess, translating Bubble Tea key names to their actual terminal byte sequences.
func (*SessionView) SetSize ¶
func (sv *SessionView) SetSize(w, h int)
SetSize resizes the PTY and VT emulator to fit the new dimensions.
func (*SessionView) TermView ¶ added in v0.6.0
func (sv *SessionView) TermView() *terminal.TermView
TermView returns the underlying terminal view, or nil for DirectRenderer backends.
func (*SessionView) View ¶
func (sv *SessionView) View() string
View renders the session view with a header bar, terminal content, and a status bar at the bottom.
type SessionsView ¶ added in v0.5.0
type SessionsView struct {
// contains filtered or unexported fields
}
SessionsView renders a browsable list of past sessions with trace preview.
func NewSessionsView ¶ added in v0.5.0
func NewSessionsView() *SessionsView
NewSessionsView creates a new sessions browser.
func (*SessionsView) CurrentDir ¶ added in v0.5.0
func (v *SessionsView) CurrentDir() string
CurrentDir returns the scoped directory.
func (*SessionsView) HasActiveFilter ¶ added in v0.5.0
func (v *SessionsView) HasActiveFilter() bool
HasActiveFilter returns true if a search filter is currently applied.
func (*SessionsView) HasActiveInput ¶ added in v0.5.0
func (v *SessionsView) HasActiveInput() bool
HasActiveInput returns true if the view has active text input or confirmation.
func (*SessionsView) SelectedSession ¶ added in v0.5.0
func (v *SessionsView) SelectedSession() *history.Session
SelectedSession returns the currently selected session, if any. Returns a pointer into the original sessions slice so mutations persist.
func (*SessionsView) SetCurrentDir ¶ added in v0.5.0
func (v *SessionsView) SetCurrentDir(dir string)
SetCurrentDir sets the scoped directory for display.
func (*SessionsView) SetSessions ¶ added in v0.5.0
func (v *SessionsView) SetSessions(sessions []history.Session)
SetSessions updates the session list.
func (*SessionsView) SetSize ¶ added in v0.5.0
func (v *SessionsView) SetSize(w, h int)
SetSize sets the available width and height.
func (*SessionsView) SetTagVocab ¶ added in v0.5.0
func (v *SessionsView) SetTagVocab(vocab []string)
SetTagVocab sets the autocomplete vocabulary for tag input.
func (*SessionsView) SetTraceParser ¶ added in v0.5.0
func (v *SessionsView) SetTraceParser(parser TraceParser)
SetTraceParser sets the parser used for trace preview.
func (*SessionsView) ShowAll ¶ added in v0.5.0
func (v *SessionsView) ShowAll() bool
ShowAll returns whether the view is showing all projects.
func (*SessionsView) Update ¶ added in v0.5.0
func (v *SessionsView) Update(msg tea.Msg) tea.Cmd
Update handles key messages for session navigation.
func (*SessionsView) View ¶ added in v0.5.0
func (v *SessionsView) View() string
View renders the sessions browser.
type TeamsView ¶
type TeamsView struct {
// contains filtered or unexported fields
}
TeamsView renders the teams overview.
func (*TeamsView) SetTeams ¶
func (v *TeamsView) SetTeams(teams []team.TeamConfig)
SetTeams updates the list of teams.
type ToolSpan ¶
ToolSpan is an alias for trace.ToolSpan, kept for backward compatibility within the views package.
type TraceParser ¶
TraceParser is a function that reads a file and returns parsed trace turns. Each provider supplies its own parser via Provider.ParseTrace.