feat: streamline quickstart provider selection

This commit is contained in:
Peter Steinberger
2026-01-08 12:19:16 +01:00
parent e210069dbd
commit 8ed412db22
3 changed files with 17 additions and 5 deletions

View File

@@ -10,6 +10,7 @@
- Agent system prompt: avoid automatic self-updates unless explicitly requested. - Agent system prompt: avoid automatic self-updates unless explicitly requested.
- Onboarding: tighten QuickStart hint copy for configuring later. - Onboarding: tighten QuickStart hint copy for configuring later.
- Onboarding: avoid “token expired” for Codex CLI when expiry is heuristic. - Onboarding: avoid “token expired” for Codex CLI when expiry is heuristic.
- Onboarding: QuickStart jumps straight into provider selection with Telegram preselected when unset.
## 2026.1.8 ## 2026.1.8

View File

@@ -736,6 +736,9 @@ type SetupProvidersOptions = {
onWhatsAppAccountId?: (accountId: string) => void; onWhatsAppAccountId?: (accountId: string) => void;
forceAllowFromProviders?: ProviderChoice[]; forceAllowFromProviders?: ProviderChoice[];
skipDmPolicyPrompt?: boolean; skipDmPolicyPrompt?: boolean;
skipConfirm?: boolean;
quickstartDefaults?: boolean;
initialSelection?: ProviderChoice[];
}; };
export async function setupProviders( export async function setupProviders(
@@ -801,10 +804,12 @@ export async function setupProviders(
"Provider status", "Provider status",
); );
const shouldConfigure = await prompter.confirm({ const shouldConfigure = options?.skipConfirm
message: "Configure chat providers now?", ? true
initialValue: true, : await prompter.confirm({
}); message: "Configure chat providers now?",
initialValue: true,
});
if (!shouldConfigure) return cfg; if (!shouldConfigure) return cfg;
await noteProviderPrimer(prompter); await noteProviderPrimer(prompter);
@@ -857,9 +862,13 @@ export async function setupProviders(
} }
}); });
const initialSelection =
options?.initialSelection ??
(options?.quickstartDefaults && !telegramConfigured ? ["telegram"] : []);
const selection = (await prompter.multiselect({ const selection = (await prompter.multiselect({
message: "Select providers", message: "Select providers",
options: selectionOptions, options: selectionOptions,
initialValues: initialSelection.length ? initialSelection : undefined,
})) as ProviderChoice[]; })) as ProviderChoice[];
options?.onSelection?.(selection); options?.onSelection?.(selection);

View File

@@ -114,7 +114,7 @@ export async function runOnboardingWizard(
const quickstartHint = "Configure details later via clawdbot configure."; const quickstartHint = "Configure details later via clawdbot configure.";
const advancedHint = const advancedHint =
"Configure anything via the Clawdbot configuration wizard anytime."; "Configure port, network, Tailscale, and auth options.";
let flow = (await prompter.select({ let flow = (await prompter.select({
message: "Onboarding mode", message: "Onboarding mode",
options: [ options: [
@@ -408,6 +408,8 @@ export async function runOnboardingWizard(
forceAllowFromProviders: forceAllowFromProviders:
flow === "quickstart" ? ["telegram", "whatsapp"] : [], flow === "quickstart" ? ["telegram", "whatsapp"] : [],
skipDmPolicyPrompt: flow === "quickstart", skipDmPolicyPrompt: flow === "quickstart",
skipConfirm: flow === "quickstart",
quickstartDefaults: flow === "quickstart",
}); });
await writeConfigFile(nextConfig); await writeConfigFile(nextConfig);