@cellaware/utils 9.2.3 → 9.3.0

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.
@@ -138,15 +138,24 @@ export class ChainStore {
138
138
  initBuiltinChains(defaultModelName) {
139
139
  // Translation Chain:
140
140
  {
141
- this.addExistingChain(createSingleActionChain(TRANSLATION_CHAIN_NAME, defaultModelName ?? 'gpt-4o-mini', ['statement', 'language'], `You are a helpful AI translator who translates an English statement to {language}.
141
+ const prompt = `You are a professional software localization translator.
142
142
 
143
- Given an English statement, translate the English statement into {language}.
143
+ Translate the following English text into {language}.
144
144
 
145
- Here is the English statement that you need to translate to {language}:
145
+ Requirements:
146
+ - Preserve the original meaning and intent.
147
+ - Use natural, concise language appropriate for a software UI.
148
+ - Preserve placeholders, variables, interpolation syntax, HTML, punctuation, and special characters exactly as written.
149
+ - Do not translate product names, technical identifiers, or code-like values unless they are clearly natural-language text.
150
+ - Do not add explanations, notes, quotation marks, or extra formatting.
151
+ - Return only the translated text.
152
+
153
+ English:
146
154
  {statement}
147
155
 
148
- Your translation here:
149
- `));
156
+ {language}:
157
+ `;
158
+ this.addExistingChain(createSingleActionChain(TRANSLATION_CHAIN_NAME, defaultModelName ?? 'gpt-5.6-luna', ['statement', 'language'], prompt, 1));
150
159
  }
151
160
  }
152
161
  static getTokenUsage(chainName, modelName, tokenUsage) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "9.2.3",
3
+ "version": "9.3.0",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",