@seamly/web-ui 24.0.0-beta.7 → 24.0.0-beta.9

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.
@@ -4306,7 +4306,7 @@ class API {
4306
4306
  return {
4307
4307
  clientName: "@seamly/web-ui",
4308
4308
  clientVariant: this.#layoutMode,
4309
- clientVersion: "24.0.0-beta.7",
4309
+ clientVersion: "24.0.0-beta.9",
4310
4310
  currentUrl: window.location.toString(),
4311
4311
  screenResolution: `${window.screen.width}x${window.screen.height}`,
4312
4312
  timezone: getTimeZone(),
@@ -17566,6 +17566,11 @@ const SeamlyInstanceFunctionsLoader = () => {
17566
17566
  const currentVisibility = (0,hooks_.useRef)(visible);
17567
17567
  const eventBus = event_bus_hooks();
17568
17568
  const api = useSeamlyApiContext();
17569
+ const {
17570
+ hasPrompt,
17571
+ continueChat
17572
+ } = use_seamly_resume_conversation_prompt();
17573
+ const hasResumeConversationPrompt = (0,hooks_.useRef)(hasPrompt);
17569
17574
  const unreadCount = useSeamlyUnreadCount();
17570
17575
  const previousUnreadCount = (0,hooks_.useRef)(null);
17571
17576
  const previousVisibilityState = (0,hooks_.useRef)(null);
@@ -17583,8 +17588,12 @@ const SeamlyInstanceFunctionsLoader = () => {
17583
17588
  } = useTranslations();
17584
17589
  (0,hooks_.useEffect)(() => {
17585
17590
  currentVisibility.current = visible;
17586
- }, [visible]);
17591
+ hasResumeConversationPrompt.current = hasPrompt;
17592
+ }, [hasPrompt, visible]);
17587
17593
  useSeamlyInstanceFunction('askText', text => {
17594
+ if (hasResumeConversationPrompt.current) {
17595
+ continueChat();
17596
+ }
17588
17597
  sendMessage({
17589
17598
  body: text
17590
17599
  });
@@ -17630,6 +17639,9 @@ const SeamlyInstanceFunctionsLoader = () => {
17630
17639
  showSuggestions: false
17631
17640
  }));
17632
17641
  }
17642
+ if (hasResumeConversationPrompt.current) {
17643
+ continueChat();
17644
+ }
17633
17645
  if (name && fallbackMessage) {
17634
17646
  sendAction({
17635
17647
  type: actionTypes.setTopic,