Skip to content

fix: hide skill prompt text from chat UI#1

Merged
bdruth merged 1 commit intodevfrom
hide-skill-prompt-in-chat
Mar 29, 2026
Merged

fix: hide skill prompt text from chat UI#1
bdruth merged 1 commit intodevfrom
hide-skill-prompt-in-chat

Conversation

@bdruth
Copy link
Copy Markdown

@bdruth bdruth commented Mar 29, 2026

Summary

  • Marks the skill template TextPart as synthetic: true in resolvePromptParts() so the full prompt is sent to the model but hidden from the user in the chat UI.
  • Adds a short ignored: true summary part ("Running skill: <command>") so the user still sees confirmation that the skill was loaded, without exposing the full prompt or polluting the model's context.

Details

When a user invokes a slash command (e.g. /onboarding), the entire SKILL.md template was previously injected as a regular TextPart and displayed verbatim in the chat — disruptive for long skill prompts.

OpenCode's existing synthetic / ignored semantics handle this cleanly:

Flag Sent to model Visible to user
synthetic: true
ignored: true
neither

The subtask path is unaffected (it uses SubtaskPart, not TextPart). The OpenWork frontend already filters on these flags, so no UI changes are needed.

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.
@bdruth bdruth merged commit 37d9822 into dev Mar 29, 2026
0 of 5 checks passed
@bdruth bdruth deleted the hide-skill-prompt-in-chat branch March 29, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant