You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnmcp.NewToolResultError(fmt.Sprintf("failed to resolve git reference: %s", err)), nil
505
505
}
506
506
507
507
// If the path is (most likely) not to be a directory, we will
@@ -592,6 +592,7 @@ func GetFileContents(getClient GetClientFn, getRawClient raw.GetRawClientFn, t t
592
592
err,
593
593
), nil
594
594
}
595
+
deferfunc() { _=resp.Body.Close() }()
595
596
596
597
// Step 2: Filter tree for matching paths
597
598
constmaxMatchingFiles=3
@@ -601,7 +602,7 @@ func GetFileContents(getClient GetClientFn, getRawClient raw.GetRawClientFn, t t
601
602
iferr!=nil {
602
603
returnmcp.NewToolResultError(fmt.Sprintf("failed to marshal matching files: %s", err)), nil
603
604
}
604
-
returnmcp.NewToolResultText(fmt.Sprintf("Provided path did not match a file or directory, but resolved ref to %s with possible path matches: %s", ref, matchingFilesJSON)), nil
605
+
returnmcp.NewToolResultText(fmt.Sprintf("Path did not point to a file or directory, but resolved ref to %s with possible path matches: %s", ref, matchingFilesJSON)), nil
605
606
}
606
607
607
608
returnmcp.NewToolResultError("Failed to get file contents. The path does not point to a file or directory, or the file does not exist in the repository."), nil
0 commit comments