mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-29 06:47:30 +00:00
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com> Co-authored-by: 谨欣 <echo.cmy@antgroup.com> Co-authored-by: 严志勇 <yanzhiyong@tiansuixiansheng.com> Co-authored-by: yanzhiyong <932374019@qq.com>
16 lines
479 B
TypeScript
16 lines
479 B
TypeScript
import markdownComponents from '@/components/chat/chat-content/config';
|
|
import { GPTVis } from '@antv/gpt-vis';
|
|
import React from 'react';
|
|
import rehypeRaw from 'rehype-raw';
|
|
import remarkGfm from 'remark-gfm';
|
|
|
|
const MarkDownContext: React.FC<{ children: string }> = ({ children }) => {
|
|
return (
|
|
<GPTVis components={{ ...markdownComponents }} rehypePlugins={[rehypeRaw]} remarkPlugins={[remarkGfm]}>
|
|
{children}
|
|
</GPTVis>
|
|
);
|
|
};
|
|
|
|
export default MarkDownContext;
|