feat(core): enable search hidden dir

This commit is contained in:
cynthialong0-0
2026-05-05 08:26:15 +00:00
parent d313cd7dde
commit 60b79d676a
3 changed files with 23 additions and 1 deletions
+20
View File
@@ -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`,
});
},
});
});
+2
View File
@@ -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');
});
+1 -1
View File
@@ -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');