MessageBubble.tsx

openbrowserclaw ยท ui, chat-bubble, message-rendering, layout

Renders individual chat message bubble with content, styling, and layout in frontend chat interface.

// ---------------------------------------------------------------------------
// OpenBrowserClaw โ€” Message bubble
// ---------------------------------------------------------------------------

import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
import rehypeRaw from 'rehype-raw';
import rehypeSanitize, { defaultSchema } from 'rehype-sanitize';
import { FileText } from 'lucide-react';
import type { StoredMessage } from '../../types.js';
import { getOrchestrator } from '../../stores/orchestrator-store.js';
import { useFileViewerStore } from '../../stores/file-viewer-store.js';
import { CodeBlock } from './CodeBlock.js';

// Matches strings that look like file paths (with extension)
const FILE_PATH_RE = /^[\w./-]+\.\w{1,10}$/;

// Allow SVG elements and common at

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key