{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "reasoning",
  "title": "Reasoning",
  "description": "The model's thinking as a step, with its thoughts streamed as markdown.",
  "dependencies": [
    "@kind-ui/agent-ui@0.9.0",
    "@ui-sdk/core@0.1.0-beta.17",
    "@ui-sdk/react@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup",
    "@kind-ui/markdown"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/react/reasoning.tsx",
      "content": "\"use client\";\n\nimport { reasoningPrimitive } from \"@kind-ui/agent-ui/core\";\nimport { createParts } from \"@ui-sdk/react/primitive\";\nimport type { ComponentProps } from \"react\";\nimport { Markdown } from \"./markdown\";\n\nconst parts = createParts(reasoningPrimitive, {\n  root: \"div\",\n  trigger: \"button\",\n  icon: \"span\",\n  title: \"span\",\n  content: \"div\",\n});\n\nexport type ReasoningProps = ComponentProps<typeof parts.Root>;\n\n/**\n * The model's thinking as a step: \"Thinking\" while it runs, \"Thought for N s\" once done, and its `text` as streamed\n * markdown. Any `children` replace the default trigger and content.\n */\nexport function Reasoning({ children, ...props }: ReasoningProps) {\n  return <parts.Root {...props}>{children !== undefined ? children : DEFAULT_PARTS}</parts.Root>;\n}\n\nexport const ReasoningTrigger = parts.Trigger;\nexport const ReasoningIcon = parts.Icon;\n\nexport type ReasoningTitleProps = ComponentProps<typeof parts.Title>;\n\n/** \"Thinking\", \"Thought for N s\" or the `label`, unless you pass children. */\nexport function ReasoningTitle({ children = ({ title }) => title, ...props }: ReasoningTitleProps) {\n  return <parts.Title {...props}>{children}</parts.Title>;\n}\n\nexport type ReasoningContentProps = ComponentProps<typeof parts.Content>;\n\n/** The `text` as markdown, streaming while the step runs, unless you pass children. */\nexport function ReasoningContent({\n  children = ({ text, streaming }) => <Markdown source={text} streaming={streaming} />,\n  ...props\n}: ReasoningContentProps) {\n  return <parts.Content {...props}>{children}</parts.Content>;\n}\n\n// Shared, so a streamed chunk doesn't render the default parts' wrappers again.\nconst DEFAULT_PARTS = (\n  <>\n    <ReasoningTrigger>\n      <ReasoningIcon />\n      <ReasoningTitle />\n    </ReasoningTrigger>\n    <ReasoningContent />\n  </>\n);\n",
      "type": "registry:ui",
      "target": "@ui/reasoning.tsx"
    }
  ],
  "meta": {
    "layer": "react"
  },
  "type": "registry:ui"
}
