feat(status): improve status output

This commit is contained in:
Peter Steinberger
2026-01-10 23:31:24 +01:00
parent 67b7877bbf
commit 1eb50ffac4
25 changed files with 2382 additions and 40 deletions

View File

@@ -7,6 +7,7 @@ import {
listIMessageAccountIds,
resolveIMessageAccount,
} from "../imessage/accounts.js";
import { resolveMSTeamsCredentials } from "../msteams/token.js";
import { DEFAULT_ACCOUNT_ID } from "../routing/session-key.js";
import {
listSignalAccountIds,
@@ -297,6 +298,27 @@ export async function buildProviderSummary(
}
}
const msEnabled = effective.msteams?.enabled !== false;
if (!msEnabled) {
lines.push(tint("MS Teams: disabled", theme.muted));
} else {
const configured = Boolean(resolveMSTeamsCredentials(effective.msteams));
lines.push(
configured
? tint("MS Teams: configured", theme.success)
: tint("MS Teams: not configured", theme.muted),
);
if (configured && resolved.includeAllowFrom) {
const allowFrom = (effective.msteams?.allowFrom ?? [])
.map((val) => val.trim())
.filter(Boolean)
.slice(0, 2);
if (allowFrom.length > 0) {
lines.push(accountLine("default", [`allow:${allowFrom.join(",")}`]));
}
}
}
return lines;
}