MCPcopy Create free account
hub / github.com/Noumena-Network/code / getApiKeySourceResolution

Function getApiKeySourceResolution

src/utils/statusNoticeDefinitions.tsx:56–74  ·  view source on GitHub ↗
(source: string, directApiKeyEnvName: string)

Source from the content-addressed store, hash-verified

54}
55
56function getApiKeySourceResolution(source: string, directApiKeyEnvName: string): string {
57 if (
58 source === 'NOUMENA_API_KEY' ||
59 source === 'ANTHROPIC_API_KEY' ||
60 source === 'OPENAI_API_KEY'
61 ) {
62 return `Unset the ${directApiKeyEnvName} environment variable.`;
63 }
64
65 if (source === 'apiKeyHelper') {
66 return 'Unset the apiKeyHelper setting.';
67 }
68
69 if (source === '/login managed key') {
70 return 'Run `ncode auth logout` to sign out of the managed key.';
71 }
72
73 return `Remove or unset the ${source} credential source.`;
74}
75
76function getAuthTokenSourceResolution(source: string): string {
77 if (source === 'claude.ai') {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected