Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] [Obs AI Assistant] Fix editing prompt from contextual insights (#206673) #206982

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…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)
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@kibanamachine kibanamachine merged commit 0caa021 into elastic:8.x Jan 16, 2025
13 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observabilityAIAssistant 19.8KB 20.2KB +375.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
observabilityAIAssistant 5 6 +1

Total ESLint disabled count

id before after diff
observabilityAIAssistant 7 8 +1

cc @viduni94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Obs AI Assistant Observability AI Assistant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants