From 0dab88e8bf87a75837d03adeb72cde6459a39401 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Sun, 21 Dec 2025 16:10:20 -0800 Subject: [PATCH] feat(icons): centralize agent icons and add to all displays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Mayor: 🎩 (top hat) - Deacon: 🦉 (owl) - Witness: 👁 (eye) - Refinery: 🏭 (factory) - Crew: 🧑‍💻 (technologist) - Polecat: 😺 (happy cat) Icons now show in: - tmux status lines for all agent types - gt status rig indicators - gt witness status output - gt agents popup menu --- internal/cmd/agents.go | 4 ++-- internal/cmd/status.go | 6 ++--- internal/cmd/statusline.go | 49 ++++++++++++++++++++++++-------------- internal/cmd/witness.go | 2 +- 4 files changed, 37 insertions(+), 24 deletions(-) diff --git a/internal/cmd/agents.go b/internal/cmd/agents.go index 6e7049dc..694ba226 100644 --- a/internal/cmd/agents.go +++ b/internal/cmd/agents.go @@ -44,10 +44,10 @@ var AgentTypeColors = map[AgentType]string{ // AgentTypeIcons maps agent types to display icons. var AgentTypeIcons = map[AgentType]string{ AgentMayor: "🎩", - AgentDeacon: "🗼", + AgentDeacon: "🦉", AgentWitness: "👁", AgentRefinery: "🏭", - AgentCrew: "👷", + AgentCrew: "🧑‍💻", AgentPolecat: "😺", } diff --git a/internal/cmd/status.go b/internal/cmd/status.go index 358f8aae..f453343d 100644 --- a/internal/cmd/status.go +++ b/internal/cmd/status.go @@ -170,13 +170,13 @@ func outputStatusText(status TownStatus) error { // Rig name with indicators indicators := "" if r.HasWitness { - indicators += " 👁" + indicators += " " + AgentTypeIcons[AgentWitness] } if r.HasRefinery { - indicators += " 🏭" + indicators += " " + AgentTypeIcons[AgentRefinery] } if r.CrewCount > 0 { - indicators += " 👤" + indicators += " " + AgentTypeIcons[AgentCrew] } fmt.Printf(" %s%s\n", style.Bold.Render(r.Name), indicators) diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go index f81e3c7b..8b1b62e3 100644 --- a/internal/cmd/statusline.go +++ b/internal/cmd/statusline.go @@ -62,21 +62,33 @@ func runStatusLine(cmd *cobra.Command, args []string) error { return runRefineryStatusLine(rigName) } - // Build mail identity - var identity string - if rigName != "" { - if polecat != "" { - identity = fmt.Sprintf("%s/%s", rigName, polecat) - } else if crew != "" { - identity = fmt.Sprintf("%s/%s", rigName, crew) - } + // Crew/Polecat status line + return runWorkerStatusLine(rigName, polecat, crew, issue) +} + +// runWorkerStatusLine outputs status for crew or polecat sessions. +func runWorkerStatusLine(rigName, polecat, crew, issue string) error { + // Determine agent type and identity + var icon, identity string + if polecat != "" { + icon = AgentTypeIcons[AgentPolecat] + identity = fmt.Sprintf("%s/%s", rigName, polecat) + } else if crew != "" { + icon = AgentTypeIcons[AgentCrew] + identity = fmt.Sprintf("%s/crew/%s", rigName, crew) } // Build status parts var parts []string - // Current issue - if issue != "" { + // Add icon prefix + if icon != "" { + if issue != "" { + parts = append(parts, fmt.Sprintf("%s %s", icon, issue)) + } else { + parts = append(parts, icon) + } + } else if issue != "" { parts = append(parts, issue) } @@ -84,7 +96,7 @@ func runStatusLine(cmd *cobra.Command, args []string) error { if identity != "" { unread := getUnreadMailCount(identity) if unread > 0 { - parts = append(parts, fmt.Sprintf("\U0001F4EC %d", unread)) // mail emoji + parts = append(parts, fmt.Sprintf("\U0001F4EC %d", unread)) } } @@ -173,7 +185,7 @@ func runWitnessStatusLine(t *tmux.Tmux, rigName string) error { // Build status var parts []string - parts = append(parts, fmt.Sprintf("👁 %d polecats", polecatCount)) + parts = append(parts, fmt.Sprintf("%s %d polecats", AgentTypeIcons[AgentWitness], polecatCount)) if unread > 0 { parts = append(parts, fmt.Sprintf("\U0001F4EC %d", unread)) } @@ -194,7 +206,7 @@ func runRefineryStatusLine(rigName string) error { } if rigName == "" { - fmt.Print("🏭 ? |") + fmt.Printf("%s ? |", AgentTypeIcons[AgentRefinery]) return nil } @@ -202,7 +214,7 @@ func runRefineryStatusLine(rigName string) error { mgr, _, err := getRefineryManager(rigName) if err != nil { // Fallback to simple status if we can't access refinery - fmt.Print("🏭 MQ: ? |") + fmt.Printf("%s MQ: ? |", AgentTypeIcons[AgentRefinery]) return nil } @@ -210,7 +222,7 @@ func runRefineryStatusLine(rigName string) error { queue, err := mgr.Queue() if err != nil { // Fallback to simple status if we can't read queue - fmt.Print("🏭 MQ: ? |") + fmt.Printf("%s MQ: ? |", AgentTypeIcons[AgentRefinery]) return nil } @@ -231,12 +243,13 @@ func runRefineryStatusLine(rigName string) error { // Build status var parts []string + icon := AgentTypeIcons[AgentRefinery] if processing { - parts = append(parts, fmt.Sprintf("🏭 MQ: %d (+1)", pending)) + parts = append(parts, fmt.Sprintf("%s MQ: %d (+1)", icon, pending)) } else if pending > 0 { - parts = append(parts, fmt.Sprintf("🏭 MQ: %d", pending)) + parts = append(parts, fmt.Sprintf("%s MQ: %d", icon, pending)) } else { - parts = append(parts, "🏭 idle") + parts = append(parts, fmt.Sprintf("%s idle", icon)) } if unread > 0 { diff --git a/internal/cmd/witness.go b/internal/cmd/witness.go index a0d51efc..ce542b5a 100644 --- a/internal/cmd/witness.go +++ b/internal/cmd/witness.go @@ -232,7 +232,7 @@ func runWitnessStatus(cmd *cobra.Command, args []string) error { } // Human-readable output - fmt.Printf("%s Witness: %s\n\n", style.Bold.Render("👁"), rigName) + fmt.Printf("%s Witness: %s\n\n", style.Bold.Render(AgentTypeIcons[AgentWitness]), rigName) stateStr := string(w.State) switch w.State {