Sync upstream Gemini-CLI v0.8.2 (#838)

This commit is contained in:
tanzhenxin
2025-10-23 09:27:04 +08:00
committed by GitHub
parent 096fabb5d6
commit eb95c131be
644 changed files with 70389 additions and 23709 deletions

View File

@@ -5,10 +5,10 @@
*/
import { AuthType } from '@qwen-code/qwen-code-core';
import { loadEnvironment } from './settings.js';
import { loadEnvironment, loadSettings } from './settings.js';
export const validateAuthMethod = (authMethod: string): string | null => {
loadEnvironment();
export function validateAuthMethod(authMethod: string): string | null {
loadEnvironment(loadSettings().merged);
if (
authMethod === AuthType.LOGIN_WITH_GOOGLE ||
authMethod === AuthType.CLOUD_SHELL
@@ -53,7 +53,7 @@ export const validateAuthMethod = (authMethod: string): string | null => {
}
return 'Invalid auth method selected.';
};
}
export const setOpenAIApiKey = (apiKey: string): void => {
process.env['OPENAI_API_KEY'] = apiKey;