@parhelia/localization 0.1.12802 → 0.1.12808

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.
@@ -5,9 +5,9 @@ import { discoverItemsTree, flattenSelectableItemsFromBackendTrees } from "./api
5
5
  * any selection-tree item whose includeSubitems flag is true.
6
6
  *
7
7
  * Selection priority:
8
- * 1. `selectionTreeItems` (new model) per-item flags drive expansion
9
- * 2. `discoveredItems` (legacy fallback) used as-is
10
- * 3. `items` (initial wizard input) used as-is
8
+ * 1. `selectionTreeItems` (new model) - per-item flags drive expansion
9
+ * 2. `discoveredItems` (legacy fallback) - used as-is
10
+ * 3. `items` (initial wizard input) - used as-is
11
11
  */
12
12
  async function resolveItemIdsToTranslate(wizardData, sessionId) {
13
13
  if (wizardData.selectionTreeItems && wizardData.selectionTreeItems.length > 0) {
@@ -81,7 +81,7 @@ export async function performDefaultTranslation(wizardData, editContext) {
81
81
  if (trimmedName) {
82
82
  metadataObj.name = trimmedName;
83
83
  }
84
- // Merge service-specific custom data (e.g., custom prompts for OpenAI)
84
+ // Merge service-specific custom data (e.g., custom prompts for AI providers)
85
85
  if (wizardData.serviceCustomData && wizardData.serviceCustomData.size > 0) {
86
86
  const serviceData = wizardData.serviceCustomData.get(wizardData.translationProvider);
87
87
  if (serviceData && serviceData.enableCustomPrompt) {
@@ -86,7 +86,7 @@ export function PromptCustomizationStep({ isActive = true, data, setData, onStep
86
86
  return data.serviceCustomData.get(data.translationProvider);
87
87
  }, [data.serviceCustomData, data.translationProvider]);
88
88
  const enableCustomPrompt = serviceData?.enableCustomPrompt === true;
89
- const supportsPromptCustomization = data.translationProvider === "OpenAI";
89
+ const supportsPromptCustomization = data.translationProvider === "AI";
90
90
  const defaultPrompt = useMemo(() => {
91
91
  const prompt = selectedProvider?.defaultPrompt;
92
92
  return prompt && prompt.trim() ? prompt : null;
@@ -133,7 +133,7 @@ export function PromptCustomizationStep({ isActive = true, data, setData, onStep
133
133
  const newProvider = e.target.value;
134
134
  const newServiceCustomData = new Map();
135
135
  data.serviceCustomData?.forEach((value, key) => {
136
- if (key !== "OpenAI" || newProvider === "OpenAI") {
136
+ if (key !== "AI" || newProvider === "AI") {
137
137
  newServiceCustomData.set(key, value);
138
138
  }
139
139
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parhelia/localization",
3
- "version": "0.1.12802",
3
+ "version": "0.1.12808",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"