npm 2.0.4
Streaming AI client helper New
New editor.aiToolkit.streamRequest({ url, body, onDelta, onResponse, onDone, onError }) consumes Server-Sent Events from a streaming AI endpoint. Returns { promise, abort() }. Browsers without fetch / ReadableStream fall back to a non-streaming XHR against the same endpoint with /stream stripped — same callback shape either way.
Works against any SSE source that follows data: / event: response / event: done framing; not tied to RichTextBox.