project-root stutter fix
This commit is contained in:
parent
0fa53ad144
commit
7cd4926adb
|
|
@ -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)) {
|
for (const mod of Object.keys(this.collectedConfig)) {
|
||||||
if (mod !== '_meta' && this.collectedConfig[mod] && this.collectedConfig[mod][configKey]) {
|
if (mod !== '_meta' && this.collectedConfig[mod] && this.collectedConfig[mod][configKey]) {
|
||||||
configValue = 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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -813,10 +809,6 @@ class ConfigCollector {
|
||||||
for (const mod of Object.keys(this.collectedConfig)) {
|
for (const mod of Object.keys(this.collectedConfig)) {
|
||||||
if (mod !== '_meta' && this.collectedConfig[mod] && this.collectedConfig[mod][configKey]) {
|
if (mod !== '_meta' && this.collectedConfig[mod] && this.collectedConfig[mod][configKey]) {
|
||||||
configValue = 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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -505,6 +505,25 @@ class Installer {
|
||||||
config._customFiles = customFiles;
|
config._customFiles = customFiles;
|
||||||
config._modifiedFiles = modifiedFiles;
|
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)
|
// Also check cache directory for custom modules (like quick update does)
|
||||||
const cacheDir = path.join(bmadDir, '_config', 'custom');
|
const cacheDir = path.join(bmadDir, '_config', 'custom');
|
||||||
if (await fs.pathExists(cacheDir)) {
|
if (await fs.pathExists(cacheDir)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue