import { Download, ExternalLink, Maximize } from "lucide-react"; import { AspectRatio } from "~/components/ui/aspect-ratio"; // Shadcn UI AspectRatio import { Button } from "~/components/ui/button"; // Shadcn UI Button import { Dialog, DialogClose, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "~/components/ui/dialog"; // Shadcn UI Dialog import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "~/components/ui/tooltip"; // Shadcn UI Tooltip import type { UploadedFile } from "~/lib/api/types"; // Adjust path as needed import { formatFileSize } from "~/lib/utils"; // Adjust path import { FileIcon } from "./file-icon"; interface ChatMessageAttachmentProps { file: UploadedFile; } export default function ChatMessageAttachment({ file, }: ChatMessageAttachmentProps) { if (file.contentType.startsWith("image/")) { return ; } return ; } function GenericFileAttachment({ file }: ChatMessageAttachmentProps) { return (

{file.filename}

{formatFileSize(file.size)}

Download Open in new tab
); } function ImageAttachment({ file }: ChatMessageAttachmentProps) { return (
{file.filename}

{file.filename} ({formatFileSize(file.size)})

{file.filename}
{file.filename}
); }