From 554ae2b01f627fef497d0daad7fe2e258160b8c2 Mon Sep 17 00:00:00 2001 From: DigHuang <114602213+DigHuang@users.noreply.github.com> Date: Thu, 12 Mar 2026 18:09:17 +0800 Subject: [PATCH] feat(file): make `FileCard` clickable to open the attached file and hover styles (#441) --- src/pages/Chat/ChatMessage.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/pages/Chat/ChatMessage.tsx b/src/pages/Chat/ChatMessage.tsx index 7a96a48f7..5f373446d 100644 --- a/src/pages/Chat/ChatMessage.tsx +++ b/src/pages/Chat/ChatMessage.tsx @@ -431,8 +431,21 @@ function FileIcon({ mimeType, className }: { mimeType: string; className?: strin } function FileCard({ file }: { file: AttachedFileMeta }) { + const handleOpen = useCallback(() => { + if (file.filePath) { + invokeIpc('shell:openPath', file.filePath); + } + }, [file.filePath]); + return ( -
{file.fileName}