diff --git a/src/components/chat/components/add-messages-to-page-wrapper/index.tsx b/src/components/chat/components/add-messages-to-page-wrapper/index.tsx index 6460b0ec..e3b83a4e 100644 --- a/src/components/chat/components/add-messages-to-page-wrapper/index.tsx +++ b/src/components/chat/components/add-messages-to-page-wrapper/index.tsx @@ -2,7 +2,7 @@ import { useChatContext } from '@/components/chat/chat/context'; import { SpaceList } from '../add-messages-to-page-wrapper/space-list'; import { Label } from '@/components/ui/label'; import { SearchInput } from '@/components/chat/components/ui/search-input'; -import { Popover, PopoverContent, PopoverTrigger } from '@/components/chat/components/ui/popover'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { Separator } from '@/components/ui/separator'; import { toast } from 'sonner'; import { useViewContentInserter } from '@/components/chat/hooks/use-view-content-inserter'; diff --git a/src/components/chat/components/ai-writer/index.tsx b/src/components/chat/components/ai-writer/index.tsx index b859aa12..44972c02 100644 --- a/src/components/chat/components/ai-writer/index.tsx +++ b/src/components/chat/components/ai-writer/index.tsx @@ -6,7 +6,7 @@ import { AskAnything } from '@/components/chat/components/ai-writer/tools/ask-an import { Explain } from '@/components/chat/components/ai-writer/tools/explain'; import { FixSpelling } from '@/components/chat/components/ai-writer/tools/fix-spelling'; import { ImproveWriting } from '@/components/chat/components/ai-writer/tools/improve-writing'; -import { Popover, PopoverContent, PopoverTrigger } from '@/components/chat/components/ui/popover'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { useTranslation } from '@/components/chat/i18n'; import { AIAssistantType } from '@/components/chat/types'; import { useWriterContext } from '@/components/chat/writer/context'; diff --git a/src/components/chat/components/ai-writer/view-tree/index.tsx b/src/components/chat/components/ai-writer/view-tree/index.tsx index 9a4a8088..b046eb11 100644 --- a/src/components/chat/components/ai-writer/view-tree/index.tsx +++ b/src/components/chat/components/ai-writer/view-tree/index.tsx @@ -6,7 +6,7 @@ import { Spaces } from './spaces'; import { MESSAGE_VARIANTS } from '@/components/chat/lib/animations'; import { motion } from 'framer-motion'; import { Button } from '@/components/ui/button'; -import { Popover, PopoverContent, PopoverTrigger } from '@/components/chat/components/ui/popover'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { SearchInput } from '@/components/chat/components/ui/search-input'; import { Separator } from '@/components/ui/separator'; import { useCheckboxTree } from '@/components/chat/hooks/use-checkbox-tree'; diff --git a/src/components/chat/components/ai-writer/writing-more.tsx b/src/components/chat/components/ai-writer/writing-more.tsx index cfc9422b..7883ee97 100644 --- a/src/components/chat/components/ai-writer/writing-more.tsx +++ b/src/components/chat/components/ai-writer/writing-more.tsx @@ -1,6 +1,6 @@ import { AiWriterMenuContent } from '../ai-writer/ai-writer-menu-content'; import { Button } from '@/components/ui/button'; -import { Popover, PopoverContent, PopoverTrigger } from '@/components/chat/components/ui/popover'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { useTranslation } from '@/components/chat/i18n'; import { AIAssistantType } from '@/components/chat/types'; import { useWriterContext } from '@/components/chat/writer/context'; diff --git a/src/components/chat/components/chat-input/model-selector/index.tsx b/src/components/chat/components/chat-input/model-selector/index.tsx index 986958d0..2945f652 100644 --- a/src/components/chat/components/chat-input/model-selector/index.tsx +++ b/src/components/chat/components/chat-input/model-selector/index.tsx @@ -9,7 +9,7 @@ import { Popover, PopoverContent, PopoverTrigger, -} from '@/components/chat/components/ui/popover'; +} from '@/components/ui/popover'; import { useModelSelectorContext } from '@/components/chat/contexts/model-selector-context'; import { MESSAGE_VARIANTS } from '@/components/chat/lib/animations'; import { ModelCache } from '@/components/chat/lib/model-cache'; diff --git a/src/components/chat/components/chat-input/prompt-modal/prompt-database/prompt-database-views.tsx b/src/components/chat/components/chat-input/prompt-modal/prompt-database/prompt-database-views.tsx index 73d6b583..d6e07b66 100644 --- a/src/components/chat/components/chat-input/prompt-modal/prompt-database/prompt-database-views.tsx +++ b/src/components/chat/components/chat-input/prompt-modal/prompt-database/prompt-database-views.tsx @@ -2,7 +2,7 @@ import { Popover, PopoverContent, PopoverTrigger, -} from '@/components/chat/components/ui/popover'; +} from '@/components/ui/popover'; import { SearchInput } from '@/components/chat/components/ui/search-input'; import { Separator } from '@/components/ui/separator'; import { ReactNode, useState } from 'react'; diff --git a/src/components/chat/components/chat-input/related-views/index.tsx b/src/components/chat/components/chat-input/related-views/index.tsx index 1b4ca25d..75ff2a55 100644 --- a/src/components/chat/components/chat-input/related-views/index.tsx +++ b/src/components/chat/components/chat-input/related-views/index.tsx @@ -2,7 +2,7 @@ import LoadingDots from '@/components/chat/components/ui/loading-dots'; import { SearchInput } from '@/components/chat/components/ui/search-input'; import { Spaces } from './spaces'; import { Button } from '@/components/ui/button'; -import { Popover, PopoverContent, PopoverTrigger } from '@/components/chat/components/ui/popover'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { motion } from 'framer-motion'; import { ReactComponent as DocIcon } from '@/components/chat/assets/icons/doc.svg'; import { Separator } from '@/components/ui/separator'; diff --git a/src/components/chat/components/chat-messages/regenerations.tsx b/src/components/chat/components/chat-messages/regenerations.tsx index 82310133..f5d952b5 100644 --- a/src/components/chat/components/chat-messages/regenerations.tsx +++ b/src/components/chat/components/chat-messages/regenerations.tsx @@ -4,7 +4,7 @@ import { ReactComponent as RegenerateCircleIcon } from '@/components/chat/assets import { ReactComponent as TryAgainIcon } from '@/components/chat/assets/icons/undo.svg'; import { FormatGroup } from '@/components/chat/components/ui/format-group'; import { Button } from '@/components/ui/button'; -import { Popover, PopoverContent, PopoverTrigger } from '@/components/chat/components/ui/popover'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'; import { useTranslation } from '@/components/chat/i18n'; import { useMessagesHandlerContext } from '@/components/chat/provider/messages-handler-provider'; diff --git a/src/components/chat/components/ui/popover.tsx b/src/components/chat/components/ui/popover.tsx deleted file mode 100644 index 05347e93..00000000 --- a/src/components/chat/components/ui/popover.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import * as PopoverPrimitive from '@radix-ui/react-popover'; -import { forwardRef } from 'react'; - -import { cn } from '@/components/chat/lib/utils'; - -function Popover({ - ...props -}: React.ComponentProps) { - return ; -} - -const PopoverTrigger = forwardRef< - HTMLButtonElement, - React.ComponentProps ->(({ ...props }, ref) => { - return ( - - ); -}); - -function PopoverContent({ - className, - align = 'center', - sideOffset = 4, - container, - ...props -}: React.ComponentProps & { - container?: React.ComponentProps['container']; - disableOutsidePointerEvents?: boolean; -}) { - return ( - - - - ); -} - -function PopoverAnchor({ - ...props -}: React.ComponentProps) { - return ; -} - -export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger }; diff --git a/src/components/chat/writer/ai-writer-menu.tsx b/src/components/chat/writer/ai-writer-menu.tsx index 57d81b4b..ffdf0aee 100644 --- a/src/components/chat/writer/ai-writer-menu.tsx +++ b/src/components/chat/writer/ai-writer-menu.tsx @@ -1,5 +1,5 @@ import { AiWriterMenuContent } from '@/components/chat/components/ai-writer/ai-writer-menu-content'; -import { Popover, PopoverContent, PopoverTrigger } from '@/components/chat/components/ui/popover'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { AIAssistantType } from '@/components/chat/types'; interface AIWriterMenuProps {