(name: string, symbol: string)
| 681 | }); |
| 682 | |
| 683 | async function indexProject(name: string, symbol: string): Promise<string> { |
| 684 | const root = path.join(tempDir, name); |
| 685 | fs.mkdirSync(root, { recursive: true }); |
| 686 | fs.writeFileSync(path.join(root, 'app.ts'), `export function ${symbol}() { return 42; }\n`); |
| 687 | const cg = await CodeGraph.init(root); |
| 688 | try { await cg.indexAll(); } finally { cg.close(); } |
| 689 | return root; |
| 690 | } |
| 691 | |
| 692 | async function start(root: string): Promise<MCPEngine> { |
| 693 | engine = new BuiltEngine({ watch: false, queryPool: true }); |
no test coverage detected