Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import React, { useEffect } from 'react';
import { omit } from 'lodash';
import { useHistory } from 'react-router-dom';
import { usePerformanceContext } from '@kbn/ebt-tools';
import { OBSERVABILITY_ERROR_ATTACHMENT_TYPE_ID } from '@kbn/observability-agent-builder-plugin/public';
import {
OBSERVABILITY_AGENT_ID,
OBSERVABILITY_ERROR_ATTACHMENT_TYPE_ID,
} from '@kbn/observability-agent-builder-plugin/public';
import { isOpenTelemetryAgentName, isRumAgentName } from '../../../../common/agent_name';
import { NOT_AVAILABLE_LABEL } from '../../../../common/i18n';
import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context';
Expand Down Expand Up @@ -207,6 +210,7 @@ export function ErrorGroupDetails() {

agentBuilder.setConversationFlyoutActiveConfig({
newConversation: true,
agentId: OBSERVABILITY_AGENT_ID,
attachments: [
{
type: OBSERVABILITY_ERROR_ATTACHMENT_TYPE_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ import { css } from '@emotion/react';
import { omit } from 'lodash';
import { usePageReady } from '@kbn/ebt-tools';
import moment from 'moment';
import { OBSERVABILITY_ALERT_ATTACHMENT_TYPE_ID } from '@kbn/observability-agent-builder-plugin/public';
import {
OBSERVABILITY_AGENT_ID,
OBSERVABILITY_ALERT_ATTACHMENT_TYPE_ID,
} from '@kbn/observability-agent-builder-plugin/public';
import { ObsCasesContext } from './components/obs_cases_context';
import { RelatedAlerts } from './components/related_alerts/related_alerts';
import type { AlertDetailsSource, TabId } from './types';
Expand Down Expand Up @@ -187,6 +190,7 @@ export function AlertDetails() {

agentBuilder.setConversationFlyoutActiveConfig({
newConversation: true,
agentId: OBSERVABILITY_AGENT_ID,
attachments: [
{
id: alertUuid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* 2.0.
*/

// Agent ID
export const OBSERVABILITY_AGENT_ID = 'observability.agent';

// Attachment type IDs
export const OBSERVABILITY_AI_INSIGHT_ATTACHMENT_TYPE_ID = 'observability.ai_insight';
export const OBSERVABILITY_ERROR_ATTACHMENT_TYPE_ID = 'observability.error';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

export {
OBSERVABILITY_AGENT_ID,
OBSERVABILITY_AI_INSIGHT_ATTACHMENT_TYPE_ID,
OBSERVABILITY_ALERT_ATTACHMENT_TYPE_ID,
OBSERVABILITY_ERROR_ATTACHMENT_TYPE_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { useLicense } from '../../hooks/use_license';
import { useGenAIConnectors } from '../../hooks/use_genai_connectors';
import { StartConversationButton } from './start_conversation_button';
import { AiInsightErrorBanner } from './ai_insight_error_banner';
import { OBSERVABILITY_AGENT_ID } from '../../../common/constants';

export interface AiInsightResponse {
summary: string;
Expand Down Expand Up @@ -87,6 +88,7 @@ export function AiInsight({ title, fetchInsight, buildAttachments }: AiInsightPr

agentBuilder.openConversationFlyout({
newConversation: true,
agentId: OBSERVABILITY_AGENT_ID,
attachments: buildAttachments(summary, context),
});
}, [agentBuilder, buildAttachments, summary, context]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { PluginInitializerContext } from '@kbn/core/public';
import { ObservabilityAgentBuilderPlugin } from './plugin';

export {
OBSERVABILITY_AGENT_ID,
OBSERVABILITY_AI_INSIGHT_ATTACHMENT_TYPE_ID,
OBSERVABILITY_ALERT_ATTACHMENT_TYPE_ID,
OBSERVABILITY_ERROR_ATTACHMENT_TYPE_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import type {
import { OBSERVABILITY_AGENT_TOOL_IDS } from '../tools/register_tools';
import { OBSERVABILITY_GET_INDEX_INFO_TOOL_ID } from '../tools';
import { getAgentBuilderResourceAvailability } from '../utils/get_agent_builder_resource_availability';

export const OBSERVABILITY_AGENT_ID = 'observability.agent';
import { OBSERVABILITY_AGENT_ID } from '../../common/constants';

export async function registerObservabilityAgent({
core,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import {
import { OBSERVABILITY_GET_INDEX_INFO_TOOL_ID, createGetIndexInfoTool } from './get_index_info';

const PLATFORM_TOOL_IDS = [
platformCoreTools.search,
platformCoreTools.listIndices,
platformCoreTools.getIndexMapping,
platformCoreTools.getDocumentById,
Expand Down
Loading