Merge tag 'v0.3.0' into chore/sync-gemini-cli-v0.3.0

This commit is contained in:
mingholy.lmh 2025-09-10 21:01:40 +08:00
commit 14ea33063f
583 changed files with 30160 additions and 10770 deletions

View file

@ -5,10 +5,9 @@
*/
import { useState, useCallback, useEffect } from 'react';
import { LoadedSettings, SettingScope } from '../../config/settings.js';
import type { LoadedSettings, SettingScope } from '../../config/settings.js';
import { AuthType, type Config } from '@qwen-code/qwen-code-core';
import {
AuthType,
Config,
clearCachedCredentialFile,
getErrorMessage,
} from '@qwen-code/qwen-code-core';
@ -20,7 +19,7 @@ export const useAuthCommand = (
config: Config,
) => {
const [isAuthDialogOpen, setIsAuthDialogOpen] = useState(
settings.merged.selectedAuthType === undefined,
settings.merged.security?.auth?.selectedType === undefined,
);
const openAuthDialog = useCallback(() => {
@ -31,7 +30,7 @@ export const useAuthCommand = (
useEffect(() => {
const authFlow = async () => {
const authType = settings.merged.selectedAuthType;
const authType = settings.merged.security?.auth?.selectedType;
if (isAuthDialogOpen || !authType) {
return;
}
@ -56,7 +55,7 @@ export const useAuthCommand = (
if (authType) {
await clearCachedCredentialFile();
settings.setValue(scope, 'selectedAuthType', authType);
settings.setValue(scope, 'security.auth.selectedType', authType);
if (
authType === AuthType.LOGIN_WITH_GOOGLE &&
config.isBrowserLaunchSuppressed()