diff --git a/packages/webui/components/chatbot-sidebar.tsx b/packages/webui/components/chatbot-sidebar.tsx index 705a2618..7a78c01e 100644 --- a/packages/webui/components/chatbot-sidebar.tsx +++ b/packages/webui/components/chatbot-sidebar.tsx @@ -7,6 +7,7 @@ import type { ChatMessage } from '@shumai/dtos' import { ArrowLeft, ArrowUp, Bot, History, Loader2, Plus, Trash2 } from 'lucide-react' import { useEffect, useRef, useState } from 'react' import Markdown from 'react-markdown' +import { formatTimeAgo } from '../lib/time' interface ChatbotSidebarProps { projectId: string @@ -135,7 +136,19 @@ export function ChatbotSidebar({ projectId, contextAssetId }: ChatbotSidebarProp return (
- {preprocessMarkdown(getMessageText(msg.content))} + tag + pre: ({ node, ...props }) => ( +
+                ),
+              }}
+            >
+              {preprocessMarkdown(getMessageText(msg.content))}
+            
           
{m.created_by_agent()} @@ -176,7 +189,7 @@ export function ChatbotSidebar({ projectId, contextAssetId }: ChatbotSidebarProp
{isOver && ( @@ -191,11 +204,10 @@ export function ChatbotSidebar({ projectId, contextAssetId }: ChatbotSidebarProp )} {/* Header section */} -
+
{isHistoryMode ? ( <>
- {m.history()}