feat(UI): add multi-chat support for the UI#13
Conversation
|
General feedback.
|
| console.warn("No last session id found: setting the current session to the first item."); | ||
| return sessions[0].id; | ||
| } | ||
|
|
There was a problem hiding this comment.
Add a simple cache here if we are gonna call this multiple times
There was a problem hiding this comment.
Since in the Chabot component(which is the only point where I call the loadChatbotSessions or loadChatbotLastSessionId) the loaders are called only once when the component mounts, and unless the component is unmounted and mounted again(like on refresh) the loaders are not invoked again, I don't find the point of having the cache in this context.
Maybe you meant to use the cache as a way to avoid reading from session storage, replacing it at runtime for like refreshes. But in that case, the cache would need to be at least as persistent as session storage, and I'm not sure if we would gain any advantages by doing that.
Let me know if I've misunderstood something. Thanks anyway for the suggestion.
There was a problem hiding this comment.
Yeah, fine! If loadChatbotSessions is called multiple times, then cache is preferable; no worries if it's only called once.
Description
This PR introduces the multi-chat UI support for the chatbot pllugin.
While the backend already allowed handling multiple conversations, the frontend lacked the support for this feature. This PR updates the previous user interface, allowing users to interact with multiple chat session. A welcome box has also been added to guide users when no chat session is active.
Screenshots ( taken on the chat panel)
Welcome screen
Multiple chat view
Testing done
Submitter checklist