import { default as React } from 'react'; /** A single message in the {@link ChatPane} transcript. */ export interface IChatMessage { /** Stable identifier. Used as the React key. */ id: string; /** Who sent it. `'user'` right-aligns; anything else left-aligns. */ role: 'user' | 'assistant'; /** Message body. Rendered as plain text with newlines preserved. */ text: string; /** Optional display name shown above the bubble. Defaults from `role`. */ author?: string; } /** A `/`-prefixed shortcut offered in the composer's autocomplete. */ export interface ISlashCommand { /** Command word without the leading slash, e.g. `"clear"`. */ command: string; /** One-line description shown beside the command in the suggestion list. */ description: string; } export interface ChatPaneProps { /** Messages to display, oldest first. */ messages?: IChatMessage[]; /** * Called with the trimmed message text on send. The component clears its * composer but does not append to `messages` — that is the caller's job. */ onSend?: (text: string) => void; /** Slash commands offered once the composer starts with `/`. */ slashCommands?: ISlashCommand[]; /** Called when a slash command is picked from the suggestion list. */ onSlashCommand?: (command: ISlashCommand) => void; /** Called when the close button is pressed. Omit to hide the button. */ onClose?: () => void; /** Title shown in the pane header. Defaults to `"Chat"`. */ title?: string; /** Placeholder for the composer. */ placeholder?: string; /** Shown in place of the transcript when `messages` is empty. */ emptyState?: React.ReactNode; /** * Draw the title bar. * * Left unset, this follows the host: inside a `SidebarPane` or a dockable tab * the title is already drawn, so the pane omits its own. Set it explicitly to * force either way — which is also what lets the component be tested without * a host around it. */ chrome?: boolean; /** Extra classes merged onto the root element. */ className?: string; } /** * A chat panel: a scrolling transcript over a composer with slash-command * autocomplete. * * Fully controlled — it owns only the in-progress input and the suggestion * highlight. Messages, sending and visibility belong to the caller, so the same * component works against a local array, a websocket, or an LLM endpoint. For * the store-backed variant, see `ConnectedChatPane`. * * **It fills whatever hosts it.** Register it as a sidebar panel, an inspector * panel or a dockable tab and it takes that shape; it carries no width or edge * of its own. Inside a host that draws a title bar it omits its own header — * see `chrome` to override. * * @example * ```tsx * send(text)} * slashCommands={[{ command: 'clear', description: 'Clear the transcript' }]} * onClose={() => setOpen(false)} * /> * ``` */ export declare const ChatPane: ({ messages, onSend, slashCommands, onSlashCommand, onClose, title, placeholder, emptyState, chrome, className, }: ChatPaneProps) => import("react/jsx-runtime").JSX.Element;