(input: EditToolInput, context: ToolContext)
| 88 | } |
| 89 | |
| 90 | export async function editFileTool(input: EditToolInput, context: ToolContext): Promise<ToolResponse<EditToolDetails>> { |
| 91 | const path = resolveAllowedPath(input.path, context.cwd, [context.root]); |
| 92 | const tool = createEditTool(context.cwd); |
| 93 | |
| 94 | return runTool((params) => tool.execute("edit_file", params), { |
| 95 | path, |
| 96 | edits: input.edits, |
| 97 | }, context); |
| 98 | } |
| 99 | |
| 100 | export async function grepFilesTool(input: GrepToolInput, context: ToolContext): Promise<ToolResponse> { |
| 101 | if (input.path) resolveAllowedPath(input.path, context.cwd, [context.root]); |
no test coverage detected