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

@@ -25,6 +25,7 @@ export const {
fileMap, fileMap,
globalReplacements, globalReplacements,
profileName, profileName,
displayName,
profileDir, profileDir,
rulesDir, rulesDir,
mcpConfig, mcpConfig,

View File

@@ -25,6 +25,7 @@ export const {
fileMap, fileMap,
globalReplacements, globalReplacements,
profileName, profileName,
displayName,
profileDir, profileDir,
rulesDir, rulesDir,
mcpConfig, mcpConfig,

View File

@@ -129,6 +129,7 @@ export const {
fileMap, fileMap,
globalReplacements, globalReplacements,
profileName, profileName,
displayName,
profileDir, profileDir,
rulesDir, rulesDir,
mcpConfig, mcpConfig,

View File

@@ -22,6 +22,7 @@ export const {
fileMap, fileMap,
globalReplacements, globalReplacements,
profileName, profileName,
displayName,
profileDir, profileDir,
rulesDir, rulesDir,
mcpConfig, mcpConfig,

View File

@@ -9,7 +9,7 @@ import { RULES_PROFILES } from '../constants/profiles.js';
const availableRulesProfiles = RULES_PROFILES.map((name) => { const availableRulesProfiles = RULES_PROFILES.map((name) => {
const displayName = getProfileDisplayName(name); const displayName = getProfileDisplayName(name);
return { return {
name: name === 'cursor' ? `${displayName} (default)` : displayName, name: displayName,
value: name value: name
}; };
}); });
@@ -19,7 +19,7 @@ const availableRulesProfiles = RULES_PROFILES.map((name) => {
*/ */
function getProfileDisplayName(name) { function getProfileDisplayName(name) {
const profile = getRulesProfile(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. * 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. * 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. * 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', name: 'rulesProfiles',
message: 'Which IDEs would you like rules included for?', message: 'Which IDEs would you like rules included for?',
choices: availableRulesProfiles, choices: availableRulesProfiles,
default: ['cursor'],
validate: (input) => input.length > 0 || 'You must select at least one.' validate: (input) => input.length > 0 || 'You must select at least one.'
}; };
const { rulesProfiles } = await inquirer.prompt([rulesProfilesQuestion]); const { rulesProfiles } = await inquirer.prompt([rulesProfilesQuestion]);