Skip to content

Response

Shows a streaming answer with its status and actions.

Response complete
The migration touches three parts of the system. The schema change is additive, so old clients keep working, and the read path can stay on the current index while the new filter rolls out.
response-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Composition

  • Response

    Owns the status. Screen readers hear Response complete, stopped, or failed once.

    • ResponseContent

      Shows the caret while streaming and sets aria-busy.

    • ResponseNotice

      Shows a marker for stopped and error.

    • ResponseActions

      Row of buttons.

    • ResponseFooter

      Row for sources and metadata.

Actions

Also install Copy button.

Response complete
The migration is safe to run behind the current feature flag. Roll the reader out first, then the writer.
response-actions-demo.tsx

Stopped

Screen readers hear Response stopped once. Continue resumes the run.

Response stopped
I can keep going with the rollout plan, but the batch

Stopped

response-stopped-demo.tsx

Error

Response failed
The connection closed before the answer finished.

Something went wrong.

response-error-demo.tsx

With reasoning and sources

Also install Reasoning and Source link.

Thought for 8s

response-sources-demo.tsx

API reference

Response

status: "streaming" | "complete" | "stopped" | "error"Required
Sets the streaming state on the content, and announces the end once as Response complete, Response stopped, or Response failed.

ResponseContent

caret: boolean = true
Shows the caret at the end while the status is streaming.