Skip to content

[8.x] [Search Assistant] Use scopes to modify behavior contextually (#195785)#196013

Merged
sphilipse merged 1 commit intoelastic:8.xfrom
sphilipse:backport/8.x/pr-195785
Oct 12, 2024
Merged

[8.x] [Search Assistant] Use scopes to modify behavior contextually (#195785)#196013
sphilipse merged 1 commit intoelastic:8.xfrom
sphilipse:backport/8.x/pr-195785

Conversation

@sphilipse
Copy link
Copy Markdown
Member

Backport

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

Questions ?

Please refer to the Backport tool documentation

…c#195785)

## Summary

This actually uses the Search Assistant scope to modify the assistant's
behavior depending on the context they're in. The assistant now:
- Defaults to Observability mode
- Is a Search assistant in the Search pages
- Switches dynamically, changing available functions, prompts and
instructions based on context

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit ee341d5)
@sphilipse sphilipse requested review from a team as code owners October 12, 2024 13:41
@sphilipse sphilipse added the backport This PR is a backport of another PR label Oct 12, 2024
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant labels Oct 12, 2024
@sphilipse sphilipse enabled auto-merge (squash) October 12, 2024 13:41
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observabilityAIAssistant 106 111 +5
observabilityAIAssistantApp 251 380 +129
searchAssistant 172 303 +131
total +265

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/ai-assistant 62 63 +1
@kbn/ai-assistant-common - 3 +3
observabilityAIAssistant 292 296 +4
total +8

Async chunks

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

id before after diff
observabilityAIAssistant 17.7KB 19.3KB +1.6KB
observabilityAIAssistantApp 153.7KB 238.2KB +84.4KB
searchAssistant 97.0KB 179.2KB +82.2KB
total +168.2KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
observabilityAIAssistant 28 27 -1

Page load bundle

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

id before after diff
observabilityAIAssistant 46.2KB 46.9KB +650.0B
observabilityAIAssistantApp 8.7KB 8.7KB +56.0B
searchAssistant 4.9KB 4.9KB +1.0B
total +707.0B
Unknown metric groups

API count

id before after diff
@kbn/ai-assistant 62 63 +1
@kbn/ai-assistant-common - 3 +3
observabilityAIAssistant 294 298 +4
total +8

ESLint disabled line counts

id before after diff
@kbn/ai-assistant-common - 1 +1

Total ESLint disabled count

id before after diff
@kbn/ai-assistant-common - 1 +1

Copy link
Copy Markdown
Contributor

@Samiul-TheSoccerFan Samiul-TheSoccerFan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sphilipse sphilipse merged commit 329473f into elastic:8.x Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants