Documentation
¶
Index ¶
- func StoredPreview(st *store.Store, driver *tmux.Driver, sessID string) (string, error)
- type AgentStats
- type Dependencies
- type Options
- type Result
- type Runner
- func (p *Runner) ReflowSessions(ids []string, reflow func()) error
- func (p *Runner) RequestRefresh()
- func (p *Runner) Run(ctx context.Context) <-chan Result
- func (p *Runner) SetInput(includeArchived bool, selectedID string)
- func (p *Runner) Step() Result
- func (p *Runner) TypeForkKeys(sess store.Session, keys string) error
- type SessionSummary
- type Snapshot
- type ToolBinaries
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StoredPreview ¶
storedPreview serves a session's saved pane snapshot, which is what the preview shows for any session with no window left to capture, however it lost it. It backfills from a still-live tmux window for sessions archived before snapshots existed.
Types ¶
type AgentStats ¶
type Dependencies ¶
type Dependencies struct {
Store *store.Store
TMux *tmux.Driver
Engine *status.Engine
Hooks *hooks.Manager
Git *git.Driver
Inbox sessioncmd.InboxMaintenance
Notify func(notify.Event)
// ShowCommand shows a notify command the user has not seen run yet.
ShowCommand func(command string)
TakeFocus func() (string, bool)
}
type Options ¶
type Options struct {
StatusSources map[string]string
SessionStores map[string]string
MCPStyles map[string]string
ReportStyles map[string]string
ShellTools map[string]bool
Binaries ToolBinaries
Interval time.Duration
}
func OptionsFromConfig ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner drives the session polling loop in its own goroutine, so status updates keep landing in the store even while the TUI is suspended inside a tmux attach. Consumers receive typed Result observations.
func New ¶
func New(deps Dependencies, opts Options) *Runner
func (*Runner) ReflowSessions ¶
reflowSessions drops activity-region hashes for ids and runs reflow while the Runner is paused (runMu held). A poll must not capture mid- resize against a pre-resize hash: that comparison treats reflow as streaming and flashes every session as working for one tick.
func (*Runner) RequestRefresh ¶
func (p *Runner) RequestRefresh()
func (*Runner) Run ¶
Run keeps the newest snapshot while its subscriber is suspended. The first unread error takes priority over later results. Cancellation is observed between steps; tmux calls already in flight finish first, except the deep quote capture, which ctx cuts short.
func (*Runner) Step ¶
refreshOnce polls every live session's pane, derives and stores status, and samples system stats. Liveness and pane pids come from one tmux call, and every process tree from one ps pass with a second scoped to the pane children, so the poll cost stays flat as sessions are added. runMu serializes the loop with one-off refreshes issued as tea commands.
type SessionSummary ¶
type Snapshot ¶
type Snapshot struct {
Sessions []store.Session
ListedAt time.Time
Groups []string
GroupPaths, GroupWorktrees map[string]string
GroupBases map[string]string
ArchivedGroups map[string]bool
Snap sysstat.Snapshot
SnapOK bool
Proc sysstat.ProcStat
ProcFor, Preview string
Agents AgentStats
QueuedMessages map[string]int
PaneLines, PanePrompts map[string]string
Panes map[string]tmux.Pane
TmuxSocket string
LeadingManager bool
FocusID string
// TurnsEnded are the sessions whose archive or kill asked for after
// their turn is due: this pass read each at rest after the request.
TurnsEnded []string
// FollowWarning reports a session whose conversation the pass could not
// follow, the first time it fails that way.
FollowWarning string
}
type ToolBinaries ¶
Shells and blocks without a command hold no binary: a terminal row is a shell whatever gets typed into it.
func NewToolBinaries ¶
func NewToolBinaries(cfg config.Config) ToolBinaries