diff --git a/src/components/ConversationSidebar.tsx b/src/components/ConversationSidebar.tsx index 094ef33..3568832 100644 --- a/src/components/ConversationSidebar.tsx +++ b/src/components/ConversationSidebar.tsx @@ -1,6 +1,7 @@ // Conversation sidebar with conversation list and management import { useConversation } from '@/contexts/ConversationContext'; +import { useInference } from '@/contexts/InferenceContext'; export function ConversationSidebar() { const { @@ -10,11 +11,19 @@ export function ConversationSidebar() { deleteConversation, setActiveConversation, } = useConversation(); + + const { clearProvider, provider } = useInference(); const handleNewConversation = () => { createConversation(); }; + const handleLogout = () => { + if (confirm('Are you sure you want to log out?')) { + clearProvider(); + } + }; + const formatDate = (date: Date): string => { const now = new Date(); const diff = now.getTime() - date.getTime(); @@ -115,6 +124,18 @@ export function ConversationSidebar() { )} + + {/* Logout Button */} + {provider && ( +