Jira: (EAI-226) [UI] Change Conversations without Reload
Changes
UI
ConversationService
Adds support for the getConversation route
useConversation() hook
Adds a switchConversation() method to allow switching to a different, existing conversation by ID.
Removes a check in createConversation() to allow starting a new conversation while one already exists.
Server
fix the get conversations routes so that it doesn't return the system message or non user/assistant response messages.
Notes
This is tough to test because we currently disable the getConversations route in our MongoDB server implementation via the blockGetRequests middleware.
To test, you can comment out this middleware in the config locally and then add a call to conversation.switchConversation("65c68cc18726aed95fcf6d73") somewhere in the code (I suggest adding it to the shouldClose handler in ModalView).
Non-MongoDB implementations allow the getConversations route by default so this should be handy for them.
Jira: (EAI-226) [UI] Change Conversations without Reload
Changes
ConversationService
getConversation
routeuseConversation()
hookswitchConversation()
method to allow switching to a different, existing conversation by ID.createConversation()
to allow starting a new conversation while one already exists.Notes
getConversations
route in our MongoDB server implementation via the blockGetRequests middleware.conversation.switchConversation("65c68cc18726aed95fcf6d73")
somewhere in the code (I suggest adding it to theshouldClose
handler inModalView
).getConversations
route by default so this should be handy for them.