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 editing prompt from contextual insights (elast…
…ic#206673) Closes elastic#201642 ## Summary ### Problem 1. Before a conversation is generated from contextual insights (before `Help me understand this alert` is clicked), if the user clicks on `Edit Prompt`, the prompt to edit is not loaded. An empty input box is loaded. 2. When a new prompt is typed in the empty input box and submitted, it throws an error (because the way the new prompt is assigned to the conversation errors out) 3. After clicking on "Help me understand this alert", if the user clicks on `Edit Prompt`, a large string is loaded with contextual information, as the prompt to edit. This is not user-friendly. (All of the above can be seen in the screen recording before the changes - attached below) ### Solution 1. Wait for the messages to be generated and then load the correct initial prompt to edit. 2. When re-assigning the new prompt to the messages, make sure to parse it and then assign correctly so that editing the prompt is user friendly. ### Checklist - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit 10a2215)
- Loading branch information