fix(tools): update no subagents message for clarity and remove unnecessary locking in runTask
This commit is contained in:
parent
de6a04bf9c
commit
9a2cf38d54
2 changed files with 1 additions and 5 deletions
|
|
@ -108,7 +108,7 @@ func (t *SpawnStatusTool) Execute(ctx context.Context, args map[string]any) *Too
|
|||
}
|
||||
|
||||
if len(tasks) == 0 {
|
||||
return NewToolResult("No subagents have been spawned yet.")
|
||||
return NewToolResult("No subagents found for this conversation.")
|
||||
}
|
||||
|
||||
// Order by creation time (ascending) so spawning order is preserved.
|
||||
|
|
|
|||
|
|
@ -109,10 +109,6 @@ func (sm *SubagentManager) Spawn(
|
|||
}
|
||||
|
||||
func (sm *SubagentManager) runTask(ctx context.Context, task *SubagentTask, callback AsyncCallback) {
|
||||
sm.mu.Lock()
|
||||
task.Status = "running"
|
||||
sm.mu.Unlock()
|
||||
|
||||
// Build system prompt for subagent
|
||||
systemPrompt := `You are a subagent. Complete the given task independently and report the result.
|
||||
You have access to tools - use them as needed to complete your task.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue