@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.
@@ -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
- metadata: Object.keys(metadata).length > 0 ? metadata : void 0,
2191
- thumbnail: attachment.thumbnail
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
- ...metadata?.width && { width: metadata.width },
2365
- ...metadata?.height && { height: metadata.height }
2364
+ ...width && { width },
2365
+ ...height && { height }
2366
2366
  };
2367
2367
  }
2368
2368
  var path_default = defineController(async ({ req, params, env }) => {