feat: streamline wizard selection prompts

This commit is contained in:
Peter Steinberger
2026-01-12 05:08:07 +00:00
parent abdf4c30b2
commit 873cee6947
5 changed files with 270 additions and 85 deletions

View File

@@ -35,10 +35,10 @@ import { resolveUserPath } from "../utils.js";
import { createClackPrompter } from "../wizard/clack-prompter.js";
import { WizardCancelledError } from "../wizard/prompts.js";
import { applyAuthChoice, warnIfModelConfigLooksOff } from "./auth-choice.js";
import { buildAuthChoiceOptions } from "./auth-choice-options.js";
import { promptAuthChoiceGrouped } from "./auth-choice-prompt.js";
import { ensureWorkspaceAndSessions, moveToTrash } from "./onboard-helpers.js";
import { setupProviders } from "./onboard-providers.js";
import type { AuthChoice, ProviderChoice } from "./onboard-types.js";
import type { ProviderChoice } from "./onboard-types.js";
type AgentsListOptions = {
json?: boolean;
@@ -920,14 +920,12 @@ export async function agentsAddCommand(
const authStore = ensureAuthProfileStore(agentDir, {
allowKeychainPrompt: false,
});
const authChoice = (await prompter.select({
message: "Model/auth choice",
options: buildAuthChoiceOptions({
store: authStore,
includeSkip: true,
includeClaudeCliIfMissing: true,
}),
})) as AuthChoice;
const authChoice = await promptAuthChoiceGrouped({
prompter,
store: authStore,
includeSkip: true,
includeClaudeCliIfMissing: true,
});
const authResult = await applyAuthChoice({
authChoice,