sidecar files retained on updates

This commit is contained in:
Brian Madison
2025-12-06 21:17:13 -06:00
parent 1697a45376
commit 6d98864ec1
3 changed files with 47 additions and 20 deletions

View File

@@ -750,10 +750,16 @@ class ModuleManager {
const agentSidecarDir = path.join(resolvedSidecarFolder, agentName);
await fs.ensureDir(agentSidecarDir);
// Copy sidecar files
const sidecarFiles = copyAgentSidecarFiles(path.dirname(sourceYamlPath), agentSidecarDir, sourceYamlPath);
// Copy sidecar files (preserve existing, add new)
const sidecarResult = copyAgentSidecarFiles(path.dirname(sourceYamlPath), agentSidecarDir, sourceYamlPath);
const totalFiles = sidecarResult.copied.length + sidecarResult.preserved.length;
console.log(chalk.dim(` Copied sidecar to: ${agentSidecarDir}`));
if (sidecarResult.copied.length > 0) {
console.log(chalk.dim(` Copied ${sidecarResult.copied.length} new sidecar file(s) to: ${agentSidecarDir}`));
}
if (sidecarResult.preserved.length > 0) {
console.log(chalk.dim(` Preserved ${sidecarResult.preserved.length} existing sidecar file(s)`));
}
}
console.log(