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

Function resolveApiKey

apps/kimi-code/src/cli/sub/provider.ts:519–524  ·  view source on GitHub ↗
(flag: string | undefined, env: NodeJS.ProcessEnv)

Source from the content-addressed store, hash-verified

517}
518
519function resolveApiKey(flag: string | undefined, env: NodeJS.ProcessEnv): string | undefined {
520 if (typeof flag === 'string' && flag.length > 0) return flag;
521 const fromEnv = env['KIMI_REGISTRY_API_KEY'];
522 if (typeof fromEnv === 'string' && fromEnv.length > 0) return fromEnv;
523 return undefined;
524}
525
526function asManaged(config: KimiConfig): ManagedKimiConfigShape {
527 return config as unknown as ManagedKimiConfigShape;

Callers 2

handleProviderAddFunction · 0.85
handleCatalogAddFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected