Skip to content

Commit b315595

Browse files
author
catlog22
committed
fix(install): update checklistChoices type and improve separator handling in installCommand
1 parent 21a152c commit b315595

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ccw/src/commands/install.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,11 @@ export async function installCommand(options: InstallOptions): Promise<void> {
371371
utility: 'Utility',
372372
};
373373
const byCategory = listTemplatesByCategory();
374-
const checklistChoices: Array<{ name: string; value: string; checked?: boolean }> = [];
374+
const checklistChoices: Array<Record<string, unknown>> = [];
375375

376376
for (const [category, templates] of Object.entries(byCategory)) {
377377
if (templates.length === 0) continue;
378-
checklistChoices.push({ name: `── ${categoryNames[category] || category} ──`, value: `__sep_${category}`, checked: false });
378+
checklistChoices.push(new inquirer.Separator(`── ${categoryNames[category] || category} (${templates.length}) ──`));
379379
for (const t of templates) {
380380
checklistChoices.push({
381381
name: ` ${chalk.yellow(t.id)}${t.description} (${t.trigger}${t.matcher ? ` / ${t.matcher}` : ''})`,
@@ -392,7 +392,7 @@ export async function installCommand(options: InstallOptions): Promise<void> {
392392
choices: checklistChoices,
393393
pageSize: 20,
394394
}]);
395-
selectedHookIds = selectedHooks.filter((id: string) => !id.startsWith('__sep_'));
395+
selectedHookIds = selectedHooks as string[];
396396
}
397397

398398
let hooksInstalled: string[] = [];

0 commit comments

Comments
 (0)