@seamly/web-ui 24.0.0-beta.8 → 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.
- package/build/dist/lib/index.debug.js +13 -2
- package/build/dist/lib/index.debug.js.map +1 -1
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.map +1 -1
- package/build/dist/lib/index.js +13 -2
- package/build/dist/lib/index.js.map +1 -1
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.map +1 -1
- package/build/dist/lib/standalone.js +13 -2
- package/build/dist/lib/standalone.js.map +1 -1
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/standalone.min.js.map +1 -1
- package/build/dist/lib/style-guide.js +13 -2
- package/build/dist/lib/style-guide.js.map +1 -1
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/style-guide.min.js.map +1 -1
- package/build/dist/lib/utils.js +13 -2
- package/build/dist/lib/utils.js.map +1 -1
- package/build/dist/lib/utils.min.js +1 -1
- package/build/dist/lib/utils.min.js.map +1 -1
- package/package.json +1 -1
- package/src/javascripts/ui/components/core/seamly-event-subscriber.ts +20 -1
package/package.json
CHANGED
|
@@ -28,6 +28,7 @@ import useSeamlyEventBusContext from 'ui/hooks/event-bus-hooks'
|
|
|
28
28
|
import {
|
|
29
29
|
useSeamlyCommands,
|
|
30
30
|
useSeamlyIdleDetachCountdown,
|
|
31
|
+
useSeamlyResumeConversationPrompt,
|
|
31
32
|
} from 'ui/hooks/seamly-hooks'
|
|
32
33
|
import useSeamlyConversation from 'ui/hooks/use-seamly-conversation'
|
|
33
34
|
import type { ChannelEvent } from 'domains/store/store.types'
|
|
@@ -44,6 +45,12 @@ const SeamlyEventSubscriber = () => {
|
|
|
44
45
|
const prevEmittedEventId = useRef(null)
|
|
45
46
|
const { initCountdown, endCountdown } = useSeamlyIdleDetachCountdown()
|
|
46
47
|
const { emitEvent } = useSeamlyCommands()
|
|
48
|
+
const { hasPrompt, continueChat } = useSeamlyResumeConversationPrompt()
|
|
49
|
+
const hasResumeConversationPrompt = useRef(hasPrompt)
|
|
50
|
+
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
hasResumeConversationPrompt.current = hasPrompt
|
|
53
|
+
}, [hasPrompt])
|
|
47
54
|
|
|
48
55
|
useEffect(() => {
|
|
49
56
|
if (conversation.socket) {
|
|
@@ -212,6 +219,10 @@ const SeamlyEventSubscriber = () => {
|
|
|
212
219
|
break
|
|
213
220
|
}
|
|
214
221
|
|
|
222
|
+
if (hasResumeConversationPrompt.current) {
|
|
223
|
+
continueChat()
|
|
224
|
+
}
|
|
225
|
+
|
|
215
226
|
dispatch(addEvent(event as unknown as ChannelEvent))
|
|
216
227
|
|
|
217
228
|
break
|
|
@@ -280,7 +291,15 @@ const SeamlyEventSubscriber = () => {
|
|
|
280
291
|
|
|
281
292
|
return true
|
|
282
293
|
})
|
|
283
|
-
}, [
|
|
294
|
+
}, [
|
|
295
|
+
continueChat,
|
|
296
|
+
conversation,
|
|
297
|
+
dispatch,
|
|
298
|
+
emitEvent,
|
|
299
|
+
endCountdown,
|
|
300
|
+
eventBus,
|
|
301
|
+
initCountdown,
|
|
302
|
+
])
|
|
284
303
|
|
|
285
304
|
useEffect(() => {
|
|
286
305
|
conversation.onConnection(({ connected }) => {
|