diff --git a/components/chat-header.tsx b/components/chat-header.tsx index 9d595ef..003f880 100644 --- a/components/chat-header.tsx +++ b/components/chat-header.tsx @@ -11,7 +11,7 @@ import { PlusIcon, VercelIcon } from './icons'; import { useSidebar } from './ui/sidebar'; import { memo } from 'react'; import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip'; -import { VisibilityType, VisibilitySelector } from './visibility-selector'; +import { type VisibilityType, VisibilitySelector } from './visibility-selector'; function PureChatHeader({ chatId, diff --git a/components/greeting.tsx b/components/greeting.tsx new file mode 100644 index 0000000..9543c77 --- /dev/null +++ b/components/greeting.tsx @@ -0,0 +1,29 @@ +import { motion } from 'framer-motion'; + +export const Greeting = () => { + return ( +
+ + Hello there! + + + How can I help you today? + +
+ ); +}; diff --git a/components/messages.tsx b/components/messages.tsx index 045f3ae..dbcb546 100644 --- a/components/messages.tsx +++ b/components/messages.tsx @@ -1,11 +1,11 @@ -import { UIMessage } from 'ai'; +import type { UIMessage } from 'ai'; import { PreviewMessage, ThinkingMessage } from './message'; import { useScrollToBottom } from './use-scroll-to-bottom'; -import { Overview } from './overview'; +import { Greeting } from './greeting'; import { memo } from 'react'; -import { Vote } from '@/lib/db/schema'; +import type { Vote } from '@/lib/db/schema'; import equal from 'fast-deep-equal'; -import { UseChatHelpers } from '@ai-sdk/react'; +import type { UseChatHelpers } from '@ai-sdk/react'; interface MessagesProps { chatId: string; @@ -35,7 +35,7 @@ function PureMessages({ ref={messagesContainerRef} className="flex flex-col min-w-0 gap-6 flex-1 overflow-y-scroll pt-4" > - {messages.length === 0 && } + {messages.length === 0 && } {messages.map((message, index) => ( { - return ( - -
-

- - + - -

-

- This is an{' '} - - open source - {' '} - chatbot template built with Next.js and the AI SDK by Vercel. It uses - the{' '} - streamText{' '} - function in the server and the{' '} - useChat hook - on the client to create a seamless chat experience. -

-

- You can learn more about the AI SDK by visiting the{' '} - - docs - - . -

-
-
- ); -};