fix: skip model picker when auth choice preset

This commit is contained in:
Jonáš Jančařík
2026-01-09 23:13:25 +01:00
committed by Peter Steinberger
parent dcc41e932d
commit 9f80d8ec7c

View File

@@ -328,6 +328,7 @@ export async function runOnboardingWizard(
const authStore = ensureAuthProfileStore(undefined, { const authStore = ensureAuthProfileStore(undefined, {
allowKeychainPrompt: false, allowKeychainPrompt: false,
}); });
const authChoiceFromPrompt = opts.authChoice === undefined;
const authChoice = const authChoice =
opts.authChoice ?? opts.authChoice ??
((await prompter.select({ ((await prompter.select({
@@ -348,6 +349,7 @@ export async function runOnboardingWizard(
}); });
nextConfig = authResult.config; nextConfig = authResult.config;
if (authChoiceFromPrompt) {
const modelSelection = await promptDefaultModel({ const modelSelection = await promptDefaultModel({
config: nextConfig, config: nextConfig,
prompter, prompter,
@@ -358,6 +360,7 @@ export async function runOnboardingWizard(
if (modelSelection.model) { if (modelSelection.model) {
nextConfig = applyPrimaryModel(nextConfig, modelSelection.model); nextConfig = applyPrimaryModel(nextConfig, modelSelection.model);
} }
}
await warnIfModelConfigLooksOff(nextConfig, prompter); await warnIfModelConfigLooksOff(nextConfig, prompter);