style: format

This commit is contained in:
Peter Steinberger
2026-01-09 00:31:24 +01:00
parent 71309c064a
commit 4e92ccc0dd
13 changed files with 66 additions and 50 deletions

View File

@@ -240,15 +240,15 @@ export async function doctorCommand(
}
}
if (healthOk) {
try {
const status = await callGateway<Record<string, unknown>>({
method: "providers.status",
params: { probe: true, timeoutMs: 5000 },
timeoutMs: 6000,
});
const issues = collectProvidersStatusIssues(status);
if (issues.length > 0) {
if (healthOk) {
try {
const status = await callGateway<Record<string, unknown>>({
method: "providers.status",
params: { probe: true, timeoutMs: 5000 },
timeoutMs: 6000,
});
const issues = collectProvidersStatusIssues(status);
if (issues.length > 0) {
note(
issues
.map(

View File

@@ -391,7 +391,12 @@ describe("providers command", () => {
hasWildcardUnmentionedGroups: true,
unresolvedGroups: 1,
groups: [
{ chatId: "-1001", ok: false, status: "left", error: "not in group" },
{
chatId: "-1001",
ok: false,
status: "left",
error: "not in group",
},
],
},
},

View File

@@ -79,11 +79,13 @@ export function formatGatewayProvidersStatusLines(
bits.push(account.connected ? "connected" : "disconnected");
}
const inboundAt =
typeof account.lastInboundAt === "number" && Number.isFinite(account.lastInboundAt)
typeof account.lastInboundAt === "number" &&
Number.isFinite(account.lastInboundAt)
? account.lastInboundAt
: null;
const outboundAt =
typeof account.lastOutboundAt === "number" && Number.isFinite(account.lastOutboundAt)
typeof account.lastOutboundAt === "number" &&
Number.isFinite(account.lastOutboundAt)
? account.lastOutboundAt
: null;
if (inboundAt) bits.push(`in:${formatAge(Date.now() - inboundAt)}`);