fix: restore download button when file type is selected in agent message (#17184)

This commit is contained in:
euvre
2026-07-22 19:21:17 +08:00
committed by GitHub
parent 1aaa200471
commit 2f7dc60337
4 changed files with 21 additions and 30 deletions

View File

@@ -315,32 +315,6 @@ function MessageItem({
))}
</div>
)}
{/* {isAssistant && item.attachment && item.attachment.doc_id && (
<div className="w-full flex items-center justify-end">
<Button
variant="link"
className="p-1 m-0 h-auto text-text-sub-title-invert"
onClick={async () => {
if (item.attachment?.doc_id) {
try {
const response = await downloadFile({
docId: item.attachment.doc_id,
ext: item.attachment.format,
});
const blob = new Blob([response.data], {
type: response.data.type,
});
downloadFileFromBlob(blob, item.attachment.file_name);
} catch (error) {
console.error('Download failed:', error);
}
}
}}
>
<Download size={16} />
</Button>
</div>
)} */}
</section>
</div>
</section>