diff --git a/apps/x/apps/renderer/src/App.tsx b/apps/x/apps/renderer/src/App.tsx index a0fe4e0e..56d953e3 100644 --- a/apps/x/apps/renderer/src/App.tsx +++ b/apps/x/apps/renderer/src/App.tsx @@ -13,7 +13,6 @@ import { ChatInputBar } from './components/chat-button'; import { ChatSidebar } from './components/chat-sidebar'; import { GraphView, type GraphEdge, type GraphNode } from '@/components/graph-view'; import { useDebounce } from './hooks/use-debounce'; -import { SidebarIcon } from '@/components/sidebar-icon'; import { SidebarContentPanel } from '@/components/sidebar-content'; import { SidebarSectionProvider, type ActiveSection } from '@/contexts/sidebar-context'; import { @@ -1786,16 +1785,9 @@ function App() {
- {/* Icon sidebar - always visible, fixed position */} - - - {/* Spacer for the fixed icon sidebar */} -
- {/* Content sidebar with SidebarProvider for collapse functionality */} diff --git a/apps/x/apps/renderer/src/components/sidebar-content.tsx b/apps/x/apps/renderer/src/components/sidebar-content.tsx index 4be433d2..4f7e65bc 100644 --- a/apps/x/apps/renderer/src/components/sidebar-content.tsx +++ b/apps/x/apps/renderer/src/components/sidebar-content.tsx @@ -12,10 +12,13 @@ import { FilePlus, Folder, FolderPlus, + HelpCircle, Mic, Network, Pencil, + Plug, LoaderIcon, + Settings, Square, SquarePen, Trash2, @@ -53,7 +56,11 @@ import { ContextMenuTrigger, } from "@/components/ui/context-menu" import { Input } from "@/components/ui/input" -import { useSidebarSection } from "@/contexts/sidebar-context" +import { cn } from "@/lib/utils" +import { type ActiveSection, useSidebarSection } from "@/contexts/sidebar-context" +import { ConnectorsPopover } from "@/components/connectors-popover" +import { HelpPopover } from "@/components/help-popover" +import { SettingsDialog } from "@/components/settings-dialog" import { toast } from "@/lib/toast" import { ServiceEvent } from "@x/shared/src/service-events.js" import z from "zod" @@ -126,10 +133,10 @@ type SidebarContentPanelProps = { selectedBackgroundTask?: string | null } & React.ComponentProps -const sectionTitles = { - knowledge: "Knowledge", - tasks: "Chats", -} +const sectionTabs: { id: ActiveSection; label: string }[] = [ + { id: "tasks", label: "Chat" }, + { id: "knowledge", label: "Knowledge" }, +] function formatEventTime(ts: string): string { const date = new Date(ts) @@ -199,7 +206,7 @@ function SyncStatusBar() { {!isMobile && isCollapsed && isSyncing && (
@@ -256,13 +263,28 @@ export function SidebarContentPanel({ selectedBackgroundTask, ...props }: SidebarContentPanelProps) { - const { activeSection } = useSidebarSection() + const { activeSection, setActiveSection } = useSidebarSection() return ( -
- {sectionTitles[activeSection]} +
+
+ {sectionTabs.map((tab) => ( + + ))} +
@@ -286,6 +308,26 @@ export function SidebarContentPanel({ /> )} + {/* Bottom actions */} +
+
+ + + + + + + + + +
+
diff --git a/apps/x/apps/renderer/src/components/sidebar-icon.tsx b/apps/x/apps/renderer/src/components/sidebar-icon.tsx deleted file mode 100644 index 54aa0622..00000000 --- a/apps/x/apps/renderer/src/components/sidebar-icon.tsx +++ /dev/null @@ -1,94 +0,0 @@ -"use client" - -import * as React from "react" -import { - Brain, - HelpCircle, - MessageSquare, - Plug, - Settings, -} from "lucide-react" - -import { cn } from "@/lib/utils" -import { - Tooltip, - TooltipContent, - TooltipTrigger, -} from "@/components/ui/tooltip" -import { type ActiveSection, useSidebarSection } from "@/contexts/sidebar-context" -import { ConnectorsPopover } from "@/components/connectors-popover" -import { HelpPopover } from "@/components/help-popover" -import { SettingsDialog } from "@/components/settings-dialog" - -type NavItem = { - id: ActiveSection - title: string - icon: React.ElementType -} - -const navItems: NavItem[] = [ - { id: "tasks", title: "Chats", icon: MessageSquare }, - { id: "knowledge", title: "Knowledge", icon: Brain }, -] - -export function SidebarIcon() { - const { activeSection, setActiveSection } = useSidebarSection() - - return ( -
- {/* Main navigation */} - - - {/* Secondary navigation (bottom) */} - -
- ) -}