Skip to content

Commit 49ab6de

Browse files
Fix checkbox prompt error in feature prioritization
- Add explicit disabled: false to checkbox choices for Inquirer v12 compatibility - Fixes "No selectable choices. All choices are disabled" error during init - Resolves #6
1 parent 20ced79 commit 49ab6de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cli/prompts/features.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ async function prioritizeFeatures(features: Feature[]): Promise<Feature[]> {
366366
const priorityChoices = features.map((f) => ({
367367
name: `${f.name} (${f.complexity})`,
368368
value: f.id,
369+
disabled: false,
369370
}));
370371

371372
const { mustHaveFeatures } = await inquirer.prompt([
@@ -383,7 +384,9 @@ async function prioritizeFeatures(features: Feature[]): Promise<Feature[]> {
383384
type: 'checkbox',
384385
name: 'niceToHaveFeatures',
385386
message: 'Which features are NICE-TO-HAVE (can be added later)?',
386-
choices: priorityChoices.filter((c) => !mustHaveFeatures.includes(c.value)),
387+
choices: priorityChoices
388+
.filter((c) => !mustHaveFeatures.includes(c.value))
389+
.map((c) => ({ ...c, disabled: false })),
387390
},
388391
]);
389392

0 commit comments

Comments
 (0)