forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Obs AI Assistant] Fix error when opening an old conversation (elasti…
…c#197745) Closes elastic#176299 ## Summary ### Problem When a chat is started from contextual insights, `initialMessages` are being populated from the temp conversation created from the error. Because the `initialMessages` are present, when an old conversation is clicked, the conversation ID of that conversation and the `initalMessages` from the temp chat are passed to the conversation. This throws an error, as there is a condition which restricts both of these being passed to `useConversation` which is used by the `ChatBody`. - Only one of these should be passed (not both) ### Solution With the current implementation, even though not passing `initialMessages` allows the user to open previous conversations successfully, it doesn't allow the user to start a new chat because as long as initial messages are set, they will be loaded when the New Chat button is clicked instead of showing a blank conversation. Clearing initial messages requires re-architecting how the Chat uses the conversation. Therefore, as the solution, when a chat is opened from contextual insights, the ConversationList will be hidden. The user can interact with the AI Assistant on the opened chat with initial messages from contextual insights.
- Loading branch information
Showing
5 changed files
with
101 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters