@seamly/web-ui 24.0.0-beta.9 → 24.0.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.
@@ -839,7 +839,7 @@ class API {
839
839
  return {
840
840
  clientName: "@seamly/web-ui",
841
841
  clientVariant: this.#layoutMode,
842
- clientVersion: "24.0.0-beta.9",
842
+ clientVersion: "24.0.0",
843
843
  currentUrl: window.location.toString(),
844
844
  screenResolution: `${window.screen.width}x${window.screen.height}`,
845
845
  timezone: (0,_utils__WEBPACK_IMPORTED_MODULE_10__.getTimeZone)(),
@@ -8307,6 +8307,14 @@ const SeamlyEventSubscriber = () => {
8307
8307
  const {
8308
8308
  emitEvent
8309
8309
  } = (0,ui_hooks_seamly_hooks__WEBPACK_IMPORTED_MODULE_12__.useSeamlyCommands)();
8310
+ const {
8311
+ hasPrompt,
8312
+ continueChat
8313
+ } = (0,ui_hooks_seamly_hooks__WEBPACK_IMPORTED_MODULE_12__.useSeamlyResumeConversationPrompt)();
8314
+ const hasResumeConversationPrompt = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useRef)(hasPrompt);
8315
+ (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
8316
+ hasResumeConversationPrompt.current = hasPrompt;
8317
+ }, [hasPrompt]);
8310
8318
  (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
8311
8319
  if (conversation.socket) {
8312
8320
  conversation.onConnection(({
@@ -8451,6 +8459,9 @@ const SeamlyEventSubscriber = () => {
8451
8459
  dispatch((0,domains_store_slice__WEBPACK_IMPORTED_MODULE_9__.updateEvent)(event));
8452
8460
  break;
8453
8461
  }
8462
+ if (hasResumeConversationPrompt.current) {
8463
+ continueChat();
8464
+ }
8454
8465
  dispatch((0,domains_store_slice__WEBPACK_IMPORTED_MODULE_9__.addEvent)(event));
8455
8466
  break;
8456
8467
  }
@@ -8504,7 +8515,7 @@ const SeamlyEventSubscriber = () => {
8504
8515
  conversation.onMessage(eventRef.current);
8505
8516
  return true;
8506
8517
  });
8507
- }, [conversation, dispatch, emitEvent, endCountdown, eventBus, initCountdown]);
8518
+ }, [continueChat, conversation, dispatch, emitEvent, endCountdown, eventBus, initCountdown]);
8508
8519
  (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
8509
8520
  conversation.onConnection(({
8510
8521
  connected
@@ -8851,11 +8862,6 @@ const SeamlyInstanceFunctionsLoader = () => {
8851
8862
  const currentVisibility = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useRef)(visible);
8852
8863
  const eventBus = (0,ui_hooks_event_bus_hooks__WEBPACK_IMPORTED_MODULE_8__["default"])();
8853
8864
  const api = (0,ui_hooks_seamly_hooks__WEBPACK_IMPORTED_MODULE_9__.useSeamlyApiContext)();
8854
- const {
8855
- hasPrompt,
8856
- continueChat
8857
- } = (0,ui_hooks_seamly_hooks__WEBPACK_IMPORTED_MODULE_9__.useSeamlyResumeConversationPrompt)();
8858
- const hasResumeConversationPrompt = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useRef)(hasPrompt);
8859
8865
  const unreadCount = (0,ui_hooks_seamly_hooks__WEBPACK_IMPORTED_MODULE_9__.useSeamlyUnreadCount)();
8860
8866
  const previousUnreadCount = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
8861
8867
  const previousVisibilityState = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
@@ -8873,12 +8879,8 @@ const SeamlyInstanceFunctionsLoader = () => {
8873
8879
  } = (0,domains_translations_hooks__WEBPACK_IMPORTED_MODULE_5__.useTranslations)();
8874
8880
  (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
8875
8881
  currentVisibility.current = visible;
8876
- hasResumeConversationPrompt.current = hasPrompt;
8877
- }, [hasPrompt, visible]);
8882
+ }, [visible]);
8878
8883
  useSeamlyInstanceFunction('askText', text => {
8879
- if (hasResumeConversationPrompt.current) {
8880
- continueChat();
8881
- }
8882
8884
  sendMessage({
8883
8885
  body: text
8884
8886
  });
@@ -8924,9 +8926,6 @@ const SeamlyInstanceFunctionsLoader = () => {
8924
8926
  showSuggestions: false
8925
8927
  }));
8926
8928
  }
8927
- if (hasResumeConversationPrompt.current) {
8928
- continueChat();
8929
- }
8930
8929
  if (name && fallbackMessage) {
8931
8930
  sendAction({
8932
8931
  type: ui_utils_seamly_utils__WEBPACK_IMPORTED_MODULE_10__.actionTypes.setTopic,