AI chat - send websocket subscription message also for user's messages
TO make sure that new messages are propagated to all chat windows (e.g. if user has chat window open in multiple windows) we should send subscription message for user's messages too (currently we send messages only for AI responses)
There is also related MR !122503 (merged) which will make it possible to subscribe to all ai_completion_responses.
Link to original discussion:
The following discussion from !122054 (merged) should be addressed:
-
@nicolasdular started a discussion: thought (non-blocking): We can do this as a follow-up, but I just ran into this problem on the general chat MR: I think we need to call
GraphqlSubscriptionResponseService
here to store it in the Cache + broadcast the subscription to sync the chat messages in all browser tabs.(There is also a another issue around this as we subscribe on
resource
on the frontend, but actually need to subscribe to all chat messages for the user on the chat)cc FYI @dmishunov as we need to handle the "multiple open tabs" case on chat as well