@flowengage/react-chatbot 7.0.10 → 7.0.11
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.
|
@@ -3521,20 +3521,36 @@ function Br({ siteId: e, config: t, children: n, language: r = "en" }) {
|
|
|
3521
3521
|
currentPageUrl: typeof window < "u" ? window.location.href : void 0,
|
|
3522
3522
|
currentPageTitle: typeof window < "u" ? document.title : void 0,
|
|
3523
3523
|
currentPagePath: typeof window < "u" ? window.location.pathname : void 0
|
|
3524
|
-
}), s = o.chat_history || []
|
|
3525
|
-
if (
|
|
3526
|
-
let e =
|
|
3527
|
-
|
|
3524
|
+
}), s = o.chat_history || [];
|
|
3525
|
+
if (o.navigate?.url) {
|
|
3526
|
+
let { url: e, section: t } = o.navigate;
|
|
3527
|
+
Sr(e, {
|
|
3528
3528
|
siteId: i?.siteId,
|
|
3529
3529
|
apiBaseUrl: i?.apiBaseUrl
|
|
3530
|
-
}).then((
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
let
|
|
3534
|
-
|
|
3535
|
-
},
|
|
3530
|
+
}).then((n) => {
|
|
3531
|
+
n && Or(e, { voiceActive: Et.current }).then((e) => {
|
|
3532
|
+
t && setTimeout(() => {
|
|
3533
|
+
let e = _r(null, t);
|
|
3534
|
+
e && vr(e);
|
|
3535
|
+
}, e ? 300 : 150);
|
|
3536
3536
|
});
|
|
3537
3537
|
});
|
|
3538
|
+
} else {
|
|
3539
|
+
let e = [...s].reverse().find((e) => e.sender === "bot" || e.sender === "assistant");
|
|
3540
|
+
if (e?.message) {
|
|
3541
|
+
let t = Fr(e.message);
|
|
3542
|
+
t && Sr(t.url, {
|
|
3543
|
+
siteId: i?.siteId,
|
|
3544
|
+
apiBaseUrl: i?.apiBaseUrl
|
|
3545
|
+
}).then((e) => {
|
|
3546
|
+
e && Or(t.url, { voiceActive: Et.current }).then((e) => {
|
|
3547
|
+
t.section && setTimeout(() => {
|
|
3548
|
+
let e = _r(null, t.section);
|
|
3549
|
+
e && vr(e);
|
|
3550
|
+
}, e ? 300 : 150);
|
|
3551
|
+
});
|
|
3552
|
+
});
|
|
3553
|
+
}
|
|
3538
3554
|
}
|
|
3539
3555
|
S(Pr(s)), re(!!o.is_human_handled), te(o.is_human_handled ? "agent" : "ai"), we(!1), ke(!1), await k.current.updateChatStatus(y, "messageSent");
|
|
3540
3556
|
} catch (e) {
|