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

Function persistedOAuthHost

packages/oauth/src/managed-kimi-code.ts:255–268  ·  view source on GitHub ↗
(options: {
  readonly key: string;
  readonly oauthHost?: string | undefined;
})

Source from the content-addressed store, hash-verified

253}
254
255function persistedOAuthHost(options: {
256 readonly key: string;
257 readonly oauthHost?: string | undefined;
258}): string | undefined {
259 const oauthHost = options.oauthHost;
260 const normalized = normalizeEndpoint(oauthHost ?? DEFAULT_KIMI_CODE_OAUTH_HOST);
261 if (
262 options.key === KIMI_CODE_OAUTH_KEY &&
263 normalized === normalizeEndpoint(DEFAULT_KIMI_CODE_OAUTH_HOST)
264 ) {
265 return undefined;
266 }
267 return normalized;
268}
269
270function managedOAuthRef(options: {
271 readonly key: string;

Callers 1

managedOAuthRefFunction · 0.85

Calls 1

normalizeEndpointFunction · 0.70

Tested by

no test coverage detected