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