-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Obs AI Assistant] Fix editing prompt from contextual insights #206673
[Obs AI Assistant] Fix editing prompt from contextual insights #206673
Conversation
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
0505c81
to
32f2299
Compare
...ility/plugins/observability/public/pages/alert_details/alert_details_contextual_insights.tsx
Outdated
Show resolved
Hide resolved
889ab05
to
a44fc6a
Compare
...ared/observability_solution/observability_ai_assistant/public/components/insight/insight.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kibana manifest LGTM
7303a9b
to
828946d
Compare
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
cc @viduni94 |
Starting backport for target branches: 8.x |
…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)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…206673) (#206982) # Backport This will backport the following commits from `main` to `8.x`: - [[Obs AI Assistant] Fix editing prompt from contextual insights (#206673)](#206673) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Viduni Wickramarachchi","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-16T16:52:44Z","message":"[Obs AI Assistant] Fix editing prompt from contextual insights (#206673)\n\nCloses https://github.com/elastic/kibana/issues/201642\r\n\r\n## Summary\r\n\r\n### Problem\r\n1. Before a conversation is generated from contextual insights (before\r\n`Help me understand this alert` is clicked), if the user clicks on `Edit\r\nPrompt`, the prompt to edit is not loaded. An empty input box is loaded.\r\n2. When a new prompt is typed in the empty input box and submitted, it\r\nthrows an error (because the way the new prompt is assigned to the\r\nconversation errors out)\r\n3. After clicking on \"Help me understand this alert\", if the user clicks\r\non `Edit Prompt`, a large string is loaded with contextual information,\r\nas the prompt to edit. This is not user-friendly.\r\n\r\n(All of the above can be seen in the screen recording before the changes\r\n- attached below)\r\n\r\n### Solution\r\n1. Wait for the messages to be generated and then load the correct\r\ninitial prompt to edit.\r\n2. When re-assigning the new prompt to the messages, make sure to parse\r\nit and then assign correctly so that editing the prompt is user\r\nfriendly.\r\n\r\n### Checklist\r\n\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"10a221553a1b0b4d66afd5b887e4115e3412d9d3","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Obs AI Assistant","Team:obs-ux-management","backport:version","v8.18.0"],"title":"[Obs AI Assistant] Fix editing prompt from contextual insights","number":206673,"url":"https://github.com/elastic/kibana/pull/206673","mergeCommit":{"message":"[Obs AI Assistant] Fix editing prompt from contextual insights (#206673)\n\nCloses https://github.com/elastic/kibana/issues/201642\r\n\r\n## Summary\r\n\r\n### Problem\r\n1. Before a conversation is generated from contextual insights (before\r\n`Help me understand this alert` is clicked), if the user clicks on `Edit\r\nPrompt`, the prompt to edit is not loaded. An empty input box is loaded.\r\n2. When a new prompt is typed in the empty input box and submitted, it\r\nthrows an error (because the way the new prompt is assigned to the\r\nconversation errors out)\r\n3. After clicking on \"Help me understand this alert\", if the user clicks\r\non `Edit Prompt`, a large string is loaded with contextual information,\r\nas the prompt to edit. This is not user-friendly.\r\n\r\n(All of the above can be seen in the screen recording before the changes\r\n- attached below)\r\n\r\n### Solution\r\n1. Wait for the messages to be generated and then load the correct\r\ninitial prompt to edit.\r\n2. When re-assigning the new prompt to the messages, make sure to parse\r\nit and then assign correctly so that editing the prompt is user\r\nfriendly.\r\n\r\n### Checklist\r\n\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"10a221553a1b0b4d66afd5b887e4115e3412d9d3"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206673","number":206673,"mergeCommit":{"message":"[Obs AI Assistant] Fix editing prompt from contextual insights (#206673)\n\nCloses https://github.com/elastic/kibana/issues/201642\r\n\r\n## Summary\r\n\r\n### Problem\r\n1. Before a conversation is generated from contextual insights (before\r\n`Help me understand this alert` is clicked), if the user clicks on `Edit\r\nPrompt`, the prompt to edit is not loaded. An empty input box is loaded.\r\n2. When a new prompt is typed in the empty input box and submitted, it\r\nthrows an error (because the way the new prompt is assigned to the\r\nconversation errors out)\r\n3. After clicking on \"Help me understand this alert\", if the user clicks\r\non `Edit Prompt`, a large string is loaded with contextual information,\r\nas the prompt to edit. This is not user-friendly.\r\n\r\n(All of the above can be seen in the screen recording before the changes\r\n- attached below)\r\n\r\n### Solution\r\n1. Wait for the messages to be generated and then load the correct\r\ninitial prompt to edit.\r\n2. When re-assigning the new prompt to the messages, make sure to parse\r\nit and then assign correctly so that editing the prompt is user\r\nfriendly.\r\n\r\n### Checklist\r\n\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"10a221553a1b0b4d66afd5b887e4115e3412d9d3"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Viduni Wickramarachchi <[email protected]>
Closes #201642
Summary
Problem
Help me understand this alert
is clicked), if the user clicks onEdit Prompt
, the prompt to edit is not loaded. An empty input box is loaded.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
Screen recordings:
Before the changes (with errors):
Screen.Recording.2025-01-14.at.2.23.54.PM.mov
After the changes:
Screen.Recording.2025-01-16.at.9.57.00.AM.mov
Checklist
release_note:*
label is applied per the guidelines