Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.12] Tweaks to prompt editor (elastic#174030) (elastic#175664)
# Backport This will backport the following commits from `main` to `8.12`: - [Tweaks to prompt editor (elastic#174030)](elastic#174030) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Coen Warmer","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-08T15:59:07Z","message":"Tweaks to prompt editor (elastic#174030)\n\n## Summary\r\n\r\nThis fixes the following edge case when using the chat interface:\r\n\r\n* When the main editor has a value in the text area, and the user edits\r\nan existing message, and presses `<enter>` on the keyboard, the value\r\nthat was in the main editor is appended as a new message, instead of\r\nediting the existing message.\r\n\r\nIt also does a bit of cleanup (moving of ChatPromptEditor components to\r\n`/components/prompt_editor`, and renaming to `PromptEditor`.)\r\n\r\n### Additional fixes\r\n* [Don't stick to bottom when changing to edit mode, re-stick to bottom\r\nwhen done\r\nediting](https://github.com/elastic/kibana/pull/174030/commits/e8a01c1d4ddd449fdf85f0fef11de3d7cc9b2637)\r\n\r\n* [Autofocus function popover list search box upon\r\nopening](https://github.com/elastic/kibana/pull/174030/commits/2329d1c0a791716bf192b5e567c49336853edbd4)\r\n\r\n* [Remove focus trap as it wasn't doing anything\r\nanymore](https://github.com/elastic/kibana/pull/174030/commits/7fcb4e0b775a768c07b79c9c362f030c8f6036cb)\r\n\r\n* [Move constants used when creating monaco model inside function scope\r\nto avoid sharing of model between multiple editor\r\ninstances](https://github.com/elastic/kibana/pull/174030/commits/c9cab2c15566a01f21342dcef66964c13574939d)\r\n\r\n* [Disable submitting function editor when json is not\r\nvalid](https://github.com/elastic/kibana/pull/174030/commits/2a6f1e1cfb2ee5f917ac4862b68aff02813341be)","sha":"f4265ca731be471481518a24794a3664a46774ff","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport missing","backport:prev-minor","v8.12.0","v8.13.0"],"number":174030,"url":"https://github.com/elastic/kibana/pull/174030","mergeCommit":{"message":"Tweaks to prompt editor (elastic#174030)\n\n## Summary\r\n\r\nThis fixes the following edge case when using the chat interface:\r\n\r\n* When the main editor has a value in the text area, and the user edits\r\nan existing message, and presses `<enter>` on the keyboard, the value\r\nthat was in the main editor is appended as a new message, instead of\r\nediting the existing message.\r\n\r\nIt also does a bit of cleanup (moving of ChatPromptEditor components to\r\n`/components/prompt_editor`, and renaming to `PromptEditor`.)\r\n\r\n### Additional fixes\r\n* [Don't stick to bottom when changing to edit mode, re-stick to bottom\r\nwhen done\r\nediting](https://github.com/elastic/kibana/pull/174030/commits/e8a01c1d4ddd449fdf85f0fef11de3d7cc9b2637)\r\n\r\n* [Autofocus function popover list search box upon\r\nopening](https://github.com/elastic/kibana/pull/174030/commits/2329d1c0a791716bf192b5e567c49336853edbd4)\r\n\r\n* [Remove focus trap as it wasn't doing anything\r\nanymore](https://github.com/elastic/kibana/pull/174030/commits/7fcb4e0b775a768c07b79c9c362f030c8f6036cb)\r\n\r\n* [Move constants used when creating monaco model inside function scope\r\nto avoid sharing of model between multiple editor\r\ninstances](https://github.com/elastic/kibana/pull/174030/commits/c9cab2c15566a01f21342dcef66964c13574939d)\r\n\r\n* [Disable submitting function editor when json is not\r\nvalid](https://github.com/elastic/kibana/pull/174030/commits/2a6f1e1cfb2ee5f917ac4862b68aff02813341be)","sha":"f4265ca731be471481518a24794a3664a46774ff"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/174030","number":174030,"mergeCommit":{"message":"Tweaks to prompt editor (elastic#174030)\n\n## Summary\r\n\r\nThis fixes the following edge case when using the chat interface:\r\n\r\n* When the main editor has a value in the text area, and the user edits\r\nan existing message, and presses `<enter>` on the keyboard, the value\r\nthat was in the main editor is appended as a new message, instead of\r\nediting the existing message.\r\n\r\nIt also does a bit of cleanup (moving of ChatPromptEditor components to\r\n`/components/prompt_editor`, and renaming to `PromptEditor`.)\r\n\r\n### Additional fixes\r\n* [Don't stick to bottom when changing to edit mode, re-stick to bottom\r\nwhen done\r\nediting](https://github.com/elastic/kibana/pull/174030/commits/e8a01c1d4ddd449fdf85f0fef11de3d7cc9b2637)\r\n\r\n* [Autofocus function popover list search box upon\r\nopening](https://github.com/elastic/kibana/pull/174030/commits/2329d1c0a791716bf192b5e567c49336853edbd4)\r\n\r\n* [Remove focus trap as it wasn't doing anything\r\nanymore](https://github.com/elastic/kibana/pull/174030/commits/7fcb4e0b775a768c07b79c9c362f030c8f6036cb)\r\n\r\n* [Move constants used when creating monaco model inside function scope\r\nto avoid sharing of model between multiple editor\r\ninstances](https://github.com/elastic/kibana/pull/174030/commits/c9cab2c15566a01f21342dcef66964c13574939d)\r\n\r\n* [Disable submitting function editor when json is not\r\nvalid](https://github.com/elastic/kibana/pull/174030/commits/2a6f1e1cfb2ee5f917ac4862b68aff02813341be)","sha":"f4265ca731be471481518a24794a3664a46774ff"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information