feat(agents): add build agent prompt extension and configuration override support
- Add BUILD_AGENT_PROMPT_EXTENSION for orchestrator-focused main agent behavior - Introduce OverridableAgentName type to allow build agent customization - Update config schema to support build agent override in oh-my-opencode.json - Inject orchestration prompt into build agent's system prompt 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
12
src/index.ts
12
src/index.ts
@@ -1,5 +1,5 @@
|
||||
import type { Plugin } from "@opencode-ai/plugin";
|
||||
import { createBuiltinAgents } from "./agents";
|
||||
import { createBuiltinAgents, BUILD_AGENT_PROMPT_EXTENSION } from "./agents";
|
||||
import {
|
||||
createTodoContinuationEnforcer,
|
||||
createContextWindowMonitorHook,
|
||||
@@ -258,6 +258,16 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
...projectAgents,
|
||||
...config.agent,
|
||||
};
|
||||
|
||||
if (config.agent.build) {
|
||||
const existingPrompt = config.agent.build.prompt || "";
|
||||
const userOverride = pluginConfig.agents?.build?.prompt || "";
|
||||
config.agent.build = {
|
||||
...config.agent.build,
|
||||
prompt: existingPrompt + BUILD_AGENT_PROMPT_EXTENSION + userOverride,
|
||||
};
|
||||
}
|
||||
|
||||
config.tools = {
|
||||
...config.tools,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user