MCPcopy
hub / github.com/ValueCell-ai/ClawX / buildOpenClawControlUiUrl

Function buildOpenClawControlUiUrl

electron/utils/openclaw-control-ui.ts:18–32  ·  view source on GitHub ↗
(
  port: number,
  token: string,
  options: OpenClawControlUiUrlOptions = {},
)

Source from the content-addressed store, hash-verified

16};
17
18export function buildOpenClawControlUiUrl(
19 port: number,
20 token: string,
21 options: OpenClawControlUiUrlOptions = {},
22): string {
23 const path = options.view ? CONTROL_UI_VIEW_PATHS[options.view] : '/';
24 const url = new URL(path, `http://127.0.0.1:${port}`);
25 const trimmedToken = token.trim();
26
27 if (trimmedToken) {
28 url.hash = new URLSearchParams({ token: trimmedToken }).toString();
29 }
30
31 return url.toString();
32}

Callers 2

createGatewayApiFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected