diff --git a/src/components/AIViewer.tsx b/src/components/AIViewer.tsx index 73000a1..86037b9 100644 --- a/src/components/AIViewer.tsx +++ b/src/components/AIViewer.tsx @@ -6,8 +6,6 @@ */ import { useState, useEffect, useCallback, useRef, memo } from "react"; -import ReactMarkdown from "react-markdown"; -import remarkGfm from "remark-gfm"; import { Loader2, PanelLeft, @@ -42,6 +40,7 @@ import { import { formatTimestamp } from "@/hooks/useLocale"; import { useGrimoire } from "@/core/state"; import { AIProvidersViewer } from "./AIProvidersViewer"; +import { MarkdownContent } from "./nostr/MarkdownContent"; import type { LLMMessage } from "@/types/llm"; const MOBILE_BREAKPOINT = 768; @@ -92,59 +91,8 @@ const MessageBubble = memo(function MessageBubble({ {message.content} ) : ( -
- ( -

- ), - code: ({ className, children, ...props }: any) => { - const isBlock = className?.includes("language-"); - if (isBlock) { - return ( -

-                        {children}
-                      
- ); - } - return ( - - {children} - - ); - }, - pre: ({ children }) => <>{children}, - ul: ({ ...props }) => ( -
@@ -422,8 +370,8 @@ function ChatPanel({ return ( <> -
-
+
+
{displayMessages.length === 0 && !showThinking ? (
Start a conversation @@ -440,8 +388,8 @@ function ChatPanel({
-
-
+
+