(root: string, files: Record<string, string>)
| 15 | import { ToolHandler } from '../src/mcp/tools'; |
| 16 | |
| 17 | const write = (root: string, files: Record<string, string>) => { |
| 18 | for (const [rel, content] of Object.entries(files)) { |
| 19 | fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); |
| 20 | fs.writeFileSync(path.join(root, rel), content); |
| 21 | } |
| 22 | }; |
| 23 | |
| 24 | const renderedFiles = (text: string): string[] => [...text.matchAll(/^\*\*`([^`]+)`\*\* —/gm)].map((m) => m[1]!); |
| 25 |
no test coverage detected