import React from "react"; import { Activity, AlertTriangle, CheckCircle2, Cpu, Database, GitBranch, LineChart, MessageSquare, Settings, ShieldCheck, User, Vote, Wallet, Zap, Bot, Boxes, BookOpen, FileText, Network, Video, Palette, Bell, Store, Plug, } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; import { Badge } from "@/components/ui/badge"; import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"; import { Progress } from "@/components/ui/progress"; // ---------- Utility types ---------- type ModuleKey = | "home" | "messenger" | "projects" | "memory" | "parser" | "graph" | "meetings" | "agents" | "training" | "dao" | "treasury" | "integrations" | "market" | "analytics" | "notifications" | "admin" | "creative" | "security" | "profile"; const MODULES: Array<{ key: ModuleKey; label: string; icon: React.ElementType; }> = [ { key: "home", label: "Головна / Оркестратор", icon: Cpu }, { key: "messenger", label: "Чати та канали", icon: MessageSquare }, { key: "projects", label: "Проєкти", icon: Boxes }, { key: "memory", label: "База знань", icon: BookOpen }, { key: "parser", label: "Парсер документів", icon: FileText }, { key: "graph", label: "Граф знань", icon: Network }, { key: "meetings", label: "Зустрічі", icon: Video }, { key: "agents", label: "Агенти", icon: Bot }, { key: "training", label: "Навчальний кабінет", icon: GitBranch }, { key: "dao", label: "Голосування / DAO", icon: Vote }, { key: "treasury", label: "Фінанси / Казна", icon: Wallet }, { key: "integrations", label: "Інтеграції", icon: Plug }, { key: "market", label: "Маркетплейс", icon: Store }, { key: "analytics", label: "Аналітика", icon: LineChart }, { key: "notifications", label: "Сповіщення", icon: Bell }, { key: "admin", label: "Адмін-панель", icon: Settings }, { key: "creative", label: "Креативна студія", icon: Palette }, { key: "security", label: "Безпека / Аудит", icon: ShieldCheck }, { key: "profile", label: "Профіль", icon: User }, ]; // ---------- Reusable UI blocks ---------- function Sidebar({ active, onSelect }: { active: ModuleKey; onSelect: (k: ModuleKey) => void }) { return ( ); } function Topbar({ netOnline, orchOk }: { netOnline: boolean; orchOk: boolean }) { return (
Private DAO Public
{netOnline ? 'Online' : 'Offline'} Orchestrator {orchOk ? 'ok' : 'unreachable'}
); } function HealthGrid() { const items = [ { title: "Messenger", ok: true }, { title: "Parser", ok: false }, { title: "KB Core", ok: true }, { title: "RAG", ok: true }, { title: "Wallet", ok: true }, { title: "DAO", ok: true }, ]; return (
{items.map((x) => ( {x.ok ? ( ) : ( )} {x.title}
{x.ok ? "Працює стабільно" : "Черга задач > p95"}
))}
); } function OrchestratorChat() { return ( Чат з Оркестратором
Вітаю. Чим допомогти? Наприклад: "Розбери PDF та створй короткий бріф у Проєктах".