(input: WriteToolInput, context: ToolContext)
| 78 | } |
| 79 | |
| 80 | export async function writeFileTool(input: WriteToolInput, context: ToolContext): Promise<ToolResponse> { |
| 81 | const path = resolveAllowedPath(input.path, context.cwd, [context.root]); |
| 82 | const tool = createWriteTool(context.cwd); |
| 83 | |
| 84 | return runTool((params) => tool.execute("write_file", params), { |
| 85 | path, |
| 86 | content: input.content, |
| 87 | }, context); |
| 88 | } |
| 89 | |
| 90 | export async function editFileTool(input: EditToolInput, context: ToolContext): Promise<ToolResponse<EditToolDetails>> { |
| 91 | const path = resolveAllowedPath(input.path, context.cwd, [context.root]); |
no test coverage detected