@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/i18n/el.d.ts CHANGED
@@ -31,7 +31,7 @@ export declare const el: {
31
31
  readonly attachedImages: "Εικόνες";
32
32
  readonly attachedVideos: "Βίντεο";
33
33
  readonly messages: {
34
- readonly loading: "Εργάζομαι...";
34
+ readonly loading: "Thinking...";
35
35
  readonly error: "Ουπς! Κάτι πήγε στραβά. Παρακαλώ δοκιμάστε ξανά αργότερα.";
36
36
  readonly delete: "Διαγραφή μηνύματος";
37
37
  readonly deleteConfirm: {
package/dist/i18n/en.d.ts CHANGED
@@ -31,7 +31,7 @@ export declare const en: {
31
31
  readonly attachedImages: "Images";
32
32
  readonly attachedVideos: "Videos";
33
33
  readonly messages: {
34
- readonly loading: "Working on it...";
34
+ readonly loading: "Thinking...";
35
35
  readonly error: "Oops! Something went wrong. Please try again later.";
36
36
  readonly delete: "Delete message";
37
37
  readonly deleteConfirm: {
@@ -35,7 +35,7 @@ export declare const translations: {
35
35
  readonly attachedImages: "Images";
36
36
  readonly attachedVideos: "Videos";
37
37
  readonly messages: {
38
- readonly loading: "Working on it...";
38
+ readonly loading: "Thinking...";
39
39
  readonly error: "Oops! Something went wrong. Please try again later.";
40
40
  readonly delete: "Delete message";
41
41
  readonly deleteConfirm: {
@@ -136,7 +136,7 @@ export declare const translations: {
136
136
  readonly attachedImages: "Εικόνες";
137
137
  readonly attachedVideos: "Βίντεο";
138
138
  readonly messages: {
139
- readonly loading: "Εργάζομαι...";
139
+ readonly loading: "Thinking...";
140
140
  readonly error: "Ουπς! Κάτι πήγε στραβά. Παρακαλώ δοκιμάστε ξανά αργότερα.";
141
141
  readonly delete: "Διαγραφή μηνύματος";
142
142
  readonly deleteConfirm: {
package/dist/index.d.ts CHANGED
@@ -286,7 +286,7 @@ declare const en: {
286
286
  readonly attachedImages: "Images";
287
287
  readonly attachedVideos: "Videos";
288
288
  readonly messages: {
289
- readonly loading: "Working on it...";
289
+ readonly loading: "Thinking...";
290
290
  readonly error: "Oops! Something went wrong. Please try again later.";
291
291
  readonly delete: "Delete message";
292
292
  readonly deleteConfirm: {
package/dist/index.esm.js CHANGED
@@ -36,7 +36,7 @@ const en = {
36
36
  attachedImages: 'Images',
37
37
  attachedVideos: 'Videos',
38
38
  messages: {
39
- loading: 'Working on it...',
39
+ loading: 'Thinking...',
40
40
  error: 'Oops! Something went wrong. Please try again later.',
41
41
  delete: 'Delete message',
42
42
  deleteConfirm: {
@@ -141,7 +141,7 @@ const el = {
141
141
  attachedImages: 'Εικόνες',
142
142
  attachedVideos: 'Βίντεο',
143
143
  messages: {
144
- loading: 'Εργάζομαι...',
144
+ loading: 'Thinking...',
145
145
  error: 'Ουπς! Κάτι πήγε στραβά. Παρακαλώ δοκιμάστε ξανά αργότερα.',
146
146
  delete: 'Διαγραφή μηνύματος',
147
147
  deleteConfirm: {
@@ -4092,7 +4092,7 @@ const {
4092
4092
  mergeConfig
4093
4093
  } = axios;
4094
4094
 
4095
- /** Decode SSE `event.data` (plain text or JSON with a `data` field), matching fusioni-web chat usage. */
4095
+ /** Decode SSE `event.data` (plain text, JSON with `data`, or chat stream `{ conversation_id, message }`). */
4096
4096
  function normalizeSsePayload(raw) {
4097
4097
  const s = raw?.trim() ?? '';
4098
4098
  if (!s) {
@@ -4100,18 +4100,33 @@ function normalizeSsePayload(raw) {
4100
4100
  }
4101
4101
  try {
4102
4102
  const parsed = JSON.parse(s);
4103
- if (parsed !== null && typeof parsed === 'object' && 'data' in parsed) {
4104
- const inner = parsed.data;
4105
- if (inner === undefined || inner === null) {
4106
- return null;
4107
- }
4108
- if (typeof inner === 'string') {
4109
- return inner;
4103
+ if (parsed !== null && typeof parsed === 'object') {
4104
+ if ('data' in parsed) {
4105
+ const inner = parsed.data;
4106
+ if (inner === undefined || inner === null) {
4107
+ return null;
4108
+ }
4109
+ if (typeof inner === 'string') {
4110
+ return inner;
4111
+ }
4112
+ if (typeof inner === 'number' || typeof inner === 'boolean') {
4113
+ return String(inner);
4114
+ }
4115
+ return JSON.stringify(inner);
4110
4116
  }
4111
- if (typeof inner === 'number' || typeof inner === 'boolean') {
4112
- return String(inner);
4117
+ if ('message' in parsed) {
4118
+ const message = parsed.message;
4119
+ if (message === undefined || message === null) {
4120
+ return null;
4121
+ }
4122
+ if (typeof message === 'string') {
4123
+ return message;
4124
+ }
4125
+ if (typeof message === 'number' || typeof message === 'boolean') {
4126
+ return String(message);
4127
+ }
4128
+ return JSON.stringify(message);
4113
4129
  }
4114
- return JSON.stringify(inner);
4115
4130
  }
4116
4131
  }
4117
4132
  catch {