mirror of
https://github.com/bmad-code-org/BMAD-METHOD.git
synced 2026-01-30 04:32:02 +00:00
project-root stutter fix
This commit is contained in:
25
src/core/module.yaml
Normal file
25
src/core/module.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
code: core
|
||||
name: "BMad™ Core Module"
|
||||
|
||||
header: "BMad™ Core Configuration"
|
||||
subheader: "Configure the core settings for your BMad™ installation.\nThese settings will be used across all modules and agents."
|
||||
|
||||
user_name:
|
||||
prompt: "What shall the agents call you (TIP: Use a team name if using with a group)?"
|
||||
default: "BMad"
|
||||
result: "{value}"
|
||||
|
||||
communication_language:
|
||||
prompt: "Preferred chat language/style? (English, Mandarin, English Pirate, etc...)"
|
||||
default: "English"
|
||||
result: "{value}"
|
||||
|
||||
document_output_language:
|
||||
prompt: "Preferred document output language?"
|
||||
default: "English"
|
||||
result: "{value}"
|
||||
|
||||
output_folder:
|
||||
prompt: "Where should default output files be saved unless specified in other modules?"
|
||||
default: "_bmad-output"
|
||||
result: "{project-root}/{value}"
|
||||
@@ -696,10 +696,6 @@ class ConfigCollector {
|
||||
for (const mod of Object.keys(this.collectedConfig)) {
|
||||
if (mod !== '_meta' && this.collectedConfig[mod] && this.collectedConfig[mod][configKey]) {
|
||||
configValue = this.collectedConfig[mod][configKey];
|
||||
// Extract just the value part if it's a result template
|
||||
if (typeof configValue === 'string' && configValue.includes('{project-root}/')) {
|
||||
configValue = configValue.replace('{project-root}/', '');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -813,10 +809,6 @@ class ConfigCollector {
|
||||
for (const mod of Object.keys(this.collectedConfig)) {
|
||||
if (mod !== '_meta' && this.collectedConfig[mod] && this.collectedConfig[mod][configKey]) {
|
||||
configValue = this.collectedConfig[mod][configKey];
|
||||
// Remove {project-root}/ prefix if present for cleaner display
|
||||
if (typeof configValue === 'string' && configValue.includes('{project-root}/')) {
|
||||
configValue = configValue.replace('{project-root}/', '');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,6 +505,25 @@ class Installer {
|
||||
config._customFiles = customFiles;
|
||||
config._modifiedFiles = modifiedFiles;
|
||||
|
||||
// Preserve existing core configuration during updates
|
||||
// Read the current core config.yaml to maintain user's settings
|
||||
const coreConfigPath = path.join(bmadDir, 'core', 'config.yaml');
|
||||
if ((await fs.pathExists(coreConfigPath)) && (!config.coreConfig || Object.keys(config.coreConfig).length === 0)) {
|
||||
try {
|
||||
const yaml = require('yaml');
|
||||
const coreConfigContent = await fs.readFile(coreConfigPath, 'utf8');
|
||||
const existingCoreConfig = yaml.parse(coreConfigContent);
|
||||
|
||||
// Store in config.coreConfig so it's preserved through the installation
|
||||
config.coreConfig = existingCoreConfig;
|
||||
|
||||
// Also store in configCollector for use during config collection
|
||||
this.configCollector.collectedConfig.core = existingCoreConfig;
|
||||
} catch (error) {
|
||||
console.warn(chalk.yellow(`Warning: Could not read existing core config: ${error.message}`));
|
||||
}
|
||||
}
|
||||
|
||||
// Also check cache directory for custom modules (like quick update does)
|
||||
const cacheDir = path.join(bmadDir, '_config', 'custom');
|
||||
if (await fs.pathExists(cacheDir)) {
|
||||
|
||||
Reference in New Issue
Block a user