@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.
@@ -4355,7 +4355,7 @@ class API {
4355
4355
  return {
4356
4356
  clientName: "@seamly/web-ui",
4357
4357
  clientVariant: this.#layoutMode,
4358
- clientVersion: "24.0.0-beta.9",
4358
+ clientVersion: "24.0.0",
4359
4359
  currentUrl: window.location.toString(),
4360
4360
  screenResolution: `${window.screen.width}x${window.screen.height}`,
4361
4361
  timezone: getTimeZone(),
@@ -17150,6 +17150,14 @@ const SeamlyEventSubscriber = () => {
17150
17150
  const {
17151
17151
  emitEvent
17152
17152
  } = use_seamly_commands();
17153
+ const {
17154
+ hasPrompt,
17155
+ continueChat
17156
+ } = use_seamly_resume_conversation_prompt();
17157
+ const hasResumeConversationPrompt = (0,hooks_module/* useRef */.li)(hasPrompt);
17158
+ (0,hooks_module/* useEffect */.vJ)(() => {
17159
+ hasResumeConversationPrompt.current = hasPrompt;
17160
+ }, [hasPrompt]);
17153
17161
  (0,hooks_module/* useEffect */.vJ)(() => {
17154
17162
  if (conversation.socket) {
17155
17163
  conversation.onConnection(({
@@ -17294,6 +17302,9 @@ const SeamlyEventSubscriber = () => {
17294
17302
  dispatch(updateEvent(event));
17295
17303
  break;
17296
17304
  }
17305
+ if (hasResumeConversationPrompt.current) {
17306
+ continueChat();
17307
+ }
17297
17308
  dispatch(addEvent(event));
17298
17309
  break;
17299
17310
  }
@@ -17347,7 +17358,7 @@ const SeamlyEventSubscriber = () => {
17347
17358
  conversation.onMessage(eventRef.current);
17348
17359
  return true;
17349
17360
  });
17350
- }, [conversation, dispatch, emitEvent, endCountdown, eventBus, initCountdown]);
17361
+ }, [continueChat, conversation, dispatch, emitEvent, endCountdown, eventBus, initCountdown]);
17351
17362
  (0,hooks_module/* useEffect */.vJ)(() => {
17352
17363
  conversation.onConnection(({
17353
17364
  connected
@@ -17615,11 +17626,6 @@ const SeamlyInstanceFunctionsLoader = () => {
17615
17626
  const currentVisibility = (0,hooks_module/* useRef */.li)(visible);
17616
17627
  const eventBus = event_bus_hooks();
17617
17628
  const api = useSeamlyApiContext();
17618
- const {
17619
- hasPrompt,
17620
- continueChat
17621
- } = use_seamly_resume_conversation_prompt();
17622
- const hasResumeConversationPrompt = (0,hooks_module/* useRef */.li)(hasPrompt);
17623
17629
  const unreadCount = useSeamlyUnreadCount();
17624
17630
  const previousUnreadCount = (0,hooks_module/* useRef */.li)(null);
17625
17631
  const previousVisibilityState = (0,hooks_module/* useRef */.li)(null);
@@ -17637,12 +17643,8 @@ const SeamlyInstanceFunctionsLoader = () => {
17637
17643
  } = useTranslations();
17638
17644
  (0,hooks_module/* useEffect */.vJ)(() => {
17639
17645
  currentVisibility.current = visible;
17640
- hasResumeConversationPrompt.current = hasPrompt;
17641
- }, [hasPrompt, visible]);
17646
+ }, [visible]);
17642
17647
  useSeamlyInstanceFunction('askText', text => {
17643
- if (hasResumeConversationPrompt.current) {
17644
- continueChat();
17645
- }
17646
17648
  sendMessage({
17647
17649
  body: text
17648
17650
  });
@@ -17688,9 +17690,6 @@ const SeamlyInstanceFunctionsLoader = () => {
17688
17690
  showSuggestions: false
17689
17691
  }));
17690
17692
  }
17691
- if (hasResumeConversationPrompt.current) {
17692
- continueChat();
17693
- }
17694
17693
  if (name && fallbackMessage) {
17695
17694
  sendAction({
17696
17695
  type: actionTypes.setTopic,