Feat: Modify the style of the agent page bright theme #3221 (#9162)

### What problem does this PR solve?

Feat: Modify the style of the agent page bright theme #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-08-01 17:55:35 +08:00
committed by GitHub
parent 6591031bad
commit 8fd12b670e
26 changed files with 180 additions and 103 deletions

View File

@ -13,15 +13,16 @@ import remarkMath from 'remark-math';
import 'katex/dist/katex.min.css'; // `rehype-katex` does not import the CSS for you
import { preprocessLaTeX } from '@/utils/chat';
import { useIsDarkTheme } from '../theme-provider';
import styles from './index.less';
const HightLightMarkdown = ({
children,
dark = false,
}: {
children: string | null | undefined;
dark?: boolean;
}) => {
const isDarkTheme = useIsDarkTheme();
return (
<Markdown
remarkPlugins={[remarkGfm, remarkMath]}
@ -37,7 +38,7 @@ const HightLightMarkdown = ({
{...rest}
PreTag="div"
language={match[1]}
style={dark ? oneDark : oneLight}
style={isDarkTheme ? oneDark : oneLight}
>
{String(children).replace(/\n$/, '')}
</SyntaxHighlighter>