mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-19 16:39:50 +00:00
fix(ui): remove confusing "None" checkbox from setup options (#2682)
The "None" sentinel option stayed checked alongside real selections, which was confusing. Remove it — the multiselect already supports submitting with nothing selected via `required: false`. Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5cc9930769
commit
09576f16ef
2 changed files with 8 additions and 26 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.1",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -152,9 +152,6 @@ function hasLocalGithubToken(): boolean {
|
|||
);
|
||||
}
|
||||
|
||||
/** Sentinel value for the "None" option in the setup options multiselect. */
|
||||
const NONE_STEP = "__none__";
|
||||
|
||||
/**
|
||||
* Show a multiselect prompt for optional post-provision setup steps.
|
||||
* Returns a Set of enabled step values, or undefined if there are no steps.
|
||||
|
|
@ -173,26 +170,13 @@ async function promptSetupOptions(agentName: string): Promise<Set<string> | unde
|
|||
return undefined;
|
||||
}
|
||||
|
||||
// Nothing pre-selected — let users opt in to what they want
|
||||
const defaultValues = [
|
||||
NONE_STEP,
|
||||
];
|
||||
|
||||
const selected = await p.multiselect({
|
||||
message: "Setup options (↑/↓ navigate, space to select, enter to confirm)",
|
||||
options: [
|
||||
{
|
||||
value: NONE_STEP,
|
||||
label: "None",
|
||||
hint: "skip all setup steps",
|
||||
},
|
||||
...filteredSteps.map((s) => ({
|
||||
value: s.value,
|
||||
label: s.label,
|
||||
hint: s.hint,
|
||||
})),
|
||||
],
|
||||
initialValues: defaultValues,
|
||||
message: "Setup options (↑/↓ navigate, space=toggle, a=all, enter=confirm)",
|
||||
options: filteredSteps.map((s) => ({
|
||||
value: s.value,
|
||||
label: s.label,
|
||||
hint: s.hint,
|
||||
})),
|
||||
required: false,
|
||||
});
|
||||
|
||||
|
|
@ -200,9 +184,7 @@ async function promptSetupOptions(agentName: string): Promise<Set<string> | unde
|
|||
return new Set<string>();
|
||||
}
|
||||
|
||||
// Strip the "None" sentinel — it carries no real step value
|
||||
const realSteps = selected.filter((v) => v !== NONE_STEP);
|
||||
const stepSet = new Set(realSteps);
|
||||
const stepSet = new Set(selected);
|
||||
|
||||
// If user selected "Custom model", prompt for the model ID and set MODEL_ID env
|
||||
if (stepSet.has("custom-model")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue