impact-chatbot 2.1.0 → 2.3.0
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 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +16 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -923,6 +923,8 @@ const getFormattedApplicationName = (applicationURL) => {
|
|
|
923
923
|
return "PriceSmart Markdown";
|
|
924
924
|
case "pricesmart-promo":
|
|
925
925
|
return "PriceSmart Promo";
|
|
926
|
+
case "agentic-assort":
|
|
927
|
+
return "AssortSmart";
|
|
926
928
|
default:
|
|
927
929
|
return "workflow input center";
|
|
928
930
|
}
|
|
@@ -9300,8 +9302,8 @@ let chatbotFilterCustomConfig = {
|
|
|
9300
9302
|
};
|
|
9301
9303
|
|
|
9302
9304
|
const SmartBot = (props) => {
|
|
9303
|
-
const { userName, partialClose, setPartialClose } = props;
|
|
9304
|
-
const { showModal, setShowModal, minimizedMode, setMinimizedMode, userInput, setUserInput, position, setPosition, flowType, setFlowType, screenName, setScreenName, questionIndex, setQuestionIndex, currentAppLink, setCurrentAppLink, loader, setLoader, enableRefreshAction, setEnableRefreshAction, refreshLoader, setRefreshLoader, chatDataState, setChatDataState, showExtendedContent, setShowExtendedContent, currentMode, setCurrentMode, selectedModule, setSelectedModule, isCardVisible, setIsCardVisible, templateData, setTemplateData, showAlert, setShowAlert, grabPositionRef, chatDataRef, chatBodyRef, minimizedBtnRef, chatDataScreenLinkRef, navigate, location, dispatch, globalClasses, classes, dateFormat, filterReducerState, activeConversationId, setActiveConversationId, isModuleChanged, setIsModuleChanged, showChatPlaceholder, setShowChatPlaceholder, currentAgentId, setCurrentAgentId, baseUrl, setBaseUrl, currentSessionId, setCurrentSessionId, notificationData, agentTaskCompleted, setAgentTaskCompleted, customChatConfig, setCustomChatConfig, setMiddleWareFunction, chatBotInfoRef, chatDataInfoRef, initValue, setInitValue, sessionId, setSessionId, thinkingContent, setThinkingContent, isThinking, setIsThinking, chatId, setChatId, isStop, setIsStop, functionsRef, functionsState, setFunctionsState, thinkingHeaderMessage, setThinkingHeaderMessage, legacyAgentScreen, setLegacyAgentScreen, uniqueChatId, setUniqueChatId, fieldNumber, setFieldNumber, thinkingContext, isModalOpen, setIsModalOpen, utilityList, setUtilityList, isUploadModalOpen, setIsUploadModalOpen, isRefreshTriggered, setIsRefreshTriggered, } = useChatState();
|
|
9305
|
+
const { userName, partialClose, setPartialClose, forceOpen, customBaseUrl = "" } = props;
|
|
9306
|
+
const { showModal, setShowModal, minimizedMode, setMinimizedMode, userInput, setUserInput, position, setPosition, flowType, setFlowType, screenName, setScreenName, questionIndex, setQuestionIndex, currentAppLink, setCurrentAppLink, loader, setLoader, enableRefreshAction, setEnableRefreshAction, refreshLoader, setRefreshLoader, chatDataState, setChatDataState, showExtendedContent, setShowExtendedContent, currentMode, setCurrentMode, selectedModule, setSelectedModule, isCardVisible, setIsCardVisible, templateData, setTemplateData, showAlert, setShowAlert, grabPositionRef, chatDataRef, chatBodyRef, minimizedBtnRef, chatDataScreenLinkRef, navigate, location, dispatch, globalClasses, classes, dateFormat, filterReducerState, activeConversationId, setActiveConversationId, isModuleChanged, setIsModuleChanged, showChatPlaceholder, setShowChatPlaceholder, currentAgentId, setCurrentAgentId, baseUrl = customBaseUrl, setBaseUrl, currentSessionId, setCurrentSessionId, notificationData, agentTaskCompleted, setAgentTaskCompleted, customChatConfig, setCustomChatConfig, setMiddleWareFunction, chatBotInfoRef, chatDataInfoRef, initValue, setInitValue, sessionId, setSessionId, thinkingContent, setThinkingContent, isThinking, setIsThinking, chatId, setChatId, isStop, setIsStop, functionsRef, functionsState, setFunctionsState, thinkingHeaderMessage, setThinkingHeaderMessage, legacyAgentScreen, setLegacyAgentScreen, uniqueChatId, setUniqueChatId, fieldNumber, setFieldNumber, thinkingContext, isModalOpen, setIsModalOpen, utilityList, setUtilityList, isUploadModalOpen, setIsUploadModalOpen, isRefreshTriggered, setIsRefreshTriggered, } = useChatState();
|
|
9305
9307
|
// Add state for confirmation dialogs
|
|
9306
9308
|
React.useState(false);
|
|
9307
9309
|
React.useState(null);
|
|
@@ -9845,7 +9847,18 @@ const SmartBot = (props) => {
|
|
|
9845
9847
|
}, 1000);
|
|
9846
9848
|
}
|
|
9847
9849
|
}, [showModal]);
|
|
9848
|
-
|
|
9850
|
+
React.useEffect(() => {
|
|
9851
|
+
if (forceOpen && !showModal && !partialClose) {
|
|
9852
|
+
setShowModal(true);
|
|
9853
|
+
setPartialClose(false);
|
|
9854
|
+
setCurrentMode("agent");
|
|
9855
|
+
setShowChatPlaceholder(true);
|
|
9856
|
+
}
|
|
9857
|
+
if (customBaseUrl) {
|
|
9858
|
+
setBaseUrl(customBaseUrl);
|
|
9859
|
+
}
|
|
9860
|
+
}, [forceOpen]);
|
|
9861
|
+
return (jsxRuntime.jsxs("div", { className: `${classes.agentStyleOverride} ${partialClose ? classes.hideBotStyle : ""}`, children: [jsxRuntime.jsx(MemoryModal, { isModalOpen: isModalOpen, setIsModalOpen: setIsModalOpen, displaySnackMessages: displaySnackMessages }), jsxRuntime.jsx(UploadModal, { isUploadModalOpen: isUploadModalOpen, setIsUploadModalOpen: setIsUploadModalOpen, displaySnackMessages: displaySnackMessages }), jsxRuntime.jsx(impactUiChatbot.ChatBotComponent, { isFullWidth: true, userName: userName, showHistoryPanel: false, customInputComponent: currentMode === "agent" ? (jsxRuntime.jsx(ChatbotInput, { newChatScreen: newChatScreen, inputValue: userInput, setInputValue: setUserInput, isStopIcon: isStop, onSendIconClick: onSendIconClick, onStopIconClick: onStopIconClick, currentMode: currentMode, filterOptions: filterOptions })) : null, isChatBotOpen: showModal || forceOpen,
|
|
9849
9862
|
// landingScreen={true}
|
|
9850
9863
|
handleNewChatClick: () => {
|
|
9851
9864
|
localStorage.setItem("isStreaming", "false");
|