add role/from_me filters and trigger error aggregation

This commit is contained in:
DBT
2026-02-23 14:17:28 +00:00
parent 1fbe28a97d
commit 6f26464766
5 changed files with 139 additions and 7 deletions

View File

@@ -20,3 +20,18 @@ func TestSubagentsInfoAll(t *testing.T) {
t.Fatalf("unexpected output: %s", out)
}
}
func TestSubagentsKillAll(t *testing.T) {
m := NewSubagentManager(nil, ".", nil, nil)
m.tasks["subagent-1"] = &SubagentTask{ID: "subagent-1", Status: "running", Label: "a", Created: 2}
m.tasks["subagent-2"] = &SubagentTask{ID: "subagent-2", Status: "running", Label: "b", Created: 3}
tool := NewSubagentsTool(m)
out, err := tool.Execute(context.Background(), map[string]interface{}{"action": "kill", "id": "all"})
if err != nil {
t.Fatal(err)
}
if !strings.Contains(out, "2") {
t.Fatalf("unexpected kill output: %s", out)
}
}