fix: ModuleManager now creates customize.yaml files for agents
- Added logic to create customize template files during agent compilation - ModuleManager was only using existing customize files, not creating them - Now customize.yaml files will be created for all module agents - This fixes issue where agents in subdirectories had no customization support Next: Need to fix agent-manifest.csv to find agents in subdirectories
This commit is contained in:
parent
1bd01e1ce6
commit
f052967f65
File diff suppressed because it is too large
Load Diff
|
|
@ -679,6 +679,16 @@ class ModuleManager {
|
||||||
const yamlContent = await fs.readFile(sourceYamlPath, 'utf8');
|
const yamlContent = await fs.readFile(sourceYamlPath, 'utf8');
|
||||||
const { compileAgent } = require('../../../lib/agent/compiler');
|
const { compileAgent } = require('../../../lib/agent/compiler');
|
||||||
|
|
||||||
|
// Create customize template if it doesn't exist
|
||||||
|
if (!(await fs.pathExists(customizePath))) {
|
||||||
|
const { getSourcePath } = require('../../../lib/project-root');
|
||||||
|
const genericTemplatePath = getSourcePath('utility', 'templates', 'agent.customize.template.yaml');
|
||||||
|
if (await fs.pathExists(genericTemplatePath)) {
|
||||||
|
await this.copyFileWithPlaceholderReplacement(genericTemplatePath, customizePath);
|
||||||
|
console.log(chalk.dim(` Created customize: ${moduleName}-${agentName}.customize.yaml`));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check for customizations
|
// Check for customizations
|
||||||
let customizedFields = [];
|
let customizedFields = [];
|
||||||
if (await fs.pathExists(customizePath)) {
|
if (await fs.pathExists(customizePath)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue