diff --git a/client/src/components/Artifacts/Thinking.tsx b/client/src/components/Artifacts/Thinking.tsx
index 08e241c6e8..17ed3a0d37 100644
--- a/client/src/components/Artifacts/Thinking.tsx
+++ b/client/src/components/Artifacts/Thinking.tsx
@@ -1,7 +1,8 @@
-import { useState, useMemo, memo, useCallback } from 'react';
+import React, { useState, useMemo, memo, useCallback } from 'react';
import { useRecoilValue } from 'recoil';
import { Atom, ChevronDown } from 'lucide-react';
import type { MouseEvent, FC } from 'react';
+import Markdown from '~/components/Chat/Messages/Content/Markdown';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';
import store from '~/store';
@@ -21,12 +22,18 @@ const CONTENT_STYLES = {
} as const;
export const ThinkingContent: FC<{ children: React.ReactNode; isPart?: boolean }> = memo(
- ({ isPart, children }) => (
-
- ),
+ ({ isPart, children }) => {
+ return (
+
+
+ {typeof children === 'string' ? (
+
+ ) : (
+
{children}
+ )}
+
+ );
+ },
);
export const ThinkingButton = memo(
diff --git a/client/src/components/Chat/Messages/Content/Markdown.tsx b/client/src/components/Chat/Messages/Content/Markdown.tsx
index e01de091c7..45bd0e2aea 100644
--- a/client/src/components/Chat/Messages/Content/Markdown.tsx
+++ b/client/src/components/Chat/Messages/Content/Markdown.tsx
@@ -166,6 +166,46 @@ export const p: React.ElementType = memo(({ children }: TParagraphProps) => {
return {children}
;
});
+export const h1: React.ElementType = memo(({ children, ...props }: TParagraphProps) => {
+ return (
+
+ {children}
+
+ );
+});
+
+export const h2: React.ElementType = memo(({ children, ...props }: TParagraphProps) => {
+ return (
+
+ {children}
+
+ );
+});
+
+export const h3: React.ElementType = memo(({ children, ...props }: TParagraphProps) => {
+ return (
+
+ {children}
+
+ );
+});
+
+export const ol: React.ElementType = memo(({ children, ...props }: TParagraphProps) => {
+ return (
+
+ {children}
+
+ );
+});
+
+export const ul: React.ElementType = memo(({ children, ...props }: TParagraphProps) => {
+ return (
+
+ );
+});
+
const cursor = ' ';
type TContentProps = {
@@ -234,6 +274,11 @@ const Markdown = memo(({ content = '', showCursor, isLatestMessage }: TContentPr
code,
a,
p,
+ h1,
+ h2,
+ h3,
+ ol,
+ ul,
artifact: Artifact,
} as {
[nodeType: string]: React.ElementType;