refactor(core): 移除不再需要的文件系统工具
删除以下工具及相关文件: - copy_file: 复制文件 - create_directory: 创建目录 - delete_file: 删除文件 - move_file: 移动文件 - search_files: 搜索文件 清理范围: - 工具实现文件 (5个) - 工具描述文件 (5个) - 单元测试文件 (6个) - Agent presets 中的引用 - Checkpoint 系统中的触发类型 - Hook 系统中的相关处理
This commit is contained in:
@@ -319,11 +319,10 @@ export class AgentExecutor {
|
||||
}
|
||||
|
||||
// 文件写入权限检查
|
||||
if (['write_file', 'edit_file', 'delete_file'].includes(toolName)) {
|
||||
if (['write_file', 'edit_file'].includes(toolName)) {
|
||||
const filePermission = permission.file;
|
||||
if (filePermission) {
|
||||
const operation = toolName === 'write_file' ? 'write' :
|
||||
toolName === 'edit_file' ? 'edit' : 'delete';
|
||||
const operation = toolName === 'write_file' ? 'write' : 'edit';
|
||||
const action = filePermission[operation];
|
||||
if (action === 'deny') {
|
||||
return { allowed: false, reason: `${operation} 操作被禁止` };
|
||||
|
||||
Reference in New Issue
Block a user