Kanshō

Docs / Plans and tasks /

ContinuationTokenBanner

Banner shown when an agent's context is approaching its limit, with a checkpoint action.

Preview

Polling for updatesNext poll in 4 s
ct_v2_9f3a1e7d-bc04-4f88-a21c-d2f9e3b04170

Variants

Polling

Polling for updatesNext poll in 4 s
ct_v2_9f3a1e7d-bc04-4f88-a21c-d2f9e3b04170

Reconnecting

Reconnecting to streamAttempt 2 of 5
ct_v2_9f3a1e7d-bc04-4f88-a21c-d2f9e3b04170

Interrupted

Stream interrupted
ct_v2_9f3a1e7d-bc04-4f88-a21c-d2f9e3b04170

Resumed

Stream resumedStream reconnected
ct_v2_9f3a1e7d-bc04-4f88-a21c-d2f9e3b04170

Props

PropTypeDescription
state*ContinuationStateConnection posture of the stream: polling, reconnecting, interrupted, or resumed.
token*stringThe opaque continuation / poll token displayed in a monospace chip.
detailstringOptional human note alongside the status pill, e.g. "Next poll in 4 s".
onReconnect() => voidReconnect callback. Shows a Reconnect button when state is interrupted or reconnecting.
onCopyToken() => voidCopy-to-clipboard handler for the continuation token.

* required.

Usage

import { ContinuationTokenBanner } from "@/components/tasks/continuation-token-banner";

<ContinuationTokenBanner
  state="polling"
  token="ct_v2_9f3a1e7d-bc04-4f88-a21c-d2f9e3b04170"
  detail="Next poll in 4 s"
  onCopyToken={() => navigator.clipboard.writeText(token)}
/>