Add list tools; normalize tool names and paths in transcript
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user