Documentation
¶
Index ¶
- func Banner(b *board.Board, t Theme, width int) string
- func CleanTask(s string) string
- func ClipANSI(s string, w int) string
- func ConfigInventory(r config.Result, t Theme, treeView bool) string
- func ConfigWhy(r config.Result, filePath string, t Theme) string
- func CtxCell(raw string, t Theme) string
- func DriftFindingDetail(f drift.Finding, t Theme) string
- func DriftFindings(findings []drift.Finding, project string, t Theme) string
- func EventLogSummary(sum eventlog.Summary, t Theme) string
- func EventLogTail(events []eventlog.Event, t Theme) string
- func FishPath(p, home string, w int) string
- func FmtMem(mib float64) string
- func FmtUp(s int64) string
- func FriendlyWhat(what string) string
- func MemoryBoard(rows []memory.BoardRow, t Theme) string
- func MemoryLog(project string, entries []memory.LogEntry, t Theme) string
- func Pad(s string, w int) string
- func RegisterExternalTurns(f func(kind, key string, n int) ([][2]string, bool))
- func Show(cache *parse.Cache, pid int, t Theme, now float64) (string, error)
- func StatusCell(s string, changed bool, t Theme) string
- func Table(b *board.Board, t Theme, o Opts) string
- func Trunc(s string, w int) string
- func UpdateCmd() string
- func UpdateHint(t Theme, rev string, dirty bool, ageSecs int64, staleDays int) string
- func VisibleWidth(s string) int
- func Why(cache *parse.Cache, pid int, t Theme, now float64) (string, error)
- type Opts
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Banner ¶
Banner renders the violet AGENTDASH splash plus a one-glance HUD off the board. Callers must show it on a TTY only — never in --json/--plain/pipes. Narrower than the figlet, it falls back to a bold one-line wordmark.
func CleanTask ¶
CleanTask tidies a task for display only (the raw task stays in --json): collapses scraped whitespace into single spaces and shortens an unpaired row's marker to a tight "(no session)".
func ClipANSI ¶
ClipANSI truncates s to w display cells, copying ANSI escape sequences through verbatim (they cost no width) so colors survive the cut. Replaces ansi.Truncate(s, w, ""): no ellipsis, never exceeds w visible cells.
func ConfigInventory ¶
ConfigInventory renders the config inventory as a human-readable table.
func DriftFindingDetail ¶
DriftFindingDetail renders a single drift finding with evidence.
func DriftFindings ¶
DriftFindings renders the list of drift findings as a human-readable report.
func EventLogSummary ¶
EventLogSummary renders aggregate stats for the event log.
func EventLogTail ¶
EventLogTail renders a list of recent events, one per line.
func FishPath ¶
FishPath abbreviates leading path segments fish-style, keeping the tail: ~/code/checkout-api -> ~/c/checkout-api; over-width paths keep their end.
func FriendlyWhat ¶
FriendlyWhat shortens a login's WHAT command to a recognizable name.
func MemoryBoard ¶
MemoryBoard renders the cross-project memory-health board, most-stale first.
func RegisterExternalTurns ¶
RegisterExternalTurns installs the recent-turns hook for an external kind.
func StatusCell ¶
StatusCell colors a status and pads it to 10 chars; changed adds bold.
func Table ¶
Table renders the whole frame (header, agent table, sections) exactly like the v1 render(); the TUI and the one-shot path share it.
func UpdateCmd ¶
func UpdateCmd() string
UpdateCmd is the reinstall command the staleness nudge prints. It carries the running binary's build tags (updateTags), so a Hermes build advertises -tags=hermes and a reinstall keeps session monitoring. agentdash never runs this itself — it only ever prints it, keeping the binary fully no-network.
func UpdateHint ¶
UpdateHint is the no-network staleness nudge shown under the banner: how old the running binary is and, once it crosses staleDays, the reinstall command. agentdash makes no network calls, so it cannot know whether a newer release exists — build age is an honest local proxy, read from the binary's embedded VCS stamp. Returns "" when the binary carries no build provenance (ageSecs<0) or staleDays<=0 (the nudge is disabled).
func VisibleWidth ¶
VisibleWidth is the display width of s in terminal cells, ignoring ANSI escape sequences (SGR colors etc.). Replaces ansi.StringWidth — no charm dependency.
Types ¶
type Opts ¶
type Opts struct {
Long bool
Expand bool
Width int
Home string // for ~ abbreviation in paths
SelPID int // watch-mode cursor; 0 = none
PrevStatus map[int]string // watch mode: bold a status that flipped
Watching bool
}
Opts steers one frame's rendering.