fix: use resolved authType to initialize ACP agent

This commit is contained in:
mingholy.lmh 2026-01-27 14:56:22 +08:00
parent 7177b41120
commit 2c9399f8e0
9 changed files with 75 additions and 68 deletions

View file

@ -47,7 +47,7 @@ export async function initializeApp(
// Use authType from modelsConfig which respects CLI --auth-type argument
// over settings.security.auth.selectedType
const authType = config.modelsConfig.getCurrentAuthType();
const authType = config.getModelsConfig().getCurrentAuthType();
const authError = await performInitialAuth(config, authType);
// Fallback to user select when initial authentication fails
@ -61,7 +61,7 @@ export async function initializeApp(
const themeError = validateTheme(settings);
const shouldOpenAuthDialog =
!config.modelsConfig.wasAuthTypeExplicitlyProvided() || !!authError;
!config.getModelsConfig().wasAuthTypeExplicitlyProvided() || !!authError;
if (config.getIdeMode()) {
const ideClient = await IdeClient.getInstance();