Get rid of custom components folder

This commit is contained in:
Jared Palmer 2024-11-15 10:14:25 -05:00
parent c493ac342b
commit 6d16f67280
38 changed files with 34 additions and 34 deletions

View file

@ -5,8 +5,8 @@ import { useRouter } from 'next/navigation';
import { useActionState, useEffect, useState } from 'react';
import { toast } from 'sonner';
import { AuthForm } from '@/components/custom/auth-form';
import { SubmitButton } from '@/components/custom/submit-button';
import { AuthForm } from '@/components/auth-form';
import { SubmitButton } from '@/components/submit-button';
import { login, LoginActionState } from '../actions';

View file

@ -5,8 +5,8 @@ import { useRouter } from 'next/navigation';
import { useActionState, useEffect, useState } from 'react';
import { toast } from 'sonner';
import { AuthForm } from '@/components/custom/auth-form';
import { SubmitButton } from '@/components/custom/submit-button';
import { AuthForm } from '@/components/auth-form';
import { SubmitButton } from '@/components/submit-button';
import { register, RegisterActionState } from '../actions';

View file

@ -4,7 +4,7 @@ import { notFound } from 'next/navigation';
import { DEFAULT_MODEL_NAME, models } from '@/ai/models';
import { auth } from '@/app/(auth)/auth';
import { Chat as PreviewChat } from '@/components/custom/chat';
import { Chat as PreviewChat } from '@/components/chat';
import { getChatById, getMessagesByChatId } from '@/lib/db/queries';
import { convertToUIMessages } from '@/lib/utils';

View file

@ -1,6 +1,6 @@
import { cookies } from 'next/headers';
import { AppSidebar } from '@/components/custom/app-sidebar';
import { AppSidebar } from '@/components/app-sidebar';
import { SidebarInset, SidebarProvider } from '@/components/ui/sidebar';
import { auth } from '../(auth)/auth';

View file

@ -1,7 +1,7 @@
import { cookies } from 'next/headers';
import { DEFAULT_MODEL_NAME, models } from '@/ai/models';
import { Chat } from '@/components/custom/chat';
import { Chat } from '@/components/chat';
import { generateUUID } from '@/lib/utils';
export default async function Page() {

View file

@ -1,7 +1,7 @@
import { Metadata } from 'next';
import { Toaster } from 'sonner';
import { ThemeProvider } from '@/components/custom/theme-provider';
import { ThemeProvider } from '@/components/theme-provider';
import './globals.css';

View file

@ -4,9 +4,9 @@ import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { type User } from 'next-auth';
import { PlusIcon } from '@/components/custom/icons';
import { SidebarHistory } from '@/components/custom/sidebar-history';
import { SidebarUserNav } from '@/components/custom/sidebar-user-nav';
import { PlusIcon } from '@/components/icons';
import { SidebarHistory } from '@/components/sidebar-history';
import { SidebarUserNav } from '@/components/sidebar-user-nav';
import { Button } from '@/components/ui/button';
import {
Sidebar,

View file

@ -1,7 +1,7 @@
import Form from 'next/form';
import { Input } from '../ui/input';
import { Label } from '../ui/label';
import { Input } from './ui/input';
import { Label } from './ui/label';
export function AuthForm({
action,

View file

@ -29,8 +29,8 @@ import { MultimodalInput } from './multimodal-input';
import { Toolbar } from './toolbar';
import { useScrollToBottom } from './use-scroll-to-bottom';
import { VersionFooter } from './version-footer';
import { Button } from '../ui/button';
import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip';
import { Button } from './ui/button';
import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip';
export interface UIBlock {
title: string;
documentId: string;

View file

@ -4,13 +4,13 @@ import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { useWindowSize } from 'usehooks-ts';
import { ModelSelector } from '@/components/custom/model-selector';
import { SidebarToggle } from '@/components/custom/sidebar-toggle';
import { ModelSelector } from '@/components/model-selector';
import { SidebarToggle } from '@/components/sidebar-toggle';
import { Button } from '@/components/ui/button';
import { BetterTooltip } from '@/components/ui/tooltip';
import { PlusIcon, VercelIcon } from './icons';
import { useSidebar } from '../ui/sidebar';
import { useSidebar } from './ui/sidebar';
export function ChatHeader({ selectedModelId }: { selectedModelId: string }) {
const router = useRouter();

View file

@ -7,9 +7,9 @@ import { useState } from 'react';
import useSWR, { useSWRConfig } from 'swr';
import { useWindowSize } from 'usehooks-ts';
import { ChatHeader } from '@/components/custom/chat-header';
import { PreviewMessage, ThinkingMessage } from '@/components/custom/message';
import { useScrollToBottom } from '@/components/custom/use-scroll-to-bottom';
import { ChatHeader } from '@/components/chat-header';
import { PreviewMessage, ThinkingMessage } from '@/components/message';
import { useScrollToBottom } from '@/components/use-scroll-to-bottom';
import { Vote } from '@/lib/db/schema';
import { fetcher } from '@/lib/utils';

View file

@ -7,13 +7,13 @@ import { Vote } from '@/lib/db/schema';
import { getMessageIdFromAnnotations } from '@/lib/utils';
import { CopyIcon, ThumbDownIcon, ThumbUpIcon } from './icons';
import { Button } from '../ui/button';
import { Button } from './ui/button';
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from '../ui/tooltip';
} from './ui/tooltip';
export function MessageActions({
chatId,

View file

@ -19,8 +19,8 @@ import { sanitizeUIMessages } from '@/lib/utils';
import { ArrowUpIcon, PaperclipIcon, StopIcon } from './icons';
import { PreviewAttachment } from './preview-attachment';
import { Button } from '../ui/button';
import { Textarea } from '../ui/textarea';
import { Button } from './ui/button';
import { Textarea } from './ui/textarea';
const suggestedActions = [
{

View file

@ -8,7 +8,7 @@ import { useEffect, useState } from 'react';
import { toast } from 'sonner';
import useSWR from 'swr';
import { MoreHorizontalIcon, TrashIcon } from '@/components/custom/icons';
import { MoreHorizontalIcon, TrashIcon } from '@/components/icons';
import {
AlertDialog,
AlertDialogAction,

View file

@ -5,7 +5,7 @@ import { BetterTooltip } from '@/components/ui/tooltip';
import { cn } from '@/lib/utils';
import { SidebarLeftIcon } from './icons';
import { Button } from '../ui/button';
import { Button } from './ui/button';
export function SidebarToggle({
className,

View file

@ -2,9 +2,9 @@
import { useFormStatus } from 'react-dom';
import { LoaderIcon } from '@/components/custom/icons';
import { LoaderIcon } from '@/components/icons';
import { Button } from '../ui/button';
import { Button } from './ui/button';
export function SubmitButton({
children,

View file

@ -7,7 +7,7 @@ import { useWindowSize } from 'usehooks-ts';
import { UISuggestion } from '@/lib/editor/suggestions';
import { CrossIcon, MessageIcon } from './icons';
import { Button } from '../ui/button';
import { Button } from './ui/button';
export const Suggestion = ({
suggestion,

View file

@ -26,7 +26,7 @@ import {
StopIcon,
SummarizeIcon,
} from './icons';
import { Button } from '../ui/button';
import { Button } from './ui/button';
type ToolProps = {
type: 'final-polish' | 'request-suggestions' | 'adjust-reading-level';

View file

@ -11,7 +11,7 @@ import { getDocumentTimestampByIndex } from '@/lib/utils';
import { UIBlock } from './block';
import { LoaderIcon } from './icons';
import { Button } from '../ui/button';
import { Button } from './ui/button';
interface VersionFooterProps {
block: UIBlock;

View file

@ -5,7 +5,7 @@ import { DOMParser, Node } from 'prosemirror-model';
import { Decoration, DecorationSet, EditorView } from 'prosemirror-view';
import { renderToString } from 'react-dom/server';
import { Markdown } from '@/components/custom/markdown';
import { Markdown } from '@/components/markdown';
import { documentSchema } from './config';
import { createSuggestionWidget, UISuggestion } from './suggestions';

View file

@ -3,7 +3,7 @@ import { PluginKey, Plugin } from 'prosemirror-state';
import { Decoration, DecorationSet, EditorView } from 'prosemirror-view';
import { createRoot } from 'react-dom/client';
import { Suggestion as PreviewSuggestion } from '@/components/custom/suggestion';
import { Suggestion as PreviewSuggestion } from '@/components/suggestion';
import { Suggestion } from '@/lib/db/schema';
export interface UISuggestion extends Suggestion {