diff --git a/packages/shadcn-registry/components/ui/popover.tsx b/packages/shadcn-registry/components/ui/popover.tsx deleted file mode 100644 index 3adf73d02..000000000 --- a/packages/shadcn-registry/components/ui/popover.tsx +++ /dev/null @@ -1,33 +0,0 @@ -"use client"; - -import * as PopoverPrimitive from "@radix-ui/react-popover"; -import * as React from "react"; - -import { cn } from "@/lib/utils"; - -const Popover = PopoverPrimitive.Root; - -const PopoverTrigger = PopoverPrimitive.Trigger; - -const PopoverAnchor = PopoverPrimitive.Anchor; - -const PopoverContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( - - - -)); -PopoverContent.displayName = PopoverPrimitive.Content.displayName; - -export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }; diff --git a/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx b/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx index acb380ce4..2211017db 100644 --- a/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx +++ b/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx @@ -4,11 +4,6 @@ import { BotIcon, ChevronDownIcon } from "lucide-react"; import { Thread } from "@/components/ui/assistant-ui/thread"; import { Button } from "@/components/ui/button"; -import { - Popover, - PopoverContent, - PopoverTrigger, -} from "@/components/ui/popover"; import { Tooltip, TooltipContent, @@ -16,25 +11,23 @@ import { } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; import { TooltipProvider } from "@radix-ui/react-tooltip"; -import { useState, forwardRef } from "react"; +import { forwardRef } from "react"; +import { AssistantModalPrimitive } from "@assistant-ui/react"; export const AssistantModal = () => { - const [open, setOpen] = useState(false); - return ( - - + + - - e.preventDefault()} - side="top" - align="end" - className="mb-3 h-[500px] w-[400px] rounded-xl p-0" + + - - + + ); }; @@ -45,6 +38,7 @@ const FloatingAssistantButton = forwardRef< FloatingAssistantButtonProps >(({ "data-state": state, ...rest }, ref) => { const tooltip = state === "open" ? "Close Assistant" : "Open Assistant"; + return (