mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 15:31:27 +00:00
refactor: refactor settings to a nested structure (#7244)
This commit is contained in:
parent
b8a7bfd136
commit
f22263c9e8
41 changed files with 2852 additions and 1424 deletions
|
|
@ -19,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(() => {
|
||||
|
|
@ -30,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;
|
||||
}
|
||||
|
|
@ -55,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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue