@@ -53,7 +53,12 @@ import {useLocation} from 'sentry/utils/useLocation';
5353import useMedia from 'sentry/utils/useMedia' ;
5454import useOrganization from 'sentry/utils/useOrganization' ;
5555import { makeAlertsPathname } from 'sentry/views/alerts/pathnames' ;
56+ import { AgentInsightsFeature } from 'sentry/views/insights/agentMonitoring/utils/features' ;
5657import { MODULE_BASE_URLS } from 'sentry/views/insights/common/utils/useModuleURL' ;
58+ import {
59+ AGENTS_LANDING_SUB_PATH ,
60+ AGENTS_SIDEBAR_LABEL ,
61+ } from 'sentry/views/insights/pages/agents/settings' ;
5762import {
5863 AI_LANDING_SUB_PATH ,
5964 AI_SIDEBAR_LABEL ,
@@ -380,13 +385,26 @@ function Sidebar() {
380385 id = "performance-domains-mobile"
381386 icon = { < SubitemDot collapsed /> }
382387 />
383- < SidebarItem
384- { ...sidebarItemProps }
385- label = { AI_SIDEBAR_LABEL }
386- to = { `/organizations/${ organization . slug } /${ DOMAIN_VIEW_BASE_URL } /${ AI_LANDING_SUB_PATH } /${ MODULE_BASE_URLS [ AI_LANDING_SUB_PATH ] } /` }
387- id = "performance-domains-ai"
388- icon = { < SubitemDot collapsed /> }
389- />
388+ < AgentInsightsFeature
389+ organization = { organization }
390+ renderDisabled = { ( ) => (
391+ < SidebarItem
392+ { ...sidebarItemProps }
393+ label = { AI_SIDEBAR_LABEL }
394+ to = { `/organizations/${ organization . slug } /${ DOMAIN_VIEW_BASE_URL } /${ AI_LANDING_SUB_PATH } /${ MODULE_BASE_URLS [ AI_LANDING_SUB_PATH ] } /` }
395+ id = "performance-domains-ai"
396+ icon = { < SubitemDot collapsed /> }
397+ />
398+ ) }
399+ >
400+ < SidebarItem
401+ { ...sidebarItemProps }
402+ label = { AGENTS_SIDEBAR_LABEL }
403+ to = { `/organizations/${ organization . slug } /${ DOMAIN_VIEW_BASE_URL } /${ AGENTS_LANDING_SUB_PATH } /${ MODULE_BASE_URLS [ AGENTS_LANDING_SUB_PATH ] } /` }
404+ id = "performance-domains-agents"
405+ icon = { < SubitemDot collapsed /> }
406+ />
407+ </ AgentInsightsFeature >
390408 </ SidebarAccordion >
391409 </ Feature >
392410 ) ;
0 commit comments