feat(core): rename grep_search include parameter to include_pattern (#20328)

This commit is contained in:
Sandy Tao
2026-02-25 20:16:21 -08:00
committed by GitHub
parent d128fb0f7b
commit 39938000a9
12 changed files with 78 additions and 69 deletions
+8 -5
View File
@@ -118,7 +118,7 @@ describe('GrepTool', () => {
const params: GrepToolParams = {
pattern: 'hello',
dir_path: '.',
include: '*.txt',
include_pattern: '*.txt',
};
expect(grepTool.validateToolParams(params)).toBeNull();
});
@@ -226,7 +226,10 @@ describe('GrepTool', () => {
}, 30000);
it('should find matches with an include glob', async () => {
const params: GrepToolParams = { pattern: 'hello', include: '*.js' };
const params: GrepToolParams = {
pattern: 'hello',
include_pattern: '*.js',
};
const invocation = grepTool.build(params);
const result = await invocation.execute(abortSignal);
expect(result.llmContent).toContain(
@@ -247,7 +250,7 @@ describe('GrepTool', () => {
const params: GrepToolParams = {
pattern: 'hello',
dir_path: 'sub',
include: '*.js',
include_pattern: '*.js',
};
const invocation = grepTool.build(params);
const result = await invocation.execute(abortSignal);
@@ -572,7 +575,7 @@ describe('GrepTool', () => {
it('should generate correct description with pattern and include', () => {
const params: GrepToolParams = {
pattern: 'testPattern',
include: '*.ts',
include_pattern: '*.ts',
};
const invocation = grepTool.build(params);
expect(invocation.getDescription()).toBe("'testPattern' in *.ts");
@@ -618,7 +621,7 @@ describe('GrepTool', () => {
await fs.mkdir(dirPath, { recursive: true });
const params: GrepToolParams = {
pattern: 'testPattern',
include: '*.ts',
include_pattern: '*.ts',
dir_path: path.join('src', 'app'),
};
const invocation = grepTool.build(params);