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

Function tryResolveServerToken

apps/kimi-code/src/cli/sub/server/shared.ts:245–251  ·  view source on GitHub ↗
(homeDir: string)

Source from the content-addressed store, hash-verified

243
244/** Best-effort token read: returns `undefined` instead of throwing. */
245export function tryResolveServerToken(homeDir: string): string | undefined {
246 try {
247 return resolveServerToken(homeDir);
248 } catch {
249 return undefined;
250 }
251}
252
253/** An `Authorization: Bearer <token>` header bag for `fetch`. */
254export function authHeaders(token: string): { Authorization: string } {

Callers 3

handleWebCommandFunction · 0.90
kill.tsFile · 0.90
run.tsFile · 0.90

Calls 1

resolveServerTokenFunction · 0.85

Tested by

no test coverage detected