Skip to content

Commit 4d29c9f

Browse files
Merge pull request #1470 from digma-ai/feature/agentic-link
Add link to Agentic
2 parents def3124 + ca1b8bc commit 4d29c9f

File tree

6 files changed

+30
-9
lines changed

6 files changed

+30
-9
lines changed

src/components/Admin/NavSidebar/NavMenu/NavMenuItem/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import type { ReactNode } from "react";
1+
import type { MouseEvent, ReactNode } from "react";
22

33
export 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

1112
export interface ContainerProps {
@@ -14,5 +15,5 @@ export interface ContainerProps {
1415

1516
export interface NavMenuItemProps {
1617
item: NavigationItem;
17-
onClick?: () => void;
18+
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
1819
}

src/components/Admin/NavSidebar/NavMenu/index.tsx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { useMemo } from "react";
1+
import { useMemo, type MouseEvent } from "react";
22
import { getFeatureFlagValue } from "../../../../featureFlags";
33
import { useGetAboutQuery } from "../../../../redux/services/digma";
4+
import { useConfigSelector } from "../../../../store/config/useConfigSelector";
45
import { FeatureFlag } from "../../../../types";
56
import { GlobeIcon } from "../../../common/icons/16px/GlobeIcon";
67
import { 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>

src/components/Agentic/IncidentDetails/AgentSummary/styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const ToolContainer = styled.details`
2323
`;
2424

2525
export 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};

src/components/Agentic/IncidentsContainer/CreateIncidentChatOverlay/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/components/Agentic/common/PulsatingDot/styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
`;

0 commit comments

Comments
 (0)