diff --git a/chat-sdk/src/attachments.ts b/chat-sdk/src/attachments.ts index 5b2e2dc9b6..77da49c804 100644 --- a/chat-sdk/src/attachments.ts +++ b/chat-sdk/src/attachments.ts @@ -65,16 +65,16 @@ function dataUrlToBlob(dataUrl: string, fallbackType: string): Blob { return new Blob([bytes], { type: mediaType }) } -/** - * Put each attachment in the workspace's object storage and hand back what the agent reads. - * The key's turn prefix and per-file index keep two files with the same name, in this turn or - * an earlier one, from overwriting each other; the name stays the last segment. - */ /** Delete uploads no run will read. Best effort: a delete that fails leaves that object behind. */ export async function discardUploads(api: WindmillChatApi, uploaded: UploadedAttachment[]): Promise { await Promise.all(uploaded.map((u) => api.deleteFile(u.s3).catch(() => {}))) } +/** + * Put each attachment in the workspace's object storage and hand back what the agent reads. + * The key's turn prefix and per-file index keep two files with the same name, in this turn or + * an earlier one, from overwriting each other; the name stays the last segment. + */ export async function uploadAttachments( api: WindmillChatApi, attachments: AttachmentUpload[],