From ce45339c0db11c83b7d509a030126ce91768051f Mon Sep 17 00:00:00 2001 From: "dayuan.jiang" Date: Mon, 10 Nov 2025 10:28:37 +0900 Subject: [PATCH] fix: enhance file handling and UI improvements in chat and file preview components --- .claude/settings.local.json | 3 ++- components/chat-example-panel.tsx | 6 ++++-- components/chat-panel.tsx | 19 +++++++++++-------- components/file-preview-list.tsx | 9 +++++---- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 8fcc355..f0acd5e 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -5,7 +5,8 @@ "WebFetch(domain:ai-sdk.dev)", "mcp__ide__getDiagnostics", "Bash(npx tsc:*)", - "WebFetch(domain:sdk.vercel.ai)" + "WebFetch(domain:sdk.vercel.ai)", + "Bash(npm run build:*)" ], "deny": [], "ask": [] diff --git a/components/chat-example-panel.tsx b/components/chat-example-panel.tsx index 2c48263..68599ea 100644 --- a/components/chat-example-panel.tsx +++ b/components/chat-example-panel.tsx @@ -30,7 +30,9 @@ export default function ExamplePanel({ // Fetch the architecture image const response = await fetch("/architecture.png"); const blob = await response.blob(); - const file = new File([blob], "architecture.png", { type: "image/png" }); + const file = new File([blob], "architecture.png", { + type: "image/png", + }); // Set the file to the files state setFiles([file]); @@ -54,7 +56,7 @@ export default function ExamplePanel({ className="text-xs bg-gray-100 hover:bg-gray-200 text-gray-800 font-medium py-1 px-2 rounded" onClick={handleReplicateArchitecture} > - Replicate this in aws style + Create this diagram in aws style -
+
Preview e.stopPropagation()} />