@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.
@@ -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.9",
4309
+ clientVersion: "24.0.0",
4310
4310
  currentUrl: window.location.toString(),
4311
4311
  screenResolution: `${window.screen.width}x${window.screen.height}`,
4312
4312
  timezone: getTimeZone(),
@@ -17101,6 +17101,14 @@ const SeamlyEventSubscriber = () => {
17101
17101
  const {
17102
17102
  emitEvent
17103
17103
  } = use_seamly_commands();
17104
+ const {
17105
+ hasPrompt,
17106
+ continueChat
17107
+ } = use_seamly_resume_conversation_prompt();
17108
+ const hasResumeConversationPrompt = (0,hooks_.useRef)(hasPrompt);
17109
+ (0,hooks_.useEffect)(() => {
17110
+ hasResumeConversationPrompt.current = hasPrompt;
17111
+ }, [hasPrompt]);
17104
17112
  (0,hooks_.useEffect)(() => {
17105
17113
  if (conversation.socket) {
17106
17114
  conversation.onConnection(({
@@ -17245,6 +17253,9 @@ const SeamlyEventSubscriber = () => {
17245
17253
  dispatch(updateEvent(event));
17246
17254
  break;
17247
17255
  }
17256
+ if (hasResumeConversationPrompt.current) {
17257
+ continueChat();
17258
+ }
17248
17259
  dispatch(addEvent(event));
17249
17260
  break;
17250
17261
  }
@@ -17298,7 +17309,7 @@ const SeamlyEventSubscriber = () => {
17298
17309
  conversation.onMessage(eventRef.current);
17299
17310
  return true;
17300
17311
  });
17301
- }, [conversation, dispatch, emitEvent, endCountdown, eventBus, initCountdown]);
17312
+ }, [continueChat, conversation, dispatch, emitEvent, endCountdown, eventBus, initCountdown]);
17302
17313
  (0,hooks_.useEffect)(() => {
17303
17314
  conversation.onConnection(({
17304
17315
  connected
@@ -17566,11 +17577,6 @@ const SeamlyInstanceFunctionsLoader = () => {
17566
17577
  const currentVisibility = (0,hooks_.useRef)(visible);
17567
17578
  const eventBus = event_bus_hooks();
17568
17579
  const api = useSeamlyApiContext();
17569
- const {
17570
- hasPrompt,
17571
- continueChat
17572
- } = use_seamly_resume_conversation_prompt();
17573
- const hasResumeConversationPrompt = (0,hooks_.useRef)(hasPrompt);
17574
17580
  const unreadCount = useSeamlyUnreadCount();
17575
17581
  const previousUnreadCount = (0,hooks_.useRef)(null);
17576
17582
  const previousVisibilityState = (0,hooks_.useRef)(null);
@@ -17588,12 +17594,8 @@ const SeamlyInstanceFunctionsLoader = () => {
17588
17594
  } = useTranslations();
17589
17595
  (0,hooks_.useEffect)(() => {
17590
17596
  currentVisibility.current = visible;
17591
- hasResumeConversationPrompt.current = hasPrompt;
17592
- }, [hasPrompt, visible]);
17597
+ }, [visible]);
17593
17598
  useSeamlyInstanceFunction('askText', text => {
17594
- if (hasResumeConversationPrompt.current) {
17595
- continueChat();
17596
- }
17597
17599
  sendMessage({
17598
17600
  body: text
17599
17601
  });
@@ -17639,9 +17641,6 @@ const SeamlyInstanceFunctionsLoader = () => {
17639
17641
  showSuggestions: false
17640
17642
  }));
17641
17643
  }
17642
- if (hasResumeConversationPrompt.current) {
17643
- continueChat();
17644
- }
17645
17644
  if (name && fallbackMessage) {
17646
17645
  sendAction({
17647
17646
  type: actionTypes.setTopic,