fix(task): append plan delegation prompt requirements

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-03-06 22:56:51 +09:00
parent 898b628d3d
commit 20b185b59f
8 changed files with 61 additions and 6 deletions
@@ -1,5 +1,6 @@
import type { DelegateTaskArgs, OpencodeClient } from "./types"
import { isPlanFamily } from "./constants"
import { buildTaskPrompt } from "./prompt-builder"
import {
promptSyncWithModelSuggestionRetry,
promptWithModelSuggestionRetry,
@@ -43,6 +44,7 @@ export async function sendSyncPrompt(
deps: SendSyncPromptDeps = sendSyncPromptDeps
): Promise<string | null> {
const allowTask = isPlanFamily(input.agentToUse)
const effectivePrompt = buildTaskPrompt(input.args.prompt, input.agentToUse)
const tools = {
task: allowTask,
call_omo_agent: true,
@@ -57,7 +59,7 @@ export async function sendSyncPrompt(
agent: input.agentToUse,
system: input.systemContent,
tools,
parts: [createInternalAgentTextPart(input.args.prompt)],
parts: [createInternalAgentTextPart(effectivePrompt)],
...(input.categoryModel
? { model: { providerID: input.categoryModel.providerID, modelID: input.categoryModel.modelID } }
: {}),