/** * MessageBubble — renders a single chat message (avatar, bubble, meta). * * Markdown / HTML rendering for AI/agent messages goes through * `formatMessageBodyHtml` which sanitizes inside a detached `
` then * we inject the sanitized result via `dangerouslySetInnerHTML`. User * messages render as escaped text unless they opted into a rich format * (markdown / html) at send time. * * Memoised so unrelated store updates (typing, scroll, channel list) * don't re-render every bubble. Reference equality on `message` is the * fast path — `upsertMessage` deliberately returns the same object when * nothing actually changed, so duplicate Ably echoes don't churn either. */ import type { JSX } from "preact"; import type { ChatMessage } from "../../../utils/globals"; import type { ChatController } from "../controller/chat-controller"; interface MessageBubbleProps { message: ChatMessage; controller: ChatController; isReadByAgent: boolean; } declare function MessageBubbleImpl({ message, controller, isReadByAgent, }: MessageBubbleProps): JSX.Element; export declare const MessageBubble: typeof MessageBubbleImpl; export {};