From f173a0a77570605ae5d930066d629b554c11cea3 Mon Sep 17 00:00:00 2001 From: Brice Ruth Date: Sun, 29 Mar 2026 13:31:47 -0500 Subject: [PATCH] fix: hide skill prompt text from chat UI Mark the skill template TextPart as synthetic so the full prompt is sent to the model but hidden from the user. Add a short ignored summary part ('Running skill: ') so the user still sees confirmation that the skill was loaded. --- packages/opencode/src/session/prompt.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts index acc9f635953c..598824081a31 100644 --- a/packages/opencode/src/session/prompt.ts +++ b/packages/opencode/src/session/prompt.ts @@ -193,6 +193,7 @@ export namespace SessionPrompt { { type: "text", text: template, + synthetic: true, }, ] const files = ConfigMarkdown.files(template) @@ -1941,7 +1942,15 @@ NOTE: At any point in time through this workflow you should feel free to ask the prompt: templateParts.find((y) => y.type === "text")?.text ?? "", }, ] - : [...templateParts, ...(input.parts ?? [])] + : [ + ...templateParts, + { + type: "text" as const, + text: `Running skill: ${input.command}`, + ignored: true, + }, + ...(input.parts ?? []), + ] const userAgent = isSubtask ? (input.agent ?? (await Agent.defaultAgent())) : agentName const userModel = isSubtask