"use client"; import { useTranslations } from "next-intl"; import { Plus } from "lucide-react"; import { Button } from "../../../../shadcnui"; import { MicroLabel } from "../../../../components/typography"; import type { AssistantInterface } from "../../data/AssistantInterface"; import { groupThreadsByBucket } from "../../utils/groupThreadsByBucket"; interface Props { threads: AssistantInterface[]; activeId?: string; onSelect: (id: string) => void; onNew: () => void; } export function AssistantSidebar({ threads, activeId, onSelect, onNew }: Props) { const t = useTranslations(); const groups = groupThreadsByBucket(threads); const renderSection = (label: string, items: AssistantInterface[]) => { if (items.length === 0) return null; return (