Skip to content

Commit f173a0a

Browse files
committed
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: <command>') so the user still sees confirmation that the skill was loaded.
1 parent afb6abf commit f173a0a

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

packages/opencode/src/session/prompt.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export namespace SessionPrompt {
193193
{
194194
type: "text",
195195
text: template,
196+
synthetic: true,
196197
},
197198
]
198199
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
19411942
prompt: templateParts.find((y) => y.type === "text")?.text ?? "",
19421943
},
19431944
]
1944-
: [...templateParts, ...(input.parts ?? [])]
1945+
: [
1946+
...templateParts,
1947+
{
1948+
type: "text" as const,
1949+
text: `Running skill: ${input.command}`,
1950+
ignored: true,
1951+
},
1952+
...(input.parts ?? []),
1953+
]
19451954

19461955
const userAgent = isSubtask ? (input.agent ?? (await Agent.defaultAgent())) : agentName
19471956
const userModel = isSubtask

0 commit comments

Comments
 (0)