Spaces:
Sleeping
Sleeping
MingruiZhang
commited on
Commit
β’
c69ef3e
1
Parent(s):
8070499
caps
Browse files- app/(logout)/unauthorized/page.tsx +1 -1
- app/layout.tsx +2 -2
- components/{Headers.tsx β Header.tsx} +2 -2
- components/LoginButton.tsx +2 -2
- components/{Provider.tsx β Providers.tsx} +1 -1
- components/ThemeToggle.tsx +2 -2
- components/UserMenu.tsx +3 -3
- components/chat/ButtonScrollToBottom.tsx +2 -2
- components/chat/ChatList.tsx +1 -1
- components/chat/ChatMessage.tsx +2 -2
- components/chat/ChatMessageActions.tsx +2 -2
- components/chat/ChatPanel.tsx +2 -2
- components/chat/PromptForm.tsx +3 -3
- components/project/MediaTile.tsx +1 -1
- components/ui/{Buttons.tsx β Button.tsx} +0 -0
- components/ui/{CodeBlocks.tsx β CodeBlock.tsx} +2 -2
- components/ui/{DropdownMenus.tsx β DropdownMenu.tsx} +0 -0
- components/ui/{Icon.tsx β Icons.tsx} +0 -0
- components/ui/{Inputs.tsx β Input.tsx} +0 -0
- components/ui/{Separators.tsx β Separator.tsx} +0 -0
- components/ui/{Textareas.tsx β Textarea.tsx} +0 -0
- components/ui/{Tooltips.tsx β Tooltip.tsx} +0 -0
app/(logout)/unauthorized/page.tsx
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import { auth } from '@/auth';
|
2 |
import { redirect } from 'next/navigation';
|
3 |
-
import { Button } from '@/components/ui/
|
4 |
import Link from 'next/link';
|
5 |
|
6 |
export default async function Unauthorized() {
|
|
|
1 |
import { auth } from '@/auth';
|
2 |
import { redirect } from 'next/navigation';
|
3 |
+
import { Button } from '@/components/ui/Button';
|
4 |
import Link from 'next/link';
|
5 |
|
6 |
export default async function Unauthorized() {
|
app/layout.tsx
CHANGED
@@ -5,8 +5,8 @@ import { GeistMono } from 'geist/font/mono';
|
|
5 |
import '@/app/globals.css';
|
6 |
import { cn } from '@/lib/utils';
|
7 |
import { TailwindIndicator } from '@/components/TailwindIndicator';
|
8 |
-
import { Providers } from '@/components/
|
9 |
-
import { Header } from '@/components/
|
10 |
|
11 |
export const metadata = {
|
12 |
metadataBase: new URL(`https://${process.env.VERCEL_URL}`),
|
|
|
5 |
import '@/app/globals.css';
|
6 |
import { cn } from '@/lib/utils';
|
7 |
import { TailwindIndicator } from '@/components/TailwindIndicator';
|
8 |
+
import { Providers } from '@/components/Providers';
|
9 |
+
import { Header } from '@/components/Header';
|
10 |
|
11 |
export const metadata = {
|
12 |
metadataBase: new URL(`https://${process.env.VERCEL_URL}`),
|
components/{Headers.tsx β Header.tsx}
RENAMED
@@ -2,9 +2,9 @@ import * as React from 'react';
|
|
2 |
import Link from 'next/link';
|
3 |
|
4 |
import { auth } from '@/auth';
|
5 |
-
import { Button } from '@/components/ui/
|
6 |
import { UserMenu } from '@/components/UserMenu';
|
7 |
-
import { IconSeparator } from './ui/
|
8 |
|
9 |
export async function Header() {
|
10 |
const session = await auth();
|
|
|
2 |
import Link from 'next/link';
|
3 |
|
4 |
import { auth } from '@/auth';
|
5 |
+
import { Button } from '@/components/ui/Button';
|
6 |
import { UserMenu } from '@/components/UserMenu';
|
7 |
+
import { IconSeparator } from './ui/Icons';
|
8 |
|
9 |
export async function Header() {
|
10 |
const session = await auth();
|
components/LoginButton.tsx
CHANGED
@@ -4,8 +4,8 @@ import * as React from 'react';
|
|
4 |
import { signIn } from 'next-auth/react';
|
5 |
|
6 |
import { cn } from '@/lib/utils';
|
7 |
-
import { Button, type ButtonProps } from '@/components/ui/
|
8 |
-
import { IconGitHub, IconSpinner, IconGoogle } from '@/components/ui/
|
9 |
|
10 |
interface LoginButtonProps extends ButtonProps {
|
11 |
oauth: 'github' | 'google';
|
|
|
4 |
import { signIn } from 'next-auth/react';
|
5 |
|
6 |
import { cn } from '@/lib/utils';
|
7 |
+
import { Button, type ButtonProps } from '@/components/ui/Button';
|
8 |
+
import { IconGitHub, IconSpinner, IconGoogle } from '@/components/ui/Icons';
|
9 |
|
10 |
interface LoginButtonProps extends ButtonProps {
|
11 |
oauth: 'github' | 'google';
|
components/{Provider.tsx β Providers.tsx}
RENAMED
@@ -3,7 +3,7 @@
|
|
3 |
import * as React from 'react';
|
4 |
import { ThemeProvider as NextThemesProvider } from 'next-themes';
|
5 |
import { ThemeProviderProps } from 'next-themes/dist/types';
|
6 |
-
import { TooltipProvider } from '@/components/ui/
|
7 |
|
8 |
export function Providers({ children, ...props }: ThemeProviderProps) {
|
9 |
return (
|
|
|
3 |
import * as React from 'react';
|
4 |
import { ThemeProvider as NextThemesProvider } from 'next-themes';
|
5 |
import { ThemeProviderProps } from 'next-themes/dist/types';
|
6 |
+
import { TooltipProvider } from '@/components/ui/Tooltip';
|
7 |
|
8 |
export function Providers({ children, ...props }: ThemeProviderProps) {
|
9 |
return (
|
components/ThemeToggle.tsx
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
import * as React from 'react';
|
4 |
import { useTheme } from 'next-themes';
|
5 |
|
6 |
-
import { Button } from '@/components/ui/
|
7 |
-
import { IconMoon, IconSun } from '@/components/ui/
|
8 |
|
9 |
export function ThemeToggle() {
|
10 |
const { setTheme, theme } = useTheme();
|
|
|
3 |
import * as React from 'react';
|
4 |
import { useTheme } from 'next-themes';
|
5 |
|
6 |
+
import { Button } from '@/components/ui/Button';
|
7 |
+
import { IconMoon, IconSun } from '@/components/ui/Icons';
|
8 |
|
9 |
export function ThemeToggle() {
|
10 |
const { setTheme, theme } = useTheme();
|
components/UserMenu.tsx
CHANGED
@@ -4,15 +4,15 @@ import Image from 'next/image';
|
|
4 |
import { type Session } from 'next-auth';
|
5 |
import { signOut } from 'next-auth/react';
|
6 |
|
7 |
-
import { Button } from '@/components/ui/
|
8 |
import {
|
9 |
DropdownMenu,
|
10 |
DropdownMenuContent,
|
11 |
DropdownMenuItem,
|
12 |
DropdownMenuSeparator,
|
13 |
DropdownMenuTrigger,
|
14 |
-
} from '@/components/ui/
|
15 |
-
import { IconExternalLink } from '@/components/ui/
|
16 |
|
17 |
export interface UserMenuProps {
|
18 |
user: Session['user'];
|
|
|
4 |
import { type Session } from 'next-auth';
|
5 |
import { signOut } from 'next-auth/react';
|
6 |
|
7 |
+
import { Button } from '@/components/ui/Button';
|
8 |
import {
|
9 |
DropdownMenu,
|
10 |
DropdownMenuContent,
|
11 |
DropdownMenuItem,
|
12 |
DropdownMenuSeparator,
|
13 |
DropdownMenuTrigger,
|
14 |
+
} from '@/components/ui/DropdownMenu';
|
15 |
+
import { IconExternalLink } from '@/components/ui/Icons';
|
16 |
|
17 |
export interface UserMenuProps {
|
18 |
user: Session['user'];
|
components/chat/ButtonScrollToBottom.tsx
CHANGED
@@ -4,8 +4,8 @@ import * as React from 'react';
|
|
4 |
|
5 |
import { cn } from '@/lib/utils';
|
6 |
import { useAtBottom } from '@/lib/hooks/useAtBottom';
|
7 |
-
import { Button, type ButtonProps } from '@/components/ui/
|
8 |
-
import { IconArrowDown } from '@/components/ui/
|
9 |
|
10 |
export function ButtonScrollToBottom({ className, ...props }: ButtonProps) {
|
11 |
const isAtBottom = useAtBottom();
|
|
|
4 |
|
5 |
import { cn } from '@/lib/utils';
|
6 |
import { useAtBottom } from '@/lib/hooks/useAtBottom';
|
7 |
+
import { Button, type ButtonProps } from '@/components/ui/Button';
|
8 |
+
import { IconArrowDown } from '@/components/ui/Icons';
|
9 |
|
10 |
export function ButtonScrollToBottom({ className, ...props }: ButtonProps) {
|
11 |
const isAtBottom = useAtBottom();
|
components/chat/ChatList.tsx
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
'use client';
|
2 |
|
3 |
-
import { Separator } from '@/components/ui/
|
4 |
import { ChatMessage } from '@/components/chat/ChatMessage';
|
5 |
import { MessageWithSelectedDataset } from '../../lib/types';
|
6 |
|
|
|
1 |
'use client';
|
2 |
|
3 |
+
import { Separator } from '@/components/ui/Separator';
|
4 |
import { ChatMessage } from '@/components/chat/ChatMessage';
|
5 |
import { MessageWithSelectedDataset } from '../../lib/types';
|
6 |
|
components/chat/ChatMessage.tsx
CHANGED
@@ -5,9 +5,9 @@ import remarkGfm from 'remark-gfm';
|
|
5 |
import remarkMath from 'remark-math';
|
6 |
|
7 |
import { cn } from '@/lib/utils';
|
8 |
-
import { CodeBlock } from '@/components/ui/
|
9 |
import { MemoizedReactMarkdown } from '@/components/chat/MemoizedReactMarkdown';
|
10 |
-
import { IconOpenAI, IconUser } from '@/components/ui/
|
11 |
import { ChatMessageActions } from '@/components/chat/ChatMessageActions';
|
12 |
import { MessageWithSelectedDataset } from '../../lib/types';
|
13 |
|
|
|
5 |
import remarkMath from 'remark-math';
|
6 |
|
7 |
import { cn } from '@/lib/utils';
|
8 |
+
import { CodeBlock } from '@/components/ui/CodeBlock';
|
9 |
import { MemoizedReactMarkdown } from '@/components/chat/MemoizedReactMarkdown';
|
10 |
+
import { IconOpenAI, IconUser } from '@/components/ui/Icons';
|
11 |
import { ChatMessageActions } from '@/components/chat/ChatMessageActions';
|
12 |
import { MessageWithSelectedDataset } from '../../lib/types';
|
13 |
|
components/chat/ChatMessageActions.tsx
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
|
3 |
import { type Message } from 'ai';
|
4 |
|
5 |
-
import { Button } from '@/components/ui/
|
6 |
-
import { IconCheck, IconCopy } from '@/components/ui/
|
7 |
import { useCopyToClipboard } from '@/lib/hooks/useCopyToClipboard';
|
8 |
import { cn } from '@/lib/utils';
|
9 |
import { MessageWithSelectedDataset } from '../../lib/types';
|
|
|
2 |
|
3 |
import { type Message } from 'ai';
|
4 |
|
5 |
+
import { Button } from '@/components/ui/Button';
|
6 |
+
import { IconCheck, IconCopy } from '@/components/ui/Icons';
|
7 |
import { useCopyToClipboard } from '@/lib/hooks/useCopyToClipboard';
|
8 |
import { cn } from '@/lib/utils';
|
9 |
import { MessageWithSelectedDataset } from '../../lib/types';
|
components/chat/ChatPanel.tsx
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import * as React from 'react';
|
2 |
import { type UseChatHelpers } from 'ai/react';
|
3 |
|
4 |
-
import { Button } from '@/components/ui/
|
5 |
import { PromptForm } from '@/components/chat/PromptForm';
|
6 |
import { ButtonScrollToBottom } from '@/components/chat/ButtonScrollToBottom';
|
7 |
-
import { IconRefresh, IconShare, IconStop } from '@/components/ui/
|
8 |
import { MessageWithSelectedDataset } from '../../lib/types';
|
9 |
|
10 |
export interface ChatPanelProps
|
|
|
1 |
import * as React from 'react';
|
2 |
import { type UseChatHelpers } from 'ai/react';
|
3 |
|
4 |
+
import { Button } from '@/components/ui/Button';
|
5 |
import { PromptForm } from '@/components/chat/PromptForm';
|
6 |
import { ButtonScrollToBottom } from '@/components/chat/ButtonScrollToBottom';
|
7 |
+
import { IconRefresh, IconShare, IconStop } from '@/components/ui/Icons';
|
8 |
import { MessageWithSelectedDataset } from '../../lib/types';
|
9 |
|
10 |
export interface ChatPanelProps
|
components/chat/PromptForm.tsx
CHANGED
@@ -3,13 +3,13 @@ import Textarea from 'react-textarea-autosize';
|
|
3 |
import { UseChatHelpers } from 'ai/react';
|
4 |
import { useEnterSubmit } from '@/lib/hooks/useEnterSubmit';
|
5 |
import { cn } from '@/lib/utils';
|
6 |
-
import { Button, buttonVariants } from '@/components/ui/
|
7 |
import {
|
8 |
Tooltip,
|
9 |
TooltipContent,
|
10 |
TooltipTrigger,
|
11 |
-
} from '@/components/ui/
|
12 |
-
import { IconArrowElbow, IconPlus } from '@/components/ui/
|
13 |
import { useRouter } from 'next/navigation';
|
14 |
|
15 |
export interface PromptProps
|
|
|
3 |
import { UseChatHelpers } from 'ai/react';
|
4 |
import { useEnterSubmit } from '@/lib/hooks/useEnterSubmit';
|
5 |
import { cn } from '@/lib/utils';
|
6 |
+
import { Button, buttonVariants } from '@/components/ui/Button';
|
7 |
import {
|
8 |
Tooltip,
|
9 |
TooltipContent,
|
10 |
TooltipTrigger,
|
11 |
+
} from '@/components/ui/Tooltip';
|
12 |
+
import { IconArrowElbow, IconPlus } from '@/components/ui/Icons';
|
13 |
import { useRouter } from 'next/navigation';
|
14 |
|
15 |
export interface PromptProps
|
components/project/MediaTile.tsx
CHANGED
@@ -6,7 +6,7 @@ import {
|
|
6 |
Tooltip,
|
7 |
TooltipContent,
|
8 |
TooltipTrigger,
|
9 |
-
} from '@/components/ui/
|
10 |
import { MediaDetails } from '@/lib/fetch/clef';
|
11 |
|
12 |
export interface MediaTileProps {
|
|
|
6 |
Tooltip,
|
7 |
TooltipContent,
|
8 |
TooltipTrigger,
|
9 |
+
} from '@/components/ui/Tooltip';
|
10 |
import { MediaDetails } from '@/lib/fetch/clef';
|
11 |
|
12 |
export interface MediaTileProps {
|
components/ui/{Buttons.tsx β Button.tsx}
RENAMED
File without changes
|
components/ui/{CodeBlocks.tsx β CodeBlock.tsx}
RENAMED
@@ -8,8 +8,8 @@ import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
|
8 |
import { coldarkDark } from 'react-syntax-highlighter/dist/cjs/styles/prism';
|
9 |
|
10 |
import { useCopyToClipboard } from '@/lib/hooks/useCopyToClipboard';
|
11 |
-
import { IconCheck, IconCopy, IconDownload } from '@/components/ui/
|
12 |
-
import { Button } from '@/components/ui/
|
13 |
|
14 |
interface Props {
|
15 |
language: string;
|
|
|
8 |
import { coldarkDark } from 'react-syntax-highlighter/dist/cjs/styles/prism';
|
9 |
|
10 |
import { useCopyToClipboard } from '@/lib/hooks/useCopyToClipboard';
|
11 |
+
import { IconCheck, IconCopy, IconDownload } from '@/components/ui/Icons';
|
12 |
+
import { Button } from '@/components/ui/Button';
|
13 |
|
14 |
interface Props {
|
15 |
language: string;
|
components/ui/{DropdownMenus.tsx β DropdownMenu.tsx}
RENAMED
File without changes
|
components/ui/{Icon.tsx β Icons.tsx}
RENAMED
File without changes
|
components/ui/{Inputs.tsx β Input.tsx}
RENAMED
File without changes
|
components/ui/{Separators.tsx β Separator.tsx}
RENAMED
File without changes
|
components/ui/{Textareas.tsx β Textarea.tsx}
RENAMED
File without changes
|
components/ui/{Tooltips.tsx β Tooltip.tsx}
RENAMED
File without changes
|