diff --git a/.maka-shots/chat-code-measure-after.png b/.maka-shots/chat-code-measure-after.png new file mode 100644 index 0000000000..a328505384 Binary files /dev/null and b/.maka-shots/chat-code-measure-after.png differ diff --git a/.maka-shots/chat-code-measure-before.png b/.maka-shots/chat-code-measure-before.png new file mode 100644 index 0000000000..d0735d5129 Binary files /dev/null and b/.maka-shots/chat-code-measure-before.png differ diff --git a/apps/desktop/src/renderer/maka-tokens.css b/apps/desktop/src/renderer/maka-tokens.css index 886634ff37..6780d4319f 100644 --- a/apps/desktop/src/renderer/maka-tokens.css +++ b/apps/desktop/src/renderer/maka-tokens.css @@ -943,6 +943,12 @@ fallbacks are redundant. */ --maka-chat-measure: 680px; + /* Astryx's AI Chat conversation uses an 800px message area while Markdown + keeps prose at 680px and lets code/tables fill the wider container. Keep + that exception transcript-scoped so the shared Maka surfaces above do not + change width as a side effect of making source evidence readable. */ + --maka-transcript-measure: 800px; + /* === settings ========================================================== One right-edge cap for a settings row's end slot — the read-only value and the control cluster share it, so the two kinds of row end stop at @@ -1507,7 +1513,7 @@ between-turn gap (.maka-chatContent) — one density, no between/within split. */ gap: var(--space-3); - max-width: var(--maka-chat-measure); + max-width: var(--maka-transcript-measure); margin: 0 auto; width: 100%; box-sizing: border-box; diff --git a/packages/ui/src/markdown-body.tsx b/packages/ui/src/markdown-body.tsx index 2f50c84b3f..2ea84a9711 100644 --- a/packages/ui/src/markdown-body.tsx +++ b/packages/ui/src/markdown-body.tsx @@ -221,6 +221,10 @@ function MarkdownCode(props: { ( + +
+ + + +
+
+ ), +}; + // Real path: 每日回顾 → a generated report that mixes headings, emphasis, a list, // a quote and a table. This is the document density — the Daily Review panel is // the caller that leaves `density` unset. (It was annotated as a chat answer,