Add list tools; normalize tool names and paths in transcript

This commit is contained in:
Ian Gulliver
2026-10-20 21:05:29 -07:00
parent e5a7fc4c1a
commit 53f20e40d3
9 changed files with 175 additions and 20 deletions
+8
View File
@@ -1,6 +1,7 @@
package agents
import (
"cmp"
"context"
"encoding/json"
"fmt"
@@ -132,6 +133,13 @@ func agyToolCall(name string, params json.RawMessage) (string, any, error) {
}{}
err := json.Unmarshal(params, &p)
return "Bash", map[string]any{"command": p.CommandLine}, err
case "read_file", "view_file":
p := struct {
Path string
AbsolutePath string
}{}
err := json.Unmarshal(params, &p)
return "Read", map[string]any{"file_path": cmp.Or(p.Path, p.AbsolutePath)}, err
case "call_mcp_tool":
p := struct {
ServerName string