forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Obs AI Assistant] Add Search Connector tab to settings (elastic#176655)
This PR simply adds a new tab that: - describes what search connectors are and how they can improve relevancy of assistant responses (copy writer welcome!) - links to enterprise search The tab will be disabled if enterprise search plugin is not enabled **Motivation for PR** Making customers aware of search connectors and their benefits in relation to the AI Assistant. We can perhaps simplify the process of adding Search Connectors down the line but for now I suggest keeping it simple. 
- Loading branch information
Showing
14 changed files
with
113 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...s/ai_assistant_management/observability/public/routes/components/search_connector_tab.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { EuiLink, EuiText } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import { useAppContext } from '../../hooks/use_app_context'; | ||
|
||
export const SELECTED_CONNECTOR_LOCAL_STORAGE_KEY = | ||
'xpack.observabilityAiAssistant.lastUsedConnector'; | ||
|
||
export function SearchConnectorTab() { | ||
const { application } = useAppContext(); | ||
const url = application.getUrlForApp('enterprise_search', { path: '/content/connectors' }); | ||
|
||
return ( | ||
<> | ||
<EuiText> | ||
{i18n.translate( | ||
'aiAssistantManagementObservability.searchConnectorTab.searchConnectorsEnablesYouTextLabel', | ||
{ | ||
defaultMessage: | ||
'Connectors enable you to index content from external sources thereby making it available for the AI Assistant. This can greatly improve the relevance of the AI Assistant’s responses.', | ||
} | ||
)} | ||
</EuiText> | ||
|
||
<EuiText> | ||
<FormattedMessage | ||
id="aiAssistantManagementObservability.searchConnectorTab.searchConnectorsManagementLink" | ||
defaultMessage="You can manage connectors under {searchConnectorLink}." | ||
values={{ | ||
searchConnectorLink: ( | ||
<EuiLink | ||
data-test-subj="pluginsSearchConnectorTabSearchConnectorsManagementPageLink" | ||
href={url} | ||
> | ||
{i18n.translate( | ||
'aiAssistantManagementObservability.searchConnectorTab.searchConnectorsManagementPageLinkLabel', | ||
{ defaultMessage: 'Connectors' } | ||
)} | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
</EuiText> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters