opencode-translate 0.2.0 → 0.2.1

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.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "OpenCode plugin that lets the user chat in a configured language while the main chat loop only sees English.",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -76,7 +76,7 @@ async function translateUserPart(
76
76
  })
77
77
  const sourceHash = hashText(part.text)
78
78
  part.metadata = { ...(part.metadata ?? {}), ...mergeTranslatedMetadata(state, part, english) }
79
- part.text = `${part.text}\n\n_→ EN: ${english}_`
79
+ part.text = `${part.text}\n\n→ EN: ${english}`
80
80
  nextParts.push(
81
81
  createLlmOnlyTextPart(part.sessionID, part.messageID, english, {
82
82
  translate_role: "llm_only_translation",
@@ -90,7 +90,7 @@ async function translateUserPart(
90
90
  const reason = normalizeReason(error)
91
91
  await logError(ctx.client, buildInboundTranslationError(state.translate_user_lang, reason))
92
92
  const originalText = part.text
93
- part.text = `${originalText}\n\n_⚠️ Translation failed: ${reason}. Original text was sent to the model._`
93
+ part.text = `${originalText}\n\n⚠️ Translation failed: ${reason}. Original text was sent to the model.`
94
94
  part.ignored = true
95
95
  nextParts.push(
96
96
  createLlmOnlyTextPart(part.sessionID, part.messageID, originalText, {
@@ -129,7 +129,7 @@ function appendActivationBanner(
129
129
  ) {
130
130
  const bannerText = createActivationBannerText(ctx.options)
131
131
  if (processed.firstUserTextPart !== undefined) {
132
- processed.firstUserTextPart.text = `${processed.firstUserTextPart.text}\n\n_${bannerText}_`
132
+ processed.firstUserTextPart.text = `${processed.firstUserTextPart.text}\n\n${bannerText}`
133
133
  }
134
134
  processed.nextParts.push(createActivationBannerPart(input.sessionID, output.message.id, state, bannerText))
135
135
  }