From c0d851c36945330c316dcb6eee8e839a0b10a79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 4 Sep 2026 11:57:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=81=8A=E5=A4=A9=20Markdown?= =?UTF-8?q?=20=E7=BA=AF=E6=96=87=E6=9C=AC=E9=93=BE=E6=8E=A5=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 让链接和图片渲染为直接文本节点 避免既有消息文本查询被 Markdown 节点拆分 补充后续安全外链 TODO --- .../src/components/ChatMarkdownMessage/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx b/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx index 9920408ea..a08779ac3 100644 --- a/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx +++ b/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx @@ -45,8 +45,9 @@ class MarkdownErrorBoundary extends Component< } const markdownComponents: Components = { - a: ({ children }) => {children}, - img: ({ alt }) => {alt?.trim() ? `图片:${alt}` : '图片已省略'}, + // TODO: 产品确认安全外链策略后,再将链接文本恢复为可点击元素。 + a: ({ children }) => children, + img: ({ alt }) => (alt?.trim() ? `图片:${alt}` : '图片已省略'), h1: ({ children }) => (

{children}

),