@standardagents/builder 0.10.1-dev.8f03957 → 0.10.1-dev.cea2b66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/built-in-routes.js +7 -7
- package/dist/built-in-routes.js.map +1 -1
- package/dist/image-processing.d.ts +10 -6
- package/dist/image-processing.js +11 -138
- package/dist/image-processing.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +48 -161
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +6 -8
- package/dist/plugin.js.map +1 -1
- package/package.json +2 -5
package/dist/built-in-routes.js
CHANGED
|
@@ -2176,9 +2176,6 @@ var messages_post_default = defineController(async ({ req, params, env }) => {
|
|
|
2176
2176
|
}
|
|
2177
2177
|
const ext = mimeType === "image/png" ? "png" : mimeType === "image/jpeg" ? "jpg" : attachment.name.split(".").pop() || "bin";
|
|
2178
2178
|
const path = `/attachments/${timestamp}-${attachmentId}.${ext}`;
|
|
2179
|
-
const metadata = {};
|
|
2180
|
-
if (width) metadata.width = width;
|
|
2181
|
-
if (height) metadata.height = height;
|
|
2182
2179
|
const base64Size = fileData.length;
|
|
2183
2180
|
const binarySize = Math.ceil(base64Size * 3 / 4);
|
|
2184
2181
|
console.log(`[writeFile] Storing ${attachment.name}: ${(binarySize / 1024 / 1024).toFixed(2)}MB binary (${(base64Size / 1024 / 1024).toFixed(2)}MB base64) to ${path}`);
|
|
@@ -2187,8 +2184,9 @@ var messages_post_default = defineController(async ({ req, params, env }) => {
|
|
|
2187
2184
|
fileData,
|
|
2188
2185
|
mimeType,
|
|
2189
2186
|
{
|
|
2190
|
-
|
|
2191
|
-
|
|
2187
|
+
thumbnail: attachment.thumbnail,
|
|
2188
|
+
width,
|
|
2189
|
+
height
|
|
2192
2190
|
}
|
|
2193
2191
|
);
|
|
2194
2192
|
console.log(`[writeFile] Result:`, result.success ? "success" : result.error);
|
|
@@ -2353,6 +2351,8 @@ var stream_default = defineController(async ({ req, params, env }) => {
|
|
|
2353
2351
|
// src/api/threads/[id]/fs/[...path].ts
|
|
2354
2352
|
function toAttachmentRef(file) {
|
|
2355
2353
|
const metadata = file.metadata;
|
|
2354
|
+
const width = file.width ?? metadata?.width;
|
|
2355
|
+
const height = file.height ?? metadata?.height;
|
|
2356
2356
|
return {
|
|
2357
2357
|
id: file.path,
|
|
2358
2358
|
// Use path as unique ID
|
|
@@ -2361,8 +2361,8 @@ function toAttachmentRef(file) {
|
|
|
2361
2361
|
name: file.name,
|
|
2362
2362
|
mimeType: file.mimeType,
|
|
2363
2363
|
size: file.size,
|
|
2364
|
-
...
|
|
2365
|
-
...
|
|
2364
|
+
...width && { width },
|
|
2365
|
+
...height && { height }
|
|
2366
2366
|
};
|
|
2367
2367
|
}
|
|
2368
2368
|
var path_default = defineController(async ({ req, params, env }) => {
|