mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-12-02 10:03:15 +00:00
fix: added renderer in answer bubble
This commit is contained in:
@@ -403,6 +403,15 @@ const ConversationBubble = forwardRef<
|
||||
const match = /language-(\w+)/.exec(className || '');
|
||||
const language = match ? match[1] : '';
|
||||
|
||||
if (language === 'mermaid') {
|
||||
return (
|
||||
<MermaidRenderer
|
||||
isDarkTheme={isDarkTheme}
|
||||
code={String(children)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return match ? (
|
||||
<div className="group relative rounded-[14px] overflow-hidden border border-light-silver dark:border-raisin-black">
|
||||
<div className="flex justify-between items-center px-2 py-1 bg-platinum dark:bg-eerie-black-2">
|
||||
@@ -792,15 +801,6 @@ function Thought({
|
||||
const match = /language-(\w+)/.exec(className || '');
|
||||
const language = match ? match[1] : '';
|
||||
|
||||
if (language === 'mermaid') {
|
||||
return (
|
||||
<MermaidRenderer
|
||||
isDarkTheme={isDarkTheme}
|
||||
code={String(children)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return match ? (
|
||||
<div className="group relative rounded-[14px] overflow-hidden border border-light-silver dark:border-raisin-black">
|
||||
<div className="flex justify-between items-center px-2 py-1 bg-platinum dark:bg-eerie-black-2">
|
||||
|
||||
Reference in New Issue
Block a user