fix: add gateway connection debug output
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
resolveStorePath,
|
||||
type SessionEntry,
|
||||
} from "../config/sessions.js";
|
||||
import { callGateway } from "../gateway/call.js";
|
||||
import { buildGatewayConnectionDetails, callGateway } from "../gateway/call.js";
|
||||
import { info } from "../globals.js";
|
||||
import { buildProviderSummary } from "../infra/provider-summary.js";
|
||||
import {
|
||||
@@ -222,7 +222,13 @@ const buildFlags = (entry: SessionEntry): string[] => {
|
||||
};
|
||||
|
||||
export async function statusCommand(
|
||||
opts: { json?: boolean; deep?: boolean; usage?: boolean; timeoutMs?: number },
|
||||
opts: {
|
||||
json?: boolean;
|
||||
deep?: boolean;
|
||||
usage?: boolean;
|
||||
timeoutMs?: number;
|
||||
verbose?: boolean;
|
||||
},
|
||||
runtime: RuntimeEnv,
|
||||
) {
|
||||
const summary = await getStatusSummary();
|
||||
@@ -247,6 +253,14 @@ export async function statusCommand(
|
||||
return;
|
||||
}
|
||||
|
||||
if (opts.verbose) {
|
||||
const details = buildGatewayConnectionDetails();
|
||||
runtime.log(info("Gateway connection:"));
|
||||
for (const line of details.message.split("\n")) {
|
||||
runtime.log(` ${line}`);
|
||||
}
|
||||
}
|
||||
|
||||
runtime.log(
|
||||
`Web session: ${summary.web.linked ? "linked" : "not linked"}${summary.web.linked ? ` (last refreshed ${formatAge(summary.web.authAgeMs)})` : ""}`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user