fix(auth): support official Command Code environment names

This commit is contained in:
Patrick Wozniak
2026-08-25 15:54:29 +02:00
parent c51a790530
commit 6a7a71e206
13 changed files with 31 additions and 14 deletions
+1
View File
@@ -34,6 +34,7 @@ export function getConfiguredApiKey(
} = {},
): string | undefined {
const env = options.env ?? process.env
if (env.COMMAND_CODE_API_KEY) return env.COMMAND_CODE_API_KEY
if (env.COMMANDCODE_API_KEY) return env.COMMANDCODE_API_KEY
const home = options.homeDir?.() ?? homedir()
+1 -1
View File
@@ -45,7 +45,7 @@ export function registerCommandCodeQuota(
const apiKey = pickCommandCodeApiKey(registryKey, getConfiguredKey())
if (!apiKey) {
ctx.ui.notify(
"Command Code quota requires an API key. Run /login and select Command Code, or set COMMANDCODE_API_KEY.",
"Command Code quota requires an API key. Run /login and select Command Code, or set COMMAND_CODE_API_KEY.",
"warning",
)
return