Revert to simple gt-mayor/gt-deacon session names
Reverts the session naming changes from PR #70. Multi-town support on a single machine is not a real use case - rigs provide project isolation, and true isolation should use containers/VMs. Changes: - MayorSessionName() and DeaconSessionName() no longer take townName parameter - ParseSessionName() handles simple gt-mayor and gt-deacon formats - Removed Town field from AgentIdentity and AgentSession structs - Updated all callers and tests Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,6 @@ type AgentSession struct {
|
||||
Type AgentType
|
||||
Rig string // For rig-specific agents
|
||||
AgentName string // e.g., crew name, polecat name
|
||||
Town string // For mayor/deacon only (town name from session)
|
||||
}
|
||||
|
||||
// AgentTypeColors maps agent types to tmux color codes.
|
||||
@@ -136,16 +135,13 @@ func categorizeSession(name string) *AgentSession {
|
||||
session := &AgentSession{Name: name}
|
||||
suffix := strings.TrimPrefix(name, "gt-")
|
||||
|
||||
// Town-level agents: gt-{town}-mayor, gt-{town}-deacon
|
||||
// Check if suffix ends with -mayor or -deacon (new format)
|
||||
if strings.HasSuffix(suffix, "-mayor") {
|
||||
// Town-level agents: gt-mayor, gt-deacon (simple format, one per machine)
|
||||
if suffix == "mayor" {
|
||||
session.Type = AgentMayor
|
||||
session.Town = strings.TrimSuffix(suffix, "-mayor")
|
||||
return session
|
||||
}
|
||||
if strings.HasSuffix(suffix, "-deacon") {
|
||||
if suffix == "deacon" {
|
||||
session.Type = AgentDeacon
|
||||
session.Town = strings.TrimSuffix(suffix, "-deacon")
|
||||
return session
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user