fix(web): 提交遗漏的文件
This commit is contained in:
@@ -4,12 +4,11 @@ import {fetchEventSource} from '@echofly/fetch-event-source'
|
|||||||
import {useMount} from 'ahooks'
|
import {useMount} from 'ahooks'
|
||||||
import {Button, Collapse, Flex, Popover, Radio, Typography} from 'antd'
|
import {Button, Collapse, Flex, Popover, Radio, Typography} from 'antd'
|
||||||
import {isEqual, isStrBlank, trim} from 'licia'
|
import {isEqual, isStrBlank, trim} from 'licia'
|
||||||
import markdownIt from 'markdown-it'
|
|
||||||
import {useRef, useState} from 'react'
|
import {useRef, useState} from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import {commonInfo} from '../../util/amis.tsx'
|
import {commonInfo} from '../../util/amis.tsx'
|
||||||
|
import MarkdownRender from '../../util/Markdown.tsx'
|
||||||
|
|
||||||
const md = markdownIt({html: true, breaks: true})
|
|
||||||
const ConversationDiv = styled.div`
|
const ConversationDiv = styled.div`
|
||||||
height: calc(100vh - 76px);
|
height: calc(100vh - 76px);
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -117,9 +116,9 @@ function Conversation() {
|
|||||||
messageRender: item => {
|
messageRender: item => {
|
||||||
let content = '', reason = ''
|
let content = '', reason = ''
|
||||||
if (!isStrBlank(item['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 (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{isStrBlank(reason)
|
{isStrBlank(reason)
|
||||||
@@ -132,16 +131,12 @@ function Conversation() {
|
|||||||
key: 0,
|
key: 0,
|
||||||
label: '思考链',
|
label: '思考链',
|
||||||
children: (
|
children: (
|
||||||
<Typography>
|
<MarkdownRender content={reason}/>
|
||||||
<div dangerouslySetInnerHTML={{__html: reason}}/>
|
|
||||||
</Typography>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>}
|
/>}
|
||||||
<Typography>
|
<MarkdownRender content={content}/>
|
||||||
<div dangerouslySetInnerHTML={{__html: content}}/>
|
|
||||||
</Typography>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user