fallback to gemini_api_key (#1255)
This commit is contained in:
parent
4e69ba3bbe
commit
ef54e4ffbc
|
@ -13,7 +13,8 @@
|
|||
"skipFiles": ["<node_internals>/**"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"GEMINI_SANDBOX": "false"
|
||||
"GEMINI_SANDBOX": "false",
|
||||
"GEMINI_API_KEY": "testkey"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -11,7 +11,11 @@ import { loadCliConfig } from './config/config.js';
|
|||
import { readStdin } from './utils/readStdin.js';
|
||||
import { basename } from 'node:path';
|
||||
import { start_sandbox } from './utils/sandbox.js';
|
||||
import { LoadedSettings, loadSettings } from './config/settings.js';
|
||||
import {
|
||||
LoadedSettings,
|
||||
loadSettings,
|
||||
SettingScope,
|
||||
} from './config/settings.js';
|
||||
import { themeManager } from './ui/themes/theme-manager.js';
|
||||
import { getStartupWarnings } from './utils/startupWarnings.js';
|
||||
import { runNonInteractive } from './nonInteractiveCli.js';
|
||||
|
@ -50,6 +54,16 @@ export async function main() {
|
|||
const extensions = loadExtensions(workspaceRoot);
|
||||
const config = await loadCliConfig(settings.merged, extensions, sessionId);
|
||||
|
||||
// set default fallback to gemini api key
|
||||
// this has to go after load cli becuase thats where the env is set
|
||||
if (!settings.merged.selectedAuthType && process.env.GEMINI_API_KEY) {
|
||||
settings.setValue(
|
||||
SettingScope.User,
|
||||
'selectedAuthType',
|
||||
AuthType.USE_GEMINI,
|
||||
);
|
||||
}
|
||||
|
||||
setMaxSizedBoxDebugging(config.getDebugMode());
|
||||
|
||||
// Initialize centralized FileDiscoveryService
|
||||
|
|
Loading…
Reference in New Issue