/// import { IAgentScopeRuntimeWebUIMessage } from "../../../.."; import { IAgentScopeRuntimeWebUIInputData } from "../../types"; interface UseChatRequestOptions { currentQARef: React.MutableRefObject<{ request?: IAgentScopeRuntimeWebUIMessage; response?: IAgentScopeRuntimeWebUIMessage; abortController?: AbortController; /** Active request id, maintained by the controller. Incrementing it invalidates any in-flight SSE. */ activeRequestId: number; /** Session id snapshot for the active request. */ activeSessionId?: string; }>; updateMessage: (message: IAgentScopeRuntimeWebUIMessage) => void; getCurrentSessionId: () => string; onFinish: () => void; } /** * Hook for handling API requests and streaming SSE responses. */ export default function useChatRequest(options: UseChatRequestOptions): { request: (historyMessages: any[], biz_params?: IAgentScopeRuntimeWebUIInputData['biz_params'], myRequestId?: number) => Promise; reconnect: (sessionId: string, myRequestId?: number) => Promise; mockRequest: (mockdata: any) => Promise; }; export {};