From 69f0bed9a1e020b20da632d867072c2e23a8f38d Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Sun, 8 Jun 2025 02:42:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E6=8F=90=E4=BA=A4=E9=81=97?= =?UTF-8?q?=E6=BC=8F=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service-web/client/src/pages/ai/Conversation.tsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/service-web/client/src/pages/ai/Conversation.tsx b/service-web/client/src/pages/ai/Conversation.tsx index f31e32e..ad1a229 100644 --- a/service-web/client/src/pages/ai/Conversation.tsx +++ b/service-web/client/src/pages/ai/Conversation.tsx @@ -4,12 +4,11 @@ import {fetchEventSource} from '@echofly/fetch-event-source' import {useMount} from 'ahooks' import {Button, Collapse, Flex, Popover, Radio, Typography} from 'antd' import {isEqual, isStrBlank, trim} from 'licia' -import markdownIt from 'markdown-it' import {useRef, useState} from 'react' import styled from 'styled-components' import {commonInfo} from '../../util/amis.tsx' +import MarkdownRender from '../../util/Markdown.tsx' -const md = markdownIt({html: true, breaks: true}) const ConversationDiv = styled.div` height: calc(100vh - 76px); display: flex; @@ -117,9 +116,9 @@ function Conversation() { messageRender: item => { let content = '', reason = '' if (!isStrBlank(item['reason'])) { - reason = `${trim(md.render(item['reason']))}` + reason = trim(item['reason']) } - content = trim(md.render(item['content'])) + content = trim(item['content']) return (
{isStrBlank(reason) @@ -132,16 +131,12 @@ function Conversation() { key: 0, label: '思考链', children: ( - -
- + ), }, ]} />} - -
- +
) },