feat: streamline quickstart provider selection
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
- Agent system prompt: avoid automatic self-updates unless explicitly requested.
|
||||
- Onboarding: tighten QuickStart hint copy for configuring later.
|
||||
- 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
|
||||
|
||||
|
||||
@@ -736,6 +736,9 @@ type SetupProvidersOptions = {
|
||||
onWhatsAppAccountId?: (accountId: string) => void;
|
||||
forceAllowFromProviders?: ProviderChoice[];
|
||||
skipDmPolicyPrompt?: boolean;
|
||||
skipConfirm?: boolean;
|
||||
quickstartDefaults?: boolean;
|
||||
initialSelection?: ProviderChoice[];
|
||||
};
|
||||
|
||||
export async function setupProviders(
|
||||
@@ -801,10 +804,12 @@ export async function setupProviders(
|
||||
"Provider status",
|
||||
);
|
||||
|
||||
const shouldConfigure = await prompter.confirm({
|
||||
message: "Configure chat providers now?",
|
||||
initialValue: true,
|
||||
});
|
||||
const shouldConfigure = options?.skipConfirm
|
||||
? true
|
||||
: await prompter.confirm({
|
||||
message: "Configure chat providers now?",
|
||||
initialValue: true,
|
||||
});
|
||||
if (!shouldConfigure) return cfg;
|
||||
|
||||
await noteProviderPrimer(prompter);
|
||||
@@ -857,9 +862,13 @@ export async function setupProviders(
|
||||
}
|
||||
});
|
||||
|
||||
const initialSelection =
|
||||
options?.initialSelection ??
|
||||
(options?.quickstartDefaults && !telegramConfigured ? ["telegram"] : []);
|
||||
const selection = (await prompter.multiselect({
|
||||
message: "Select providers",
|
||||
options: selectionOptions,
|
||||
initialValues: initialSelection.length ? initialSelection : undefined,
|
||||
})) as ProviderChoice[];
|
||||
|
||||
options?.onSelection?.(selection);
|
||||
|
||||
@@ -114,7 +114,7 @@ export async function runOnboardingWizard(
|
||||
|
||||
const quickstartHint = "Configure details later via clawdbot configure.";
|
||||
const advancedHint =
|
||||
"Configure anything via the Clawdbot configuration wizard anytime.";
|
||||
"Configure port, network, Tailscale, and auth options.";
|
||||
let flow = (await prompter.select({
|
||||
message: "Onboarding mode",
|
||||
options: [
|
||||
@@ -408,6 +408,8 @@ export async function runOnboardingWizard(
|
||||
forceAllowFromProviders:
|
||||
flow === "quickstart" ? ["telegram", "whatsapp"] : [],
|
||||
skipDmPolicyPrompt: flow === "quickstart",
|
||||
skipConfirm: flow === "quickstart",
|
||||
quickstartDefaults: flow === "quickstart",
|
||||
});
|
||||
|
||||
await writeConfigFile(nextConfig);
|
||||
|
||||
Reference in New Issue
Block a user