@n8n/chat 1.18.0 → 1.18.1

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.18.0 */
1
+ /*! Package version @n8n/chat@1.18.1 */
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 xre(e) {
13545
13545
  //#endregion
13546
13546
  //#region src/utils/utils.ts
13547
13547
  var Sre = "with-buttons";
13548
- function Cre(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 Cre(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 Dp(e) {
13553
13553
  let t = xp(), n = {
@@ -14103,8 +14103,8 @@ var xie = {
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
  Xr(() => {
14110
14110
  kp.on("focusInput", T), kp.on("blurInput", w), kp.on("setInputValue", E), kp.on("setupWebsocket", C), l.value && (f.value = new ResizeObserver((e) => {
@@ -14129,10 +14129,10 @@ var xie = {
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 = Cre(a.webhookUrl, e, o.currentSessionId.value, !0);
14135
- o.ws = new WebSocket(t), o.ws.onmessage = (e) => {
14134
+ let n = Cre(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 xie = {
14184
14184
  return;
14185
14185
  }
14186
14186
  let n = await o.sendMessage(t, D());
14187
- n?.executionId && O(n.executionId), kp.emit("messageSent"), d.value = !1;
14187
+ n?.executionId && O(n.executionId, n.resumeToken), kp.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 xie = {
14256
14256
  onRemove: N
14257
14257
  }, null, 8, ["file"]))), 128))])) : Q("", !0)], 4));
14258
14258
  }
14259
- }), [["__scopeId", "data-v-55b59141"]]), jie = { class: "chat-layout" }, Mie = {
14259
+ }), [["__scopeId", "data-v-fb8d706b"]]), jie = { class: "chat-layout" }, Mie = {
14260
14260
  key: 0,
14261
14261
  class: "chat-header"
14262
14262
  }, Nie = {
@@ -19053,7 +19053,7 @@ var _S = {
19053
19053
  }), c = Qt(null);
19054
19054
  W(() => t.icon, async (e) => {
19055
19055
  if (typeof e == "string" && e.startsWith("node:") && !c.value) {
19056
- let { nodeIconSet: e } = await import("./node-icons-BfpANqUU.mjs");
19056
+ let { nodeIconSet: e } = await import("./node-icons-Ca5tmG4k.mjs");
19057
19057
  c.value = e;
19058
19058
  }
19059
19059
  }, { immediate: !0 });