{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chain-of-thought-vue",
  "title": "Chain of Thought (Vue)",
  "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/vue@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/vue/chain-of-thought.ts",
      "content": "import { type ChainOfThoughtStep, chainOfThoughtPrimitive } from \"@kind-ui/agent-ui/core\";\nimport { createParts } from \"@ui-sdk/vue/primitive\";\nimport { type Component, defineComponent, h, type Slot, type VNodeChild } from \"vue\";\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\n// A part whose default slot falls back to `fallback`, as React's default `children` do.\nconst withDefault = <State, Part extends Component = Component>(\n  part: Part,\n  name: string,\n  fallback: (scope: { state: State }) => VNodeChild,\n): Part =>\n  defineComponent({\n    name,\n    inheritAttrs: false,\n    setup(_, { attrs, slots }) {\n      return () => h(part as Component, attrs, { ...slots, default: slots.default ?? (fallback as Slot) });\n    },\n  }) as unknown as Part;\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\n/** The `label`, else \"N steps\", unless you fill the slot. */\nexport const ChainOfThoughtTitle = withDefault<{ title: string }>(\n  parts.Title,\n  \"ChainOfThoughtTitle\",\n  ({ state }) => state.title,\n);\n\n/** The `durationSeconds`, as \"N s\", unless you fill the slot. */\nexport const ChainOfThoughtMeta = withDefault<{ duration: string }>(\n  parts.Meta,\n  \"ChainOfThoughtMeta\",\n  ({ state }) => state.duration,\n);\n\n/** The step's `title`, unless you fill the slot. */\nexport const ChainOfThoughtItemTitle = withDefault<{ title: string }>(\n  parts.ItemTitle,\n  \"ChainOfThoughtItemTitle\",\n  ({ state }) => state.title,\n);\n\n/** The step's `durationSeconds`, as \"N s\", unless you fill the slot. */\nexport const ChainOfThoughtItemMeta = withDefault<{ duration: string }>(\n  parts.ItemMeta,\n  \"ChainOfThoughtItemMeta\",\n  ({ state }) => state.duration,\n);\n\n/** Opens and closes the step's content. Without a default slot, it shows the step's icon, title and duration. */\nexport const ChainOfThoughtItemTrigger = withDefault(parts.ItemTrigger, \"ChainOfThoughtItemTrigger\", () => [\n  h(ChainOfThoughtItemIcon),\n  h(ChainOfThoughtItemTitle),\n  h(ChainOfThoughtItemMeta),\n]);\n\n/** The step whose `id` is `value`. Without a default slot, it shows the step's trigger. */\nexport const ChainOfThoughtItem = withDefault(parts.Item, \"ChainOfThoughtItem\", () =>\n  h(ChainOfThoughtItemTrigger),\n);\n\n/** An item for each step, unless you fill the slot. */\nexport const ChainOfThoughtList = withDefault<{ steps: readonly ChainOfThoughtStep[] }>(\n  parts.List,\n  \"ChainOfThoughtList\",\n  ({ state }) => state.steps.map((step) => h(ChainOfThoughtItem, { key: step.id, value: step.id })),\n);\n\nconst defaultParts = () => [\n  h(ChainOfThoughtTrigger, null, () => [\n    h(ChainOfThoughtIcon),\n    h(ChainOfThoughtTitle),\n    h(ChainOfThoughtMeta),\n  ]),\n  h(ChainOfThoughtContent, null, () => h(ChainOfThoughtList)),\n];\n\n/**\n * A summary of the steps an agent took, which expands into them. A default slot replaces the default trigger and\n * content.\n */\nexport const ChainOfThought = withDefault(parts.Root, \"ChainOfThought\", defaultParts);\n",
      "type": "registry:ui",
      "target": "@ui/vue/chain-of-thought.ts"
    }
  ],
  "meta": {
    "layer": "vue"
  },
  "type": "registry:ui"
}
