///
import type { SendContent, FunctionCall, IMessage } from "../../../types";
/**
* 聊天动作 Context
* 只包含操作方法,不包含状态数据
* 与 ChatStateContext 分离可以优化性能
*/
export interface ChatActionContextType {
/** 发送消息 */
chat: (content: SendContent) => void;
/** 停止聊天 */
stopChat: () => void;
/** 清空/重置聊天 */
clearChat: () => void;
/** 重新发送 */
reChat: () => void;
/** 使用建议问题 */
suggestChat: (text: string) => void;
/** 确认函数调用 */
confirmFnCall: (fnCall: FunctionCall, confirmed: boolean) => void;
/** 设置消息列表 */
setMessages: React.Dispatch>;
/** 点赞/点踩消息 */
likeMessage: (invocationId: string, isLike: 1 | -1, feedbackData?: {
feedbackTags?: string;
feedbackDescription?: string;
}) => Promise;
/**
* 设置自定义业务参数 (stateDelta)
* 设置后每次发送消息时会自动携带该参数
* 传入 undefined 可清除已设置的参数
*/
setStateDelta: (delta: Record | undefined) => void;
}
export declare const ChatActionContext: import("react").Context;
/**
* 使用聊天动作 Hook
* @returns ChatActionContextType
* @throws Error 如果在 XAdkProvider 外部使用
*/
export declare const useChatActions: () => ChatActionContextType;