fix(attachment-local): keep reference field order stable for logged fixtures

The canonical ref serializes mediaType, width, height, bytes in the order the
pre-canonicalization store used, so existing session-log fixtures and logged
histories keep byte-identical reference JSON.
This commit is contained in:
creatixchu committed 2026-08-21 15:01:45 +08:00
1 parent 6e17c20804
commit c6fa512e15
1 file changed
+1 -1
@@ -203,9 +203,9 @@ export async function saveImageFile(
ref: {
attachmentId: AttachmentId(`sha256:${sha256}`),
mediaType: canonical.mediaType,
bytes: canonical.data.byteLength,
width: canonical.width,
height: canonical.height,
bytes: canonical.data.byteLength,
...(name !== undefined ? { name } : {}),
},
source: metadata,