Add plan agent system prompt and permission configuration to OmO-Plan
Completes the OmO-Plan implementation by providing the READ-ONLY system prompt and permission configuration that enforce plan-specific constraints. This ensures OmO-Plan operates in pure analysis and planning mode without file modifications. Fixes: #77 References: #72, #75 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -50,6 +50,7 @@ import { BackgroundManager } from "./features/background-agent";
|
||||
import { createBuiltinMcps } from "./mcp";
|
||||
import { OhMyOpenCodeConfigSchema, type OhMyOpenCodeConfig, type HookName } from "./config";
|
||||
import { log, deepMerge } from "./shared";
|
||||
import { PLAN_SYSTEM_PROMPT, PLAN_PERMISSION } from "./agents/plan-prompt";
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import * as os from "os";
|
||||
@@ -313,11 +314,15 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
const omoPlanOverride = pluginConfig.agents?.["OmO-Plan"];
|
||||
const omoPlanBase = {
|
||||
...planConfigWithoutName,
|
||||
prompt: PLAN_SYSTEM_PROMPT,
|
||||
permission: PLAN_PERMISSION,
|
||||
description: `${config.agent?.plan?.description ?? "Plan agent"} (OhMyOpenCode version)`,
|
||||
color: config.agent?.plan?.color ?? "#6495ED",
|
||||
};
|
||||
|
||||
const omoPlanConfig = omoPlanOverride ? deepMerge(omoPlanBase, omoPlanOverride) : omoPlanBase;
|
||||
const omoPlanConfig = omoPlanOverride
|
||||
? { ...omoPlanBase, ...omoPlanOverride }
|
||||
: omoPlanBase;
|
||||
|
||||
config.agent = {
|
||||
OmO: builtinAgents.OmO,
|
||||
|
||||
Reference in New Issue
Block a user