import { PlusIcon, TrashIcon } from "@heroicons/react/20/solid"; import { DateTime } from "~/components/primitives/DateTime"; import { Paragraph } from "~/components/primitives/Paragraph"; import { cn } from "~/utils/cn"; // Date fields arrive as strings over the loader's JSON. export type DashboardAgentChat = { id: string; title: string; lastMessageAt: string | null; updatedAt: string; }; export function DashboardAgentHistory({ chats, currentChatId, onSelect, onNewChat, onDelete, }: { chats: DashboardAgentChat[]; currentChatId: string; onSelect: (chatId: string) => void; onNewChat: () => void; onDelete: (chatId: string) => void; }) { return (
{chats.length === 0 ? ( No previous chats yet. ) : (
    {chats.map((chat) => (
  1. ))}
)}
); }