mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-29 14:57:35 +00:00
fix: duplicate dependence & pick gpt-vis upgrade
This commit is contained in:
parent
0d0fbeb457
commit
f070db8db8
@ -77,7 +77,7 @@ For full documentation, visit [document](https://docs.dbgpt.site/).
|
||||
|
||||
|
||||
## Usage
|
||||
[react-markdown](https://github.com/remarkjs/react-markdown#readme) for markdown support.
|
||||
[gpt-vis](https://github.com/eosphoros-ai/DB-GPT/gpt-vis) for markdown support.
|
||||
[ant-design](https://github.com/ant-design/ant-design) for ui components.
|
||||
[next.js](https://github.com/vercel/next.js) for server side rendering.
|
||||
[@antv/g2](https://github.com/antvis/g2#readme) for charts.
|
||||
|
@ -13,8 +13,8 @@ import { GPTVis } from '@antv/gpt-vis';
|
||||
import { Tag } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { PropsWithChildren, ReactNode, memo, useContext, useMemo } from 'react';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import rehypeRaw from 'rehype-raw';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import { renderModelIcon } from '../header/model-selector';
|
||||
import markdownComponents from './config';
|
||||
|
||||
@ -131,9 +131,9 @@ function ChatContent({ children, content, isChartChat, onLinkClick }: PropsWithC
|
||||
</div>
|
||||
{result ? (
|
||||
<div className='px-4 md:px-6 py-4 text-sm'>
|
||||
<ReactMarkdown components={markdownComponents} rehypePlugins={[rehypeRaw]}>
|
||||
<GPTVis components={markdownComponents} rehypePlugins={[rehypeRaw]} remarkPlugins={[remarkGfm]}>
|
||||
{result ?? ''}
|
||||
</ReactMarkdown>
|
||||
</GPTVis>
|
||||
</div>
|
||||
) : (
|
||||
<div className='px-4 md:px-6 py-4 text-sm'>{err_msg}</div>
|
||||
@ -172,7 +172,11 @@ function ChatContent({ children, content, isChartChat, onLinkClick }: PropsWithC
|
||||
)}
|
||||
{/* Markdown */}
|
||||
{isRobot && typeof context === 'string' && (
|
||||
<GPTVis components={{ ...markdownComponents, ...extraMarkdownComponents }} rehypePlugins={[rehypeRaw]}>
|
||||
<GPTVis
|
||||
components={{ ...markdownComponents, ...extraMarkdownComponents }}
|
||||
rehypePlugins={[rehypeRaw]}
|
||||
remarkPlugins={[remarkGfm]}
|
||||
>
|
||||
{formatMarkdownVal(value)}
|
||||
</GPTVis>
|
||||
)}
|
||||
|
@ -53,33 +53,23 @@
|
||||
"cytoscape": "^3.29.2",
|
||||
"cytoscape-euler": "^1.2.2",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"framer-motion": "^10.16.4",
|
||||
"google-auth-library": "^9.2.0",
|
||||
"google-one-tap": "^1.0.6",
|
||||
"dayjs": "^1.11.12",
|
||||
"i18next": "^23.4.5",
|
||||
"iron-session": "^6.3.1",
|
||||
"iron-session": "^6.3.1",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^14.1.0",
|
||||
"markdown-it": "^14.1.0",
|
||||
"moment": "^2.29.4",
|
||||
"monaco-editor": ">=0.31.0",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"mysql2": "^3.6.2",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"mysql2": "^3.6.2",
|
||||
"next": "13.4.7",
|
||||
"next-auth": "^4.20.1",
|
||||
"next-connect": "^1.0.0-next.4",
|
||||
"next-transpile-modules": "^10.0.1",
|
||||
"next-connect": "^1.0.0-next.4",
|
||||
"next-transpile-modules": "^10.0.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-i18next": "^13.2.0",
|
||||
"react-markdown": "^8.0.7",
|
||||
"react-markdown-editor-lite": "^1.3.4",
|
||||
"react-syntax-highlighter": "^15.5.0",
|
||||
"react-virtualized": "^9.22.5",
|
||||
@ -127,5 +117,20 @@
|
||||
"*.{json,md}": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"resolutions": {
|
||||
"d3-color": "2",
|
||||
"d3-array": "2",
|
||||
"d3-shape": "2",
|
||||
"d3-path": "2",
|
||||
"d3-dsv": "2",
|
||||
"d3-hierarchy": "2",
|
||||
"d3-scale-chromatic": "2",
|
||||
"d3-format": "2",
|
||||
"d3-timer": "2",
|
||||
"d3-dispatch": "2",
|
||||
"d3-quadtree": "2",
|
||||
"d3-force": "2",
|
||||
"d3-geo": "2"
|
||||
}
|
||||
}
|
||||
|
1054
web/yarn.lock
1054
web/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user