import { type JSX } from "react"; import type { ChatMessage, ChatMessageContextFile } from "../types/ui-schema.js"; import { type MarkdownRenderOptions } from "./MarkdownMessage.js"; import { type PermissionChoice } from "./PermissionCard.js"; export interface ChatMessageProps extends MarkdownRenderOptions { message: ChatMessage; renderMarkdown?: (content: string) => string; onFeedback?: (messageId: string, rating: "up" | "down") => void; onDismissFeedback?: (messageId: string) => void; onContextFileClick?: (file: ChatMessageContextFile) => void; onFileReferenceClick?: (reference: string) => void; showTimestamp?: boolean; /** Show the thumbs up/down feedback buttons on assistant messages. Default: false. */ showFeedbackButtons?: boolean; /** Show the "Copy" button on assistant messages. Default: false. */ showCopyButton?: boolean; /** Called when the user clicks a button on an inline permission card. * The host is expected to post the choice back to the extension. */ onPermissionChoice?: (id: string, choice: PermissionChoice, notes?: string) => void; /** Called when the user clicks a speaker control on an assistant * message. Host fetches TTS audio and plays/pauses/resumes/stops it. * Action defaults to "start" for backward compatibility. When the * prop is undefined, no speaker affordance renders. */ onSpeak?: (messageId: string, text: string, action?: "start" | "pause" | "resume" | "stop") => void; /** Id of the message whose audio is currently active (playing or * paused). Used to render the multi-button speaker pill. */ speakingMessageId?: string | null; /** True when speakingMessageId's audio is paused (vs playing). Drives * the Pause vs Play icon swap inside the active pill. */ speakPaused?: boolean; /** Id of the assistant message currently being streamed in. While set, * we hide the speaker pill on that message — listening to a half-baked * response is jarring, and the button reappears as soon as the stream * closes. */ streamingMessageId?: string | null; } export declare const ChatMessageBubble: ({ message, renderMarkdown, onFeedback, onContextFileClick, resolveFileHref, onFileReferenceClick, showTimestamp, showFeedbackButtons, showCopyButton, onPermissionChoice, onSpeak, speakingMessageId, speakPaused, streamingMessageId }: ChatMessageProps) => JSX.Element; //# sourceMappingURL=ChatMessage.d.ts.map