chore: update comments to reference @clack/prompts instead of inquirer
- Update bmad-cli.js comment about CLI prompts - Update config-collector.js JSDoc comments - Rename inquirer variable to choiceUtils in ui.js - Update JSDoc returns and calls documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
224a944540
commit
4ba3a61ec3
|
|
@ -3,7 +3,7 @@ const path = require('node:path');
|
|||
const fs = require('node:fs');
|
||||
|
||||
// Fix for stdin issues when running through npm on Windows
|
||||
// Ensures keyboard interaction works properly with inquirer prompts
|
||||
// Ensures keyboard interaction works properly with CLI prompts
|
||||
if (process.stdin.isTTY) {
|
||||
try {
|
||||
process.stdin.resume();
|
||||
|
|
|
|||
|
|
@ -835,7 +835,7 @@ class ConfigCollector {
|
|||
}
|
||||
|
||||
/**
|
||||
* Build an inquirer question from a config item
|
||||
* Build a prompt question from a config item
|
||||
* @param {string} moduleName - Module name
|
||||
* @param {string} key - Config key
|
||||
* @param {Object} item - Config item definition
|
||||
|
|
@ -997,7 +997,7 @@ class ConfigCollector {
|
|||
message: message,
|
||||
};
|
||||
|
||||
// Set default - if it's dynamic, use a function that inquirer will evaluate with current answers
|
||||
// Set default - if it's dynamic, use a function that the prompt will evaluate with current answers
|
||||
// But if we have an existing value, always use that instead
|
||||
if (existingValue !== null && existingValue !== undefined && questionType !== 'list') {
|
||||
question.default = existingValue;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ class Separator {
|
|||
type = 'separator';
|
||||
}
|
||||
|
||||
// Provide a compatible interface
|
||||
const inquirer = { Separator };
|
||||
// Separator for choice lists (compatible interface)
|
||||
const choiceUtils = { Separator };
|
||||
|
||||
/**
|
||||
* UI utilities for the installer
|
||||
|
|
@ -448,7 +448,7 @@ class UI {
|
|||
|
||||
// First, add previously configured IDEs at the top, marked with ✅
|
||||
if (configuredIdes.length > 0) {
|
||||
ideChoices.push(new inquirer.Separator('── Previously Configured ──'));
|
||||
ideChoices.push(new choiceUtils.Separator('── Previously Configured ──'));
|
||||
for (const ideValue of configuredIdes) {
|
||||
// Skip empty or invalid IDE values
|
||||
if (!ideValue || typeof ideValue !== 'string') {
|
||||
|
|
@ -477,7 +477,7 @@ class UI {
|
|||
// Add preferred tools (excluding already processed)
|
||||
const remainingPreferred = preferredIdes.filter((ide) => !processedIdes.has(ide.value));
|
||||
if (remainingPreferred.length > 0) {
|
||||
ideChoices.push(new inquirer.Separator('── Recommended Tools ──'));
|
||||
ideChoices.push(new choiceUtils.Separator('── Recommended Tools ──'));
|
||||
for (const ide of remainingPreferred) {
|
||||
ideChoices.push({
|
||||
name: `${ide.name} ⭐`,
|
||||
|
|
@ -491,7 +491,7 @@ class UI {
|
|||
// Add other tools (excluding already processed)
|
||||
const remainingOther = otherIdes.filter((ide) => !processedIdes.has(ide.value));
|
||||
if (remainingOther.length > 0) {
|
||||
ideChoices.push(new inquirer.Separator('── Additional Tools ──'));
|
||||
ideChoices.push(new choiceUtils.Separator('── Additional Tools ──'));
|
||||
for (const ide of remainingOther) {
|
||||
ideChoices.push({
|
||||
name: ide.name,
|
||||
|
|
@ -685,7 +685,7 @@ class UI {
|
|||
* Get module choices for selection
|
||||
* @param {Set} installedModuleIds - Currently installed module IDs
|
||||
* @param {Object} customContentConfig - Custom content configuration
|
||||
* @returns {Array} Module choices for inquirer
|
||||
* @returns {Array} Module choices for prompt
|
||||
*/
|
||||
async getModuleChoices(installedModuleIds, customContentConfig = null) {
|
||||
const moduleChoices = [];
|
||||
|
|
@ -742,9 +742,9 @@ class UI {
|
|||
if (allCustomModules.length > 0) {
|
||||
// Add separator for custom content, all custom modules, and official content separator
|
||||
moduleChoices.push(
|
||||
new inquirer.Separator('── Custom Content ──'),
|
||||
new choiceUtils.Separator('── Custom Content ──'),
|
||||
...allCustomModules,
|
||||
new inquirer.Separator('── Official Content ──'),
|
||||
new choiceUtils.Separator('── Official Content ──'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -785,7 +785,7 @@ class UI {
|
|||
|
||||
/**
|
||||
* Prompt for directory selection
|
||||
* @returns {Object} Directory answer from inquirer
|
||||
* @returns {Object} Directory answer from prompt
|
||||
*/
|
||||
async promptForDirectory() {
|
||||
// Use sync validation because @clack/prompts doesn't support async validate
|
||||
|
|
@ -1069,7 +1069,7 @@ class UI {
|
|||
* @sideeffects None - pure user input collection, no files written
|
||||
* @edgecases Shows warning if user enables TTS but AgentVibes not detected
|
||||
* @calledby promptInstall() during installation flow, after core config, before IDE selection
|
||||
* @calls checkAgentVibesInstalled(), inquirer.prompt(), chalk.green/yellow/dim()
|
||||
* @calls checkAgentVibesInstalled(), prompts.select(), chalk.green/yellow/dim()
|
||||
*
|
||||
* AI NOTE: This prompt is strategically positioned in installation flow:
|
||||
* - AFTER core config (user_name, etc)
|
||||
|
|
|
|||
Loading…
Reference in New Issue