Get rid of custom components folder
This commit is contained in:
parent
c493ac342b
commit
6d16f67280
38 changed files with 34 additions and 34 deletions
|
|
@ -5,8 +5,8 @@ import { useRouter } from 'next/navigation';
|
||||||
import { useActionState, useEffect, useState } from 'react';
|
import { useActionState, useEffect, useState } from 'react';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
|
|
||||||
import { AuthForm } from '@/components/custom/auth-form';
|
import { AuthForm } from '@/components/auth-form';
|
||||||
import { SubmitButton } from '@/components/custom/submit-button';
|
import { SubmitButton } from '@/components/submit-button';
|
||||||
|
|
||||||
import { login, LoginActionState } from '../actions';
|
import { login, LoginActionState } from '../actions';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import { useRouter } from 'next/navigation';
|
||||||
import { useActionState, useEffect, useState } from 'react';
|
import { useActionState, useEffect, useState } from 'react';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
|
|
||||||
import { AuthForm } from '@/components/custom/auth-form';
|
import { AuthForm } from '@/components/auth-form';
|
||||||
import { SubmitButton } from '@/components/custom/submit-button';
|
import { SubmitButton } from '@/components/submit-button';
|
||||||
|
|
||||||
import { register, RegisterActionState } from '../actions';
|
import { register, RegisterActionState } from '../actions';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { notFound } from 'next/navigation';
|
||||||
|
|
||||||
import { DEFAULT_MODEL_NAME, models } from '@/ai/models';
|
import { DEFAULT_MODEL_NAME, models } from '@/ai/models';
|
||||||
import { auth } from '@/app/(auth)/auth';
|
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 { getChatById, getMessagesByChatId } from '@/lib/db/queries';
|
||||||
import { convertToUIMessages } from '@/lib/utils';
|
import { convertToUIMessages } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { cookies } from 'next/headers';
|
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 { SidebarInset, SidebarProvider } from '@/components/ui/sidebar';
|
||||||
|
|
||||||
import { auth } from '../(auth)/auth';
|
import { auth } from '../(auth)/auth';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { cookies } from 'next/headers';
|
import { cookies } from 'next/headers';
|
||||||
|
|
||||||
import { DEFAULT_MODEL_NAME, models } from '@/ai/models';
|
import { DEFAULT_MODEL_NAME, models } from '@/ai/models';
|
||||||
import { Chat } from '@/components/custom/chat';
|
import { Chat } from '@/components/chat';
|
||||||
import { generateUUID } from '@/lib/utils';
|
import { generateUUID } from '@/lib/utils';
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
import { Toaster } from 'sonner';
|
import { Toaster } from 'sonner';
|
||||||
|
|
||||||
import { ThemeProvider } from '@/components/custom/theme-provider';
|
import { ThemeProvider } from '@/components/theme-provider';
|
||||||
|
|
||||||
import './globals.css';
|
import './globals.css';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import Link from 'next/link';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
import { type User } from 'next-auth';
|
import { type User } from 'next-auth';
|
||||||
|
|
||||||
import { PlusIcon } from '@/components/custom/icons';
|
import { PlusIcon } from '@/components/icons';
|
||||||
import { SidebarHistory } from '@/components/custom/sidebar-history';
|
import { SidebarHistory } from '@/components/sidebar-history';
|
||||||
import { SidebarUserNav } from '@/components/custom/sidebar-user-nav';
|
import { SidebarUserNav } from '@/components/sidebar-user-nav';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import Form from 'next/form';
|
import Form from 'next/form';
|
||||||
|
|
||||||
import { Input } from '../ui/input';
|
import { Input } from './ui/input';
|
||||||
import { Label } from '../ui/label';
|
import { Label } from './ui/label';
|
||||||
|
|
||||||
export function AuthForm({
|
export function AuthForm({
|
||||||
action,
|
action,
|
||||||
|
|
@ -29,8 +29,8 @@ import { MultimodalInput } from './multimodal-input';
|
||||||
import { Toolbar } from './toolbar';
|
import { Toolbar } from './toolbar';
|
||||||
import { useScrollToBottom } from './use-scroll-to-bottom';
|
import { useScrollToBottom } from './use-scroll-to-bottom';
|
||||||
import { VersionFooter } from './version-footer';
|
import { VersionFooter } from './version-footer';
|
||||||
import { Button } from '../ui/button';
|
import { Button } from './ui/button';
|
||||||
import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip';
|
import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip';
|
||||||
export interface UIBlock {
|
export interface UIBlock {
|
||||||
title: string;
|
title: string;
|
||||||
documentId: string;
|
documentId: string;
|
||||||
|
|
@ -4,13 +4,13 @@ import Link from 'next/link';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
import { useWindowSize } from 'usehooks-ts';
|
import { useWindowSize } from 'usehooks-ts';
|
||||||
|
|
||||||
import { ModelSelector } from '@/components/custom/model-selector';
|
import { ModelSelector } from '@/components/model-selector';
|
||||||
import { SidebarToggle } from '@/components/custom/sidebar-toggle';
|
import { SidebarToggle } from '@/components/sidebar-toggle';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { BetterTooltip } from '@/components/ui/tooltip';
|
import { BetterTooltip } from '@/components/ui/tooltip';
|
||||||
|
|
||||||
import { PlusIcon, VercelIcon } from './icons';
|
import { PlusIcon, VercelIcon } from './icons';
|
||||||
import { useSidebar } from '../ui/sidebar';
|
import { useSidebar } from './ui/sidebar';
|
||||||
|
|
||||||
export function ChatHeader({ selectedModelId }: { selectedModelId: string }) {
|
export function ChatHeader({ selectedModelId }: { selectedModelId: string }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -7,9 +7,9 @@ import { useState } from 'react';
|
||||||
import useSWR, { useSWRConfig } from 'swr';
|
import useSWR, { useSWRConfig } from 'swr';
|
||||||
import { useWindowSize } from 'usehooks-ts';
|
import { useWindowSize } from 'usehooks-ts';
|
||||||
|
|
||||||
import { ChatHeader } from '@/components/custom/chat-header';
|
import { ChatHeader } from '@/components/chat-header';
|
||||||
import { PreviewMessage, ThinkingMessage } from '@/components/custom/message';
|
import { PreviewMessage, ThinkingMessage } from '@/components/message';
|
||||||
import { useScrollToBottom } from '@/components/custom/use-scroll-to-bottom';
|
import { useScrollToBottom } from '@/components/use-scroll-to-bottom';
|
||||||
import { Vote } from '@/lib/db/schema';
|
import { Vote } from '@/lib/db/schema';
|
||||||
import { fetcher } from '@/lib/utils';
|
import { fetcher } from '@/lib/utils';
|
||||||
|
|
||||||
|
|
@ -7,13 +7,13 @@ import { Vote } from '@/lib/db/schema';
|
||||||
import { getMessageIdFromAnnotations } from '@/lib/utils';
|
import { getMessageIdFromAnnotations } from '@/lib/utils';
|
||||||
|
|
||||||
import { CopyIcon, ThumbDownIcon, ThumbUpIcon } from './icons';
|
import { CopyIcon, ThumbDownIcon, ThumbUpIcon } from './icons';
|
||||||
import { Button } from '../ui/button';
|
import { Button } from './ui/button';
|
||||||
import {
|
import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
TooltipContent,
|
TooltipContent,
|
||||||
TooltipProvider,
|
TooltipProvider,
|
||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
} from '../ui/tooltip';
|
} from './ui/tooltip';
|
||||||
|
|
||||||
export function MessageActions({
|
export function MessageActions({
|
||||||
chatId,
|
chatId,
|
||||||
|
|
@ -19,8 +19,8 @@ import { sanitizeUIMessages } from '@/lib/utils';
|
||||||
|
|
||||||
import { ArrowUpIcon, PaperclipIcon, StopIcon } from './icons';
|
import { ArrowUpIcon, PaperclipIcon, StopIcon } from './icons';
|
||||||
import { PreviewAttachment } from './preview-attachment';
|
import { PreviewAttachment } from './preview-attachment';
|
||||||
import { Button } from '../ui/button';
|
import { Button } from './ui/button';
|
||||||
import { Textarea } from '../ui/textarea';
|
import { Textarea } from './ui/textarea';
|
||||||
|
|
||||||
const suggestedActions = [
|
const suggestedActions = [
|
||||||
{
|
{
|
||||||
|
|
@ -8,7 +8,7 @@ import { useEffect, useState } from 'react';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import useSWR from 'swr';
|
import useSWR from 'swr';
|
||||||
|
|
||||||
import { MoreHorizontalIcon, TrashIcon } from '@/components/custom/icons';
|
import { MoreHorizontalIcon, TrashIcon } from '@/components/icons';
|
||||||
import {
|
import {
|
||||||
AlertDialog,
|
AlertDialog,
|
||||||
AlertDialogAction,
|
AlertDialogAction,
|
||||||
|
|
@ -5,7 +5,7 @@ import { BetterTooltip } from '@/components/ui/tooltip';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
import { SidebarLeftIcon } from './icons';
|
import { SidebarLeftIcon } from './icons';
|
||||||
import { Button } from '../ui/button';
|
import { Button } from './ui/button';
|
||||||
|
|
||||||
export function SidebarToggle({
|
export function SidebarToggle({
|
||||||
className,
|
className,
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
import { useFormStatus } from 'react-dom';
|
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({
|
export function SubmitButton({
|
||||||
children,
|
children,
|
||||||
|
|
@ -7,7 +7,7 @@ import { useWindowSize } from 'usehooks-ts';
|
||||||
import { UISuggestion } from '@/lib/editor/suggestions';
|
import { UISuggestion } from '@/lib/editor/suggestions';
|
||||||
|
|
||||||
import { CrossIcon, MessageIcon } from './icons';
|
import { CrossIcon, MessageIcon } from './icons';
|
||||||
import { Button } from '../ui/button';
|
import { Button } from './ui/button';
|
||||||
|
|
||||||
export const Suggestion = ({
|
export const Suggestion = ({
|
||||||
suggestion,
|
suggestion,
|
||||||
|
|
@ -26,7 +26,7 @@ import {
|
||||||
StopIcon,
|
StopIcon,
|
||||||
SummarizeIcon,
|
SummarizeIcon,
|
||||||
} from './icons';
|
} from './icons';
|
||||||
import { Button } from '../ui/button';
|
import { Button } from './ui/button';
|
||||||
|
|
||||||
type ToolProps = {
|
type ToolProps = {
|
||||||
type: 'final-polish' | 'request-suggestions' | 'adjust-reading-level';
|
type: 'final-polish' | 'request-suggestions' | 'adjust-reading-level';
|
||||||
|
|
@ -11,7 +11,7 @@ import { getDocumentTimestampByIndex } from '@/lib/utils';
|
||||||
|
|
||||||
import { UIBlock } from './block';
|
import { UIBlock } from './block';
|
||||||
import { LoaderIcon } from './icons';
|
import { LoaderIcon } from './icons';
|
||||||
import { Button } from '../ui/button';
|
import { Button } from './ui/button';
|
||||||
|
|
||||||
interface VersionFooterProps {
|
interface VersionFooterProps {
|
||||||
block: UIBlock;
|
block: UIBlock;
|
||||||
|
|
@ -5,7 +5,7 @@ import { DOMParser, Node } from 'prosemirror-model';
|
||||||
import { Decoration, DecorationSet, EditorView } from 'prosemirror-view';
|
import { Decoration, DecorationSet, EditorView } from 'prosemirror-view';
|
||||||
import { renderToString } from 'react-dom/server';
|
import { renderToString } from 'react-dom/server';
|
||||||
|
|
||||||
import { Markdown } from '@/components/custom/markdown';
|
import { Markdown } from '@/components/markdown';
|
||||||
|
|
||||||
import { documentSchema } from './config';
|
import { documentSchema } from './config';
|
||||||
import { createSuggestionWidget, UISuggestion } from './suggestions';
|
import { createSuggestionWidget, UISuggestion } from './suggestions';
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { PluginKey, Plugin } from 'prosemirror-state';
|
||||||
import { Decoration, DecorationSet, EditorView } from 'prosemirror-view';
|
import { Decoration, DecorationSet, EditorView } from 'prosemirror-view';
|
||||||
import { createRoot } from 'react-dom/client';
|
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';
|
import { Suggestion } from '@/lib/db/schema';
|
||||||
|
|
||||||
export interface UISuggestion extends Suggestion {
|
export interface UISuggestion extends Suggestion {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue