chore: show dashboard url in status

This commit is contained in:
Peter Steinberger
2026-01-08 10:51:55 +01:00
parent 840c64084e
commit e8698fb9ef
2 changed files with 26 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ import { resolveGatewayProgramArguments } from "../daemon/program-args.js";
import { resolveGatewayService } from "../daemon/service.js";
import { callGateway } from "../gateway/call.js";
import { resolveGatewayBindHost } from "../gateway/net.js";
import { resolveControlUiLinks } from "../commands/onboard-helpers.js";
import {
formatPortDiagnostics,
inspectPortUsage,
@@ -562,6 +563,17 @@ function printDaemonStatus(status: DaemonStatus, opts: { json: boolean }) {
`Gateway: bind=${status.gateway.bindMode} (${bindHost}), port=${status.gateway.port} (${status.gateway.portSource})`,
);
defaultRuntime.log(`Probe target: ${status.gateway.probeUrl}`);
const controlUiEnabled = status.config?.daemon?.controlUi?.enabled ?? true;
if (!controlUiEnabled) {
defaultRuntime.log("Dashboard: disabled");
} else {
const links = resolveControlUiLinks({
port: status.gateway.port,
bind: status.gateway.bindMode,
basePath: status.config?.daemon?.controlUi?.basePath,
});
defaultRuntime.log(`Dashboard: ${links.httpUrl}`);
}
if (status.gateway.probeNote) {
defaultRuntime.log(`Probe note: ${status.gateway.probeNote}`);
}

View File

@@ -6,7 +6,7 @@ import {
} from "../agents/defaults.js";
import { resolveConfiguredModelRef } from "../agents/model-selection.js";
import { withProgress } from "../cli/progress.js";
import { loadConfig } from "../config/config.js";
import { loadConfig, resolveGatewayPort } from "../config/config.js";
import {
loadSessionStore,
resolveStorePath,
@@ -29,6 +29,7 @@ import {
logWebSelfId,
webAuthExists,
} from "../web/session.js";
import { resolveControlUiLinks } from "./onboard-helpers.js";
import type { HealthSummary } from "./health.js";
export type SessionStatus = {
@@ -265,6 +266,7 @@ export async function statusCommand(
},
runtime: RuntimeEnv,
) {
const cfg = loadConfig();
const summary = await getStatusSummary();
const usage = opts.usage
? await withProgress(
@@ -311,11 +313,21 @@ export async function statusCommand(
}
}
const controlUiEnabled = cfg.gateway?.controlUi?.enabled ?? true;
if (!controlUiEnabled) {
runtime.log(info("Dashboard: disabled"));
} else {
const links = resolveControlUiLinks({
port: resolveGatewayPort(cfg),
bind: cfg.gateway?.bind,
basePath: cfg.gateway?.controlUi?.basePath,
});
runtime.log(info(`Dashboard: ${links.httpUrl}`));
}
runtime.log(
`Web session: ${summary.web.linked ? "linked" : "not linked"}${summary.web.linked ? ` (last refreshed ${formatAge(summary.web.authAgeMs)})` : ""}`,
);
if (summary.web.linked) {
const cfg = loadConfig();
const account = resolveWhatsAppAccount({ cfg });
logWebSelfId(account.authDir, runtime, true);
}