diff --git a/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/public/components/assistant_avatar.stories.tsx b/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/public/components/assistant_avatar.stories.tsx deleted file mode 100644 index 3d1d770488491..0000000000000 --- a/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/public/components/assistant_avatar.stories.tsx +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { ComponentStory } from '@storybook/react'; - -import { AssistantAvatar as Component, AssistantAvatarProps } from './assistant_avatar'; - -export default { - component: Component, - title: 'app/Atoms/AssistantAvatar', - argTypes: { - size: { - options: ['xs', 's', 'm', 'l', 'xl'], - control: { type: 'radio' }, - }, - }, -}; - -const Template: ComponentStory = (props: AssistantAvatarProps) => ( - -); - -const defaultProps = { - size: 'm' as const, -}; - -export const AssistantAvatar = Template.bind({}); -AssistantAvatar.args = defaultProps; diff --git a/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/public/components/insight/insight_base.tsx b/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/public/components/insight/insight_base.tsx index 97f2e0a71a0c6..1fdf0bece9b49 100644 --- a/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/public/components/insight/insight_base.tsx +++ b/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/public/components/insight/insight_base.tsx @@ -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; @@ -66,7 +66,7 @@ export function InsightBase({ - + diff --git a/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.json b/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.json index db9c1cddae90a..610dd70945df2 100644 --- a/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.json +++ b/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.json @@ -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/**/*"] } diff --git a/x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/components/nav_control/index.tsx b/x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/components/nav_control/index.tsx index fd198c42fda08..e43a9ea5f4527 100644 --- a/x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/components/nav_control/index.tsx +++ b/x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/components/nav_control/index.tsx @@ -5,7 +5,7 @@ * 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'; @@ -13,6 +13,7 @@ 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'; @@ -157,7 +158,7 @@ export function NavControl({ isServerless }: { isServerless?: boolean }) { color="primary" size="s" > - {chatService.loading ? : } + {chatService.loading ? : } ) : ( - {chatService.loading ? : } + {chatService.loading ? : } )} diff --git a/x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/rule_connector/ai_assistant.tsx b/x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/rule_connector/ai_assistant.tsx index bd024e9231ac0..79d9678733941 100644 --- a/x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/rule_connector/ai_assistant.tsx +++ b/x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/rule_connector/ai_assistant.tsx @@ -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 { @@ -29,7 +27,7 @@ export function getConnectorType( return { id: OBSERVABILITY_AI_ASSISTANT_CONNECTOR_ID, modalWidth: 675, - iconClass: () => , + iconClass: () => , isSystemActionType: true, isExperimental: true, selectMessage: CONNECTOR_DESC, diff --git a/x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.json b/x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.json index 7e3de7940f22b..af075027d9cd4 100644 --- a/x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.json +++ b/x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.json @@ -80,6 +80,7 @@ "@kbn/observability-ai-common", "@kbn/llm-tasks-plugin", "@kbn/product-doc-common", + "@kbn/ai-assistant-icon", ], "exclude": [ "target/**/*"