File tree Expand file tree Collapse file tree 5 files changed +37
-60
lines changed
Expand file tree Collapse file tree 5 files changed +37
-60
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { PlusIcon, VercelIcon } from './icons';
1111import { useSidebar } from './ui/sidebar' ;
1212import { memo } from 'react' ;
1313import { Tooltip , TooltipContent , TooltipTrigger } from './ui/tooltip' ;
14- import { VisibilityType , VisibilitySelector } from './visibility-selector' ;
14+ import { type VisibilityType , VisibilitySelector } from './visibility-selector' ;
1515
1616function PureChatHeader ( {
1717 chatId,
Original file line number Diff line number Diff line change 1+ import { motion } from 'framer-motion' ;
2+
3+ export const Greeting = ( ) => {
4+ return (
5+ < div
6+ key = "overview"
7+ className = "max-w-3xl mx-auto md:mt-20 px-8 size-full flex flex-col justify-center"
8+ >
9+ < motion . div
10+ initial = { { opacity : 0 , y : 10 } }
11+ animate = { { opacity : 1 , y : 0 } }
12+ exit = { { opacity : 0 , y : 10 } }
13+ transition = { { delay : 0.5 } }
14+ className = "text-2xl font-semibold"
15+ >
16+ Hello there!
17+ </ motion . div >
18+ < motion . div
19+ initial = { { opacity : 0 , y : 10 } }
20+ animate = { { opacity : 1 , y : 0 } }
21+ exit = { { opacity : 0 , y : 10 } }
22+ transition = { { delay : 0.6 } }
23+ className = "text-2xl text-zinc-500"
24+ >
25+ How can I help you today?
26+ </ motion . div >
27+ </ div >
28+ ) ;
29+ } ;
Original file line number Diff line number Diff line change 1- import { UIMessage } from 'ai' ;
1+ import type { UIMessage } from 'ai' ;
22import { PreviewMessage , ThinkingMessage } from './message' ;
33import { useScrollToBottom } from './use-scroll-to-bottom' ;
4- import { Overview } from './overview ' ;
4+ import { Greeting } from './greeting ' ;
55import { memo } from 'react' ;
6- import { Vote } from '@/lib/db/schema' ;
6+ import type { Vote } from '@/lib/db/schema' ;
77import equal from 'fast-deep-equal' ;
8- import { UseChatHelpers } from '@ai-sdk/react' ;
8+ import type { UseChatHelpers } from '@ai-sdk/react' ;
99
1010interface MessagesProps {
1111 chatId : string ;
@@ -35,7 +35,7 @@ function PureMessages({
3535 ref = { messagesContainerRef }
3636 className = "flex flex-col min-w-0 gap-6 flex-1 overflow-y-scroll pt-4"
3737 >
38- { messages . length === 0 && < Overview /> }
38+ { messages . length === 0 && < Greeting /> }
3939
4040 { messages . map ( ( message , index ) => (
4141 < PreviewMessage
Original file line number Diff line number Diff line change 11'use client' ;
22
3- import type { Attachment , Message , UIMessage } from 'ai' ;
3+ import type { Attachment , UIMessage } from 'ai' ;
44import cx from 'classnames' ;
55import type React from 'react' ;
66import {
@@ -22,7 +22,7 @@ import { Button } from './ui/button';
2222import { Textarea } from './ui/textarea' ;
2323import { SuggestedActions } from './suggested-actions' ;
2424import equal from 'fast-deep-equal' ;
25- import { UseChatHelpers } from '@ai-sdk/react' ;
25+ import type { UseChatHelpers } from '@ai-sdk/react' ;
2626
2727function PureMultimodalInput ( {
2828 chatId,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments