Response
Markdown renderer that is safe to stream. Closes unterminated syntax as it arrives and highlights code with Shiki.
Retry with backoff
Wrap the call and double the delay after each failure:
- Cap the delay so users aren't left waiting
- Only retry idempotent requests
Installation
pnpm dlx shadcn@latest add @jds/response
Usage
import { Response } from "@/components/ai/response"
<Response isAnimating={status === "streaming"}>{part.text}</Response>API Reference
Response
| Prop | Type | Default |
|---|---|---|
childrenMarkdown source. | string | – |
isAnimatingStreaming mode: fades in new tokens and repairs partial syntax. | boolean | false |