fix offset
This commit is contained in:
parent
e4897b1091
commit
957d75d226
1 changed files with 2 additions and 2 deletions
|
|
@ -532,7 +532,7 @@ func (t *ReadFileLinesTool) Execute(ctx context.Context, args map[string]any) *T
|
||||||
return ErrorResult(err.Error())
|
return ErrorResult(err.Error())
|
||||||
}
|
}
|
||||||
if startLine < 1 {
|
if startLine < 1 {
|
||||||
return ErrorResult("offset must be >= 1")
|
return ErrorResult("start_line must be >= 1")
|
||||||
}
|
}
|
||||||
|
|
||||||
limit := int64(-1)
|
limit := int64(-1)
|
||||||
|
|
@ -635,7 +635,7 @@ func (t *ReadFileLinesTool) Execute(ctx context.Context, args map[string]any) *T
|
||||||
endLine := startLine + linesRead - 1
|
endLine := startLine + linesRead - 1
|
||||||
displayPath := filepath.Base(path)
|
displayPath := filepath.Base(path)
|
||||||
header := fmt.Sprintf(
|
header := fmt.Sprintf(
|
||||||
"[file: %s | read: lines %d-%d (0-indexed) | bytes: %d]",
|
"[file: %s | read: lines %d-%d (1-indexed) | bytes: %d]",
|
||||||
displayPath, start, endLine, bytesRead,
|
displayPath, start, endLine, bytesRead,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue