@flowengage/react-chatbot 8.0.68 → 8.0.70

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.
@@ -8903,11 +8903,12 @@ async function jm(e) {
8903
8903
  let y = /* @__PURE__ */ new Set(), b = {
8904
8904
  role: null,
8905
8905
  text: "",
8906
- timer: null
8906
+ timer: null,
8907
+ debug: null
8907
8908
  }, x = "", S = () => {
8908
8909
  b.timer &&= (clearTimeout(b.timer), null);
8909
- let e = b.text.trim(), t = b.role;
8910
- if (b.text = "", b.role = null, !(!e || !t)) {
8910
+ let e = b.text.trim(), t = b.role, n = b.debug;
8911
+ if (b.text = "", b.role = null, b.debug = null, !(!e || !t)) {
8911
8912
  if (t === "agent") {
8912
8913
  if (e === x) {
8913
8914
  console.debug("[FlowEngage] duplicate agent turn suppressed");
@@ -8917,11 +8918,12 @@ async function jm(e) {
8917
8918
  }
8918
8919
  s?.({
8919
8920
  role: t,
8920
- message: e
8921
+ message: e,
8922
+ debug: n
8921
8923
  });
8922
8924
  }
8923
- }, C = (e, t) => {
8924
- t && (b.role && b.role !== e && S(), b.role = e, b.text = b.text ? `${b.text} ${t}`.replace(/\s+/g, " ") : t, b.timer && clearTimeout(b.timer), b.timer = setTimeout(S, Sm));
8925
+ }, C = (e, t, n) => {
8926
+ t && (b.role && b.role !== e && S(), b.role = e, b.text = b.text ? `${b.text} ${t}`.replace(/\s+/g, " ") : t, n && (b.debug = n), b.timer && clearTimeout(b.timer), b.timer = setTimeout(S, Sm));
8925
8927
  }, w = !1, T = !1, E = !1, D = !1, O = !0, k = 0, A = !1, ee = !1, te = Cm, ne = wm, j = null, re = !1, ie = () => {
8926
8928
  j && clearTimeout(j);
8927
8929
  let e = () => {
@@ -9016,7 +9018,7 @@ async function jm(e) {
9016
9018
  break;
9017
9019
  }
9018
9020
  }
9019
- C(e.role === "user" ? "user" : "agent", t);
9021
+ C(e.role === "user" ? "user" : "agent", t, e.debug);
9020
9022
  break;
9021
9023
  }
9022
9024
  case "UserStartedSpeaking":
@@ -13022,7 +13024,8 @@ function kg({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
13022
13024
  if (l.current = [...l.current, {
13023
13025
  sender: n,
13024
13026
  message: r,
13025
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
13027
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
13028
+ debug: t.debug
13026
13029
  }], i) try {
13027
13030
  let e = kh(l.current);
13028
13031
  e && P(i, e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowengage/react-chatbot",
3
- "version": "8.0.68",
3
+ "version": "8.0.70",
4
4
  "description": "Embeddable AI chat widget for React — powered by FlowEngage. Drop it in with a single siteId.",
5
5
  "keywords": [
6
6
  "chatbot",