Skip to content

Commit 7acc126

Browse files
committed
fix: fronted loading
1 parent 13e2de8 commit 7acc126

File tree

1 file changed

+13
-0
lines changed
  • frontend/src/app/dashboard/chat/[id]

1 file changed

+13
-0
lines changed

frontend/src/app/dashboard/chat/[id]/page.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,19 @@ export default function ChatPage({ params }: { params: { id: string } }) {
264264
</div>
265265
)
266266
)}
267+
<div className="flex justify-start">
268+
{isLoading &&
269+
processedMessages[processedMessages.length - 1]?.role !=
270+
"assistant" && (
271+
<div className="max-w-[80%] rounded-lg px-4 py-2 bg-accent text-accent-foreground">
272+
<div className="flex items-center space-x-1">
273+
<div className="w-2 h-2 rounded-full bg-primary animate-bounce" />
274+
<div className="w-2 h-2 rounded-full bg-primary animate-bounce [animation-delay:0.2s]" />
275+
<div className="w-2 h-2 rounded-full bg-primary animate-bounce [animation-delay:0.4s]" />
276+
</div>
277+
</div>
278+
)}
279+
</div>
267280
<div ref={messagesEndRef} />
268281
</div>
269282
<form

0 commit comments

Comments
 (0)