use displayName and don't select any defaults in setup

This commit is contained in:
Joe Danziger
2025-05-26 21:36:31 -04:00
parent db623bc553
commit bd81d00169
5 changed files with 7 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ import { RULES_PROFILES } from '../constants/profiles.js';
const availableRulesProfiles = RULES_PROFILES.map((name) => {
const displayName = getProfileDisplayName(name);
return {
name: name === 'cursor' ? `${displayName} (default)` : displayName,
name: displayName,
value: name
};
});
@@ -19,7 +19,7 @@ const availableRulesProfiles = RULES_PROFILES.map((name) => {
*/
function getProfileDisplayName(name) {
const profile = getRulesProfile(name);
return profile?.profileName || name.charAt(0).toUpperCase() + name.slice(1);
return profile?.displayName || name.charAt(0).toUpperCase() + name.slice(1);
}
/**
@@ -30,7 +30,7 @@ function getProfileDisplayName(name) {
* Launches an interactive prompt for selecting which profile rules to include in your project.
*
* This function dynamically lists all available profiles (from RULES_PROFILES) and presents them as checkboxes.
* The user must select at least one profile (default: cursor). The result is an array of selected profile names.
* The user must select at least one profile (no defaults are pre-selected). The result is an array of selected profile names.
*
* Used by both project initialization (init) and the CLI 'task-master rules setup' command to ensure DRY, consistent UX.
*
@@ -47,7 +47,6 @@ export async function runInteractiveRulesSetup() {
name: 'rulesProfiles',
message: 'Which IDEs would you like rules included for?',
choices: availableRulesProfiles,
default: ['cursor'],
validate: (input) => input.length > 0 || 'You must select at least one.'
};
const { rulesProfiles } = await inquirer.prompt([rulesProfilesQuestion]);