From 93b359fd690451632ce0c5e8b410d06b98403cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= Date: Sat, 31 Jan 2026 00:37:51 +0100 Subject: [PATCH] ui: tweaks --- src/components/AIViewer.tsx | 66 +++--------------------- src/components/nostr/MarkdownContent.tsx | 20 +++++++ 2 files changed, 27 insertions(+), 59 deletions(-) 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 }) => ( -
    - ), - ol: ({ ...props }) => ( -
      - ), - a: ({ href, children, ...props }) => ( - - {children} - - ), - }} - > - {message.content} - +
      +
      )}
@@ -422,8 +370,8 @@ function ChatPanel({ return ( <> -
-
+
+
{displayMessages.length === 0 && !showThinking ? (
Start a conversation @@ -440,8 +388,8 @@ function ChatPanel({
-
-
+
+