mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
fix(agent): implement Critical flag, complete tools.SubTurnConfig, remove redundant subTurnResults
- Critical flag was declared but never acted on; non-critical SubTurns now break out of the iteration loop when IsParentEnded() returns true - tools.SubTurnConfig was missing Critical/Timeout/MaxContextRunes, making those fields unreachable from the tools layer; added fields and wired them through AgentLoopSpawner.SpawnSubTurn - Removed subTurnResults sync.Map from AgentLoop — it was a redundant alias for the same channel already stored in turnState.pendingResults; dequeuePendingSubTurnResults now reads directly via activeTurnStates - Replace hardcoded concurrencySem size 5 with maxConcurrentSubTurns constant - Update affected tests to match new dequeuePendingSubTurnResults API
This commit is contained in:
@@ -22,7 +22,10 @@ type SubTurnConfig struct {
|
||||
SystemPrompt string
|
||||
MaxTokens int
|
||||
Temperature float64
|
||||
Async bool // true for async (spawn), false for sync (subagent)
|
||||
Async bool // true for async (spawn), false for sync (subagent)
|
||||
Critical bool // continue running after parent finishes gracefully
|
||||
Timeout time.Duration // 0 = use default (5 minutes)
|
||||
MaxContextRunes int // 0 = auto, -1 = no limit, >0 = explicit limit
|
||||
}
|
||||
|
||||
type SubagentTask struct {
|
||||
|
||||
Reference in New Issue
Block a user