fix: markdown

This commit is contained in:
archer
2023-06-14 20:58:11 +08:00
parent 07f8e18c10
commit 7c159d8aba
4 changed files with 3 additions and 36 deletions

View File

@@ -50,7 +50,6 @@
"react-markdown": "^8.0.5",
"react-syntax-highlighter": "^15.5.0",
"rehype-katex": "^6.0.2",
"remark-breaks": "^3.0.3",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1",
"request-ip": "^3.3.0",

22
client/pnpm-lock.yaml generated
View File

@@ -128,9 +128,6 @@ dependencies:
rehype-katex:
specifier: ^6.0.2
version: registry.npmmirror.com/rehype-katex@6.0.2
remark-breaks:
specifier: ^3.0.3
version: registry.npmmirror.com/remark-breaks@3.0.3
remark-gfm:
specifier: ^3.0.1
version: registry.npmmirror.com/remark-gfm@3.0.1
@@ -9401,15 +9398,6 @@ packages:
mdast-util-to-markdown: registry.npmmirror.com/mdast-util-to-markdown@1.5.0
dev: false
registry.npmmirror.com/mdast-util-newline-to-break@1.0.0:
resolution: {integrity: sha512-491LcYv3gbGhhCrLoeALncQmega2xPh+m3gbsIhVsOX4sw85+ShLFPvPyibxc1Swx/6GtzxgVodq+cGa/47ULg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/mdast-util-newline-to-break/-/mdast-util-newline-to-break-1.0.0.tgz}
name: mdast-util-newline-to-break
version: 1.0.0
dependencies:
'@types/mdast': registry.npmmirror.com/@types/mdast@3.0.11
mdast-util-find-and-replace: registry.npmmirror.com/mdast-util-find-and-replace@2.2.2
dev: false
registry.npmmirror.com/mdast-util-phrasing@3.0.1:
resolution: {integrity: sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz}
name: mdast-util-phrasing
@@ -11052,16 +11040,6 @@ packages:
unified: registry.npmmirror.com/unified@10.1.2
dev: false
registry.npmmirror.com/remark-breaks@3.0.3:
resolution: {integrity: sha512-C7VkvcUp1TPUc2eAYzsPdaUh8Xj4FSbQnYA5A9f80diApLZscTDeG7efiWP65W8hV2sEy3JuGVU0i6qr5D8Hug==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/remark-breaks/-/remark-breaks-3.0.3.tgz}
name: remark-breaks
version: 3.0.3
dependencies:
'@types/mdast': registry.npmmirror.com/@types/mdast@3.0.11
mdast-util-newline-to-break: registry.npmmirror.com/mdast-util-newline-to-break@1.0.0
unified: registry.npmmirror.com/unified@10.1.2
dev: false
registry.npmmirror.com/remark-gfm@3.0.1:
resolution: {integrity: sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/remark-gfm/-/remark-gfm-3.0.1.tgz}
name: remark-gfm

View File

@@ -1,15 +1,7 @@
### 常见问题
**Git 地址**
[项目地址,完全开源,随便用。](https://github.com/c121914yu/FastGPT)
**问题文档**
[先看文档,再提问](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh)
**删除和复制**
电脑端:聊天内容右侧有复制和删除的图标。
移动端:点击对话头像,可以选择复制或删除该条内容。
**Git 地址**: [项目地址,完全开源,随便用。](https://github.com/c121914yu/FastGPT)
**问题文档**: [先看文档,再提问](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh)
**价格表**
如果使用了自己的 Api Key网页上 openai 模型聊天不会计费。可以在账号页,看到详细账单。
| 计费项 | 价格: 元/ 1K tokens包含上下文|
@@ -21,7 +13,6 @@
| 文件拆分 | 0.025 |
**其他问题**
请 WX 联系: YNyiqi
| 交流群 | 小助手 |
| ----------------------- | -------------------- |
| ![](https://otnvvf-imgs.oss.laf.run/wxqun300.jpg) | ![](https://otnvvf-imgs.oss.laf.run/wx300.jpg) |

View File

@@ -3,7 +3,6 @@ import ReactMarkdown from 'react-markdown';
import { formatLinkText } from '@/utils/tools';
import remarkGfm from 'remark-gfm';
import remarkMath from 'remark-math';
import remarkBreaks from 'remark-breaks';
import rehypeKatex from 'rehype-katex';
import 'katex/dist/katex.min.css';
@@ -30,7 +29,7 @@ const Markdown = ({
className={`markdown ${styles.markdown}
${isChatting ? (source === '' ? styles.waitingAnimation : styles.animation) : ''}
`}
remarkPlugins={[remarkGfm, remarkMath, remarkBreaks]}
remarkPlugins={[remarkGfm, remarkMath]}
rehypePlugins={[rehypeKatex]}
components={{
pre: 'div',