@eshal-bot/chat-widget 0.1.68 → 0.1.69

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.
@@ -8791,10 +8791,7 @@
8791
8791
  * @param {string} apiBaseUrl - Frontend base URL, e.g. https://demo.eshal.ai
8792
8792
  * @returns {string} Voice WS base, e.g. wss://demo.eshal.ai/voice/ws
8793
8793
  */
8794
- const getWebSocketUrl = (apiBaseUrl, wsBaseUrl) => {
8795
- // If the backend returned a wsBaseUrl in agentConfig (or customer passed one
8796
- // explicitly), use it directly — it already points at the correct host.
8797
- if (wsBaseUrl) return wsBaseUrl.replace(/\/$/, '');
8794
+ const getWebSocketUrl = apiBaseUrl => {
8798
8795
  if (!apiBaseUrl) {
8799
8796
  return 'wss://dev.eshal.ai/voice/ws';
8800
8797
  }
@@ -9145,7 +9142,6 @@
9145
9142
  welcomeMessage,
9146
9143
  quickQuestions = [],
9147
9144
  apiBaseUrl,
9148
- wsBaseUrl,
9149
9145
  apiKey,
9150
9146
  organizationId,
9151
9147
  getAuthToken,
@@ -9316,9 +9312,9 @@
9316
9312
  const visitorProfileRef = reactExports.useRef(null);
9317
9313
  const websocketUrl = reactExports.useMemo(() => {
9318
9314
  if (!organizationId) return null;
9319
- const resolvedWsBaseUrl = getWebSocketUrl(apiBaseUrl, wsBaseUrl);
9315
+ const resolvedWsBaseUrl = getWebSocketUrl(apiBaseUrl);
9320
9316
  return "".concat(resolvedWsBaseUrl, "/").concat(organizationId, "/").concat(bidiSessionId);
9321
- }, [apiBaseUrl, wsBaseUrl, organizationId, bidiSessionId]);
9317
+ }, [apiBaseUrl, organizationId, bidiSessionId]);
9322
9318
  const getNextMessageId = reactExports.useCallback(() => {
9323
9319
  const id = "msg-".concat(messageIdRef.current);
9324
9320
  messageIdRef.current += 1;
@@ -100730,7 +100726,7 @@
100730
100726
 
100731
100727
  // Map API response to widget props (use props as overrides if provided)
100732
100728
  const widgetConfig = reactExports.useMemo(() => {
100733
- var _agentConfig$config, _cfg$identity, _cfg$branding, _cfg$typography, _cfg$messages, _cfg$voice, _cfg$onboarding, _cfg$disclaimer, _cfg$csat, _cfg$inactivity, _cfg$behavior, _cfg$security, _cfg$layout, _ref2, _messages$bundles$loc, _messages$bundles, _messages$bundles$en, _messages$bundles2, _ref3, _ref4, _ref5, _ref6, _branding$chatbotAvat, _branding$chatbotAvat2, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _typography$headerTex, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _inactivity$timeoutVa, _inactivity$timeoutUn, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _csat$enabled, _csat$format, _csat$prompt, _csat$triggerType, _csat$idleTimeoutMins, _csat$followUpEnabled, _csat$followUpPrompt, _behavior$autoPromptE, _behavior$allowFeedba, _behavior$provideCita, _agentConfig$organiza, _agentConfig$wsBaseUr;
100729
+ var _agentConfig$config, _cfg$identity, _cfg$branding, _cfg$typography, _cfg$messages, _cfg$voice, _cfg$onboarding, _cfg$disclaimer, _cfg$csat, _cfg$inactivity, _cfg$behavior, _cfg$security, _cfg$layout, _ref2, _messages$bundles$loc, _messages$bundles, _messages$bundles$en, _messages$bundles2, _ref3, _ref4, _ref5, _ref6, _branding$chatbotAvat, _branding$chatbotAvat2, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _typography$headerTex, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _inactivity$timeoutVa, _inactivity$timeoutUn, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _csat$enabled, _csat$format, _csat$prompt, _csat$triggerType, _csat$idleTimeoutMins, _csat$followUpEnabled, _csat$followUpPrompt, _behavior$autoPromptE, _behavior$allowFeedba, _behavior$provideCita, _agentConfig$organiza;
100734
100730
  if (!agentConfig) {
100735
100731
  return null;
100736
100732
  }
@@ -100828,8 +100824,7 @@
100828
100824
  provideCitations: (_behavior$provideCita = behavior.provideCitations) !== null && _behavior$provideCita !== void 0 ? _behavior$provideCita : true,
100829
100825
  // organizationId from the backend response — used internally for
100830
100826
  // session isolation (localStorage keys) and WS paths. Not a user prop.
100831
- organizationId: (_agentConfig$organiza = agentConfig.organizationId) !== null && _agentConfig$organiza !== void 0 ? _agentConfig$organiza : null,
100832
- wsBaseUrl: (_agentConfig$wsBaseUr = agentConfig.wsBaseUrl) !== null && _agentConfig$wsBaseUr !== void 0 ? _agentConfig$wsBaseUr : null
100827
+ organizationId: (_agentConfig$organiza = agentConfig.organizationId) !== null && _agentConfig$organiza !== void 0 ? _agentConfig$organiza : null
100833
100828
  };
100834
100829
  }, [agentConfig, darkMode, primaryColor, position, companyName, conciergeName, companyLogo, welcomeMessage, quickQuestions, quickQuestionsEnabled, textColor, agentMessageBubbleColor, userMessageBoxColor, assistantTextColor, userTextColor, fontFamily, fontSize, defaultLanguage, headerTextBold, headerTextItalic, enableVoiceInteraction, disclaimerEnabled, disclaimerText, disclaimerPosition, disclaimerLinkLabel, disclaimerLinkUrl, showPoweredBy, onboardingQuestions, onboardingEnabled, collectionPrompt, allowedDomains, agentMessageBubbleFontFamily, agentMessageBubbleFontSize, userMessageBubbleFontFamily, userMessageBubbleFontSize
100835
100830
  // CSAT dependencies
@@ -100900,7 +100895,6 @@
100900
100895
  welcomeMessage: widgetConfig.welcomeMessage,
100901
100896
  quickQuestions: widgetConfig.quickQuestions,
100902
100897
  apiBaseUrl,
100903
- wsBaseUrl: widgetConfig.wsBaseUrl,
100904
100898
  apiKey,
100905
100899
  organizationId: widgetConfig.organizationId,
100906
100900
  getAuthToken,