mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
roo installer had some bugs
This commit is contained in:
@@ -563,6 +563,9 @@ class ConfigCollector {
|
||||
// Get friendly module name from config or use uppercase module name
|
||||
const moduleDisplayName = moduleConfig.header || `${moduleName.toUpperCase()} Module`;
|
||||
|
||||
// Add blank line for better readability
|
||||
console.log();
|
||||
|
||||
// Display the module name in color first
|
||||
console.log(chalk.cyan('?') + ' ' + chalk.magenta(moduleDisplayName));
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class BaseIdeSetup {
|
||||
* @returns {string} The activation header text
|
||||
*/
|
||||
async getAgentCommandHeader() {
|
||||
const headerPath = path.join(getSourcePath(), 'src', 'utility', 'agent-components', 'agent-command-header.md');
|
||||
const headerPath = getSourcePath('utility', 'agent-components', 'agent-command-header.md');
|
||||
return await fs.readFile(headerPath, 'utf8');
|
||||
}
|
||||
|
||||
|
||||
@@ -45,12 +45,22 @@ class RooSetup extends BaseIdeSetup {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Read the actual agent file from _bmad for metadata extraction (installed agents are .md files)
|
||||
const agentPath = path.join(bmadDir, artifact.module, 'agents', `${artifact.name}.md`);
|
||||
const content = await this.readFile(agentPath);
|
||||
// artifact.sourcePath contains the full path to the agent file
|
||||
if (!artifact.sourcePath) {
|
||||
console.error(`Error: Missing sourcePath for artifact ${artifact.name} from module ${artifact.module}`);
|
||||
console.error(`Artifact object:`, artifact);
|
||||
throw new Error(`Missing sourcePath for agent: ${artifact.name}`);
|
||||
}
|
||||
|
||||
const content = await this.readFile(artifact.sourcePath);
|
||||
|
||||
// Create command file that references the actual _bmad agent
|
||||
await this.createCommandFile({ module: artifact.module, name: artifact.name, path: agentPath }, content, commandPath, projectDir);
|
||||
await this.createCommandFile(
|
||||
{ module: artifact.module, name: artifact.name, path: artifact.sourcePath },
|
||||
content,
|
||||
commandPath,
|
||||
projectDir,
|
||||
);
|
||||
|
||||
addedCount++;
|
||||
console.log(chalk.green(` ✓ Added command: ${commandName}`));
|
||||
|
||||
Reference in New Issue
Block a user