chore: do not respond with error

Kujtim Hoxha created

Change summary

internal/agent/tools/ls.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

internal/agent/tools/ls.go 🔗

@@ -99,7 +99,7 @@ func NewLsTool(permissions permission.Service, workingDir string, lsConfig confi
 
 			output, metadata, err := ListDirectoryTree(searchPath, params, lsConfig)
 			if err != nil {
-				return fantasy.ToolResponse{}, err
+				return fantasy.NewTextErrorResponse(err.Error()), err
 			}
 
 			return fantasy.WithResponseMetadata(