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

View File

@@ -350,7 +350,7 @@ describe('RipGrepTool', () => {
},
{
name: 'pattern, path, and include',
params: { pattern: 'hello', dir_path: '.', include: '*.txt' },
params: { pattern: 'hello', dir_path: '.', include_pattern: '*.txt' },
expected: null,
},
])(
@@ -526,7 +526,10 @@ describe('RipGrepTool', () => {
}),
);
const params: RipGrepToolParams = { pattern: 'hello', include: '*.js' };
const params: RipGrepToolParams = {
pattern: 'hello',
include_pattern: '*.js',
};
const invocation = grepTool.build(params);
const result = await invocation.execute(abortSignal);
expect(result.llmContent).toContain(
@@ -564,7 +567,7 @@ describe('RipGrepTool', () => {
const params: RipGrepToolParams = {
pattern: 'hello',
dir_path: 'sub',
include: '*.js',
include_pattern: '*.js',
};
const invocation = grepTool.build(params);
const result = await invocation.execute(abortSignal);
@@ -1314,7 +1317,7 @@ describe('RipGrepTool', () => {
const params: RipGrepToolParams = {
pattern: 'content',
include: '*.{ts,tsx}',
include_pattern: '*.{ts,tsx}',
};
const invocation = grepTool.build(params);
const result = await invocation.execute(abortSignal);
@@ -1350,7 +1353,7 @@ describe('RipGrepTool', () => {
const params: RipGrepToolParams = {
pattern: 'code',
include: 'src/**',
include_pattern: 'src/**',
};
const invocation = grepTool.build(params);
const result = await invocation.execute(abortSignal);
@@ -1774,7 +1777,7 @@ describe('RipGrepTool', () => {
},
{
name: 'pattern and include',
params: { pattern: 'testPattern', include: '*.ts' },
params: { pattern: 'testPattern', include_pattern: '*.ts' },
expected: "'testPattern' in *.ts within ./",
},
{
@@ -1849,7 +1852,7 @@ describe('RipGrepTool', () => {
await fs.mkdir(dirPath, { recursive: true });
const params: RipGrepToolParams = {
pattern: 'testPattern',
include: '*.ts',
include_pattern: '*.ts',
dir_path: path.join('src', 'app'),
};
const invocation = grepTool.build(params);