Status scan: fix JSON channels result typing

This commit is contained in:
Vincent Koc
2026-03-01 12:21:56 -08:00
parent ba0aa3cfae
commit 7aa9267d00

View File

@@ -166,7 +166,7 @@ async function scanStatusJsonFast(opts: {
gatewaySelf, gatewaySelf,
channelIssues, channelIssues,
agentStatus, agentStatus,
channels: [], channels: { rows: [], details: [] },
summary, summary,
memory, memory,
memoryPlugin, memoryPlugin,
@@ -188,7 +188,7 @@ export async function scanStatus(
{ {
label: "Scanning status…", label: "Scanning status…",
total: 10, total: 10,
enabled: opts.json !== true, enabled: true,
}, },
async (progress) => { async (progress) => {
progress.setLabel("Loading config…"); progress.setLabel("Loading config…");
@@ -258,13 +258,11 @@ export async function scanStatus(
progress.tick(); progress.tick();
progress.setLabel("Summarizing channels…"); progress.setLabel("Summarizing channels…");
const channels = opts.json const channels = await buildChannelsTable(cfg, {
? [] // Show token previews in regular status; keep `status --all` redacted.
: await buildChannelsTable(cfg, { // Set `CLAWDBOT_SHOW_SECRETS=0` to force redaction.
// Show token previews in regular status; keep `status --all` redacted. showSecrets: process.env.CLAWDBOT_SHOW_SECRETS?.trim() !== "0",
// Set `CLAWDBOT_SHOW_SECRETS=0` to force redaction. });
showSecrets: process.env.CLAWDBOT_SHOW_SECRETS?.trim() !== "0",
});
progress.tick(); progress.tick();
progress.setLabel("Checking memory…"); progress.setLabel("Checking memory…");