| 36 | } |
| 37 | |
| 38 | function renderCompile(projectRoot, result, lint) { |
| 39 | const lines = []; |
| 40 | lines.push('Memory Blocks'); |
| 41 | lines.push('='.repeat(40)); |
| 42 | lines.push(`Project: ${projectRoot}`); |
| 43 | lines.push(`Blocks: ${result.blocks.length}`); |
| 44 | lines.push(`Index: ${path.relative(projectRoot, result.indexPath)}`); |
| 45 | lines.push(''); |
| 46 | for (const block of result.blocks) { |
| 47 | lines.push(` ${block.id} (${block.type}) - ${block.sources.length} source(s), ${block.confidence}`); |
| 48 | } |
| 49 | lines.push(''); |
| 50 | lines.push(`Lint: ${lint.pass ? 'PASS' : 'FAIL'} (${lint.issues.length} issue(s))`); |
| 51 | for (const issue of lint.issues.slice(0, 12)) { |
| 52 | lines.push(` ${issue.id || 'memory'}: ${issue.issue}`); |
| 53 | } |
| 54 | return `${lines.join('\n')}\n`; |
| 55 | } |
| 56 | |
| 57 | function renderList(projectRoot, blocks) { |
| 58 | const lines = []; |