This commit is contained in:
Julius Marminge committed 2026-02-28 23:05:58 -08:00
1 parent d3d0a08237
commit 44e409f9c6
2 files changed
+7 -18

No files matched your search

-1
View File
@@ -1,7 +1,6 @@
import fs from "node:fs";
import http from "node:http";
import path from "node:path";
export { IMAGE_EXTENSION_BY_MIME_TYPE, SAFE_IMAGE_FILE_EXTENSIONS } from "./imageMime.ts";
export const ATTACHMENTS_ROUTE_PREFIX = "/attachments";
+7 -17
View File
@@ -1486,23 +1486,13 @@ export default function ChatView({ threadId }: ChatViewProps) {
const messageIdForSend = newMessageId();
const messageCreatedAt = new Date().toISOString();
const turnAttachmentsPromise = Promise.all(
composerImagesSnapshot.map(
async (
image,
): Promise<{
type: "image";
name: string;
mimeType: string;
sizeBytes: number;
dataUrl: string;
}> => ({
type: "image",
name: image.name,
mimeType: image.mimeType,
sizeBytes: image.sizeBytes,
dataUrl: await readFileAsDataUrl(image.file),
}),
),
composerImagesSnapshot.map(async (image) => ({
type: "image" as const,
name: image.name,
mimeType: image.mimeType,
sizeBytes: image.sizeBytes,
dataUrl: await readFileAsDataUrl(image.file),
})),
);
const optimisticAttachments = composerImagesSnapshot.map((image) => ({
type: "image" as const,