@n8n/chat 1.17.0 → 1.17.2

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.
@@ -1,4 +1,4 @@
1
- /*! Package version @n8n/chat@1.17.0 */
1
+ /*! Package version @n8n/chat@1.17.2 */
2
2
  //#region \0rolldown/runtime.js
3
3
  var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (e && (t = e(e = 0)), t), s = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), c = (e, n) => {
4
4
  let r = {};
@@ -13545,9 +13545,9 @@ function bre(e) {
13545
13545
  //#endregion
13546
13546
  //#region src/utils/utils.ts
13547
13547
  var xre = "with-buttons";
13548
- function Sre(e, t, n, r) {
13549
- let i = new URL(e).origin, a = i.startsWith("https") ? "wss" : "ws";
13550
- return `${i.replace(/^https?/, a)}/chat?sessionId=${n}&executionId=${t}${r ? "&isPublic=true" : ""}`;
13548
+ function Sre(e, t, n, r, i) {
13549
+ let a = new URL(e).origin, o = a.startsWith("https") ? "wss" : "ws", s = `${a.replace(/^https?/, o)}/chat?sessionId=${n}&executionId=${t}`;
13550
+ return r && (s += "&isPublic=true"), i && (s += `&token=${i}`), s;
13551
13551
  }
13552
13552
  function Op(e) {
13553
13553
  let t = Sp(), n = {
@@ -14103,8 +14103,8 @@ var bie = {
14103
14103
  for (let n = 0; n < e.length; n++) t.items.add(e[n]);
14104
14104
  c.value = t.files;
14105
14105
  });
14106
- function C(e) {
14107
- O(e);
14106
+ function C(e, t) {
14107
+ O(e, t);
14108
14108
  }
14109
14109
  qr(() => {
14110
14110
  Ap.on("focusInput", T), Ap.on("blurInput", w), Ap.on("setInputValue", E), Ap.on("setupWebsocket", C), l.value && (f.value = new ResizeObserver((e) => {
@@ -14129,10 +14129,10 @@ var bie = {
14129
14129
  }
14130
14130
  return [];
14131
14131
  }
14132
- function O(e) {
14132
+ function O(e, t) {
14133
14133
  if (a.webhookUrl && o.currentSessionId.value) try {
14134
- let t = Sre(a.webhookUrl, e, o.currentSessionId.value, !0);
14135
- o.ws = new WebSocket(t), o.ws.onmessage = (e) => {
14134
+ let n = Sre(a.webhookUrl, e, o.currentSessionId.value, !0, t);
14135
+ o.ws = new WebSocket(n), o.ws.onmessage = (e) => {
14136
14136
  if (e.data === "n8n|heartbeat") {
14137
14137
  o.ws?.send("n8n|heartbeat-ack");
14138
14138
  return;
@@ -14184,7 +14184,7 @@ var bie = {
14184
14184
  return;
14185
14185
  }
14186
14186
  let n = await o.sendMessage(t, D());
14187
- n?.executionId && O(n.executionId), Ap.emit("messageSent"), d.value = !1;
14187
+ n?.executionId && O(n.executionId, n.resumeToken), Ap.emit("messageSent"), d.value = !1;
14188
14188
  }
14189
14189
  async function M(e) {
14190
14190
  e.shiftKey || e.isComposing || (await j(e), I());
@@ -14256,7 +14256,7 @@ var bie = {
14256
14256
  onRemove: N
14257
14257
  }, null, 8, ["file"]))), 128))])) : Q("", !0)], 4));
14258
14258
  }
14259
- }), [["__scopeId", "data-v-55b59141"]]), Aie = { class: "chat-layout" }, jie = {
14259
+ }), [["__scopeId", "data-v-fb8d706b"]]), Aie = { class: "chat-layout" }, jie = {
14260
14260
  key: 0,
14261
14261
  class: "chat-header"
14262
14262
  }, Mie = {
@@ -19015,7 +19015,7 @@ var vS = {
19015
19015
  }), c = Zt(null);
19016
19016
  W(() => t.icon, async (e) => {
19017
19017
  if (typeof e == "string" && e.startsWith("node:") && !c.value) {
19018
- let { nodeIconSet: e } = await import("./node-icons-B8yj9hZx.mjs");
19018
+ let { nodeIconSet: e } = await import("./node-icons-CKgMxpAY.mjs");
19019
19019
  c.value = e;
19020
19020
  }
19021
19021
  }, { immediate: !0 });