mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-04-14 22:09:37 +08:00
add role/from_me filters and trigger error aggregation
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user