"use client"; import { MessageSquarePlus, Trash2 } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useI18n, type TranslateFn } from "@/i18n/i18n-context"; import { cn } from "@/lib/utils"; import type { ChatSession } from "@/hooks/use-chat-history"; import { ChatHistoryTransfer } from "./chat-history-transfer"; interface ChatHistorySidebarProps { sessions: ChatSession[]; activeSessionId: string | null; onNewSession: () => void; onSelectSession: (id: string) => void; onDeleteSession: (id: string) => void; onClearAll: () => void; activeInstance?: string | null; transferDisabled?: boolean; } /** * Left-hand conversation list. Styled as a minimal rail (256px wide) so * the main chat column retains reading comfort. Each row shows the derived * title and relative timestamp; destructive actions are reveal-on-hover to * avoid accidental clicks. */ export function ChatHistorySidebar({ sessions, activeSessionId, onNewSession, onSelectSession, onDeleteSession, onClearAll, activeInstance = null, transferDisabled = false, }: ChatHistorySidebarProps) { const { t } = useI18n(); return ( ); } function SessionRow({ session, active, onSelect, onDelete, }: { session: ChatSession; active: boolean; onSelect: () => void; onDelete: () => void; }) { const { t } = useI18n(); const mountCount = session.config.mounts.length; return (