Merge branch 'main' into 'feature/mermaid-integration'

This commit is contained in:
ManishMadan2882
2025-05-07 03:44:47 +05:30
49 changed files with 1500 additions and 593 deletions

View File

@@ -5,10 +5,7 @@ import { useTranslation } from 'react-i18next';
import ReactMarkdown from 'react-markdown';
import { useSelector } from 'react-redux';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import {
oneLight,
vscDarkPlus,
} from 'react-syntax-highlighter/dist/cjs/styles/prism';
import { oneLight, vscDarkPlus } from 'react-syntax-highlighter/dist/cjs/styles/prism';
import rehypeKatex from 'rehype-katex';
import remarkGfm from 'remark-gfm';
import remarkMath from 'remark-math';
@@ -29,10 +26,7 @@ import CopyButton from '../components/CopyButton';
import Sidebar from '../components/Sidebar';
import SpeakButton from '../components/TextToSpeechButton';
import { useDarkTheme, useOutsideAlerter } from '../hooks';
import {
selectChunks,
selectSelectedDocs,
} from '../preferences/preferenceSlice';
import { selectChunks, selectSelectedDocs } from '../preferences/preferenceSlice';
import classes from './ConversationBubble.module.css';
import { FEEDBACK, MESSAGE_TYPE } from './conversationModels';
import { ToolCallsType } from './types';
@@ -414,7 +408,7 @@ const ConversationBubble = forwardRef<
{language}
</span>
<CopyButton
text={String(children).replace(/\n$/, '')}
textToCopy={String(children).replace(/\n$/, '')}
/>
</div>
<SyntaxHighlighter
@@ -512,7 +506,7 @@ const ConversationBubble = forwardRef<
${type !== 'ERROR' ? 'group-hover:lg:visible' : 'hidden'}`}
>
<div>
<CopyButton text={message} />
<CopyButton textToCopy={message} />
</div>
</div>
<div
@@ -721,7 +715,7 @@ function ToolCalls({ toolCalls }: { toolCalls: ToolCallsType[] }) {
Arguments
</span>{' '}
<CopyButton
text={JSON.stringify(toolCall.arguments, null, 2)}
textToCopy={JSON.stringify(toolCall.arguments, null, 2)}
/>
</p>
<p className="p-2 font-mono text-sm dark:tex dark:bg-[#222327] rounded-b-2xl break-words">
@@ -739,7 +733,7 @@ function ToolCalls({ toolCalls }: { toolCalls: ToolCallsType[] }) {
Response
</span>{' '}
<CopyButton
text={JSON.stringify(toolCall.result, null, 2)}
textToCopy={JSON.stringify(toolCall.result, null, 2)}
/>
</p>
<p className="p-2 font-mono text-sm dark:tex dark:bg-[#222327] rounded-b-2xl break-words">
@@ -816,7 +810,7 @@ function Thought({
{language}
</span>
<CopyButton
text={String(children).replace(/\n$/, '')}
textToCopy={String(children).replace(/\n$/, '')}
/>
</div>
<SyntaxHighlighter