Documentation
¶
Index ¶
- func FadeHex(startHex, endHex string, elapsed, duration time.Duration) string
- func StatusFadeColor(s Status, lastActivity time.Time) string
- type Agent
- func (a Agent) AgeTime() time.Time
- func (a Agent) FormatAge() string
- func (a Agent) FormatCPU() 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 BadgeValue
- type SourceType
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FadeHex ¶ added in v0.11.0
FadeHex interpolates between two hex colors (#RRGGBB) using a square-root curve for perceptual smoothness. elapsed/duration controls the progress: 0 returns startHex, >= duration returns endHex.
func StatusFadeColor ¶ added in v0.11.0
StatusFadeColor returns a foreground hex color string for statuses that should fade over time. Currently only StatusIdle fades (bright grey to dark grey over 1 hour). Returns "" for statuses that don't fade.
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
CPUPercent float64
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
Badges []BadgeValue // evaluated badge results from project files
}
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 BadgeValue ¶ added in v0.11.0
BadgeValue is an evaluated badge for display.
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