"use client"; import { useRef, useState } from "react"; import { Chat, type ChatRef, ConversationSidebar, type ConversationSidebarRef } from "@/components/chat"; /** * Chat Page * * Placeholder route for the chat interface migrated from jarvis-fe. * * NOTE (see issue #TBD): * - Integrate with authentication * - Connect to brain API endpoints (/api/brain/query) * - Implement conversation persistence * - Add project/workspace integration * - Wire up actual hooks (useAuth, useProjects, useConversations, useApi) */ export default function ChatPage() { const chatRef = useRef(null); const sidebarRef = useRef(null); const [sidebarOpen, setSidebarOpen] = useState(false); const [currentConversationId, setCurrentConversationId] = useState(null); const handleConversationChange = (conversationId: string | null) => { setCurrentConversationId(conversationId); // NOTE: Update sidebar when conversation changes (see issue #TBD) }; const handleSelectConversation = (conversationId: string | null) => { // NOTE: Load conversation from backend (see issue #TBD) void conversationId; // Placeholder until implemented setCurrentConversationId(conversationId); }; const handleNewConversation = (projectId?: string | null) => { chatRef.current?.startNewConversation(projectId); setCurrentConversationId(null); }; return (
{/* Conversation Sidebar */} setSidebarOpen(!sidebarOpen)} currentConversationId={currentConversationId} onSelectConversation={handleSelectConversation} onNewConversation={handleNewConversation} /> {/* Main Chat Area */}
{/* Header */}
{/* Toggle Sidebar Button */}

AI Chat

Migrated from Jarvis - Connect to brain API for full functionality

{/* Chat Component */}
); }