11'use client' ;
22
3- import { UIMessage } from '@ai-sdk/react' ;
3+ import type { UIMessage } from '@ai-sdk/react' ;
44import { Sparkles } from 'lucide-react' ;
55import { Markdown } from '@/components/markdown' ;
66import { useApp } from '@/contexts/app' ;
@@ -23,19 +23,19 @@ export default function Messages() {
2323
2424 if ( isLoadingMessages ) {
2525 return (
26- < div className = " flex justify-center items-center h-full animate__animated animate__fadeIn" >
27- < span className = " loading loading-spinner loading-md" > </ span >
26+ < div className = ' flex justify-center items-center h-full animate__animated animate__fadeIn' >
27+ < span className = ' loading loading-spinner loading-md' > </ span >
2828 </ div >
2929 ) ;
3030 }
3131
3232 if ( ! id ) {
3333 return (
34- < div className = " flex justify-center items-center flex-col h-full " >
35- < h1 className = " animate__animated animate__fadeInUp mb-0 " >
36- < span className = " ai-thinking" > Welcome to AI Assistant</ span >
34+ < div className = ' flex justify-center items-center flex-col h-full ' >
35+ < h1 className = ' animate__animated animate__fadeInUp mb-0 ' >
36+ < span className = ' ai-thinking' > Welcome to AI Assistant</ span >
3737 </ h1 >
38- < p className = " animate__animated animate__fadeInUp animate__delay-1s text-gray-500" >
38+ < p className = ' animate__animated animate__fadeInUp animate__delay-1s text-gray-500' >
3939 Ready to help you with any questions or tasks. How can I assist you
4040 today?
4141 </ p >
@@ -44,29 +44,29 @@ export default function Messages() {
4444 }
4545
4646 return (
47- < div className = " py-15 pl-3 max-w-3xl mx-auto space-y-5" >
47+ < div className = ' py-15 pl-3 max-w-3xl mx-auto space-y-5' >
4848 { messages . map ( ( m : UIMessage ) => (
4949 < div
5050 key = { m . id }
5151 className = { `chat animate__animated animate__fadeIn ${
5252 m . role === 'user' ? 'chat-end' : 'chat-start'
5353 } `}
5454 >
55- < div className = " flex gap-2 flex-wrap" >
55+ < div className = ' flex gap-2 flex-wrap' >
5656 { m . parts . map (
5757 ( part , index ) =>
5858 part . type === 'file' &&
5959 part . url && (
6060 < a
6161 key = { 'file-' + index + m . id }
6262 href = { part . url }
63- target = " _blank"
64- className = " not-prose mb-2"
63+ target = ' _blank'
64+ className = ' not-prose mb-2'
6565 >
6666 < Image
6767 src = { part . url }
6868 alt = { part . filename || 'unknown' }
69- className = " w-30 h-30 rounded-lg object-cover"
69+ className = ' w-30 h-30 rounded-lg object-cover'
7070 width = { 300 }
7171 height = { 300 }
7272 />
@@ -91,9 +91,9 @@ export default function Messages() {
9191 </ div >
9292 ) ) }
9393 { status === 'submitted' && (
94- < div className = " flex gap-1 items-center text-sm my-4 animate-pulse" >
95- < Sparkles className = " w-3 h-3 animate-pulse text-[#00ffe0]" />
96- < span className = " ai-thinking" > Thinking</ span >
94+ < div className = ' flex gap-1 items-center text-sm my-4 animate-pulse' >
95+ < Sparkles className = ' w-3 h-3 animate-pulse text-[#00ffe0]' />
96+ < span className = ' ai-thinking' > Thinking</ span >
9797 </ div >
9898 ) }
9999 < div ref = { messagesEndRef } />
0 commit comments