/** * CommandsUtils - React 版命令监听工具 * 类似 Vue 版本的 watchCommands,监听命令队列并执行函数 */ /** * 命令项接口 */ export interface CommandItem { actionName: string; arg?: any; timestamp: number; } /** * 监听命令队列的通用函数 * @param _store - store 实例(从 useItemStore 获取) * @param sessionId - 会话ID * @param context - 执行上下文,包含可调用的函数 * @returns 取消订阅函数 */ export declare function watchCommands(_store: any, sessionId: string, context?: Record void>): () => void; /** * 创建一个绑定了模块上下文的 watchCommands 函数 * @param getModuleExports - 获取当前模块导出对象的函数(支持延迟获取) * @returns 绑定了上下文的 watchCommands 函数 */ export declare function createWatchCommands(getModuleExports: () => Record void>): (store: any, sessionId: string) => () => void; //# sourceMappingURL=CommandsUtils.d.ts.map