mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-15 14:23:02 -07:00
feat(core): enable search hidden dir
This commit is contained in:
@@ -179,4 +179,24 @@ describe('grep_search_functionality', () => {
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
evalTest('USUALLY_PASSES', {
|
||||
suiteName: 'default',
|
||||
suiteType: 'behavioral',
|
||||
name: 'should find files in hidden directories',
|
||||
files: {
|
||||
'.hidden_dir/system.md':
|
||||
'Instructional Conversion and Integration Protocol',
|
||||
'visible_dir/normal.txt': 'nothing to see here',
|
||||
},
|
||||
prompt: 'Find "Instructional Conversion and Integration Protocol"',
|
||||
assert: async (rig: TestRig, result: string) => {
|
||||
await rig.waitForToolCall('grep_search');
|
||||
assertModelHasOutput(result);
|
||||
checkModelOutputContent(result, {
|
||||
expectedContent: [/\.hidden_dir\/system\.md/],
|
||||
testName: `${TEST_PREFIX}hidden directory search`,
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1330,6 +1330,7 @@ describe('RipGrepTool', () => {
|
||||
const result = await invocation.execute({ abortSignal });
|
||||
|
||||
const spawnArgs = mockSpawn.mock.calls[0][1];
|
||||
expect(spawnArgs).toContain('--hidden');
|
||||
expect(spawnArgs).toContain('--fixed-strings');
|
||||
expect(spawnArgs).toContain('--regexp');
|
||||
expect(spawnArgs).toContain('hello.world');
|
||||
@@ -1777,6 +1778,7 @@ describe('RipGrepTool', () => {
|
||||
await invocation.execute({ abortSignal });
|
||||
|
||||
const spawnArgs = mockSpawn.mock.calls[0][1];
|
||||
expect(spawnArgs).toContain('--hidden');
|
||||
expect(spawnArgs).toContain('--max-count');
|
||||
expect(spawnArgs).toContain('1');
|
||||
});
|
||||
|
||||
@@ -402,7 +402,7 @@ class GrepToolInvocation extends BaseToolInvocation<
|
||||
|
||||
const searchPaths = Array.isArray(path) ? path : [path];
|
||||
|
||||
const rgArgs = ['--json'];
|
||||
const rgArgs = ['--json', '--hidden'];
|
||||
|
||||
if (!case_sensitive) {
|
||||
rgArgs.push('--ignore-case');
|
||||
|
||||
Reference in New Issue
Block a user