| ... | ... | @@ -710,8 +710,13 @@ export default function ChatView({ threadId }: ChatViewProps) { |
| 710 | 710 | } |
| 711 | 711 | |
| 712 | 712 | let changed = false; |
| 713 | | const attachments = message.attachments.map((attachment, index) => { |
| 714 | | const handoffPreviewUrl = handoffPreviewUrls[index]; |
| 713 | let imageIndex = 0; |
| 714 | const attachments = message.attachments.map((attachment) => { |
| 715 | if (attachment.type !== "image") { |
| 716 | return attachment; |
| 717 | } |
| 718 | const handoffPreviewUrl = handoffPreviewUrls[imageIndex]; |
| 719 | imageIndex += 1; |
| 715 | 720 | if (!handoffPreviewUrl || attachment.previewUrl === handoffPreviewUrl) { |
| 716 | 721 | return attachment; |
| 717 | 722 | } |