diff --git a/src/components/cloud-agent-next/ChatSidebar.tsx b/src/components/cloud-agent-next/ChatSidebar.tsx index 28d7c559ff..42096a3e7a 100644 --- a/src/components/cloud-agent-next/ChatSidebar.tsx +++ b/src/components/cloud-agent-next/ChatSidebar.tsx @@ -1,9 +1,8 @@ 'use client'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { Button } from '@/components/Button'; import { - Plus, + SquarePen, Search, SlidersHorizontal, MoreHorizontal, @@ -12,6 +11,7 @@ import { X, Pencil, } from 'lucide-react'; +import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'; import { TimeAgo } from '@/components/shared/TimeAgo'; import { usePathname, useRouter } from 'next/navigation'; import { isToday, isYesterday, startOfDay, differenceInCalendarDays, format } from 'date-fns'; @@ -358,83 +358,93 @@ export function ChatSidebar({
{/* Header */}
- - - {(onPlatformChange || onProjectChange) && ( - - - + + New session + +
+ + {(onPlatformChange || onProjectChange) && ( + + + + + + {onProjectChange && recentProjects.length > 0 && ( + <> + Project + onProjectChange(undefined)}> + + All projects + + {recentProjects.map(project => { + const isActive = projectFilter === project.gitUrl; + return ( + onProjectChange(project.gitUrl)} + > + + {project.displayName} + + ); + })} + )} - > - - - - - {onProjectChange && recentProjects.length > 0 && ( - <> - Project - onProjectChange(undefined)}> - - All projects - - {recentProjects.map(project => { - const isActive = projectFilter === project.gitUrl; - return ( - onProjectChange(project.gitUrl)} - > - - {project.displayName} - - ); - })} - - )} - {onPlatformChange && ( - <> - {onProjectChange && recentProjects.length > 0 && } - Platform - {PLATFORM_FILTERS.map(p => { - const isFilterActive = p === 'all' ? !platformFilter : platformFilter === p; - return ( - onPlatformChange(p === 'all' ? undefined : p)} - > - - {platformFilterLabel(p)} - - ); - })} - - )} - - - )} + {onPlatformChange && ( + <> + {onProjectChange && recentProjects.length > 0 && } + Platform + {PLATFORM_FILTERS.map(p => { + const isFilterActive = p === 'all' ? !platformFilter : platformFilter === p; + return ( + onPlatformChange(p === 'all' ? undefined : p)} + > + + {platformFilterLabel(p)} + + ); + })} + + )} + + + )} +
{/* Collapsible search */}