import { useChatStore, useUserStore } from "../../store"; import { User } from "../../types"; const Sidebar = () => { const userStore = useUserStore(); const chatStore = useChatStore(); const currentChatUserId = chatStore.currentChat.userId; const handleAssistantClick = (user: User) => { for (const chat of chatStore.chatList) { if (chat.userId === user.id) { chatStore.setCurrentChat(chat); return; } } chatStore.createChat(user); }; return (