From 87bdf5be01ddf5472180dc8ba95e0674313635ea Mon Sep 17 00:00:00 2001 From: starmorph Date: Tue, 20 May 2025 13:54:39 -0700 Subject: [PATCH] file preview styling: full width -> wrap --- .../thread/ContentBlocksPreview.tsx | 2 +- .../{ui => thread}/MultimodalPreview.tsx | 33 +++++++------------ src/components/thread/messages/human.tsx | 2 +- 3 files changed, 14 insertions(+), 23 deletions(-) rename src/components/{ui => thread}/MultimodalPreview.tsx (80%) diff --git a/src/components/thread/ContentBlocksPreview.tsx b/src/components/thread/ContentBlocksPreview.tsx index 0ee6664..c9703f1 100644 --- a/src/components/thread/ContentBlocksPreview.tsx +++ b/src/components/thread/ContentBlocksPreview.tsx @@ -1,6 +1,6 @@ import React from "react"; import type { Base64ContentBlock } from "@langchain/core/messages"; -import { MultimodalPreview } from "../ui/MultimodalPreview"; +import { MultimodalPreview } from "./MultimodalPreview"; import { cn } from "@/lib/utils"; interface ContentBlocksPreviewProps { diff --git a/src/components/ui/MultimodalPreview.tsx b/src/components/thread/MultimodalPreview.tsx similarity index 80% rename from src/components/ui/MultimodalPreview.tsx rename to src/components/thread/MultimodalPreview.tsx index a64ee41..0f55573 100644 --- a/src/components/ui/MultimodalPreview.tsx +++ b/src/components/thread/MultimodalPreview.tsx @@ -18,15 +18,6 @@ export const MultimodalPreview: React.FC = ({ className, size = "md", }) => { - // Sizing - const sizeMap = { - sm: "h-10 w-10 text-base", - md: "h-16 w-16 text-lg", - lg: "h-24 w-24 text-xl", - }; - const iconSize: string = - typeof sizeMap[size] === "string" ? sizeMap[size] : sizeMap["md"]; - // Image block if ( block.type === "image" && @@ -72,28 +63,28 @@ export const MultimodalPreview: React.FC = ({ return (
- +
+ +
{String(filename)} {removable && (