refactor(auth): save authType after successfully authenticated (#1036)

This commit is contained in:
Mingholy
2025-11-19 11:21:46 +08:00
committed by GitHub
parent 3ed93d5b5d
commit d0e76c76a8
30 changed files with 822 additions and 518 deletions

View File

@@ -16,6 +16,7 @@ import {
import { type SettingScope } from '../../config/settings.js';
import type { AuthState } from '../types.js';
import { type VisionSwitchOutcome } from '../components/ModelSwitchDialog.js';
import { type OpenAICredentials } from '../components/OpenAIKeyPrompt.js';
export interface UIActions {
handleThemeSelect: (
@@ -30,12 +31,11 @@ export interface UIActions {
handleAuthSelect: (
authType: AuthType | undefined,
scope: SettingScope,
) => void;
credentials?: OpenAICredentials,
) => Promise<void>;
setAuthState: (state: AuthState) => void;
onAuthError: (error: string) => void;
// Qwen OAuth handlers
handleQwenAuthTimeout: () => void;
handleQwenAuthCancel: () => void;
cancelAuthentication: () => void;
handleEditorSelect: (
editorType: EditorType | undefined,
scope: SettingScope,