import { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { SquarePen, MessageSquare, Bot, Search, X, Settings } from 'lucide-react'; import { ConversationList } from './ConversationList'; import { CloneManager } from './CloneManager'; import { useChatStore } from '../store/chatStore'; import { containerVariants, defaultTransition } from '../lib/animations'; export type MainViewType = 'chat' | 'automation' | 'skills'; interface SidebarProps { onOpenSettings?: () => void; onMainViewChange?: (view: MainViewType) => void; onNewChat?: () => void; } type Tab = 'conversations' | 'clones'; export function Sidebar({ onOpenSettings, onMainViewChange, }: Omit) { const [activeTab, setActiveTab] = useState('conversations'); const [searchQuery, setSearchQuery] = useState(''); const newConversation = useChatStore((s) => s.newConversation); const handleNewConversation = () => { newConversation(); onMainViewChange?.('chat'); }; const handleNavClick = (tab: Tab) => { setActiveTab(tab); if (tab === 'clones') { onMainViewChange?.('chat'); } else { onMainViewChange?.('chat'); } }; return ( ); }