rrce-workflow 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1117,27 +1117,27 @@ function copyPromptsToDir(prompts, targetDir, extension) {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
1119
|
function updateOpenCodeConfig(newAgents) {
|
|
1120
|
-
const opencodePath =
|
|
1120
|
+
const opencodePath = getOpenCodeConfigPath();
|
|
1121
1121
|
if (!fs7.existsSync(opencodePath)) {
|
|
1122
1122
|
return;
|
|
1123
1123
|
}
|
|
1124
1124
|
try {
|
|
1125
1125
|
const config = JSON.parse(fs7.readFileSync(opencodePath, "utf8"));
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
}
|
|
1129
|
-
const existingAgentKeys = Object.keys(config.agents);
|
|
1126
|
+
const agentConfig = config.agent ?? config.agents ?? {};
|
|
1127
|
+
const existingAgentKeys = Object.keys(agentConfig);
|
|
1130
1128
|
const rrceKeys = existingAgentKeys.filter((key) => key.startsWith("rrce_"));
|
|
1131
1129
|
for (const key of rrceKeys) {
|
|
1132
1130
|
if (!newAgents[key]) {
|
|
1133
|
-
delete
|
|
1131
|
+
delete agentConfig[key];
|
|
1134
1132
|
}
|
|
1135
1133
|
}
|
|
1136
1134
|
for (const [key, value] of Object.entries(newAgents)) {
|
|
1137
1135
|
if (key.startsWith("rrce_")) {
|
|
1138
|
-
|
|
1136
|
+
agentConfig[key] = value;
|
|
1139
1137
|
}
|
|
1140
1138
|
}
|
|
1139
|
+
config.agent = agentConfig;
|
|
1140
|
+
if (config.agents) delete config.agents;
|
|
1141
1141
|
fs7.writeFileSync(opencodePath, JSON.stringify(config, null, 2));
|
|
1142
1142
|
} catch (e) {
|
|
1143
1143
|
console.error("Failed to update OpenCode config:", e);
|
|
@@ -1207,9 +1207,9 @@ function surgicalUpdateOpenCodeAgents(prompts, mode, dataPath) {
|
|
|
1207
1207
|
updateOpenCodeConfig(newAgents);
|
|
1208
1208
|
if (fs7.existsSync(openCodeConfig)) {
|
|
1209
1209
|
const config = JSON.parse(fs7.readFileSync(openCodeConfig, "utf8"));
|
|
1210
|
-
if (!config.
|
|
1211
|
-
if (!config.
|
|
1212
|
-
config.
|
|
1210
|
+
if (!config.agent) config.agent = {};
|
|
1211
|
+
if (!config.agent.plan) config.agent.plan = {};
|
|
1212
|
+
config.agent.plan.disable = true;
|
|
1213
1213
|
fs7.writeFileSync(openCodeConfig, JSON.stringify(config, null, 2));
|
|
1214
1214
|
}
|
|
1215
1215
|
} catch (e) {
|