import React from 'react';
import type { ChatMessage } from '../types/chat-message';
import type { UseChatRuntimeOptions } from '../types/chat-polling';
import type { InitStatus } from '../types/cn-ai-chat-shell';
/**
 * 聊天运行时 Hook
 *
 * 协调整个会话状态机：submit → polling → done / error / cancel
 * 支持受控与非受控两种消息管理模式。
 * 当 `autoInit=true` 时，mount 后自动调用 adapter.init 初始化会话。
 */
export declare function useChatRuntime(options: UseChatRuntimeOptions): {
    messages: ChatMessage[];
    isPolling: boolean;
    generatingMessageId: string;
    conversationIdRef: React.RefObject<string>;
    handleSubmit: (value?: string) => Promise<void>;
    handleCancel: () => void;
    setMessages: React.Dispatch<React.SetStateAction<ChatMessage[]>>;
    initStatus: InitStatus;
    retryInit: () => void;
    isHistoryLoading: boolean;
    historyHasMore: boolean;
    loadHistory: () => Promise<void>;
    historySessionDividerBeforeMessageId: string;
};
