|
1 | 1 | import { AppEvents } from '../../constants/events'; |
2 | 2 | import React, { useEffect, useState } from 'react'; |
3 | 3 | import { |
4 | | - AppWindow, |
5 | 4 | ChefHat, |
6 | 5 | ChevronRight, |
7 | 6 | Clock, |
@@ -31,7 +30,6 @@ import { useNavigation } from '../../hooks/useNavigation'; |
31 | 30 | import { SessionIndicators } from '../SessionIndicators'; |
32 | 31 | import { useSidebarSessionStatus } from '../../hooks/useSidebarSessionStatus'; |
33 | 32 | import { getInitialWorkingDir } from '../../utils/workingDir'; |
34 | | -import { useConfig } from '../ConfigContext'; |
35 | 33 |
|
36 | 34 | interface SidebarProps { |
37 | 35 | onSelectSession: (sessionId: string) => void; |
@@ -63,13 +61,6 @@ const menuItems: NavigationEntry[] = [ |
63 | 61 | icon: FileText, |
64 | 62 | tooltip: 'Browse your saved recipes', |
65 | 63 | }, |
66 | | - { |
67 | | - type: 'item', |
68 | | - path: '/apps', |
69 | | - label: 'Apps', |
70 | | - icon: AppWindow, |
71 | | - tooltip: 'MCP and custom apps', |
72 | | - }, |
73 | 64 | { |
74 | 65 | type: 'item', |
75 | 66 | path: '/schedules', |
@@ -198,11 +189,8 @@ SessionList.displayName = 'SessionList'; |
198 | 189 | const AppSidebar: React.FC<SidebarProps> = ({ currentPath }) => { |
199 | 190 | const navigate = useNavigate(); |
200 | 191 | const chatContext = useChatContext(); |
201 | | - const configContext = useConfig(); |
202 | 192 | const setView = useNavigation(); |
203 | 193 |
|
204 | | - const appsExtensionEnabled = !!configContext.extensionsList?.find((ext) => ext.name === 'apps') |
205 | | - ?.enabled; |
206 | 194 | const [searchParams] = useSearchParams(); |
207 | 195 | const [recentSessions, setRecentSessions] = useState<Session[]>([]); |
208 | 196 | const [isChatExpanded, setIsChatExpanded] = useState(true); |
@@ -468,14 +456,6 @@ const AppSidebar: React.FC<SidebarProps> = ({ currentPath }) => { |
468 | 456 | ); |
469 | 457 | }; |
470 | 458 |
|
471 | | - const visibleMenuItems = menuItems.filter((entry) => { |
472 | | - // Filter out Apps if extension is not enabled |
473 | | - if (entry.type === 'item' && entry.path === '/apps') { |
474 | | - return appsExtensionEnabled; |
475 | | - } |
476 | | - return true; |
477 | | - }); |
478 | | - |
479 | 459 | return ( |
480 | 460 | <> |
481 | 461 | <SidebarContent className="pt-12"> |
@@ -561,7 +541,7 @@ const AppSidebar: React.FC<SidebarProps> = ({ currentPath }) => { |
561 | 541 |
|
562 | 542 | <SidebarSeparator /> |
563 | 543 |
|
564 | | - {visibleMenuItems.map((entry, index) => renderMenuItem(entry, index))} |
| 544 | + {menuItems.map((entry, index) => renderMenuItem(entry, index))} |
565 | 545 | </SidebarMenu> |
566 | 546 | </SidebarContent> |
567 | 547 | </> |
|
0 commit comments