File tree Expand file tree Collapse file tree 6 files changed +30
-9
lines changed
IncidentDetails/AgentSummary
IncidentsContainer/CreateIncidentChatOverlay Expand file tree Collapse file tree 6 files changed +30
-9
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export const NavMenuItem = ({ item, onClick }: NavMenuItemProps) => {
2323 e . preventDefault ( ) ;
2424 setIsExpanded ( ! isExpanded ) ;
2525 } else {
26- onClick ?.( ) ;
26+ onClick ?.( e ) ;
2727 }
2828 } ;
2929
Original file line number Diff line number Diff line change 1- import type { ReactNode } from "react" ;
1+ import type { MouseEvent , ReactNode } from "react" ;
22
33export interface NavigationItem {
44 id : string ;
55 name : string ;
66 route : string ;
77 icon ?: ReactNode ;
88 items ?: NavigationItem [ ] ;
9+ onClick ?: ( e : MouseEvent < HTMLAnchorElement > ) => void ;
910}
1011
1112export interface ContainerProps {
@@ -14,5 +15,5 @@ export interface ContainerProps {
1415
1516export interface NavMenuItemProps {
1617 item : NavigationItem ;
17- onClick ?: ( ) => void ;
18+ onClick ?: ( e : MouseEvent < HTMLAnchorElement > ) => void ;
1819}
Original file line number Diff line number Diff line change 1- import { useMemo } from "react" ;
1+ import { useMemo , type MouseEvent } from "react" ;
22import { getFeatureFlagValue } from "../../../../featureFlags" ;
33import { useGetAboutQuery } from "../../../../redux/services/digma" ;
4+ import { useConfigSelector } from "../../../../store/config/useConfigSelector" ;
45import { FeatureFlag } from "../../../../types" ;
56import { GlobeIcon } from "../../../common/icons/16px/GlobeIcon" ;
67import { HomeIcon } from "../../../common/icons/16px/HomeIcon" ;
@@ -17,6 +18,8 @@ export const NavMenu = () => {
1718 FeatureFlag . AreBlockedTracesEnabled
1819 ) ;
1920
21+ const { isAgenticEnabled } = useConfigSelector ( ) ;
22+
2023 const navigationItems : NavigationItem [ ] = useMemo (
2124 ( ) => [
2225 {
@@ -63,16 +66,33 @@ export const NavMenu = () => {
6366 ]
6467 }
6568 ]
69+ : [ ] ) ,
70+ ...( isAgenticEnabled
71+ ? [
72+ {
73+ id : "aiSre" ,
74+ name : "AI SRE" ,
75+ route : `${ window . location . origin } /agentic` ,
76+ onClick : ( e : MouseEvent < HTMLAnchorElement > ) => {
77+ e . preventDefault ( ) ;
78+ window . open (
79+ `${ window . location . origin } /agentic` ,
80+ "_blank" ,
81+ "noopener noreferrer"
82+ ) ;
83+ }
84+ }
85+ ]
6686 : [ ] )
6787 ] ,
68- [ isTroubleshootingEnabled ]
88+ [ isTroubleshootingEnabled , isAgenticEnabled ]
6989 ) ;
7090
7191 return (
7292 < nav >
7393 < s . NavigationList >
7494 { navigationItems . map ( ( x ) => (
75- < NavMenuItem key = { x . id } item = { x } />
95+ < NavMenuItem key = { x . id } item = { x } onClick = { x . onClick } />
7696 ) ) }
7797 </ s . NavigationList >
7898 </ nav >
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export const ToolContainer = styled.details`
2323` ;
2424
2525export const ToolSummary = styled . summary `
26- background-color : ${ ( { theme } ) => theme . colors . v3 . surface . secondary } ;
26+ background: ${ ( { theme } ) => theme . colors . v3 . surface . secondary } ;
2727 padding: 12px 16px;
2828 font-weight: 600;
2929 color: ${ ( { theme } ) => theme . colors . v3 . text . primary } ;
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export const CreateIncidentChatOverlay = () => {
6161 {
6262 id : "__start_message" ,
6363 type : "human" ,
64- agent_name : "incident_entry" ,
64+ agent_name : AGENT_ID ,
6565 message : text ,
6666 tool_name : null ,
6767 mcp_name : null
Original file line number Diff line number Diff line change @@ -15,6 +15,6 @@ export const Container = styled.div`
1515 width: 10px;
1616 height: 10px;
1717 border-radius: 50%;
18- background-color : ${ ( { theme } ) => theme . colors . v3 . text . white } ;
18+ background: ${ ( { theme } ) => theme . colors . v3 . text . white } ;
1919 animation: ${ pulsate } 1s infinite alternate;
2020` ;
You can’t perform that action at this time.
0 commit comments