| ... | @@ -1486,23 +1486,13 @@ export default function ChatView({ threadId }: ChatViewProps) { | ... | @@ -1486,23 +1486,13 @@ export default function ChatView({ threadId }: ChatViewProps) { |
| 1486 | const messageIdForSend = newMessageId(); | 1486 | const messageIdForSend = newMessageId(); |
| 1487 | const messageCreatedAt = new Date().toISOString(); | 1487 | const messageCreatedAt = new Date().toISOString(); |
| 1488 | const turnAttachmentsPromise = Promise.all( | 1488 | const turnAttachmentsPromise = Promise.all( |
| 1489 | composerImagesSnapshot.map( | 1489 | composerImagesSnapshot.map(async (image) => ({ |
| 1490 | async ( | 1490 | type: "image" as const, |
| 1491 | image, | 1491 | name: image.name, |
| 1492 | ): Promise<{ | 1492 | mimeType: image.mimeType, |
| 1493 | type: "image"; | 1493 | sizeBytes: image.sizeBytes, |
| 1494 | name: string; | 1494 | dataUrl: await readFileAsDataUrl(image.file), |
| 1495 | mimeType: string; | 1495 | })), |
| 1496 | sizeBytes: number; | | |
| 1497 | dataUrl: string; | | |
| 1498 | }> => ({ | | |
| 1499 | type: "image", | | |
| 1500 | name: image.name, | | |
| 1501 | mimeType: image.mimeType, | | |
| 1502 | sizeBytes: image.sizeBytes, | | |
| 1503 | dataUrl: await readFileAsDataUrl(image.file), | | |
| 1504 | }), | | |
| 1505 | ), | | |
| 1506 | ); | 1496 | ); |
| 1507 | const optimisticAttachments = composerImagesSnapshot.map((image) => ({ | 1497 | const optimisticAttachments = composerImagesSnapshot.map((image) => ({ |
| 1508 | type: "image" as const, | 1498 | type: "image" as const, |