(source: string, directApiKeyEnvName: string)
| 54 | } |
| 55 | |
| 56 | function 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 | |
| 76 | function getAuthTokenSourceResolution(source: string): string { |
| 77 | if (source === 'claude.ai') { |
no outgoing calls
no test coverage detected