mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
777230dcd1
- Added `/subagents` platform command to visualize the active task tree. - Implemented GetAllActiveTurns and FormatTree in AgentLoop to support cross-session observability. - Fixed a bug where sub-turns spawned via tools were not registered in the global `activeTurnStates` map, making them invisible to system queries. - Enhanced tree rendering logic to identify and display "orphaned" subagents (children that outlive their parent turns). - Registered the new command in `builtin.go` and injected the turn state provider into the commands runtime. Modified Files: - pkg/agent/turn_state.go: Added TurnInfo snapshotting and recursive tree formatting. - pkg/agent/loop.go: Injected GetActiveTurn hook and implemented multi-root forest rendering. - pkg/agent/subturn.go: Added child turn registration into activeTurnStates. - pkg/commands/cmd_subagents.go: New command implementation. - pkg/commands/builtin.go: Command registration.
19 lines
489 B
Go
19 lines
489 B
Go
package commands
|
|
|
|
// BuiltinDefinitions returns all built-in command definitions.
|
|
// Each command group is defined in its own cmd_*.go file.
|
|
// Definitions are stateless — runtime dependencies are provided
|
|
// via the Runtime parameter passed to handlers at execution time.
|
|
func BuiltinDefinitions() []Definition {
|
|
return []Definition{
|
|
startCommand(),
|
|
helpCommand(),
|
|
showCommand(),
|
|
listCommand(),
|
|
switchCommand(),
|
|
checkCommand(),
|
|
clearCommand(),
|
|
subagentsCommand(),
|
|
}
|
|
}
|