diff --git a/src/cli/doctor/format-verbose.ts b/src/cli/doctor/format-verbose.ts index f965b6759..daa33f1fd 100644 --- a/src/cli/doctor/format-verbose.ts +++ b/src/cli/doctor/format-verbose.ts @@ -57,6 +57,19 @@ export function formatVerbose(result: DoctorResult): string { } lines.push("") + for (const check of results) { + if (!check.details || check.details.length === 0) { + continue + } + + lines.push(`${color.bold(check.name)}`) + lines.push(`${color.dim("\u2500".repeat(40))}`) + for (const detail of check.details) { + lines.push(detail) + } + lines.push("") + } + const allIssues = results.flatMap((r) => r.issues) if (allIssues.length > 0) { lines.push(`${color.bold("Issues")}`) diff --git a/src/cli/doctor/formatter.test.ts b/src/cli/doctor/formatter.test.ts index 312ccbedc..f5b4ebdd2 100644 --- a/src/cli/doctor/formatter.test.ts +++ b/src/cli/doctor/formatter.test.ts @@ -51,6 +51,23 @@ function createDoctorResultWithIssues(): DoctorResult { return base } +function createDoctorResultWithDetails(): DoctorResult { + const base = createDoctorResult() + base.results = [ + ...base.results, + { + name: "Models", + status: "pass", + message: "2 agents, 1 category, 0 overrides", + details: ["Available models: openai/gpt-5.4", "Agent sisyphus -> openai/gpt-5.4"], + issues: [], + }, + ] + base.summary.total = 3 + base.summary.passed = 2 + return base +} + describe("formatDoctorOutput", () => { describe("#given default mode", () => { it("shows System OK when no issues", async () => { @@ -137,6 +154,20 @@ describe("formatDoctorOutput", () => { expect(output).toContain("0 failed") expect(output).toContain("1 warnings") }) + + it("renders check details sections such as Models", async () => { + //#given + const result = createDoctorResultWithDetails() + const { formatDoctorOutput } = await import(`./formatter?verbose-details-${Date.now()}`) + + //#when + const output = stripAnsi(formatDoctorOutput(result, "verbose")) + + //#then + expect(output).toContain("Models") + expect(output).toContain("Available models: openai/gpt-5.4") + expect(output).toContain("Agent sisyphus -> openai/gpt-5.4") + }) }) describe("formatJsonOutput", () => {