refactor(sisyphus-agent): rename Builder-Sisyphus to OpenCode-Builder and remove custom overrides
- Renamed agent from 'Builder-Sisyphus' to 'OpenCode-Builder' in schema and config
- Removed BUILD_SYSTEM_PROMPT and BUILD_PERMISSION custom overrides
- Now uses OpenCode's default build agent configuration exactly
- Simplified agent configuration to rely on OpenCode defaults
🤖 Generated with assistance of OhMyOpenCode
This commit is contained in:
@@ -30,7 +30,7 @@ export const OverridableAgentNameSchema = z.enum([
|
|||||||
"build",
|
"build",
|
||||||
"plan",
|
"plan",
|
||||||
"Sisyphus",
|
"Sisyphus",
|
||||||
"Builder-Sisyphus",
|
"OpenCode-Builder",
|
||||||
"Planner-Sisyphus",
|
"Planner-Sisyphus",
|
||||||
"oracle",
|
"oracle",
|
||||||
"librarian",
|
"librarian",
|
||||||
@@ -87,7 +87,7 @@ export const AgentOverridesSchema = z.object({
|
|||||||
build: AgentOverrideConfigSchema.optional(),
|
build: AgentOverrideConfigSchema.optional(),
|
||||||
plan: AgentOverrideConfigSchema.optional(),
|
plan: AgentOverrideConfigSchema.optional(),
|
||||||
Sisyphus: AgentOverrideConfigSchema.optional(),
|
Sisyphus: AgentOverrideConfigSchema.optional(),
|
||||||
"Builder-Sisyphus": AgentOverrideConfigSchema.optional(),
|
"OpenCode-Builder": AgentOverrideConfigSchema.optional(),
|
||||||
"Planner-Sisyphus": AgentOverrideConfigSchema.optional(),
|
"Planner-Sisyphus": AgentOverrideConfigSchema.optional(),
|
||||||
oracle: AgentOverrideConfigSchema.optional(),
|
oracle: AgentOverrideConfigSchema.optional(),
|
||||||
librarian: AgentOverrideConfigSchema.optional(),
|
librarian: AgentOverrideConfigSchema.optional(),
|
||||||
|
|||||||
16
src/index.ts
16
src/index.ts
@@ -50,7 +50,6 @@ import { createBuiltinMcps } from "./mcp";
|
|||||||
import { OhMyOpenCodeConfigSchema, type OhMyOpenCodeConfig, type HookName } from "./config";
|
import { OhMyOpenCodeConfigSchema, type OhMyOpenCodeConfig, type HookName } from "./config";
|
||||||
import { log, deepMerge, getUserConfigDir, addConfigLoadError } from "./shared";
|
import { log, deepMerge, getUserConfigDir, addConfigLoadError } from "./shared";
|
||||||
import { PLAN_SYSTEM_PROMPT, PLAN_PERMISSION } from "./agents/plan-prompt";
|
import { PLAN_SYSTEM_PROMPT, PLAN_PERMISSION } from "./agents/plan-prompt";
|
||||||
import { BUILD_SYSTEM_PROMPT, BUILD_PERMISSION } from "./agents/build-prompt";
|
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
|
|
||||||
@@ -396,18 +395,15 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
|||||||
|
|
||||||
if (builderEnabled) {
|
if (builderEnabled) {
|
||||||
const { name: _buildName, ...buildConfigWithoutName } = config.agent?.build ?? {};
|
const { name: _buildName, ...buildConfigWithoutName } = config.agent?.build ?? {};
|
||||||
const builderSisyphusOverride = pluginConfig.agents?.["Builder-Sisyphus"];
|
const openCodeBuilderOverride = pluginConfig.agents?.["OpenCode-Builder"];
|
||||||
const builderSisyphusBase = {
|
const openCodeBuilderBase = {
|
||||||
...buildConfigWithoutName,
|
...buildConfigWithoutName,
|
||||||
prompt: BUILD_SYSTEM_PROMPT,
|
description: `${config.agent?.build?.description ?? "Build agent"} (OpenCode default)`,
|
||||||
permission: BUILD_PERMISSION,
|
|
||||||
description: `${config.agent?.build?.description ?? "Build agent"} (OhMyOpenCode version)`,
|
|
||||||
color: config.agent?.build?.color ?? "#32CD32",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
agentConfig["Builder-Sisyphus"] = builderSisyphusOverride
|
agentConfig["OpenCode-Builder"] = openCodeBuilderOverride
|
||||||
? { ...builderSisyphusBase, ...builderSisyphusOverride }
|
? { ...openCodeBuilderBase, ...openCodeBuilderOverride }
|
||||||
: builderSisyphusBase;
|
: openCodeBuilderBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plannerEnabled) {
|
if (plannerEnabled) {
|
||||||
|
|||||||
Reference in New Issue
Block a user