agent customzation almost working again

This commit is contained in:
Brian Madison
2025-12-13 17:50:33 +08:00
parent 25c79e3fe5
commit ce42d56fdd
17 changed files with 257 additions and 687 deletions

View File

@@ -348,7 +348,7 @@ class BaseIdeSetup {
try {
const yaml = require('js-yaml');
const content = await fs.readFile(fullPath, 'utf8');
const workflowData = yaml.load(content);
const workflowData = yaml.parse(content);
if (workflowData && workflowData.name) {
workflows.push({
@@ -456,7 +456,7 @@ class BaseIdeSetup {
if (frontmatterMatch) {
const yaml = require('js-yaml');
try {
const frontmatter = yaml.load(frontmatterMatch[1]);
const frontmatter = yaml.parse(frontmatterMatch[1]);
standalone = frontmatter.standalone === true;
} catch {
// Ignore YAML parse errors

View File

@@ -50,7 +50,7 @@ class AntigravitySetup extends BaseIdeSetup {
try {
// Load injection configuration
const configContent = await fs.readFile(injectionConfigPath, 'utf8');
const injectionConfig = yaml.load(configContent);
const injectionConfig = yaml.parse(configContent);
// Ask about subagents if they exist and we haven't asked yet
if (injectionConfig.subagents && !config.subagentChoices) {

View File

@@ -49,7 +49,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
try {
// Load injection configuration
const configContent = await fs.readFile(injectionConfigPath, 'utf8');
const injectionConfig = yaml.load(configContent);
const injectionConfig = yaml.parse(configContent);
// Ask about subagents if they exist and we haven't asked yet
if (injectionConfig.subagents && !config.subagentChoices) {

View File

@@ -34,7 +34,7 @@ class GeminiSetup extends BaseIdeSetup {
if (await fs.pathExists(coreConfigPath)) {
try {
const configContent = await fs.readFile(coreConfigPath, 'utf8');
const config = yaml.load(configContent);
const config = yaml.parse(configContent);
if (config.user_name) {
configValues.user_name = config.user_name;

View File

@@ -150,7 +150,7 @@ class KiroCliSetup extends BaseIdeSetup {
*/
async processAgentFile(agentFile, agentsDir, projectDir) {
const yamlContent = await fs.readFile(agentFile, 'utf8');
const agentData = yaml.load(yamlContent);
const agentData = yaml.parse(yamlContent);
if (!this.validateBmadCompliance(agentData)) {
return;

View File

@@ -152,7 +152,7 @@ class OpenCodeSetup extends BaseIdeSetup {
let frontmatter = {};
try {
frontmatter = yaml.load(match[1]) || {};
frontmatter = yaml.parse(match[1]) || {};
} catch {
frontmatter = {};
}

View File

@@ -14,7 +14,7 @@ async function loadModuleInjectionConfig(handler, moduleName) {
}
const configContent = await fs.readFile(configPath, 'utf8');
const config = yaml.load(configContent) || {};
const config = yaml.parse(configContent) || {};
return {
config,