refactor(core): 重命名 grep_content 工具为 grep

- 重命名 grep_content.ts 为 grep.ts
- 更新工具名称从 grep_content 改为 grep
- 更新所有引用该工具的代码和测试文件
- 更新描述文件名称
This commit is contained in:
2025-12-16 15:03:33 +08:00
parent 452f19e2a9
commit 30f35a6562
14 changed files with 40 additions and 40 deletions
@@ -49,7 +49,7 @@ describe('Prompt Template System', () => {
it('should handle multiple variables in one template', () => {
const template = 'Use ${tools.glob}, ${tools.grep}, and ${tools.read}';
const result = renderTemplate(template, context);
expect(result).toBe('Use glob, grep_content, and read_file');
expect(result).toBe('Use glob, grep, and read_file');
});
it('should handle ternary expressions - false condition', () => {
@@ -103,7 +103,7 @@ describe('Prompt Template System', () => {
it('should create context with default tool names', () => {
const ctx = createDefaultContext();
expect(ctx.tools.glob).toBe('glob');
expect(ctx.tools.grep).toBe('grep_content');
expect(ctx.tools.grep).toBe('grep');
expect(ctx.tools.read).toBe('read_file');
expect(ctx.tools.write).toBe('write_file');
expect(ctx.tools.bash).toBe('bash');
@@ -117,7 +117,7 @@ describe('Prompt Template System', () => {
},
});
expect(ctx.tools.glob).toBe('custom_glob');
expect(ctx.tools.grep).toBe('grep_content'); // Others unchanged
expect(ctx.tools.grep).toBe('grep'); // Others unchanged
});
it('should set default plan values', () => {