Components / AI components / Tools & execution
State & statusExperimental alpha

ConnectionStatus

Connection and recovery controls with explicit replay capabilities.

ConnectionStatus preview

Loading example…

Interactions use local sample data.

Usage and props

Show connection state alongside the freshness of the displayed data. Your application supplies both and handles recovery requests; keep completed actions visible during a connection loss. Declare actual adapter capabilities and a public cursor. A recovery request is not a completed recovery or a new run.

valueConnectionInfo
Connection state, data freshness, adapter capabilities and any recovery cursor.
submissionSubmissionState (optional)
The recovery request state. Defaults to idle; track unknown outcomes explicitly.
onResume(cursor: RecoveryCursor) => void (optional)
Ask your host to resume from the supplied cursor when replay is available.
onRefresh() => void (optional)
Request a current snapshot when the adapter supports it.
errorstring (optional)
The recovery failure to show alongside the retained connection state.
variant'banner' | 'card' | 'compact' (optional)
Choose a presentation for the available space. Defaults to banner.
How state and callbacks work

These are the main props for the example. The package's TypeScript declarations include the full API.

Customize and use with a keyboard