@fusioni/client-sdk 1.1.25 → 1.1.26
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/dist/fusioni-sdk.umd.js +29 -14
- package/dist/fusioni-sdk.umd.js.map +1 -1
- package/dist/i18n/el.d.ts +1 -1
- package/dist/i18n/en.d.ts +1 -1
- package/dist/i18n/index.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +28 -13
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +28 -13
- package/dist/index.js.map +1 -1
- package/dist/services/ApiClient.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/fusioni-sdk.umd.js
CHANGED
|
@@ -490,7 +490,7 @@ var Fusioni = (function () {
|
|
|
490
490
|
attachedImages: 'Images',
|
|
491
491
|
attachedVideos: 'Videos',
|
|
492
492
|
messages: {
|
|
493
|
-
loading: '
|
|
493
|
+
loading: 'Thinking...',
|
|
494
494
|
error: 'Oops! Something went wrong. Please try again later.',
|
|
495
495
|
delete: 'Delete message',
|
|
496
496
|
deleteConfirm: {
|
|
@@ -595,7 +595,7 @@ var Fusioni = (function () {
|
|
|
595
595
|
attachedImages: 'Εικόνες',
|
|
596
596
|
attachedVideos: 'Βίντεο',
|
|
597
597
|
messages: {
|
|
598
|
-
loading: '
|
|
598
|
+
loading: 'Thinking...',
|
|
599
599
|
error: 'Ουπς! Κάτι πήγε στραβά. Παρακαλώ δοκιμάστε ξανά αργότερα.',
|
|
600
600
|
delete: 'Διαγραφή μηνύματος',
|
|
601
601
|
deleteConfirm: {
|
|
@@ -4546,7 +4546,7 @@ var Fusioni = (function () {
|
|
|
4546
4546
|
mergeConfig
|
|
4547
4547
|
} = axios;
|
|
4548
4548
|
|
|
4549
|
-
/** Decode SSE `event.data` (plain text
|
|
4549
|
+
/** Decode SSE `event.data` (plain text, JSON with `data`, or chat stream `{ conversation_id, message }`). */
|
|
4550
4550
|
function normalizeSsePayload(raw) {
|
|
4551
4551
|
const s = raw?.trim() ?? '';
|
|
4552
4552
|
if (!s) {
|
|
@@ -4554,18 +4554,33 @@ var Fusioni = (function () {
|
|
|
4554
4554
|
}
|
|
4555
4555
|
try {
|
|
4556
4556
|
const parsed = JSON.parse(s);
|
|
4557
|
-
if (parsed !== null && typeof parsed === 'object'
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4557
|
+
if (parsed !== null && typeof parsed === 'object') {
|
|
4558
|
+
if ('data' in parsed) {
|
|
4559
|
+
const inner = parsed.data;
|
|
4560
|
+
if (inner === undefined || inner === null) {
|
|
4561
|
+
return null;
|
|
4562
|
+
}
|
|
4563
|
+
if (typeof inner === 'string') {
|
|
4564
|
+
return inner;
|
|
4565
|
+
}
|
|
4566
|
+
if (typeof inner === 'number' || typeof inner === 'boolean') {
|
|
4567
|
+
return String(inner);
|
|
4568
|
+
}
|
|
4569
|
+
return JSON.stringify(inner);
|
|
4564
4570
|
}
|
|
4565
|
-
if (
|
|
4566
|
-
|
|
4571
|
+
if ('message' in parsed) {
|
|
4572
|
+
const message = parsed.message;
|
|
4573
|
+
if (message === undefined || message === null) {
|
|
4574
|
+
return null;
|
|
4575
|
+
}
|
|
4576
|
+
if (typeof message === 'string') {
|
|
4577
|
+
return message;
|
|
4578
|
+
}
|
|
4579
|
+
if (typeof message === 'number' || typeof message === 'boolean') {
|
|
4580
|
+
return String(message);
|
|
4581
|
+
}
|
|
4582
|
+
return JSON.stringify(message);
|
|
4567
4583
|
}
|
|
4568
|
-
return JSON.stringify(inner);
|
|
4569
4584
|
}
|
|
4570
4585
|
}
|
|
4571
4586
|
catch {
|
|
@@ -7432,7 +7447,7 @@ var Fusioni = (function () {
|
|
|
7432
7447
|
const Fusioni = {
|
|
7433
7448
|
init,
|
|
7434
7449
|
mount,
|
|
7435
|
-
version: "1.1.
|
|
7450
|
+
version: "1.1.25",
|
|
7436
7451
|
};
|
|
7437
7452
|
if (typeof window !== 'undefined') {
|
|
7438
7453
|
window.Fusioni = Fusioni;
|