unified read_file tool
This commit is contained in:
parent
6090ab1d20
commit
85711cce94
2 changed files with 9 additions and 3 deletions
|
|
@ -275,8 +275,14 @@ func TestNewAgentInstance_ReadFileModeSelectsSchema(t *testing.T) {
|
|||
|
||||
params := readTool.Parameters()
|
||||
props, _ := params["properties"].(map[string]any)
|
||||
if _, ok := props["limit"]; !ok {
|
||||
t.Fatalf("expected line-mode schema to expose limit, got %#v", props)
|
||||
if _, ok := props["start_line"]; !ok {
|
||||
t.Fatalf("expected line-mode schema to expose start_line, got %#v", props)
|
||||
}
|
||||
if _, ok := props["max_lines"]; !ok {
|
||||
t.Fatalf("expected line-mode schema to expose max_lines, got %#v", props)
|
||||
}
|
||||
if _, ok := props["offset"]; ok {
|
||||
t.Fatalf("did not expect line-mode schema to expose offset, got %#v", props)
|
||||
}
|
||||
if _, ok := props["length"]; ok {
|
||||
t.Fatalf("did not expect line-mode schema to expose length, got %#v", props)
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ func (t *ReadFileTool) Name() string {
|
|||
}
|
||||
|
||||
func (t *ReadFileLinesTool) Name() string {
|
||||
return "read_file_lines"
|
||||
return "read_file"
|
||||
}
|
||||
|
||||
func (t *ReadFileTool) Description() string {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue