Mercurial
view love/epi/src/components/ChatUI/MessageItem.tsx @ 279:b3b547563ec7
Add Google connector service and agent wiki
Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 22:22:36 -0700 |
| parents | cf9caa4abc3e |
| children |
line wrap: on
line source
import { User, Bot } from 'lucide-react'; import type { Message } from '@/atoms/chatAtoms'; import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; interface MessageItemProps { message: Message; } export function MessageItem({ message }: MessageItemProps) { const isUser = message.role === 'user'; return ( <div className={`flex gap-4 py-4 px-6 ${ isUser ? 'bg-gray-50 dark:bg-gray-800/30' : '' }`} > <div className="flex-shrink-0"> {isUser ? ( <div className="w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center"> <User className="w-5 h-5 text-white" /> </div> ) : ( <div className="w-8 h-8 rounded-full bg-green-500 flex items-center justify-center"> <Bot className="w-5 h-5 text-white" /> </div> )} </div> <div className="flex-1 prose prose-sm text-white dark:prose-invert max-w-none"> {message.image_url && ( <div className="my-4 -mx-4 sm:mx-0 rounded-lg overflow-hidden"> <img src={message.image_url} alt="Uploaded or generated content" className="max-w-full h-auto rounded-lg shadow-lg" loading="lazy" /> </div> )} <ReactMarkdown remarkPlugins={[remarkGfm]}> {message.content} </ReactMarkdown> </div> </div> ); }