import { type ReactNode } from 'react'; import { type ApprovalAnswerHandler } from '../core/config.js'; import type { AttachmentRef, ChatMessage as Message } from '../types.js'; interface ChatMessageProps { message: Message; allMessages: Message[]; isStreaming?: boolean; /** The thread's newest message: a long reply stays open, so opening a chat ends on its last line. */ latest?: boolean | undefined; isEditing?: boolean; showAuthor?: boolean | undefined; currentUsername?: string | undefined; attachmentDownloadUrl?: ((id: string) => string) | undefined; onOpenAttachment?: ((attachment: AttachmentRef) => void) | undefined; onNavigateBranch?: ((messageId: string) => void) | undefined; onEdit?: ((messageId: string) => void) | undefined; onSaveEdit?: ((messageId: string, content: string) => void) | undefined; onCancelEdit?: (() => void) | undefined; onRegenerate?: ((messageId: string) => void) | undefined; onRetry?: ((messageId: string) => void) | undefined; onOpenReasoning?: ((reasoning: string, duration: number | null) => void) | undefined; onApprovalAnswer?: ApprovalAnswerHandler | undefined; /** Drops the row's horizontal padding, for hosts that constrain the column themselves. */ flush?: boolean | undefined; /** Draws the transcript as a terminal does: every run of tool calls folds * from its first call, failures and running calls included, and a thought * shows whole while it streams. */ foldEveryRun?: boolean | undefined; /** A line under the message that stays in view, such as where a queued one * stands; the hover actions open below it rather than over it. */ status?: ReactNode; /** Off for a message that offers no actions of its own, such as one in a * queue that offers Edit for all of it; no room is kept below for them. */ actions?: boolean | undefined; /** Sits just under the message before it, as one of a stack of queued * messages, instead of opening a new turn. */ stacked?: boolean | undefined; } declare function ChatMessage({ message, allMessages, isStreaming, latest, isEditing, showAuthor, currentUsername, attachmentDownloadUrl, onOpenAttachment, onNavigateBranch, onEdit, onSaveEdit, onCancelEdit, onRegenerate, onRetry, onOpenReasoning, onApprovalAnswer, flush, foldEveryRun, status, actions, stacked, }: ChatMessageProps): import("react").JSX.Element | null; declare const _default: import("react").MemoExoticComponent; export default _default;