'use client'; /** * Debug Panel Component * * Collapsible bottom panel with tabbed interface for debug tools: * - Memory Detail (enhanced) * - Query Tester * - Activity Log * - Relationship Graph * - SQL Console */ import { useState } from 'react'; import { QueryTester } from './QueryTester'; import { ActivityLog } from './ActivityLog'; import { RelationshipGraph } from './RelationshipGraph'; import { SqlConsole } from './SqlConsole'; type TabId = 'detail' | 'query' | 'activity' | 'graph' | 'sql'; interface Tab { id: TabId; label: string; icon: string; } const TABS: Tab[] = [ { id: 'query', label: 'Query', icon: '🔍' }, { id: 'activity', label: 'Activity', icon: '📋' }, { id: 'graph', label: 'Graph', icon: '🕸' }, { id: 'sql', label: 'SQL', icon: '💾' }, ]; interface DebugPanelProps { onCollapse?: () => void; } export function DebugPanel({ onCollapse }: DebugPanelProps) { const [activeTab, setActiveTab] = useState('query'); const [isCollapsed, setIsCollapsed] = useState(false); const handleCollapse = () => { setIsCollapsed(!isCollapsed); onCollapse?.(); }; if (isCollapsed) { return (
); } return (
{/* Tab Bar */}
{TABS.map((tab) => ( ))}
{/* Tab Content */}
{activeTab === 'query' && } {activeTab === 'activity' && } {activeTab === 'graph' && } {activeTab === 'sql' && }
); }