SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

STREAM_COLLAPSE_ATTRIBUTE

Attribute a <details> carries to fold away once the replay moves past it, such as an assistant's thinking once its answer starts.

tsx
import { STREAM_COLLAPSE_ATTRIBUTE } from "@sdxc/ui/chat";

Signature

typescript
const STREAM_COLLAPSE_ATTRIBUTE = "data-stream-collapse"

The events, constants and types its module publishes, each imported from @sdxc/ui/chat too.

Interface

StreamRevealOptions

Options for revealStream.

MemberTypeRequiredDescription
intervalnumberNoMilliseconds between ticks. @default 32
onEnd(end: StreamRevealEnd) => voidNoCalled once, when the whole reply has shown or StreamReveal.stop ran.
signalAbortSignalNoStops the reveal where it is when aborted, as StreamReveal.stop does.
Interface

StreamReveal

A running reveal.

MemberTypeRequiredDescription
stopvoidYesFreezes the reply at what has shown; the rest of it stays out of the page.
Type

StreamRevealEnd

How a reveal finished.

typescript
type StreamRevealEnd = "done" | "stopped"
@sdxc/ui

Can’t find it? Contact us