Skip to content

Conversation

@thomasyuill-livekit
Copy link
Contributor

@thomasyuill-livekit thomasyuill-livekit commented Dec 12, 2025

Summary

  • Introduces a shadcn registry configuration (registry.json) for the @agents-ui package, enabling components to be installed via the shadcn CLI
  • Restructures the agents-ui components to follow shadcn registry conventions by flattening nested component directories and consolidating hooks into a dedicated hooks/agents-ui/ folder
  • Consolidates use-input-controls and use-publish-permissions hooks into a single use-agent-control-bar.ts file
  • Inlines AgentChatInput component into agent-control-bar.tsx to simplify the component structure

Testing

  • create a test next js app
  • add components.json file (see below)
  • run pnpm registry:build && pnpm registry:serve
  • run pnpm dlx shadcn@latest add @agents-ui/agent-track-toggle @agents-ui/agent-track-control @agents-ui/agent-disconnect-button @agents-ui/agent-control-bar @agents-ui/audio-visualizer-bar in test app folder
  • run pnpm i && pnpm dev
  • try and use the @agents-ui components in your app

components.json

{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "new-york",
  "rsc": true,
  "tsx": true,
  "tailwind": {
    "config": "",
    "css": "app/globals.css",
    "baseColor": "neutral",
    "cssVariables": true,
    "prefix": ""
  },
  "iconLibrary": "lucide",
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils",
    "ui": "@/components/ui",
    "lib": "@/lib",
    "hooks": "@/hooks"
  },
  "registries": {
    "@agents-ui": "http://localhost:3210/{name}.json"
  }
}

@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2025

⚠️ No Changeset found

Latest commit: f9e9d04

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2025

size-limit report 📦

Path Size
LiveKitRoom only 6 KB (0%)
LiveKitRoom with VideoConference 32.46 KB (0%)
All exports 43.29 KB (0%)

@thomasyuill-livekit thomasyuill-livekit self-assigned this Dec 12, 2025
@lukasIO
Copy link
Contributor

lukasIO commented Dec 12, 2025

@thomasyuill-livekit can you share some more info around the recommended flattening approach for hooks?
The only official example I found nests the hook/lib/components folder in the component/block directory

@thomasyuill-livekit
Copy link
Contributor Author

@thomasyuill-livekit can you share some more info around the recommended flattening approach for hooks?
The only official example I found nests the hook/lib/components folder in the component/block directory

@lukasIO
Yeah this was a little trial and error on my part to understand how shadcn installs dependencies

I discovered

  • use registry:ui if the component is a simple primitive and should installed in the components/ui folder
  • use registry:component if you want it installed in a namespaced folder components/{namespace}
  • top level registry:hook items are installed in /hooks
  • registry items (likeregistry:hook) within a component or block are installed in a namespaced folder components/{namespace} or hooks/{namespace} etc

see screen shot of folder structure from sample app

Screenshot 2025-12-12 at 9 56 52 AM

@thomasyuill-livekit thomasyuill-livekit merged commit 4b7752e into main Dec 12, 2025
6 checks passed
@thomasyuill-livekit thomasyuill-livekit deleted the ty/shadcn-init-registy branch December 12, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants