Skip to content

Commit

Permalink
[8.x] [ai][assistant] Refactor o11y to use new Assistant logo and bea…
Browse files Browse the repository at this point in the history
…con (#204289) (#204746)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ai][assistant] Refactor o11y to use new Assistant logo and beacon
(#204289)](#204289)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Clint Andrew
Hall","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-17T01:44:32Z","message":"[ai][assistant]
Refactor o11y to use new Assistant logo and beacon
(#204289)","sha":"8f70a2dec2579579d82027a8464665c645fc6e48","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","release_note:skip","backport:skip","v9.0.0","Team:Obs
AI
Assistant","v8.18.0"],"number":204289,"url":"https://github.com/elastic/kibana/pull/204289","mergeCommit":{"message":"[ai][assistant]
Refactor o11y to use new Assistant logo and beacon
(#204289)","sha":"8f70a2dec2579579d82027a8464665c645fc6e48"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204289","number":204289,"mergeCommit":{"message":"[ai][assistant]
Refactor o11y to use new Assistant logo and beacon
(#204289)","sha":"8f70a2dec2579579d82027a8464665c645fc6e48"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
clintandrewhall and kibanamachine authored Dec 18, 2024
1 parent 353551f commit f142284
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 44 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React, { useState } from 'react';
import { AssistantAvatar } from '../assistant_avatar';
import { AssistantIcon } from '@kbn/ai-assistant-icon';

export interface InsightBaseProps {
title: string;
Expand Down Expand Up @@ -66,7 +66,7 @@ export function InsightBase({
<EuiFlexGroup wrap responsive={false} gutterSize="m" data-test-subj={dataTestSubj}>
<EuiFlexItem grow={false}>
<EuiSpacer size="xs" />
<AssistantAvatar size="xs" />
<AssistantIcon size="m" />
</EuiFlexItem>
<EuiFlexItem>
<EuiFlexGroup gutterSize="s" alignItems="center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"@kbn/inference-plugin",
"@kbn/core-lifecycle-server",
"@kbn/server-route-repository-utils",
"@kbn/inference-plugin"
"@kbn/inference-plugin",
"@kbn/ai-assistant-icon",
],
"exclude": ["target/**/*"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
* 2.0.
*/
import React, { useEffect, useRef, useState } from 'react';
import { AssistantAvatar, useAbortableAsync } from '@kbn/observability-ai-assistant-plugin/public';
import { useAbortableAsync } from '@kbn/observability-ai-assistant-plugin/public';
import { EuiButton, EuiButtonEmpty, EuiLoadingSpinner, EuiToolTip } from '@elastic/eui';
import { css } from '@emotion/react';
import { v4 } from 'uuid';
import useObservable from 'react-use/lib/useObservable';
import { i18n } from '@kbn/i18n';
import { CoreStart } from '@kbn/core-lifecycle-browser';
import { AIAssistantAppService, useAIAssistantAppService, ChatFlyout } from '@kbn/ai-assistant';
import { AssistantIcon } from '@kbn/ai-assistant-icon';
import { useKibana } from '../../hooks/use_kibana';
import { useTheme } from '../../hooks/use_theme';
import { useNavControlScreenContext } from '../../hooks/use_nav_control_screen_context';
Expand Down Expand Up @@ -157,7 +158,7 @@ export function NavControl({ isServerless }: { isServerless?: boolean }) {
color="primary"
size="s"
>
{chatService.loading ? <EuiLoadingSpinner size="s" /> : <AssistantAvatar size="xs" />}
{chatService.loading ? <EuiLoadingSpinner size="s" /> : <AssistantIcon size="m" />}
</EuiButtonEmpty>
) : (
<EuiButton
Expand All @@ -174,7 +175,7 @@ export function NavControl({ isServerless }: { isServerless?: boolean }) {
fullWidth={false}
minWidth={0}
>
{chatService.loading ? <EuiLoadingSpinner size="s" /> : <AssistantAvatar size="xs" />}
{chatService.loading ? <EuiLoadingSpinner size="s" /> : <AssistantIcon size="m" />}
</EuiButton>
)}
</EuiToolTip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ import type {
ActionTypeModel as ConnectorTypeModel,
GenericValidationResult,
} from '@kbn/triggers-actions-ui-plugin/public/types';
import {
AssistantAvatar,
ObservabilityAIAssistantService,
} from '@kbn/observability-ai-assistant-plugin/public';
import { ObservabilityAIAssistantService } from '@kbn/observability-ai-assistant-plugin/public';
import { AssistantIcon } from '@kbn/ai-assistant-icon';
import { OBSERVABILITY_AI_ASSISTANT_CONNECTOR_ID } from '../../common/rule_connector';
import { ObsAIAssistantActionParams } from './types';
import {
Expand All @@ -29,7 +27,7 @@ export function getConnectorType(
return {
id: OBSERVABILITY_AI_ASSISTANT_CONNECTOR_ID,
modalWidth: 675,
iconClass: () => <AssistantAvatar />,
iconClass: () => <AssistantIcon />,
isSystemActionType: true,
isExperimental: true,
selectMessage: CONNECTOR_DESC,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"@kbn/observability-ai-common",
"@kbn/llm-tasks-plugin",
"@kbn/product-doc-common",
"@kbn/ai-assistant-icon",
],
"exclude": [
"target/**/*"
Expand Down

0 comments on commit f142284

Please sign in to comment.