@flowengage/react-chatbot 8.0.76 → 8.0.77
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.
|
@@ -12172,7 +12172,7 @@ function vg(e) {
|
|
|
12172
12172
|
if (typeof window < "u" && window.__fe_user_nav_during_speech) {
|
|
12173
12173
|
let e = window.__fe_user_nav_during_speech, t = window.location.pathname;
|
|
12174
12174
|
if (Date.now() - e.ts >= 3e4) window.__fe_user_nav_during_speech = null;
|
|
12175
|
-
else return $("flowengage_highlight ✖ blocked — user navigated during speech", e), `NAV_CHANGED: The visitor navigated from "${e.fromPageName}" to "${e.toPageName}" (current path: ${t}) while you were speaking. STOP the current walkthrough immediately. DO NOT call
|
|
12175
|
+
else return $("flowengage_highlight ✖ blocked — user navigated during speech", e), `NAV_CHANGED: The visitor navigated from "${e.fromPageName}" to "${e.toPageName}" (current path: ${t}) while you were speaking. STOP the current walkthrough immediately. DO NOT call fwh-highlight-mvp again. Say out loud: "I see you've navigated to the ${e.toPageName} page — do you want me to continue what I was explaining, or shall I guide you through this page?" Wait for the visitor's answer before doing anything else.`;
|
|
12176
12176
|
}
|
|
12177
12177
|
hg();
|
|
12178
12178
|
let i = ((e) => e && e.replace(/^\d+\.\s*/, "").replace(/^["']|["']$/g, "").trim())(r), a = cr(n || null, i || null);
|
|
@@ -12318,7 +12318,9 @@ function vg(e) {
|
|
|
12318
12318
|
"fwh-request-email-mvp": async () => ($("fwh-request-email-mvp ▶"), typeof e.requestEmailCollection == "function" && e.requestEmailCollection(), "EMAIL_BOX_SHOWN. An email input text box is now visible to the visitor. Say EXACTLY: \"Please enter your email in the text box to continue.\" Then stop and wait silently — do NOT ask them to say it aloud, do NOT repeat, and do NOT answer any other question until you receive the EMAIL_SAVED message."),
|
|
12319
12319
|
"fwh-get-current-page-mvp": async () => {
|
|
12320
12320
|
if ($("fwh-get-current-page-mvp ▶"), typeof window > "u") return "Cannot determine current page (no browser context).";
|
|
12321
|
-
let e = window.location.href, t = window.location.pathname, n = document.title || ""
|
|
12321
|
+
let e = window.location.href, t = window.location.pathname, n = document.title || "";
|
|
12322
|
+
if (yr()) return $("fwh-get-current-page-mvp ✓ 404 detected", { url: e }), `CURRENT_PAGE_NOT_FOUND. The visitor is currently on a 404 / page-not-found error page (${e}). There is no real content here. Do NOT describe this page, do NOT list sections, do NOT offer a walkthrough, and do NOT describe it from your own knowledge. Tell the visitor plainly that the page they are on doesn't exist, and offer to take them somewhere that does.`;
|
|
12323
|
+
let { headings: r, pageTitleHeading: i, introText: a } = gg();
|
|
12322
12324
|
$("fwh-get-current-page-mvp ✓", {
|
|
12323
12325
|
url: e,
|
|
12324
12326
|
path: t,
|
|
@@ -13148,7 +13150,7 @@ function Mg({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, siteId: i,
|
|
|
13148
13150
|
ts: Date.now()
|
|
13149
13151
|
});
|
|
13150
13152
|
try {
|
|
13151
|
-
N.current?.sendUserMessage?.(`[SYSTEM: I navigated away mid-walkthrough — I am now on the "${l}" page (${i}). Page title: "${a}". Sections: ${JSON.stringify(o)}. STOP everything. Do NOT describe the new page. Say EXACTLY: "I see you've navigated to the ${l} page — would you like me to continue what I was explaining, or shall I walk you through this page?" Then wait for my answer. IF I say continue/yes/carry on: resume speaking verbally from where you left off — do NOT call
|
|
13153
|
+
N.current?.sendUserMessage?.(`[SYSTEM: I navigated away mid-walkthrough — I am now on the "${l}" page (${i}). Page title: "${a}". Sections: ${JSON.stringify(o)}. STOP everything. Do NOT describe the new page. Say EXACTLY: "I see you've navigated to the ${l} page — would you like me to continue what I was explaining, or shall I walk you through this page?" Then wait for my answer. IF I say continue/yes/carry on: resume speaking verbally from where you left off — do NOT call fwh-navigate-mvp, do NOT call fwh-highlight-mvp, the visitor will navigate themselves if needed. IF I want to hear about this page: call fwh-highlight-mvp for sections of "${l}" only.]`);
|
|
13152
13154
|
} catch {}
|
|
13153
13155
|
};
|
|
13154
13156
|
c = window.history.pushState.bind(window.history), window.history.pushState = (...e) => {
|