import type { Dispatch, SetStateAction } from 'react'; import type { SSEMessage, SearchResource, ToolCallState, AiSearchState } from '../../types'; import type { AiSearchConversationItem } from '@redocly/theme/core/types'; /** * Context object passed to message handlers * Contains current values and state setters */ export type MessageHandlerContext = { messageId: string; resources: SearchResource[]; accumulatedResponse: string; setConversation: Dispatch>; setState: Dispatch>; setToolCalls: Dispatch>; }; /** * Updates returned by message handlers */ export type MessageHandlerResult = { messageId?: string; resources?: SearchResource[]; accumulatedResponse?: string; }; /** * Main message dispatcher that routes messages to appropriate handlers * Returns updates to be applied to refs */ export declare function handleSSEMessage(message: SSEMessage, ctx: MessageHandlerContext): MessageHandlerResult; //# sourceMappingURL=message-handlers.d.ts.map