Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/lib/agent-onboard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,16 @@ describe("printDashboardUi — regression for #2078 (port 8642 is not a chat UI)
expect(noteSpy).not.toHaveBeenCalled();
});

it("keeps the existing tokenized URL wording for UI-kind agents", () => {
it("prints tokenized URL with save-now warning for UI-kind agents", () => {
printDashboardUi("sandbox-y", "tok", uiAgent, {
note: noteSpy,
buildControlUiUrls: buildUrlsLoopback,
});

const output = logSpy.mock.calls.map((args) => String(args[0])).join("\n");
expect(output).toContain("Ficticious UI (tokenized URL; treat it like a password)");
expect(output).toContain(
"Ficticious UI (tokenized URL; treat it like a password; save it now - it will not be printed again)",
);
expect(output).toContain("Port 19000 must be forwarded before opening this URL.");
expect(output).toContain("http://127.0.0.1:19000/#token=tok");
});
Expand Down
4 changes: 3 additions & 1 deletion src/lib/agent-onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ export function printDashboardUi(
}

if (token) {
console.log(` ${info.displayName} ${label} (tokenized URL; treat it like a password)`);
console.log(
` ${info.displayName} ${label} (tokenized URL; treat it like a password; save it now - it will not be printed again)`,
);
console.log(` Port ${info.port} must be forwarded before opening this URL.`);
for (const url of deps.buildControlUiUrls(token, info.port)) {
console.log(` ${url}`);
Expand Down
4 changes: 3 additions & 1 deletion src/lib/onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6270,7 +6270,9 @@ function printDashboard(sandboxName, model, provider, nimContainer = null, agent
},
});
} else if (token) {
console.log(" OpenClaw UI (tokenized URL; treat it like a password)");
console.log(
" OpenClaw UI (tokenized URL; treat it like a password; save it now - it will not be printed again)",
);
for (const line of guidanceLines) {
console.log(` ${line}`);
}
Expand Down
Loading