import type { Dispatch, SetStateAction } from 'react';
import type { ConversationMessage, ChatState, StreamEvent } from '../../types';
import type { WidgetApiClient } from '../../api/client';
export type StreamState = {
    currentContent: string;
    currentMessageId: string;
    activeToolCallCount: number;
    newMessageIds: Set<string>;
    sources: ConversationMessage["sources"];
    toolCallToActionId: Record<string, string>;
    requestId: string;
};
export type ActionRequestEvent = Extract<StreamEvent, {
    type: "action_request";
}>;
export type EventHandler = (event: StreamEvent, streamState: StreamState, onMessageUpdate: (message: ConversationMessage) => void, setState: Dispatch<SetStateAction<ChatState>>) => void;
export interface ActionLoopContext {
    client: WidgetApiClient;
    streamState: StreamState;
    onMessageUpdate: (message: ConversationMessage) => void;
    setState: Dispatch<SetStateAction<ChatState>>;
    widgetId: string;
    conversationId: string;
    getMessages: () => ConversationMessage[];
}
//# sourceMappingURL=types.d.ts.map