fix: ensure file list button click handler works properly

This commit is contained in:
Your Name 2026-01-26 21:52:28 +08:00
parent acc28658d4
commit 259f45740e

View File

@ -331,7 +331,13 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
variant="ghost"
size="icon"
className="h-8 w-8 rounded-full hover:bg-muted"
onClick={onOpenFileList}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
if (onOpenFileList) {
onOpenFileList();
}
}}
title="已生成文件列表"
>
<LayoutGrid className="h-4 w-4" />