{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chain-of-thought-solid",
  "title": "Chain of Thought (Solid)",
  "description": "A summary of the steps an agent took, which opens into each step's details.",
  "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"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/solid/chain-of-thought.tsx",
      "content": "import type { ChainOfThoughtStep } from \"@kind-ui/agent-ui/core\";\nimport { chainOfThoughtPrimitive } from \"@kind-ui/agent-ui/core\";\nimport type { ComponentProps } from \"@solidjs/web\";\nimport { createParts } from \"@ui-sdk/solid/primitive\";\nimport { For, omit } from \"solid-js\";\n\nconst parts = createParts(chainOfThoughtPrimitive, {\n  root: \"div\",\n  trigger: \"button\",\n  icon: \"span\",\n  title: \"span\",\n  meta: \"span\",\n  content: \"div\",\n  list: \"ol\",\n  item: \"li\",\n  \"item-trigger\": \"button\",\n  \"item-icon\": \"span\",\n  \"item-title\": \"span\",\n  \"item-meta\": \"span\",\n  \"item-content\": \"div\",\n});\n\nexport type ChainOfThoughtProps = ComponentProps<typeof parts.Root>;\n\n/**\n * A summary of the steps an agent took, which expands into them. Any `children` replace the default trigger and\n * content.\n */\nexport function ChainOfThought(props: ChainOfThoughtProps) {\n  return <parts.Root {...omit(props, \"children\")}>{props.children ?? <DefaultParts />}</parts.Root>;\n}\n\nexport const ChainOfThoughtTrigger = parts.Trigger;\nexport const ChainOfThoughtIcon = parts.Icon;\nexport const ChainOfThoughtContent = parts.Content;\nexport const ChainOfThoughtItemIcon = parts.ItemIcon;\nexport const ChainOfThoughtItemContent = parts.ItemContent;\n\nexport type ChainOfThoughtTitleProps = ComponentProps<typeof parts.Title>;\n\n/** The `label`, else \"N steps\", unless you pass children. */\nexport function ChainOfThoughtTitle(props: ChainOfThoughtTitleProps) {\n  return (\n    <parts.Title {...omit(props, \"children\")}>\n      {props.children ?? ((state: { title: string }) => state.title)}\n    </parts.Title>\n  );\n}\n\nexport type ChainOfThoughtMetaProps = ComponentProps<typeof parts.Meta>;\n\n/** The `durationSeconds`, as \"N s\", unless you pass children. */\nexport function ChainOfThoughtMeta(props: ChainOfThoughtMetaProps) {\n  return (\n    <parts.Meta {...omit(props, \"children\")}>\n      {props.children ?? ((state: { duration: string }) => state.duration)}\n    </parts.Meta>\n  );\n}\n\nexport type ChainOfThoughtListProps = ComponentProps<typeof parts.List>;\n\n/** An item for each step, unless you pass children. */\nexport function ChainOfThoughtList(props: ChainOfThoughtListProps) {\n  return (\n    <parts.List {...omit(props, \"children\")}>\n      {props.children ??\n        ((state: { steps: ChainOfThoughtStep[] }) => (\n          <For each={state.steps} keyed={(step) => step.id}>\n            {(step) => <ChainOfThoughtItem value={step().id} />}\n          </For>\n        ))}\n    </parts.List>\n  );\n}\n\nexport type ChainOfThoughtItemProps = ComponentProps<typeof parts.Item>;\n\n/** The step whose `id` is `value`. Without children, it shows the step's trigger. */\nexport function ChainOfThoughtItem(props: ChainOfThoughtItemProps) {\n  return (\n    <parts.Item {...omit(props, \"children\")}>{props.children ?? <ChainOfThoughtItemTrigger />}</parts.Item>\n  );\n}\n\nexport type ChainOfThoughtItemTriggerProps = ComponentProps<typeof parts.ItemTrigger>;\n\n/** Opens and closes the step's content. Without children, it shows the step's icon, title and duration. */\nexport function ChainOfThoughtItemTrigger(props: ChainOfThoughtItemTriggerProps) {\n  return (\n    <parts.ItemTrigger {...omit(props, \"children\")}>\n      {props.children ?? (\n        <>\n          <ChainOfThoughtItemIcon />\n          <ChainOfThoughtItemTitle />\n          <ChainOfThoughtItemMeta />\n        </>\n      )}\n    </parts.ItemTrigger>\n  );\n}\n\nexport type ChainOfThoughtItemTitleProps = ComponentProps<typeof parts.ItemTitle>;\n\n/** The step's `title`, unless you pass children. */\nexport function ChainOfThoughtItemTitle(props: ChainOfThoughtItemTitleProps) {\n  return (\n    <parts.ItemTitle {...omit(props, \"children\")}>\n      {props.children ?? ((state: { title: string }) => state.title)}\n    </parts.ItemTitle>\n  );\n}\n\nexport type ChainOfThoughtItemMetaProps = ComponentProps<typeof parts.ItemMeta>;\n\n/** The step's `durationSeconds`, as \"N s\", unless you pass children. */\nexport function ChainOfThoughtItemMeta(props: ChainOfThoughtItemMetaProps) {\n  return (\n    <parts.ItemMeta {...omit(props, \"children\")}>\n      {props.children ?? ((state: { duration: string }) => state.duration)}\n    </parts.ItemMeta>\n  );\n}\n\nfunction DefaultParts() {\n  return (\n    <>\n      <ChainOfThoughtTrigger>\n        <ChainOfThoughtIcon />\n        <ChainOfThoughtTitle />\n        <ChainOfThoughtMeta />\n      </ChainOfThoughtTrigger>\n      <ChainOfThoughtContent>\n        <ChainOfThoughtList />\n      </ChainOfThoughtContent>\n    </>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@ui/solid/chain-of-thought.tsx"
    }
  ],
  "meta": {
    "layer": "solid"
  },
  "type": "registry:ui"
}
