bazel start + mcp start

This commit is contained in:
ari committed 2026-11-01 14:55:33 -05:00
1 parent a90653260a
commit 4c082aca7c
33 files changed
+1728 -79

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
package tools
import (
"encoding/json"
"testing"
"slackerbot/internal/acp"
)
func TestCallsCollectsCompletedSends(t *testing.T) {
var c Calls
in := json.RawMessage(`{"path":"/root/a.png","comment":"here"}`)
c.Update(acp.Update{Kind: "tool_call", ToolID: "1", ToolName: "slackerbot__send_file", RawInput: in})
c.Update(acp.Update{Kind: "tool_call", ToolID: "2", Title: "slackerbot: send file · /root/b.zip", RawInput: json.RawMessage(`{"path":"/root/b.zip"}`)})
c.Update(acp.Update{Kind: "tool_call", ToolID: "3", ToolName: "developer__shell", RawInput: json.RawMessage(`{"path":"/root/x"}`)})
c.Update(acp.Update{Kind: "tool_call_update", ToolID: "1", Status: "completed"})
c.Update(acp.Update{Kind: "tool_call_update", ToolID: "2", Status: "failed"})
c.Update(acp.Update{Kind: "tool_call_update", ToolID: "3", Status: "completed"})
got := c.Files()
if len(got) != 1 || got[0].Path != "/root/a.png" || got[0].Comment != "here" {
t.Fatalf("got %+v", got)
}
}