fix(dashboard): restore tokenized control ui links

This commit is contained in:
Peter Steinberger
2026-02-06 22:16:53 -08:00
parent e78ae48e69
commit c5194d8148
6 changed files with 65 additions and 22 deletions

View File

@@ -179,16 +179,24 @@ export async function detectBrowserOpenSupport(): Promise<BrowserOpenSupport> {
return { ok: true, command: resolved.command };
}
export function formatControlUiSshHint(params: { port: number; basePath?: string }): string {
export function formatControlUiSshHint(params: {
port: number;
basePath?: string;
token?: string;
}): string {
const basePath = normalizeControlUiBasePath(params.basePath);
const uiPath = basePath ? `${basePath}/` : "/";
const localUrl = `http://localhost:${params.port}${uiPath}`;
const authedUrl = params.token
? `${localUrl}#token=${encodeURIComponent(params.token)}`
: undefined;
const sshTarget = resolveSshTargetHint();
return [
"No GUI detected. Open from your computer:",
`ssh -N -L ${params.port}:127.0.0.1:${params.port} ${sshTarget}`,
"Then open:",
localUrl,
authedUrl,
"Docs:",
"https://docs.openclaw.ai/gateway/remote",
"https://docs.openclaw.ai/web/control-ui",