fix(opencode): Use synthetic: true for invisible content injection
#122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The OpenCode plugin injects the bootstrap and skill content as visible user messages. OpenCode's
TextPartInputsupports asyntheticBoolean property that hides parts from the UI while keeping them visible to the AI -- it's been available in the v2 message format since around the v1.0.0 version bump.Motivation and Context
Bootstrap content (the
<EXTREMELY_IMPORTANT>block) appears as a visible user message at the start of every OpenCode session. When loading skills viause_skill, the full skill content also appears as a visible message. WhilenoReply: trueprevents an AI response, the injected content still appears in the chat UI which makes it just a bit noisy.How Has This Been Tested?
Tested locally in OpenCode v1.0.114:
Chat session before change: https://opencode.ai/s/Z3AqwrES
Chat session after change: https://opencode.ai/s/WjTuvSy6
Breaking Changes
None. This is purely a UI visibility change - the AI receives identical content.
Types of changes
Checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.