This commit is contained in:
afjcjsbx
2026-03-04 22:59:58 +01:00
parent c87375588e
commit 1b990d9acd
+6 -1
View File
@@ -143,7 +143,12 @@ func (t *ReadFileTool) Execute(ctx context.Context, args map[string]any) *ToolRe
// Lock the binaries now before using more RAM
if isBinaryFile(header) {
return ErrorResult(fmt.Sprintf("cannot read file %q: appears to be a binary file (e.g., PDF, image, executable)", filepath.Base(path)))
return ErrorResult(
fmt.Sprintf(
"cannot read file %q: appears to be a binary file (e.g., PDF, image, executable)",
filepath.Base(path),
),
)
}
// If it is text, let's read the rest of the file