| 61 | } |
| 62 | |
| 63 | function renderList(reports) { |
| 64 | const lines = []; |
| 65 | lines.push('Worktree Readiness Reports'); |
| 66 | lines.push('='.repeat(40)); |
| 67 | if (reports.length === 0) { |
| 68 | lines.push(' (none recorded)'); |
| 69 | return `${lines.join('\n')}\n`; |
| 70 | } |
| 71 | |
| 72 | for (const report of reports.slice(0, 20)) { |
| 73 | const branch = report.branch ? ` - ${report.branch}` : ''; |
| 74 | lines.push(` ${report.status} - ${report.worktreeName || path.basename(report.worktreePath || '')}${branch}`); |
| 75 | } |
| 76 | return `${lines.join('\n')}\n`; |
| 77 | } |
| 78 | |
| 79 | async function main() { |
| 80 | const args = parseArgs(process.argv); |