/** * useAgentStream Hook * Custom hook for managing agent streaming communication */ import type { McpState, McpToolResult } from '../../agent/types.js'; import type { ToolCallRecord } from '../components/ToolCallIndicator.js'; export interface Message { id: string; role: 'user' | 'assistant'; content: string; isStreaming?: boolean; toolCalls?: Array<{ id: string; name: string; type: 'tool' | 'mcp'; serverName?: string; status: 'pending' | 'completed' | 'error'; }>; } export interface UseAgentStreamOptions { mcpState?: McpState; onMcpToolCall?: (callId: string, serverName: string, toolName: string, args: Record) => Promise; cliMode?: boolean; showToolCalls?: boolean; resumeConversationId?: string; modelTier?: 'lite' | 'flash' | 'pro'; } export interface UseAgentStreamReturn { messages: Message[]; isProcessing: boolean; currentToolCall: { name: string; type: 'tool' | 'mcp'; serverName?: string; } | null; toolCallHistory: ToolCallRecord[]; streamingText: string; conversationId: string | undefined; sendMessage: (message: string) => Promise; abort: () => void; addRemoteExchange: (userMessage: string, assistantContent: string, clientType: string) => void; queuedMessage: string | null; enqueueMessage: (message: string) => void; clearQueuedMessage: () => void; } export declare function useAgentStream(options?: UseAgentStreamOptions): UseAgentStreamReturn; //# sourceMappingURL=useAgentStream.d.ts.map