cmdSubagents lists registered subagent types and, separately, any that are currently running. The active list is empty when nothing is in flight.
(_ string)
| 236 | // cmdSubagents lists registered subagent types and, separately, any that |
| 237 | // are currently running. The active list is empty when nothing is in flight. |
| 238 | func cmdSubagents(_ string) { |
| 239 | all := subagent.Default.All() |
| 240 | if len(all) == 0 { |
| 241 | fmt.Println(ui.Dimmed("no subagents registered")) |
| 242 | } else { |
| 243 | fmt.Println(ui.Dimmed("registered subagents:")) |
| 244 | for _, s := range all { |
| 245 | fmt.Printf(" %s %s\n", ui.Cyan(s.Name()), ui.Dimmed(s.Description())) |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | active := subagent.Active() |
| 250 | if len(active) == 0 { |
| 251 | fmt.Println(ui.Dimmed("currently running: (none)")) |
| 252 | return |
| 253 | } |
| 254 | fmt.Println(ui.Dimmed("currently running:")) |
| 255 | for name, n := range active { |
| 256 | if n == 1 { |
| 257 | fmt.Printf(" %s\n", ui.Cyan(name)) |
| 258 | } else { |
| 259 | fmt.Printf(" %s ×%d\n", ui.Cyan(name), n) |
| 260 | } |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | func cmdCompact(args string) { |
| 265 | strategy := rootAgent.Compactor |