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 @@ -23,7 +23,7 @@ export const NavMenuItem = ({ item, onClick }: NavMenuItemProps) => {
e.preventDefault();
setIsExpanded(!isExpanded);
} else {
onClick?.();
onClick?.(e);
}
};

Expand Down
5 changes: 3 additions & 2 deletions src/components/Admin/NavSidebar/NavMenu/NavMenuItem/types.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { ReactNode } from "react";
import type { MouseEvent, ReactNode } from "react";

export interface NavigationItem {
id: string;
name: string;
route: string;
icon?: ReactNode;
items?: NavigationItem[];
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
}

export interface ContainerProps {
Expand All @@ -14,5 +15,5 @@ export interface ContainerProps {

export interface NavMenuItemProps {
item: NavigationItem;
onClick?: () => void;
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
}
26 changes: 23 additions & 3 deletions src/components/Admin/NavSidebar/NavMenu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useMemo } from "react";
import { useMemo, type MouseEvent } from "react";
import { getFeatureFlagValue } from "../../../../featureFlags";
import { useGetAboutQuery } from "../../../../redux/services/digma";
import { useConfigSelector } from "../../../../store/config/useConfigSelector";
import { FeatureFlag } from "../../../../types";
import { GlobeIcon } from "../../../common/icons/16px/GlobeIcon";
import { HomeIcon } from "../../../common/icons/16px/HomeIcon";
Expand All @@ -17,6 +18,8 @@ export const NavMenu = () => {
FeatureFlag.AreBlockedTracesEnabled
);

const { isAgenticEnabled } = useConfigSelector();

const navigationItems: NavigationItem[] = useMemo(
() => [
{
Expand Down Expand Up @@ -63,16 +66,33 @@ export const NavMenu = () => {
]
}
]
: []),
...(isAgenticEnabled
? [
{
id: "aiSre",
name: "AI SRE",
route: `${window.location.origin}/agentic`,
onClick: (e: MouseEvent<HTMLAnchorElement>) => {
e.preventDefault();
window.open(
`${window.location.origin}/agentic`,
"_blank",
"noopener noreferrer"
);
}
}
]
: [])
],
[isTroubleshootingEnabled]
[isTroubleshootingEnabled, isAgenticEnabled]
);

return (
<nav>
<s.NavigationList>
{navigationItems.map((x) => (
<NavMenuItem key={x.id} item={x} />
<NavMenuItem key={x.id} item={x} onClick={x.onClick} />
))}
</s.NavigationList>
</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const ToolContainer = styled.details`
`;

export const ToolSummary = styled.summary`
background-color: ${({ theme }) => theme.colors.v3.surface.secondary};
background: ${({ theme }) => theme.colors.v3.surface.secondary};
padding: 12px 16px;
font-weight: 600;
color: ${({ theme }) => theme.colors.v3.text.primary};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const CreateIncidentChatOverlay = () => {
{
id: "__start_message",
type: "human",
agent_name: "incident_entry",
agent_name: AGENT_ID,
message: text,
tool_name: null,
mcp_name: null
Expand Down
2 changes: 1 addition & 1 deletion src/components/Agentic/common/PulsatingDot/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export const Container = styled.div`
width: 10px;
height: 10px;
border-radius: 50%;
background-color: ${({ theme }) => theme.colors.v3.text.white};
background: ${({ theme }) => theme.colors.v3.text.white};
animation: ${pulsate} 1s infinite alternate;
`;
Loading