mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-13 23:01:09 -07:00
feat(core): rename grep_search include parameter to include_pattern (#20328)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user