import type { ChatMessage } from '../types.js'; /** What a reply said: its content, or for a reply that is a parts timeline * (an agent's turn), its text parts. */ export declare function replyText(message: ChatMessage): string; export declare function lastAssistantContent(messages: ChatMessage[]): string | null; export declare function lastUserMessage(messages: ChatMessage[]): ChatMessage | null; /** The conversation shortcuts wherever a conversation or session shows: * Cmd/Ctrl+Shift+O starts a new one, +C copies the last reply, +F searches. */ export declare function useConversationShortcuts({ enabled, onNew, lastReply, onSearch, }: { enabled?: boolean; onNew: () => void; /** The last reply's text, or null when there is none. */ lastReply: () => string | null; onSearch: () => void; }): { copyLastReply: () => Promise; }; interface UseKeyboardShortcutsOptions { enabled?: boolean; } /** The conversation shortcuts for the chat provider's conversations; search * focuses the sidebar's, or whatever answers the focus event. */ export declare function useKeyboardShortcuts(options?: UseKeyboardShortcutsOptions): { getLastUserMessage: () => ChatMessage | null; getLastAssistantMessage: () => string | null; handleNewConversation: () => void; handleCopyLastResponse: () => Promise; handleStopGeneration: () => void; }; /** Escape pressed in a dialog, a drawer, a menu or an open list closes that * layer and nothing else. Those layers dismiss from a listener on the * document too, so stopping propagation can't keep the event from here. */ export declare function escapeClosesLayer(target: EventTarget | null): boolean; export {};