@pluno/product-agent-web 0.1.144 → 0.1.145

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.
@@ -215,14 +215,16 @@ const ps = globalThis.fetch.bind(globalThis), Pt = '.pluno-pa-widget-host[data-p
215
215
  let ys = 0;
216
216
  function re(e) {
217
217
  const t = {};
218
- for (const r of ["type", "requestId", "clientMessageId", "sessionId", "runId", "itemId", "reason"]) {
219
- const i = e[r];
220
- (typeof i == "string" || typeof i == "number" || typeof i == "boolean" || i === null) && (t[r] = i);
218
+ for (const i of ["type", "requestId", "clientMessageId", "sessionId", "runId", "itemId", "reason", "phase"]) {
219
+ const o = e[i];
220
+ (typeof o == "string" || typeof o == "number" || typeof o == "boolean" || o === null) && (t[i] = o);
221
221
  }
222
222
  const s = e.content;
223
223
  typeof s == "string" && (t.contentLength = s.length);
224
- const n = e.attachments;
225
- return Array.isArray(n) && (t.attachmentCount = n.length), t;
224
+ const n = e.delta;
225
+ typeof n == "string" && (t.deltaLength = n.length);
226
+ const r = e.attachments;
227
+ return Array.isArray(r) && (t.attachmentCount = r.length), t;
226
228
  }
227
229
  function Rt(e, t, s) {
228
230
  if (typeof window > "u")
@@ -277,14 +277,16 @@ const Ia = globalThis.fetch.bind(globalThis), Ao = '.pluno-pa-widget-host[data-p
277
277
  let Ra = 0;
278
278
  function Bi(t) {
279
279
  const e = {};
280
- for (const i of ["type", "requestId", "clientMessageId", "sessionId", "runId", "itemId", "reason"]) {
281
- const r = t[i];
282
- (typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null) && (e[i] = r);
280
+ for (const r of ["type", "requestId", "clientMessageId", "sessionId", "runId", "itemId", "reason", "phase"]) {
281
+ const a = t[r];
282
+ (typeof a == "string" || typeof a == "number" || typeof a == "boolean" || a === null) && (e[r] = a);
283
283
  }
284
284
  const n = t.content;
285
285
  typeof n == "string" && (e.contentLength = n.length);
286
- const o = t.attachments;
287
- return Array.isArray(o) && (e.attachmentCount = o.length), e;
286
+ const o = t.delta;
287
+ typeof o == "string" && (e.deltaLength = o.length);
288
+ const i = t.attachments;
289
+ return Array.isArray(i) && (e.attachmentCount = i.length), e;
288
290
  }
289
291
  function uo(t, e, n) {
290
292
  if (typeof window > "u")
@@ -6464,8 +6466,8 @@ function Ir(t) {
6464
6466
  }
6465
6467
  function Vd(t, e, n) {
6466
6468
  t.replaceChildren(), t.hidden = e.length === 0;
6467
- for (const [o, i] of e.entries()) {
6468
- const r = document.createElement("div");
6469
+ for (let o = 0; o < e.length; o += 1) {
6470
+ const i = e[o], r = document.createElement("div");
6469
6471
  r.className = "pluno-pa-widget__attachment", r.appendChild(Xd(i));
6470
6472
  const a = document.createElement("span");
6471
6473
  a.textContent = i.name, r.appendChild(a);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluno/product-agent-web",
3
- "version": "0.1.144",
3
+ "version": "0.1.145",
4
4
  "description": "Browser SDK and default widget for embedding Pluno Product Agent into customer web apps.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",