import type { ChatRequestOptions } from "ai"; import { type ChatCommandQueue, type ChatCommandState } from "./commands"; /** * Render the hook only in the active shell (desktop panel or mobile drawer), * once stored history has loaded into the shared chat. Both shells use the * same chat, so `sendMessage`, `status`, and `stop` act on one conversation. */ interface UseChatCommandsOptions { /** Clear the stored and displayed conversation. */ clearConversation: () => Promise; commandState: ChatCommandState; commands: ChatCommandQueue; sendMessage: (message: { metadata?: unknown; text: string; }, options?: ChatRequestOptions) => Promise; status: string; stop: () => Promise | void; } /** * Drains the provider's command queue into the chat: a requested clear runs * first (stopping a streaming response), then queued questions are sent one * at a time whenever the chat is idle. Returns `submitText`, which every * submission path uses so an attached page travels with exactly one message. */ export declare const useChatCommands: ({ clearConversation, commandState, commands, sendMessage, status, stop, }: UseChatCommandsOptions) => (text: string) => Promise; export {}; //# sourceMappingURL=use-chat-commands.d.ts.map