{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "model-selector-vue",
  "title": "Model Selector (Vue)",
  "description": "A button that opens a searchable list of models grouped by provider, with their logos, costs and footer actions.",
  "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",
    "@kind-ui/picker-vue"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/vue/model-selector.ts",
      "content": "import { type ModelSelectorOptions, modelSelectorPrimitive } from \"@kind-ui/agent-ui/core\";\nimport { createParts } from \"@ui-sdk/vue/primitive\";\nimport { defineComponent, h, type VNode } from \"vue\";\nimport { pickerParts } from \"./picker\";\n\n// `@ui-sdk/vue`'s `createParts` hands the primitive an emitter for every callback, whether or not anything listens, so\n// `onAction`, whose presence offers `run`, is declared a function prop instead, which `@action` binds.\nconst primitive = Object.defineProperty(\n  Object.assign((options: never) => modelSelectorPrimitive(options), modelSelectorPrimitive, {\n    options: { ...modelSelectorPrimitive.options, onAction: \"action\" },\n  }),\n  \"name\",\n  { value: modelSelectorPrimitive.name },\n) as typeof modelSelectorPrimitive;\n\nconst parts = createParts(primitive, {\n  root: \"div\",\n  trigger: \"button\",\n  content: \"div\",\n  viewport: \"div\",\n  command: \"div\",\n  item: \"span\",\n  note: \"p\",\n});\n\nconst picker = pickerParts(parts, \"ModelSelector\");\n\n/** A model, whose `icon` is an image URL or a node such as an inline `svg`. */\nexport type ModelSelectorModel = Omit<NonNullable<ModelSelectorOptions[\"models\"]>[number], \"icon\"> & {\n  icon?: string | VNode;\n};\n\n/**\n * A button that shows the chosen model and its icon, and opens a searchable list of models grouped by provider, with\n * footer `actions`. A default slot replaces the trigger and the list.\n */\nexport const ModelSelector = defineComponent({\n  name: \"ModelSelector\",\n  inheritAttrs: false,\n  setup(_, { attrs, slots }) {\n    return () => h(parts.Root, attrs, { ...slots, default: slots.default ?? picker.Default });\n  },\n}) as unknown as typeof parts.Root;\n\n/** Opens the list. Shows the chosen model's icon and name, or the `label` while none is chosen, unless you pass a slot. */\nexport const ModelSelectorTrigger = picker.Trigger;\n/** The popover: the search field and the list, unless you pass a slot. Focus moves to the search field. */\nexport const ModelSelectorContent = picker.Content;\n/** UI SDK Command: the search field, the empty text, and every page of rows unless you pass a slot. */\nexport const ModelSelectorList = picker.List;\n/** A group of rows under its label, or the footer. */\nexport const ModelSelectorSectionRows = picker.SectionRows;\n/** A row: UI SDK's `CommandItem` with the row's props, holding its `ModelSelectorItem` unless you pass a slot. */\nexport const ModelSelectorRowItem = picker.RowItem;\n/** A row's content: the model's icon, its marked name, its description, and a check when chosen. */\nexport const ModelSelectorItem = picker.Item;\n",
      "type": "registry:ui",
      "target": "@ui/vue/model-selector.ts"
    }
  ],
  "meta": {
    "layer": "vue"
  },
  "type": "registry:ui"
}
