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.12] Tweaks to prompt editor (#174030) #175664

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

CoenWarmer
Copy link
Contributor

Backport

This will backport the following commits from main to 8.12:

Questions ?

Please refer to the Backport tool documentation

@CoenWarmer CoenWarmer enabled auto-merge (squash) January 26, 2024 09:57
## Summary

This fixes the following edge case when using the chat interface:

* When the main editor has a value in the text area, and the user edits
an existing message, and presses `<enter>` on the keyboard, the value
that was in the main editor is appended as a new message, instead of
editing the existing message.

It also does a bit of cleanup (moving of ChatPromptEditor components to
`/components/prompt_editor`, and renaming to `PromptEditor`.)

### Additional fixes
* [Don't stick to bottom when changing to edit mode, re-stick to bottom
when done
editing](elastic@e8a01c1)

* [Autofocus function popover list search box upon
opening](elastic@2329d1c)

* [Remove focus trap as it wasn't doing anything
anymore](elastic@7fcb4e0)

* [Move constants used when creating monaco model inside function scope
to avoid sharing of model between multiple editor
instances](elastic@c9cab2c)

* [Disable submitting function editor when json is not
valid](elastic@2a6f1e1)

(cherry picked from commit f4265ca)

# Conflicts:
#	x-pack/plugins/observability_ai_assistant/public/components/prompt_editor/prompt_editor_function.tsx
@CoenWarmer CoenWarmer force-pushed the backport/8.12/pr-174030 branch from 0682d62 to 30c2ded Compare January 26, 2024 10:42
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #26 / transform - creation - index pattern "after all" hook in "transform - creation - index pattern"
  • [job] [logs] FTR Configs #26 / transform - creation - index pattern creation_index_pattern "after all" hook in "creation_index_pattern"
  • [job] [logs] FTR Configs #26 / transform - creation - index pattern creation_index_pattern batch transform with terms+date_histogram groups and avg agg "after all" hook: afterTestSuite.trigger for "navigates to discover and displays results of the destination index"
  • [job] [logs] FTR Configs #26 / transform - creation - index pattern creation_index_pattern batch transform with terms+date_histogram groups and avg agg navigates through the wizard and sets all needed fields

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observabilityAIAssistant 223 256 +33

Async chunks

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

id before after diff
observabilityAIAssistant 156.8KB 199.1KB +42.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observabilityAIAssistant 15.0KB 15.1KB +63.0B

History

  • 💔 Build #189534 failed 48e06c4e410149331a235ce5d73c7167fda75a85

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@CoenWarmer CoenWarmer merged commit 9419256 into elastic:8.12 Jan 26, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants