diff --git a/src/components/Agentic/IncidentDetails/AgentSummary/index.tsx b/src/components/Agentic/IncidentDetails/AgentSummary/index.tsx index f46926fc2..fabfaf9ac 100644 --- a/src/components/Agentic/IncidentDetails/AgentSummary/index.tsx +++ b/src/components/Agentic/IncidentDetails/AgentSummary/index.tsx @@ -1,18 +1,23 @@ import { useMemo } from "react"; import { useParams } from "react-router"; import { useStableSearchParams } from "../../../../hooks/useStableSearchParams"; -import { - useGetIncidentAgentEventsQuery, - useGetIncidentAgentsQuery -} from "../../../../redux/services/digma"; +import { useGetIncidentAgentsQuery } from "../../../../redux/services/digma"; +import type { IncidentAgentEvent } from "../../../../redux/services/types"; import { ThreeCirclesSpinner } from "../../../common/ThreeCirclesSpinner"; import { Spinner } from "../../../common/v3/Spinner"; -import { AgentEventsList } from "../../common/AgentEventsList"; +import { AgentEventList } from "../../common/AgentEventList"; +import { mockedAgentEvents } from "../../common/AgentEventList/mockData"; import { useAutoScroll } from "../useAutoScroll"; import * as s from "./styles"; const REFRESH_INTERVAL = 10 * 1000; // in milliseconds +const agentEventsData: IncidentAgentEvent[] = mockedAgentEvents.filter( + (event) => event.type !== "human" +); + +const isLoading = false; + export const AgentSummary = () => { const params = useParams(); const incidentId = params.id; @@ -28,13 +33,13 @@ export const AgentSummary = () => { } ); - const { data: agentEventsData, isLoading } = useGetIncidentAgentEventsQuery( - { incidentId: incidentId ?? "", agentId: agentId ?? "" }, - { - pollingInterval: REFRESH_INTERVAL, - skip: !incidentId || !agentId - } - ); + // const { data: agentEventsData, isLoading } = useGetIncidentAgentEventsQuery( + // { incidentId: incidentId ?? "", agentId: agentId ?? "" }, + // { + // pollingInterval: REFRESH_INTERVAL, + // skip: !incidentId || !agentId + // } + // ); const isAgentRunning = useMemo( () => @@ -52,7 +57,14 @@ export const AgentSummary = () => { )} {agentEventsData && ( - + + {agentEventsData && ( + + )} + )} {isAgentRunning && } diff --git a/src/components/Agentic/IncidentDetails/AgentSummary/styles.ts b/src/components/Agentic/IncidentDetails/AgentSummary/styles.ts index 76d904022..e404a3a84 100644 --- a/src/components/Agentic/IncidentDetails/AgentSummary/styles.ts +++ b/src/components/Agentic/IncidentDetails/AgentSummary/styles.ts @@ -33,3 +33,9 @@ export const ToolSummary = styled.summary` export const ToolContent = styled.div` padding: 16px; `; + +export const EventsContainer = styled.div` + display: flex; + flex-direction: column; + gap: 8px; +`; diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/Accordion/index.tsx b/src/components/Agentic/common/Accordion/index.tsx similarity index 57% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/Accordion/index.tsx rename to src/components/Agentic/common/Accordion/index.tsx index e222e1dd5..80396f5bd 100644 --- a/src/components/Agentic/common/AgentEventsList/AgentEvent/Accordion/index.tsx +++ b/src/components/Agentic/common/Accordion/index.tsx @@ -1,10 +1,13 @@ -import { useState } from "react"; -import { ChevronIcon } from "../../../../../common/icons/16px/ChevronIcon"; -import { Direction } from "../../../../../common/icons/types"; +import { forwardRef, useState, type ForwardedRef } from "react"; +import { ChevronIcon } from "../../../common/icons/16px/ChevronIcon"; +import { Direction } from "../../../common/icons/types"; import * as s from "./styles"; import type { AccordionProps } from "./types"; -export const Accordion = ({ summary, content }: AccordionProps) => { +export const AccordionComponent = ( + { summary, content, className }: AccordionProps, + ref: ForwardedRef +) => { const [isOpen, setIsOpen] = useState(false); const handleSummaryClick = () => { @@ -12,7 +15,7 @@ export const Accordion = ({ summary, content }: AccordionProps) => { }; return ( - + { ); }; + +export const Accordion = forwardRef(AccordionComponent); diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/Accordion/styles.ts b/src/components/Agentic/common/Accordion/styles.ts similarity index 76% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/Accordion/styles.ts rename to src/components/Agentic/common/Accordion/styles.ts index 1121f430d..ab8958bf1 100644 --- a/src/components/Agentic/common/AgentEventsList/AgentEvent/Accordion/styles.ts +++ b/src/components/Agentic/common/Accordion/styles.ts @@ -1,14 +1,14 @@ import styled from "styled-components"; export const Container = styled.div` - border: 1px solid ${({ theme }) => theme.colors.v3.stroke.primary}; + border: 1px solid ${({ theme }) => theme.colors.v3.stroke.dark}; border-radius: 8px; flex-shrink: 0; overflow: hidden; `; export const Summary = styled.div` - background-color: ${({ theme }) => theme.colors.v3.surface.secondary}; + background: ${({ theme }) => theme.colors.v3.surface.secondary}; color: ${({ theme }) => theme.colors.v3.text.primary}; padding: 8px; cursor: pointer; diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/Accordion/types.ts b/src/components/Agentic/common/Accordion/types.ts similarity index 84% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/Accordion/types.ts rename to src/components/Agentic/common/Accordion/types.ts index 0146d33fb..83fc32311 100644 --- a/src/components/Agentic/common/AgentEventsList/AgentEvent/Accordion/types.ts +++ b/src/components/Agentic/common/Accordion/types.ts @@ -3,4 +3,5 @@ import type { ReactNode } from "react"; export interface AccordionProps { summary: ReactNode; content: ReactNode; + className?: string; } diff --git a/src/components/Agentic/common/AgentChat/AgentChat.stories.tsx b/src/components/Agentic/common/AgentChat/AgentChat.stories.tsx index 9f2d889e6..7a9773fb5 100644 --- a/src/components/Agentic/common/AgentChat/AgentChat.stories.tsx +++ b/src/components/Agentic/common/AgentChat/AgentChat.stories.tsx @@ -3,6 +3,7 @@ import { useEffect, useState } from "react"; import { fn } from "storybook/test"; import { AgentChat } from "."; import type { IncidentAgentEvent } from "../../../../redux/services/types"; +import { mockedAgentEvents } from "../AgentEventList/mockData"; // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { @@ -19,45 +20,6 @@ export default meta; type Story = StoryObj; // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args -const mockedAgentEvents: IncidentAgentEvent[] = [ - { - id: "1", - type: "human", - message: "Can you help me understand why my API response time is slow?", - agent_name: "user" - }, - { - id: "2", - type: "token", - message: "Let me analyze your application's performance data...", - agent_name: "agent" - }, - { - id: "3", - type: "token", - message: - "I've found several performance issues in your application:\n\n1. **Database Query Optimization**: Your user lookup queries are taking an average of 2.3 seconds\n2. **Memory Usage**: High memory allocation in the user service\n3. **Cache Misses**: 78% cache miss rate on user data\n\nWould you like me to suggest specific optimizations for any of these areas?", - agent_name: "agent" - }, - { - id: "4", - type: "tool", - agent_name: "agent", - message: - '\n```json\n{\n "success": false,\n "blockers": "Limited tool access prevents thorough investigation of system-wide issues, infrastructure problems, service mesh configurations, and external dependencies. Need access to Kubernetes API, service mesh telemetry, network monitoring tools, and container logs.",\n "result": {\n "is_relevant": true,\n "objective_success": false,\n "blockers": "Limited tool access prevents thorough investigation of system-wide issues, infrastructure problems, service mesh configurations, and external dependencies. Need access to Kubernetes API, service mesh telemetry, network monitoring tools, and container logs.",\n "beyond_the_result": {\n "summary": "Unable to fully investigate alternative causes due to tool limitations, but analysis suggests potential issues in service mesh, network policies, or external dependencies",\n "description": "The investigation revealed a severe performance degradation (2650%) in the PipelineConnector Execute operation that has been ongoing for over 24 hours. While direct investigation was limited by tool access, the pattern and severity suggest potential issues with service mesh routing, network policies, cross-namespace communication, or external service dependencies rather than simple resource constraints.",\n "confidence_level": "30",\n "confidence_level_reason": "Limited tool access prevents thorough investigation of infrastructure and network-related causes. The assessment is based primarily on timing patterns and service impact analysis rather than direct evidence."\n },\n "next_steps_suggestions": "1. Request access to Kubernetes cluster information and API\\n2. Obtain access to service mesh telemetry and dashboard\\n3. Deploy network monitoring tools\\n4. Enable access to container logs\\n5. Once access is granted, conduct thorough analysis of namespace configurations, service mesh settings, network policies, and external service dependencies",\n "actions_taken": [\n {\n "action": "Gathered relevant objects",\n "action_execution_success": true,\n "action_command": "list_relevant_incident_objects",\n "resolution_success_status": "PARTIAL",\n "resolution_explanation": "Successfully identified the critical trace ID but couldn\'t gather infrastructure-related objects",\n "resolution_success_evidence": "Retrieved trace ID FB0C56FA98816BBBFBB934CCEDEA72E4 showing the performance degradation",\n "state_changes_confirmed_due_to_actions": "Confirmed existence of trace showing 2650% performance degradation in PipelineConnector Execute operation"\n },\n {\n "action": "Tracked relevant trace",\n "action_execution_success": true,\n "action_command": "track_incident_relevant_object",\n "resolution_success_status": "PARTIAL",\n "resolution_explanation": "Successfully tracked the critical trace ID for future reference",\n "resolution_success_evidence": "Trace ID FB0C56FA98816BBBFBB934CCEDEA72E4 was successfully tracked",\n "state_changes_confirmed_due_to_actions": "Added trace to tracked objects for future investigation"\n }\n ]\n }\n}\n```\n', - tool_name: "kubernetes_resolution_expert_tool", - mcp_name: "", - status: "success" - }, - { - id: "5", - type: "token", - message: - "Here are my recommendations for optimizing your database queries:\n\n```sql\n-- Add an index on the email column\nCREATE INDEX idx_users_email ON users(email);\n\n-- Use prepared statements\nSELECT id, name, email FROM users WHERE email = ?\n```\n\nThis should reduce your query time from 2.3s to under 100ms.", - agent_name: "agent" - } -]; - const EVENTS_CURSOR = 2; const EVENTS_TIMEOUT = 2000; diff --git a/src/components/Agentic/common/AgentChat/index.tsx b/src/components/Agentic/common/AgentChat/index.tsx index 40258109d..86defcf25 100644 --- a/src/components/Agentic/common/AgentChat/index.tsx +++ b/src/components/Agentic/common/AgentChat/index.tsx @@ -1,7 +1,7 @@ import { sendUserActionTrackingEvent } from "../../../../utils/actions/sendUserActionTrackingEvent"; import { Chat } from "../../common/Chat"; import { trackingEvents } from "../../tracking"; -import { AgentEventsList } from "../AgentEventsList"; +import { AgentEventList } from "../AgentEventList"; import type { AgentChatProps } from "./types"; export const AgentChat = ({ @@ -42,7 +42,7 @@ export const AgentChat = ({ chatContent={ <> {data && ( - = { title: - "Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/MarkdownRenderer", + "Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/MarkdownRenderer", component: MarkdownRenderer, parameters: { // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/MarkdownRenderer/index.tsx b/src/components/Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/MarkdownRenderer/index.tsx similarity index 100% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/MarkdownRenderer/index.tsx rename to src/components/Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/MarkdownRenderer/index.tsx diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/MarkdownRenderer/styles.ts b/src/components/Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/MarkdownRenderer/styles.ts similarity index 100% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/MarkdownRenderer/styles.ts rename to src/components/Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/MarkdownRenderer/styles.ts diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/MarkdownRenderer/types.ts b/src/components/Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/MarkdownRenderer/types.ts similarity index 100% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/MarkdownRenderer/types.ts rename to src/components/Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/MarkdownRenderer/types.ts diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/index.tsx b/src/components/Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/index.tsx similarity index 100% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/index.tsx rename to src/components/Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/index.tsx diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/types.ts b/src/components/Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/types.ts similarity index 100% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/TypingMarkdown/types.ts rename to src/components/Agentic/common/AgentEventList/AgentEvent/TypingMarkdown/types.ts diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/index.tsx b/src/components/Agentic/common/AgentEventList/AgentEvent/index.tsx similarity index 85% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/index.tsx rename to src/components/Agentic/common/AgentEventList/AgentEvent/index.tsx index 44ab1c0f3..cae09b865 100644 --- a/src/components/Agentic/common/AgentEventsList/AgentEvent/index.tsx +++ b/src/components/Agentic/common/AgentEventList/AgentEvent/index.tsx @@ -1,7 +1,8 @@ import { sendUserActionTrackingEvent } from "../../../../../utils/actions/sendUserActionTrackingEvent"; import { MagicWandIcon } from "../../../../common/icons/16px/MagicWandIcon"; import { trackingEvents } from "../../../tracking"; -import { Accordion } from "./Accordion"; +import { Accordion } from "../../Accordion"; +import { AgentEventSection } from "../../AgentEventSection"; import * as s from "./styles"; import type { AgentEventProps } from "./types"; import { TypingMarkdown } from "./TypingMarkdown"; @@ -10,6 +11,8 @@ const TYPING_SPEED = 3; // in milliseconds per character export const AgentEvent = ({ event, + index, + eventsCount, onNavigateToIncident, onEventTypingComplete, isEventTypingRequired @@ -75,6 +78,15 @@ export const AgentEvent = ({ Updated saved memory ); + case "section": { + const type = + index === 0 + ? "intro" + : index === eventsCount - 1 + ? "summary" + : undefined; + return ; + } default: return null; } diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/styles.ts b/src/components/Agentic/common/AgentEventList/AgentEvent/styles.ts similarity index 100% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/styles.ts rename to src/components/Agentic/common/AgentEventList/AgentEvent/styles.ts diff --git a/src/components/Agentic/common/AgentEventsList/AgentEvent/types.ts b/src/components/Agentic/common/AgentEventList/AgentEvent/types.ts similarity index 90% rename from src/components/Agentic/common/AgentEventsList/AgentEvent/types.ts rename to src/components/Agentic/common/AgentEventList/AgentEvent/types.ts index 056c85f10..eae488f26 100644 --- a/src/components/Agentic/common/AgentEventsList/AgentEvent/types.ts +++ b/src/components/Agentic/common/AgentEventList/AgentEvent/types.ts @@ -5,6 +5,8 @@ import type { export interface AgentEventProps { event: IncidentAgentEvent; + index: number; + eventsCount: number; onNavigateToIncident?: () => void; onEventTypingComplete: (id: string) => void; isEventTypingRequired: boolean; diff --git a/src/components/Agentic/common/AgentEventsList/index.tsx b/src/components/Agentic/common/AgentEventList/index.tsx similarity index 92% rename from src/components/Agentic/common/AgentEventsList/index.tsx rename to src/components/Agentic/common/AgentEventList/index.tsx index 3b80c51af..59e16e427 100644 --- a/src/components/Agentic/common/AgentEventsList/index.tsx +++ b/src/components/Agentic/common/AgentEventList/index.tsx @@ -1,16 +1,16 @@ import { useEffect, useMemo, useState } from "react"; import type { IncidentAgentEvent } from "../../../../redux/services/types"; import { AgentEvent } from "./AgentEvent"; -import type { AgentEventsListProps, RenderState } from "./types"; +import type { AgentEventListProps, RenderState } from "./types"; const isTypingEvent = (event: IncidentAgentEvent) => ["ai", "token"].includes(event.type); -export const AgentEventsList = ({ +export const AgentEventList = ({ events, onNavigateToIncident, typeInitialEvents -}: AgentEventsListProps) => { +}: AgentEventListProps) => { const [initialVisibleCount] = useState(() => typeInitialEvents ? 0 : events.length ); @@ -97,10 +97,12 @@ export const AgentEventsList = ({ [events, renderState.currentEventIndex] ); - return visibleEvents.map((event) => ( + return visibleEvents.map((event, i) => ( void; typeInitialEvents?: boolean; diff --git a/src/components/Agentic/common/AgentEventSection/AgentEventSection.stories.tsx b/src/components/Agentic/common/AgentEventSection/AgentEventSection.stories.tsx new file mode 100644 index 000000000..9d2340570 --- /dev/null +++ b/src/components/Agentic/common/AgentEventSection/AgentEventSection.stories.tsx @@ -0,0 +1,63 @@ +import type { Meta, StoryObj } from "@storybook/react-webpack5"; +import { useTheme } from "styled-components"; +import { mockedAgentEvents } from "../AgentEventList/mockData"; +import { AgentEventSection } from "../AgentEventSection"; + +// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction +const meta: Meta = { + title: "Agentic/common/AgentEventSection", + component: AgentEventSection, + parameters: { + // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout + layout: "fullscreen" + } +}; + +export default meta; + +type Story = StoryObj; + +// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args +export const Default: Story = { + args: { + data: mockedAgentEvents.find((event) => event.type === "section"), + typeInitialEvents: false + } +}; + +export const Multiple: Story = { + args: { + typeInitialEvents: false + }, + render: (args) => { + const theme = useTheme(); + + const data = mockedAgentEvents.filter((event) => event.type === "section"); + + return ( +
+ {data.map((section) => ( + event.type !== "human" + ) + }} + /> + ))} +
+ ); + } +}; diff --git a/src/components/Agentic/common/AgentEventSection/index.tsx b/src/components/Agentic/common/AgentEventSection/index.tsx new file mode 100644 index 000000000..71baedea3 --- /dev/null +++ b/src/components/Agentic/common/AgentEventSection/index.tsx @@ -0,0 +1,79 @@ +import { useEffect, useRef, useState } from "react"; +import { AgentEventList } from "../AgentEventList"; +import * as s from "./styles"; +import type { AgentEventSectionProps, AgentEventSectionType } from "./types"; + +const getHue = (index: number, sectionType?: AgentEventSectionType) => { + if (sectionType === "intro") { + return 30; + } + + if (sectionType === "summary") { + return 330; + } + + const hueValues = [90, 150, 210, 270]; + return hueValues[index % hueValues.length]; +}; + +export const AgentEventSection = ({ + data, + type, + typeInitialEvents, + index +}: AgentEventSectionProps) => { + const [isSticky, setIsSticky] = useState(false); + const stickyRef = useRef(null); + const sentinelRef = useRef(null); + + useEffect(() => { + const sentinel = sentinelRef.current; + if (!sentinel) { + return; + } + + const observer = new IntersectionObserver( + ([entry]) => { + setIsSticky(entry.intersectionRatio < 1); + }, + { + threshold: [1] + } + ); + + observer.observe(sentinel); + + return () => { + observer.disconnect(); + }; + }, []); + + return ( + + + + {data.section?.name} + {data.section?.status === "active" && } + {data.section?.summary} + + } + content={ + + {data.section?.description} + {data.events && ( + + )} + + } + /> + + ); +}; diff --git a/src/components/Agentic/common/AgentEventSection/styles.ts b/src/components/Agentic/common/AgentEventSection/styles.ts new file mode 100644 index 000000000..d6b31166d --- /dev/null +++ b/src/components/Agentic/common/AgentEventSection/styles.ts @@ -0,0 +1,65 @@ +import styled from "styled-components"; +import { Accordion } from "../Accordion"; +import { Content, Summary } from "../Accordion/styles"; +import { PulsatingDot } from "../PulsatingDot"; +import type { SectionAccordionProps } from "./types"; + +export const Container = styled.div` + position: relative; +`; + +export const StickySentinel = styled.div` + position: absolute; + top: 0; + width: 100%; + height: 1px; +`; + +export const SectionAccordion = styled(Accordion)` + border: 1px solid hsl(${({ $hue }) => $hue} 50% 30%); + overflow: visible; + + & > ${Summary} { + background: ${({ theme }) => theme.colors.v3.surface.secondary}; + background-image: linear-gradient( + hsl(${({ $hue }) => $hue} 50% 30% / 15%), + hsl(${({ $hue }) => $hue} 50% 30% / 15%) + ); + position: sticky; + top: 0; + z-index: 1; + border-radius: ${({ $isSticky }) => ($isSticky ? "0" : "8px")}; + } + + & > ${Content} { + background: hsl(${({ $hue }) => $hue} 50% 30% / 15%); + } +`; + +export const SectionAccordionSummaryContainer = styled.div` + display: flex; + align-items: center; + gap: 8px; +`; + +export const SummarySubtitle = styled.span` + color: ${({ theme }) => theme.colors.v3.text.secondary}; +`; + +export const SectionAccordionContentContainer = styled.div` + display: flex; + flex-direction: column; + gap: 8px; +`; + +export const StyledPulsatingDot = styled(PulsatingDot)` + width: 14px; + height: 14px; + background: ${({ theme }) => theme.colors.v3.surface.brandPrimary}; +`; + +export const Description = styled.div` + border: 1px solid ${({ theme }) => theme.colors.v3.text.tertiary}; + border-radius: 8px; + padding: 8px; +`; diff --git a/src/components/Agentic/common/AgentEventSection/types.ts b/src/components/Agentic/common/AgentEventSection/types.ts new file mode 100644 index 000000000..50e4fcaf5 --- /dev/null +++ b/src/components/Agentic/common/AgentEventSection/types.ts @@ -0,0 +1,15 @@ +import type { IncidentAgentEvent } from "../../../../redux/services/types"; + +export type AgentEventSectionType = "intro" | "summary"; + +export interface AgentEventSectionProps { + data: IncidentAgentEvent; + type?: AgentEventSectionType; + typeInitialEvents?: boolean; + index: number; +} + +export interface SectionAccordionProps { + $hue: number; + $isSticky?: boolean; +} diff --git a/src/redux/services/types.ts b/src/redux/services/types.ts index 11c58f64f..d2423b5bd 100644 --- a/src/redux/services/types.ts +++ b/src/redux/services/types.ts @@ -1234,13 +1234,24 @@ export interface IncidentAgentEvent { | "error" | "agent_end" | "input_user_required" - | "memory_update"; + | "memory_update" + | "section"; message: string; agent_name: string; tool_name?: string | null; mcp_name?: string | null; conversation_id?: string; + events?: IncidentAgentEvent[] | null; status?: IncidentAgentEventStatus; + section?: IncidentAgentEventSection; +} + +export interface IncidentAgentEventSection { + id: string; + name: string; + description: string; + summary: string; + status: "active" | "completed"; } export type GetIncidentAgentEventsResponse = IncidentAgentEvent[];