refactor(core): 重命名 grep_content 工具为 grep
- 重命名 grep_content.ts 为 grep.ts - 更新工具名称从 grep_content 改为 grep - 更新所有引用该工具的代码和测试文件 - 更新描述文件名称
This commit is contained in:
+4
-4
@@ -11,11 +11,11 @@ interface GrepMatch {
|
||||
content: string;
|
||||
}
|
||||
|
||||
export const grepContentTool: ToolWithMetadata = {
|
||||
name: 'grep_content',
|
||||
description: loadDescription('grep_content'),
|
||||
export const grepTool: ToolWithMetadata = {
|
||||
name: 'grep',
|
||||
description: loadDescription('grep'),
|
||||
metadata: {
|
||||
name: 'grep_content',
|
||||
name: 'grep',
|
||||
category: 'filesystem',
|
||||
description: '在文件内容中搜索文本',
|
||||
keywords: ['grep', 'search', 'content', 'text', 'find', 'regex', '搜索', '内容', '文本', '查找', '正则'],
|
||||
@@ -11,7 +11,7 @@ export { createDirectoryTool } from './create_directory.js';
|
||||
// 搜索
|
||||
export { searchFilesTool } from './search_files.js';
|
||||
export { globTool } from './glob.js';
|
||||
export { grepContentTool } from './grep_content.js';
|
||||
export { grepTool } from './grep.js';
|
||||
|
||||
// 文件信息
|
||||
export { getFileInfoTool } from './get_file_info.js';
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
createDirectoryTool,
|
||||
searchFilesTool,
|
||||
globTool,
|
||||
grepContentTool,
|
||||
grepTool,
|
||||
getFileInfoTool,
|
||||
moveFileTool,
|
||||
copyFileTool,
|
||||
@@ -90,7 +90,7 @@ const allToolsWithMetadata: ToolWithMetadata[] = [
|
||||
createDirectoryTool,
|
||||
searchFilesTool,
|
||||
globTool,
|
||||
grepContentTool,
|
||||
grepTool,
|
||||
getFileInfoTool,
|
||||
moveFileTool,
|
||||
copyFileTool,
|
||||
|
||||
@@ -18,7 +18,7 @@ const TOOL_CATEGORY_MAP: Record<string, string> = {
|
||||
create_directory: 'filesystem',
|
||||
search_files: 'filesystem',
|
||||
glob: 'filesystem',
|
||||
grep_content: 'filesystem',
|
||||
grep: 'filesystem',
|
||||
get_file_info: 'filesystem',
|
||||
move_file: 'filesystem',
|
||||
copy_file: 'filesystem',
|
||||
|
||||
@@ -45,7 +45,7 @@ export const enterPlanModeTool: ToolWithMetadata = {
|
||||
|
||||
计划模式中的限制:
|
||||
进入后只能使用只读工具:
|
||||
✅ read_file, list_directory, search_files, grep_content
|
||||
✅ read_file, list_directory, search_files, grep
|
||||
✅ web_search, web_extract
|
||||
✅ task(探索代理)
|
||||
✅ ask_user_question
|
||||
|
||||
Reference in New Issue
Block a user