diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 7ac2ca792..76ca7ab53 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -1,10 +1,16 @@ # Changelog ## [Unreleased] + ### Changed - Increased default async max jobs limit from 15 to 100 for improved concurrent task handling +### Fixed + +- Improved config display formatting to properly render arrays and objects as JSON instead of `[object Object]` +- Enhanced type display in config list output to show correct type indicators for number, array, and record settings + ## [13.3.3] - 2026-02-26 ### Added diff --git a/packages/coding-agent/src/cli/config-cli.ts b/packages/coding-agent/src/cli/config-cli.ts index 001bc117e..9e724b5eb 100644 --- a/packages/coding-agent/src/cli/config-cli.ts +++ b/packages/coding-agent/src/cli/config-cli.ts @@ -134,18 +134,36 @@ function formatValue(value: unknown): string { if (typeof value === "number") { return chalk.cyan(String(value)); } + if (typeof value === "string") { + return chalk.yellow(value); + } + if (Array.isArray(value) || typeof value === "object") { + try { + return chalk.yellow(JSON.stringify(value)); + } catch { + return chalk.yellow(String(value)); + } + } return chalk.yellow(String(value)); } function getTypeDisplay(def: CliSettingDef): string { - if (def.type === "boolean") { - return "(boolean)"; - } const values = getSettingValues(def); if (values && values.length > 0) { return `(${values.join("|")})`; } - return "(string)"; + switch (def.type) { + case "boolean": + return "(boolean)"; + case "number": + return "(number)"; + case "array": + return "(array)"; + case "record": + return "(record)"; + default: + return "(string)"; + } } // ============================================================================= diff --git a/packages/coding-agent/test/config-cli.test.ts b/packages/coding-agent/test/config-cli.test.ts index b5724b939..28bffb79e 100644 --- a/packages/coding-agent/test/config-cli.test.ts +++ b/packages/coding-agent/test/config-cli.test.ts @@ -39,4 +39,17 @@ describe("config CLI schema coverage", () => { expect(parsed.type).toBe("array"); expect(parsed.description).toBe(""); }); + + it("renders record settings as JSON and with record type in text output", async () => { + const logSpy = vi.spyOn(console, "log").mockImplementation(() => {}); + + await runConfigCommand({ action: "list", flags: {} }); + + const lines = logSpy.mock.calls.map(call => String(call[0] ?? "")); + const modelRolesLine = lines.find(line => line.includes("modelRoles =")); + expect(modelRolesLine).toBeDefined(); + expect(modelRolesLine).toContain("modelRoles = {}"); + expect(modelRolesLine).toContain("(record)"); + expect(modelRolesLine).not.toContain("[object Object]"); + }); });