| 175 | } |
| 176 | |
| 177 | export function renderSetupReport(report) { |
| 178 | const lines = [ |
| 179 | "# Codex Setup", |
| 180 | "", |
| 181 | `Status: ${report.ready ? "ready" : "needs attention"}`, |
| 182 | "", |
| 183 | "Checks:", |
| 184 | `- node: ${report.node.detail}`, |
| 185 | `- npm: ${report.npm.detail}`, |
| 186 | `- codex: ${report.codex.detail}`, |
| 187 | `- auth: ${report.auth.detail}`, |
| 188 | `- session runtime: ${report.sessionRuntime.label}`, |
| 189 | `- review gate: ${report.reviewGateEnabled ? "enabled" : "disabled"}`, |
| 190 | "" |
| 191 | ]; |
| 192 | |
| 193 | if (report.actionsTaken.length > 0) { |
| 194 | lines.push("Actions taken:"); |
| 195 | for (const action of report.actionsTaken) { |
| 196 | lines.push(`- ${action}`); |
| 197 | } |
| 198 | lines.push(""); |
| 199 | } |
| 200 | |
| 201 | if (report.nextSteps.length > 0) { |
| 202 | lines.push("Next steps:"); |
| 203 | for (const step of report.nextSteps) { |
| 204 | lines.push(`- ${step}`); |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | return `${lines.join("\n").trimEnd()}\n`; |
| 209 | } |
| 210 | |
| 211 | export function renderReviewResult(parsedResult, meta) { |
| 212 | if (!parsedResult.parsed) { |