summaryrefslogtreecommitdiff
path: root/packages/cli/src/gemini.tsx
diff options
context:
space:
mode:
authorPascal Birchler <[email protected]>2025-07-09 00:10:36 +0200
committerGitHub <[email protected]>2025-07-08 22:10:36 +0000
commitc8cf954e6ef8b360b0c7880ca4d29a12eb1ec7c8 (patch)
tree55670fde25a7d59cae19d2b21ecacc67f58ae1cc /packages/cli/src/gemini.tsx
parent0506b40a39c04a5949c7886aaf5f87173453f0a2 (diff)
fix(auth): do not blindly default to API key auth (#3235)
Co-authored-by: matt korwel <[email protected]> Co-authored-by: N. Taylor Mullen <[email protected]>
Diffstat (limited to 'packages/cli/src/gemini.tsx')
-rw-r--r--packages/cli/src/gemini.tsx12
1 files changed, 3 insertions, 9 deletions
diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx
index 91425d8d..a2e14ab0 100644
--- a/packages/cli/src/gemini.tsx
+++ b/packages/cli/src/gemini.tsx
@@ -17,8 +17,8 @@ import { start_sandbox } from './utils/sandbox.js';
import {
LoadedSettings,
loadSettings,
- SettingScope,
USER_SETTINGS_PATH,
+ SettingScope,
} from './config/settings.js';
import { themeManager } from './ui/themes/theme-manager.js';
import { getStartupWarnings } from './utils/startupWarnings.js';
@@ -111,15 +111,9 @@ export async function main() {
process.exit(0);
}
- // Set a default auth type if one isn't set for a couple of known cases.
+ // Set a default auth type if one isn't set.
if (!settings.merged.selectedAuthType) {
- if (process.env.GEMINI_API_KEY) {
- settings.setValue(
- SettingScope.User,
- 'selectedAuthType',
- AuthType.USE_GEMINI,
- );
- } else if (process.env.CLOUD_SHELL === 'true') {
+ if (process.env.CLOUD_SHELL === 'true') {
settings.setValue(
SettingScope.User,
'selectedAuthType',