feat(icons): centralize agent icons and add to all displays

- 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
This commit is contained in:
Steve Yegge
2025-12-21 16:10:20 -08:00
parent ca93a45b7d
commit 0dab88e8bf
4 changed files with 37 additions and 24 deletions

View File

@@ -44,10 +44,10 @@ var AgentTypeColors = map[AgentType]string{
// AgentTypeIcons maps agent types to display icons. // AgentTypeIcons maps agent types to display icons.
var AgentTypeIcons = map[AgentType]string{ var AgentTypeIcons = map[AgentType]string{
AgentMayor: "🎩", AgentMayor: "🎩",
AgentDeacon: "🗼", AgentDeacon: "🦉",
AgentWitness: "👁", AgentWitness: "👁",
AgentRefinery: "🏭", AgentRefinery: "🏭",
AgentCrew: "👷", AgentCrew: "🧑‍💻",
AgentPolecat: "😺", AgentPolecat: "😺",
} }

View File

@@ -170,13 +170,13 @@ func outputStatusText(status TownStatus) error {
// Rig name with indicators // Rig name with indicators
indicators := "" indicators := ""
if r.HasWitness { if r.HasWitness {
indicators += " 👁" indicators += " " + AgentTypeIcons[AgentWitness]
} }
if r.HasRefinery { if r.HasRefinery {
indicators += " 🏭" indicators += " " + AgentTypeIcons[AgentRefinery]
} }
if r.CrewCount > 0 { if r.CrewCount > 0 {
indicators += " 👤" indicators += " " + AgentTypeIcons[AgentCrew]
} }
fmt.Printf(" %s%s\n", style.Bold.Render(r.Name), indicators) fmt.Printf(" %s%s\n", style.Bold.Render(r.Name), indicators)

View File

@@ -62,21 +62,33 @@ func runStatusLine(cmd *cobra.Command, args []string) error {
return runRefineryStatusLine(rigName) return runRefineryStatusLine(rigName)
} }
// Build mail identity // Crew/Polecat status line
var identity string return runWorkerStatusLine(rigName, polecat, crew, issue)
if rigName != "" { }
if polecat != "" {
identity = fmt.Sprintf("%s/%s", rigName, polecat) // runWorkerStatusLine outputs status for crew or polecat sessions.
} else if crew != "" { func runWorkerStatusLine(rigName, polecat, crew, issue string) error {
identity = fmt.Sprintf("%s/%s", rigName, crew) // 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 // Build status parts
var parts []string var parts []string
// Current issue // Add icon prefix
if issue != "" { 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) parts = append(parts, issue)
} }
@@ -84,7 +96,7 @@ func runStatusLine(cmd *cobra.Command, args []string) error {
if identity != "" { if identity != "" {
unread := getUnreadMailCount(identity) unread := getUnreadMailCount(identity)
if unread > 0 { 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 // Build status
var parts []string 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 { if unread > 0 {
parts = append(parts, fmt.Sprintf("\U0001F4EC %d", unread)) parts = append(parts, fmt.Sprintf("\U0001F4EC %d", unread))
} }
@@ -194,7 +206,7 @@ func runRefineryStatusLine(rigName string) error {
} }
if rigName == "" { if rigName == "" {
fmt.Print("🏭 ? |") fmt.Printf("%s ? |", AgentTypeIcons[AgentRefinery])
return nil return nil
} }
@@ -202,7 +214,7 @@ func runRefineryStatusLine(rigName string) error {
mgr, _, err := getRefineryManager(rigName) mgr, _, err := getRefineryManager(rigName)
if err != nil { if err != nil {
// Fallback to simple status if we can't access refinery // Fallback to simple status if we can't access refinery
fmt.Print("🏭 MQ: ? |") fmt.Printf("%s MQ: ? |", AgentTypeIcons[AgentRefinery])
return nil return nil
} }
@@ -210,7 +222,7 @@ func runRefineryStatusLine(rigName string) error {
queue, err := mgr.Queue() queue, err := mgr.Queue()
if err != nil { if err != nil {
// Fallback to simple status if we can't read queue // Fallback to simple status if we can't read queue
fmt.Print("🏭 MQ: ? |") fmt.Printf("%s MQ: ? |", AgentTypeIcons[AgentRefinery])
return nil return nil
} }
@@ -231,12 +243,13 @@ func runRefineryStatusLine(rigName string) error {
// Build status // Build status
var parts []string var parts []string
icon := AgentTypeIcons[AgentRefinery]
if processing { 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 { } else if pending > 0 {
parts = append(parts, fmt.Sprintf("🏭 MQ: %d", pending)) parts = append(parts, fmt.Sprintf("%s MQ: %d", icon, pending))
} else { } else {
parts = append(parts, "🏭 idle") parts = append(parts, fmt.Sprintf("%s idle", icon))
} }
if unread > 0 { if unread > 0 {

View File

@@ -232,7 +232,7 @@ func runWitnessStatus(cmd *cobra.Command, args []string) error {
} }
// Human-readable output // 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) stateStr := string(w.State)
switch w.State { switch w.State {