{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "reasoning-solid",
  "title": "Reasoning (Solid)",
  "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/solid@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup",
    "@kind-ui/markdown-solid"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/solid/reasoning.tsx",
      "content": "import { reasoningPrimitive } from \"@kind-ui/agent-ui/core\";\nimport type { ComponentProps } from \"@solidjs/web\";\nimport { createParts } from \"@ui-sdk/solid/primitive\";\nimport { omit } from \"solid-js\";\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(props: ReasoningProps) {\n  return <parts.Root {...omit(props, \"children\")}>{props.children ?? <DefaultParts />}</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(props: ReasoningTitleProps) {\n  return (\n    <parts.Title {...omit(props, \"children\")}>\n      {props.children ?? ((state: { title: string }) => state.title)}\n    </parts.Title>\n  );\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(props: ReasoningContentProps) {\n  return (\n    <parts.Content {...omit(props, \"children\")}>\n      {props.children ??\n        ((state: { text: string; streaming: boolean }) => (\n          <Markdown source={state.text} streaming={state.streaming} />\n        ))}\n    </parts.Content>\n  );\n}\n\nfunction DefaultParts() {\n  return (\n    <>\n      <ReasoningTrigger>\n        <ReasoningIcon />\n        <ReasoningTitle />\n      </ReasoningTrigger>\n      <ReasoningContent />\n    </>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@ui/solid/reasoning.tsx"
    }
  ],
  "meta": {
    "layer": "solid"
  },
  "type": "registry:ui"
}
