diff --git a/ui/src/components/ChatFileCard.tsx b/ui/src/components/ChatFileCard.tsx
new file mode 100644
index 00000000..6fe241a3
--- /dev/null
+++ b/ui/src/components/ChatFileCard.tsx
@@ -0,0 +1,67 @@
+import { Download, File, FileCode, FileText, ImageIcon } from "lucide-react";
+import { cn } from "../lib/utils";
+import type { ChatFile } from "@paperclipai/shared";
+
+interface ChatFileCardProps {
+ file: ChatFile;
+ contentPath: string;
+ className?: string;
+}
+
+export function formatFileSize(bytes: number): string {
+ if (bytes < 1024) return `${bytes} B`;
+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
+}
+
+function FileIcon({ category }: { category: ChatFile["category"] }) {
+ const cls = "h-5 w-5 shrink-0 text-muted-foreground";
+ switch (category) {
+ case "image":
+ return