mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-17 17:41:24 -07:00
Limit search depth in path corrector (#14869)
This commit is contained in:
committed by
GitHub
parent
ee6556cbd2
commit
1954f45c19
@@ -24,7 +24,6 @@ describe('AcpFileSystemService', () => {
|
||||
mockFallback = {
|
||||
readTextFile: vi.fn(),
|
||||
writeTextFile: vi.fn(),
|
||||
findFiles: vi.fn(),
|
||||
};
|
||||
});
|
||||
|
||||
@@ -113,19 +112,4 @@ describe('AcpFileSystemService', () => {
|
||||
verify();
|
||||
});
|
||||
});
|
||||
|
||||
it('should always use fallback for findFiles', () => {
|
||||
service = new AcpFileSystemService(
|
||||
mockClient,
|
||||
'session-1',
|
||||
{ readTextFile: true, writeTextFile: true },
|
||||
mockFallback,
|
||||
);
|
||||
mockFallback.findFiles.mockReturnValue(['file1', 'file2']);
|
||||
|
||||
const result = service.findFiles('pattern', ['/path']);
|
||||
|
||||
expect(mockFallback.findFiles).toHaveBeenCalledWith('pattern', ['/path']);
|
||||
expect(result).toEqual(['file1', 'file2']);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -44,7 +44,4 @@ export class AcpFileSystemService implements FileSystemService {
|
||||
sessionId: this.sessionId,
|
||||
});
|
||||
}
|
||||
findFiles(fileName: string, searchPaths: readonly string[]): string[] {
|
||||
return this.fallback.findFiles(fileName, searchPaths);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user