Fix issues that resulted in Gemini trying to use relative paths where absolute paths were required (#3938)

This commit is contained in:
Jacob Richman
2025-07-11 17:49:26 -07:00
committed by GitHub
parent 6ebe97c704
commit 82bde57868
5 changed files with 66 additions and 39 deletions

View File

@@ -101,11 +101,7 @@ export class ReadFileTool extends BaseTool<ReadFileToolParams, ToolResult> {
const fileService = this.config.getFileService();
if (fileService.shouldGeminiIgnoreFile(params.absolute_path)) {
const relativePath = makeRelative(
params.absolute_path,
this.rootDirectory,
);
return `File path '${shortenPath(relativePath)}' is ignored by .geminiignore pattern(s).`;
return `File path '${filePath}' is ignored by .geminiignore pattern(s).`;
}
return null;