File tree 5 files changed +37
-60
lines changed
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';
11
11
import { useSidebar } from './ui/sidebar' ;
12
12
import { memo } from 'react' ;
13
13
import { Tooltip , TooltipContent , TooltipTrigger } from './ui/tooltip' ;
14
- import { VisibilityType , VisibilitySelector } from './visibility-selector' ;
14
+ import { type VisibilityType , VisibilitySelector } from './visibility-selector' ;
15
15
16
16
function PureChatHeader ( {
17
17
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' ;
2
2
import { PreviewMessage , ThinkingMessage } from './message' ;
3
3
import { useScrollToBottom } from './use-scroll-to-bottom' ;
4
- import { Overview } from './overview ' ;
4
+ import { Greeting } from './greeting ' ;
5
5
import { memo } from 'react' ;
6
- import { Vote } from '@/lib/db/schema' ;
6
+ import type { Vote } from '@/lib/db/schema' ;
7
7
import equal from 'fast-deep-equal' ;
8
- import { UseChatHelpers } from '@ai-sdk/react' ;
8
+ import type { UseChatHelpers } from '@ai-sdk/react' ;
9
9
10
10
interface MessagesProps {
11
11
chatId : string ;
@@ -35,7 +35,7 @@ function PureMessages({
35
35
ref = { messagesContainerRef }
36
36
className = "flex flex-col min-w-0 gap-6 flex-1 overflow-y-scroll pt-4"
37
37
>
38
- { messages . length === 0 && < Overview /> }
38
+ { messages . length === 0 && < Greeting /> }
39
39
40
40
{ messages . map ( ( message , index ) => (
41
41
< PreviewMessage
Original file line number Diff line number Diff line change 1
1
'use client' ;
2
2
3
- import type { Attachment , Message , UIMessage } from 'ai' ;
3
+ import type { Attachment , UIMessage } from 'ai' ;
4
4
import cx from 'classnames' ;
5
5
import type React from 'react' ;
6
6
import {
@@ -22,7 +22,7 @@ import { Button } from './ui/button';
22
22
import { Textarea } from './ui/textarea' ;
23
23
import { SuggestedActions } from './suggested-actions' ;
24
24
import equal from 'fast-deep-equal' ;
25
- import { UseChatHelpers } from '@ai-sdk/react' ;
25
+ import type { UseChatHelpers } from '@ai-sdk/react' ;
26
26
27
27
function PureMultimodalInput ( {
28
28
chatId,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments