Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ui/src/components/chat/ChatView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useRef, useEffect } from 'react';
import ChatMessage from './ChatMessage';
import ChatInput from './ChatInput';
import ThinkingIndicator from './ThinkingIndicator';
import ThemeToggle from '@/components/ThemeToggle';
import type { Message, FileAttachment } from '@/lib/llm';

Expand Down Expand Up @@ -41,6 +42,9 @@ export default function ChatView({
<ChatMessage key={message.id} message={message} />
))}

{/* Thinking indicator — visible before first stream token */}
{isLoading && !streamingContent && <ThinkingIndicator />}

{/* Streaming Message */}
{streamingContent && (
<ChatMessage
Expand Down
12 changes: 12 additions & 0 deletions ui/src/components/chat/ThinkingIndicator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default function ThinkingIndicator() {
return (
<div className="flex justify-start py-2">
<div className="flex items-center gap-1.5 text-muted-foreground text-sm">
<span className="h-1.5 w-1.5 rounded-full bg-muted-foreground/60 animate-[dot-pulse_1.4s_ease-in-out_infinite_0ms]" />
<span className="h-1.5 w-1.5 rounded-full bg-muted-foreground/60 animate-[dot-pulse_1.4s_ease-in-out_infinite_200ms]" />
<span className="h-1.5 w-1.5 rounded-full bg-muted-foreground/60 animate-[dot-pulse_1.4s_ease-in-out_infinite_400ms]" />
<span className="ml-1 text-xs">Thinking...</span>
</div>
</div>
);
}
40 changes: 18 additions & 22 deletions ui/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,24 @@ export default {
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)'
},
keyframes: {
'accordion-down': {
from: {
height: '0'
},
to: {
height: 'var(--radix-accordion-content-height)'
}
},
'accordion-up': {
from: {
height: 'var(--radix-accordion-content-height)'
},
to: {
height: '0'
}
}
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out'
},
keyframes: {
'accordion-down': {
from: { height: '0' },
to: { height: 'var(--radix-accordion-content-height)' }
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: '0' }
},
'dot-pulse': {
'0%, 80%, 100%': { opacity: '0.3', transform: 'scale(0.8)' },
'40%': { opacity: '1', transform: 'scale(1.2)' }
}
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out'
},
fontFamily: {
sans: [
'Poppins',
Expand Down