(name, args, ctx)
| 1013 | // This keeps the hook out of every individual tool case. |
| 1014 | const _executeToolRaw = executeTool; |
| 1015 | async function executeToolWithTDD(name, args, ctx) { |
| 1016 | const result = await _executeToolRaw(name, args, ctx); |
| 1017 | const WRITE_TOOLS = new Set(['write_file', 'patch', 'append_file', 'read_and_patch']); |
| 1018 | if (WRITE_TOOLS.has(name) && result && !result.error) { |
| 1019 | const filePath = args && (args.path || ''); |
| 1020 | return _tddPostWrite(filePath, result, process.cwd()); |
| 1021 | } |
| 1022 | return result; |
| 1023 | } |
| 1024 | |
| 1025 | module.exports = { executeTool: executeToolWithTDD }; |
nothing calls this directly
no test coverage detected