on main help sign in
fix(tools): lowercase 'image file is too large' error message
b203f9ciko
internal/agent/tools/view.go+1−1
@@ -204,7 +204,7 @@ func NewViewTool(
204 isSupportedImage, mimeType := getImageMimeType(filePath)
204 isSupportedImage, mimeType := getImageMimeType(filePath)
205 if isSupportedImage {
205 if isSupportedImage {
206 if fileInfo.Size() > MaxViewSize {
206 if fileInfo.Size() > MaxViewSize {
207− return fantasy.NewTextErrorResponse(fmt.Sprintf("Image file is too large (%d bytes). Maximum size is %d bytes",
207+ return fantasy.NewTextErrorResponse(fmt.Sprintf("image file is too large (%d bytes). Maximum size is %d bytes",
208 fileInfo.Size(), MaxViewSize)), nil
208 fileInfo.Size(), MaxViewSize)), nil
209 }
209 }
210 if !GetSupportsImagesFromContext(ctx) {
210 if !GetSupportsImagesFromContext(ctx) {