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.esm.js CHANGED
@@ -5097,6 +5097,13 @@ const sseevent = (message, messageToStoreRef) => {
5097
5097
  ? parsedData.additional_args
5098
5098
  : {};
5099
5099
  }
5100
+ if (parsedData?.status === "notification") {
5101
+ messageToStoreRef.current.notificationData = {
5102
+ message: parsedData?.message || "",
5103
+ chat_id: parsedData?.chat_id || "",
5104
+ session_id: parsedData?.session_id || "",
5105
+ };
5106
+ }
5100
5107
  if (parsedData?.status === "completed" ||
5101
5108
  parsedData?.status === "follow-up") {
5102
5109
  messageToStoreRef.current.initValue = true;
@@ -6652,6 +6659,15 @@ const StreamedContent = ({ botData }) => {
6652
6659
  thinkingStartTimeRef.current = Date.now();
6653
6660
  }
6654
6661
  const data = JSON.parse(event.data);
6662
+ if (data?.status === "notification") {
6663
+ window.dispatchEvent(new CustomEvent("agent-notification", {
6664
+ detail: {
6665
+ message: data?.message || "",
6666
+ chat_id: data?.chat_id || "",
6667
+ session_id: data?.session_id || "",
6668
+ },
6669
+ }));
6670
+ }
6655
6671
  if (data?.message || data?.status === "step" || data?.status === "step_form" || data?.status === "thinking" || data?.status === "questions") {
6656
6672
  if (data.status === "questions") {
6657
6673
  const incomingQuestions = data.widget_data?.[0]?.questions || [];