impact-chatbot 2.3.32 → 2.3.33
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.
- package/dist/index.cjs.js +16 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +16 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -5119,6 +5119,13 @@ const sseevent = (message, messageToStoreRef) => {
|
|
|
5119
5119
|
? parsedData.additional_args
|
|
5120
5120
|
: {};
|
|
5121
5121
|
}
|
|
5122
|
+
if (parsedData?.status === "notification") {
|
|
5123
|
+
messageToStoreRef.current.notificationData = {
|
|
5124
|
+
message: parsedData?.message || "",
|
|
5125
|
+
chat_id: parsedData?.chat_id || "",
|
|
5126
|
+
session_id: parsedData?.session_id || "",
|
|
5127
|
+
};
|
|
5128
|
+
}
|
|
5122
5129
|
if (parsedData?.status === "completed" ||
|
|
5123
5130
|
parsedData?.status === "follow-up") {
|
|
5124
5131
|
messageToStoreRef.current.initValue = true;
|
|
@@ -6674,6 +6681,15 @@ const StreamedContent = ({ botData }) => {
|
|
|
6674
6681
|
thinkingStartTimeRef.current = Date.now();
|
|
6675
6682
|
}
|
|
6676
6683
|
const data = JSON.parse(event.data);
|
|
6684
|
+
if (data?.status === "notification") {
|
|
6685
|
+
window.dispatchEvent(new CustomEvent("agent-notification", {
|
|
6686
|
+
detail: {
|
|
6687
|
+
message: data?.message || "",
|
|
6688
|
+
chat_id: data?.chat_id || "",
|
|
6689
|
+
session_id: data?.session_id || "",
|
|
6690
|
+
},
|
|
6691
|
+
}));
|
|
6692
|
+
}
|
|
6677
6693
|
if (data?.message || data?.status === "step" || data?.status === "step_form" || data?.status === "thinking" || data?.status === "questions") {
|
|
6678
6694
|
if (data.status === "questions") {
|
|
6679
6695
|
const incomingQuestions = data.widget_data?.[0]?.questions || [];
|