/** * JARVIS — Sidebar * Session history, new chat button, model status indicators */ import React, { useState } from 'react' import { motion } from 'framer-motion' import { Plus, MessageSquare, Trash2, ChevronRight, Bot, Zap, Eye, Mic, Brain, Settings, } from 'lucide-react' import { formatDistanceToNow } from 'date-fns' import clsx from 'clsx' import useAppStore from '../../stores/appStore' import toast from 'react-hot-toast' export default function Sidebar() { const { sessions, activeSessionId, modelStatus, newSession, switchSession, deleteSession, } = useAppStore() const [hoveredId, setHoveredId] = useState(null) const handleNew = () => { newSession() toast('New chat started', { icon: '✨' }) } const handleDelete = async (e, id) => { e.stopPropagation() if (sessions.length === 1) return toast.error('Cannot delete the only session') await deleteSession(id) toast('Session deleted') } const models = [ { key: 'llm', label: 'LLM', icon: Brain }, { key: 'blip', label: 'Vision', icon: Eye }, { key: 'whisper', label: 'Voice', icon: Mic }, ] return ( ) }