diff --git a/packages/web/src/components/chat/AttachmentRenderer.tsx b/packages/web/src/components/chat/AttachmentRenderer.tsx index 849225a6..4f6e6132 100644 --- a/packages/web/src/components/chat/AttachmentRenderer.tsx +++ b/packages/web/src/components/chat/AttachmentRenderer.tsx @@ -1,6 +1,7 @@ import React from 'react'; import type { Attachment } from '@backspace/shared'; import { useUIStore } from '../../stores/uiStore'; +import { useTransferStore } from '../../stores/transferStore'; import { Tooltip } from '../ui/Tooltip'; interface AttachmentRendererProps { @@ -13,13 +14,21 @@ function formatFileSize(bytes: number): string { return `${(bytes / 1048576).toFixed(1)} MB`; } +/** + * Resolves the displayable URL for an attachment. Same logic used by inline + * ``/`