/** * Message-state transitions for a streaming turn — start, append, end, fail. * * Deliberately does NOT parse frames or extract tokens any more. It used to * carry its own `parseStreamPayload` and a 10-path `extractTokenText` that was * byte-for-byte identical to the one in `streaming/sse-parser.ts` (whose * docstring records that it was lifted from here). The widget now consumes * parsed events from `stream-runner`, so the second copy was deleted rather than * kept in sync by hand. */ import type { MessageType } from '@/widget/types'; type StreamingDeps = { setMessages: (fn: (prev: MessageType[]) => MessageType[]) => void; appendToken: (text: string) => void; }; export declare const useStreamingChat: (deps: StreamingDeps) => { startStream: () => void; ensureStreamMessage: () => void; appendStreamChunk: (chunk: string) => void; endStream: () => void; failStream: (errorMessage: string) => void; }; export {};