opencode-translate 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-translate",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "OpenCode plugin that lets the user chat in a configured source language while the main chat loop only sees English.",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/activation.ts CHANGED
@@ -124,6 +124,12 @@ function mergeTranslatedMetadata(state: TranslateState, part: TextPartLike, engl
124
124
  }
125
125
  }
126
126
 
127
+ // OpenCode's flag semantics, observed from packages/opencode and packages/ui:
128
+ // synthetic: true -> hidden from the user UI, still sent to the LLM
129
+ // ignored: true -> hidden from the LLM, still shown in the user UI
130
+ // The translation preview, activation banner, and failure notices are
131
+ // user-facing status/diagnostic parts that must not leak into the LLM
132
+ // prompt, so they use synthetic:false + ignored:true.
127
133
  function createSyntheticTextPart(
128
134
  sessionID: string,
129
135
  messageID: string,
@@ -136,7 +142,7 @@ function createSyntheticTextPart(
136
142
  messageID,
137
143
  type: "text",
138
144
  text,
139
- synthetic: true,
145
+ synthetic: false,
140
146
  ignored: true,
141
147
  metadata,
142
148
  }