|
|
@@ -777,8 +777,23 @@ export namespace SessionPrompt {
|
|
|
mime: contentItem.mimeType,
|
|
|
url: `data:${contentItem.mimeType};base64,${contentItem.data}`,
|
|
|
})
|
|
|
+ } else if (contentItem.type === "resource") {
|
|
|
+ const { resource } = contentItem
|
|
|
+ if (resource.text) {
|
|
|
+ textParts.push(resource.text)
|
|
|
+ }
|
|
|
+ if (resource.blob) {
|
|
|
+ attachments.push({
|
|
|
+ id: Identifier.ascending("part"),
|
|
|
+ sessionID: input.session.id,
|
|
|
+ messageID: input.processor.message.id,
|
|
|
+ type: "file",
|
|
|
+ mime: resource.mimeType ?? "application/octet-stream",
|
|
|
+ url: `data:${resource.mimeType ?? "application/octet-stream"};base64,${resource.blob}`,
|
|
|
+ filename: resource.uri,
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- // Add support for other types if needed
|
|
|
}
|
|
|
|
|
|
return {
|