MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / resolveVisAuthToken

Function resolveVisAuthToken

apps/vis/server/src/config.ts:51–61  ·  view source on GitHub ↗
(host: string = resolveHost())

Source from the content-addressed store, hash-verified

49}
50
51export function resolveVisAuthToken(host: string = resolveHost()): string | undefined {
52 const raw = process.env['VIS_AUTH_TOKEN'];
53 const token = raw?.trim();
54 if (token !== undefined && token.length > 0) return token;
55 if (!isLoopbackHost(host)) {
56 throw new Error(
57 `VIS_AUTH_TOKEN is required when binding vis-server outside loopback (host=${host})`,
58 );
59 }
60 return undefined;
61}
62
63export const KIMI_CODE_HOME: string = resolveKimiCodeHome();

Callers 2

mainFunction · 0.90
startVisServerFunction · 0.90

Calls 2

resolveHostFunction · 0.85
isLoopbackHostFunction · 0.70

Tested by

no test coverage detected