-
-
- {isUnivAiPlusMode ? : }
-
-
-
- {/* Fixed height container for title */}
-
-
- {isUnivAiPlusMode ? 'UnivAi+++' : 'UnivAi'}
- {isUnivAiPlusMode && }
-
-
- {/* Fixed height container for description */}
-
-
- {isUnivAiPlusMode
- ? 'Smarter with human-like responses'
- : 'Any PUP-Related Queries?'
- }
-
-
- {/* Fixed button */}
-
-
-
-
-
-
- {/* Chat Stats - Equalized for both modes */}
-
- {/* Coming Soon Toast */}
-
- {showComingSoon && (
-
- Coming soon!
-
- )}
-
-
- {/* Usage Limit Warning */}
-
- {isUnivAiPlusMode && hasUsedPlusResponse && (
-
- UnivAi+++ limit reached. Switch to UnivAi to continue.
-
- )}
-
-
- {/* Dark Mode Toggle - Top Right */}
-
-
- {isDarkMode ? : }
-
-
-
- {/* Mobile Left Sheet Trigger */}
-
-
-
-
-
-
-
- Navigation Menu
-
- Access chat navigation, statistics, search, profile, and settings
-
-
-
-
-
-
-
- {/* Sidebar - Desktop only */}
-
-
-
-
- {/* Main Container */}
-
- {/* Header */}
-
-
-
-
-
- {isUnivAiPlusMode ? : }
-
-
-
-
- {isUnivAiPlusMode ? 'UnivAi+++' : 'UnivAi'}
- {isUnivAiPlusMode && }
-
-
-
- {isUnivAiPlusMode ? 'Premium AI Experience' : 'Always ready to help'}
-
-
-
-
-
-
-
-
- {/* Chat Container */}
-
- {/* Messages Area */}
-
- {/* Messages */}
-
-
- {messages.map((message) => (
-
- ))}
- {isTyping &&
}
-
-
-
-
- {/* Feedback Section - Appears after AI responses */}
-
- {showFeedback && messages.length > 1 && (
-
-
-
-
-
How was this response?
-
-
-
-
-
-
-
-
-
- )}
-
-
- {/* Input */}
-
-
-
-
-
- {/* Stats Sidebar - Desktop & Tablet */}
-
-
-
-
-
-
- {/* Mobile Right Sheet Trigger */}
-
-
-
-
-
-
-
- Chat Information Panel
-
- View AI status, chat statistics, and source references
-
-
-
-
-
-
-
- );
-}
+import { useState, useRef, useEffect, type ReactNode } from 'react';
+import { Send, MessageCircle, Settings, Search, BarChart3, User, Bot, Sparkles, HelpCircle, Moon, Sun, Globe, Database, BookOpen, Crown, Zap, Menu, ChevronLeft, ChevronRight, ThumbsUp, ThumbsDown, MessageSquare } from 'lucide-react';
+import { Button } from './ui/button';
+import { Input } from './ui/input';
+import { Message } from './Message';
+import { TypingIndicator } from './TypingIndicator';
+import { Sheet, SheetContent, SheetTrigger, SheetTitle, SheetDescription } from './ui/sheet';
+import { Textarea } from './ui/textarea';
+import { motion, AnimatePresence } from 'motion/react';
+
+interface ChatMessage {
+ id: string;
+ content: string;
+ isUser: boolean;
+ timestamp: Date;
+ isPlusResponse?: boolean;
+ sources?: Array<{ name: string; icon: ReactNode; url?: string }>;
+}
+
+export function ChatInterface() {
+ const [messages, setMessages] = useState