From 1c9705fcd93ce11f1eff76af631d24969bd7136f Mon Sep 17 00:00:00 2001 From: tianma-if Date: Thu, 23 Jul 2026 00:55:05 +0800 Subject: [PATCH] style(demo): default cat image size to small (35%) in demo seed notes --- apps/api/src/index.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index d49f34e4..7b70044f 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -5353,6 +5353,19 @@ const ensureDemoSeed = async ( } const contentJson = markdownToDoc(memo.markdown); + const applyDemoImageWidths = (nodes: any[]) => { + for (const node of nodes) { + if (node.type === "image") { + node.attrs = { ...node.attrs, width: 35 }; + } + if (Array.isArray(node.content)) { + applyDemoImageWidths(node.content); + } + } + }; + if (Array.isArray(contentJson.content)) { + applyDemoImageWidths(contentJson.content); + } const contentText = docToText(contentJson); const contentHash = await sha256(memo.markdown + JSON.stringify(contentJson));