import React, { useState } from "react"; import { Activity, FolderTree, Bot, X } from "lucide-react"; import FileExplorer from "./FileExplorer"; import AgentSettingsPanel from "./AgentSettingsPanel"; import BrowserPanel from "./BrowserPanel"; const TABS = [ { id: "activity", label: "Activité", icon: Activity }, { id: "files", label: "Fichiers", icon: FolderTree }, { id: "agent", label: "Agent", icon: Bot }, ]; export default function RightPanel({ tools, agentOnline, agentToolsOnline, onRefreshStatus, onClose, filePreview = null, activeTab, onTabChange, browserFrames = [], reflectNotes = [], onBrowserFrameUpdate, mobileSheet = false, }) { const [fallbackTab, setFallbackTab] = useState("activity"); const tab = activeTab ?? fallbackTab; const selectTab = (id) => { if (activeTab == null) setFallbackTab(id); onTabChange?.(id); }; return ( ); } const ActivityTab = ({ tools, agentOnline, agentToolsOnline, browserFrames, reflectNotes, onBrowserFrameUpdate }) => (
Desktop {agentOnline ? "connecté" : "hors ligne"} {agentToolsOnline ? ( · outils actifs ) : null} {tools.length > 0 && ( · {tools.length} action{tools.length !== 1 ? "s" : ""} )}
{tools.length > 0 && (
{tools.slice(-8).map((t) => (
{t.tool} {t.state === "executing" ? "en cours…" : t.state === "error" ? "erreur" : "ok"}
))}
)}
);