STREAM_END_ATTRIBUTE
Attribute revealStream sets on the reply when it ends: "done" or "stopped".
import { STREAM_END_ATTRIBUTE } from "@sdxc/ui/chat";Signature
const STREAM_END_ATTRIBUTE = "data-stream-end"Used with it
The events, constants and types its module publishes, each imported from @sdxc/ui/chat too.
Interface
StreamRevealOptions
Options for revealStream.
| Member | Type | Required | Description |
|---|---|---|---|
interval | number | No | Milliseconds between ticks. @default 32 |
onEnd | (end: StreamRevealEnd) => void | No | Called once, when the whole reply has shown or StreamReveal.stop ran. |
signal | AbortSignal | No | Stops the reveal where it is when aborted, as StreamReveal.stop does. |
Interface
StreamReveal
A running reveal.
| Member | Type | Required | Description |
|---|---|---|---|
stop | void | Yes | Freezes the reply at what has shown; the rest of it stays out of the page. |
Type
StreamRevealEnd
How a reveal finished.
type StreamRevealEnd = "done" | "stopped"