{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stopped-run-demo",
  "title": "Stopped Run Demo",
  "description": "A worked example of Stopped Run: What the thread says after an answer ended early, with whatever it had already written kept above the line.",
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/stopped-run.json"
  ],
  "files": [
    {
      "path": "components/demos/stopped-run-demo.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { StoppedRun } from \"@/registry/default/stopped-run/stopped-run\"\n\nexport function StoppedRunDemo() {\n  const [reason, setReason] = React.useState<\"stopped\" | \"error\">(\"stopped\")\n\n  return (\n    <div className=\"w-full max-w-lg space-y-3\">\n      <StoppedRun\n        reason={reason}\n        elapsed={7.4}\n        onRetry={() => {}}\n        onResume={reason === \"stopped\" ? () => {} : undefined}\n      >\n        <p>\n          The retry helper backs off between attempts, so the fix is to keep the\n          delay and remove the listener before adding it again. The reconnect\n          path currently registers\n        </p>\n      </StoppedRun>\n\n      <button\n        type=\"button\"\n        onClick={() => setReason(reason === \"stopped\" ? \"error\" : \"stopped\")}\n        className=\"text-muted-foreground hover:text-foreground text-xs underline underline-offset-4\"\n      >\n        Show it as {reason === \"stopped\" ? \"a failure\" : \"a stop\"}\n      </button>\n    </div>\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}