import type { FetchEventSourceInit } from '@microsoft/fetch-event-source'; export interface AgentInfo { agentId?: string; apiKey?: string; } export interface UseAgentChatOptions extends AgentInfo { getAgentInfo?: () => undefined | null | AgentInfo | Promise; getSessionId?: (agentId: string, apiKey: string) => string | Promise; getUrl?: (agentId: string, sessionId: string) => string; } export interface SendFile { fileId?: string; url?: string; name?: string; type?: string; size?: number; uploadTime?: string; } export interface SendOptions { prompt?: string; files?: SendFile[]; reSend?: boolean; extParams?: Record; refreshSessionId?: boolean; parseContent?: boolean; onOpen?: (res: Response) => Promise | void; onMessage?: (res: { data: { content: string; reasoning: string; }; allData: { content: string; reasoning: string; parsedContent: unknown; useTime: number; }; }) => void; onClose?: (res: { content: string; reasoning: string; parsedContent: unknown; useTime: number; }) => void; onError?: FetchEventSourceInit['onerror']; }