Documentation
¶
Index ¶
- type Agent
- func (a Agent) AgeTime() time.Time
- func (a Agent) FormatAge() string
- func (a Agent) FormatCost() string
- func (a Agent) FormatMemory() string
- func (a Agent) Icon() string
- func (a Agent) IsSubagent() bool
- func (a Agent) ShortDir() string
- func (a Agent) ShortModel() string
- func (a Agent) ShortProject() string
- type SourceType
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
PID int
SessionID string
Name string // project name, derived from WorkingDir
ProviderName string // "claude", "codex", "gemini"
SessionFile string // path to conversation log
Model string // e.g. "claude-opus-4-6[1m]"
PermissionMode string
WorkingDir string
Source SourceType
StartTime time.Time
Status Status
TMuxSession string
MemoryMB uint64
GitBranch string
TokensIn int64
TokensOut int64
EstCostUSD float64
TeamName string
TaskID string
TaskSubject string
LastActivity time.Time
GroupCount int // number of processes grouped into this entry (0 or 1 = single)
GroupPIDs []int // PIDs of grouped processes (for drill-down)
LastAction string // most recent tool call, e.g. "Ed main.go", "Sh go test"
ParentPID int // process tree parent (0 = top-level)
Subagent subagent.Info // from OTEL correlation
}
Agent represents a running AI coding agent session.
func (Agent) AgeTime ¶ added in v0.3.0
AgeTime returns the effective time used for age calculation: StartTime if available, otherwise LastActivity. Returns the zero time if neither is set.
func (Agent) FormatAge ¶
FormatAge returns a human-friendly age string based on StartTime or LastActivity.
func (Agent) FormatCost ¶
FormatCost returns the estimated cost formatted as a dollar amount.
Examples:
0.82 -> "$0.82" 12.5 -> "$12.50" 0 -> "$0.00"
func (Agent) FormatMemory ¶
FormatMemory returns a human-friendly memory string.
Examples:
405 -> "405M" 1400 -> "1.4G" 0 -> "0M"
func (Agent) IsSubagent ¶ added in v0.5.0
IsSubagent returns true if this agent is nested under another agent.
func (Agent) ShortDir ¶
ShortDir returns the parent directory name — the directory containing the project. This disambiguates agents with the same project name in different locations. The full path is available in the preview pane.
Examples:
"/Users/me/go/src/github.com/zanetworker/aimux" -> "zanetworker" "/Users/me/projects/myapp" -> "projects" "/tmp/test" -> "tmp"
func (Agent) ShortModel ¶
ShortModel returns a human-friendly shortened model name.
Examples:
"claude-opus-4-6[1m]" -> "opus-4.6" "claude-sonnet-4-5@20250929" -> "sonnet-4.5" "claude-haiku-3-5" -> "haiku-3.5"
func (Agent) ShortProject ¶
ShortProject returns the last path segment of WorkingDir.
type SourceType ¶
type SourceType int
SourceType represents how an agent was launched.
const ( SourceCLI SourceType = iota // launched from CLI SourceVSCode // launched from VS Code extension SourceSDK // launched from SDK )
func (SourceType) String ¶
func (s SourceType) String() string