MCPcopy
hub / github.com/Doorman11991/smallcode / executeToolWithTDD

Function executeToolWithTDD

bin/executor.js:1015–1023  ·  view source on GitHub ↗
(name, args, ctx)

Source from the content-addressed store, hash-verified

1013// This keeps the hook out of every individual tool case.
1014const _executeToolRaw = executeTool;
1015async 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
1025module.exports = { executeTool: executeToolWithTDD };

Callers

nothing calls this directly

Calls 2

_tddPostWriteFunction · 0.85
hasMethod · 0.45

Tested by

no test coverage detected