/** * `ResumeProjectPanel` — the reopen resume panel (L15 / lot B2, ARCHITECTURE * §15.2). * * Mounted **once when a project is (re)opened**, only when the resumable * inventory is non-empty. It lists every agent cell that "was running" and/or * carries a persisted conversation id, and lets the user decide, per agent: * **Reprendre** / **Nouvelle conversation** / **Ignorer**, plus the global * **Tout reprendre** / **Tout ignorer**. Each choice reuses the existing * `launch_agent` flow through {@link useResumeProject}; the panel itself is pure * presentation (it only consumes the view-model, never a gateway directly). * * Status / labels mirror {@link ResumeConversationPopup}: the "en cours" / "clôt" * status is derived **only** from `wasRunning`; an agent whose profile cannot * resume a conversation (`resumeSupported === false`) shows "relance à neuf". * * Empty pending set ⇒ the component renders nothing (no overlay). */ import { Button, cn } from "@/shared"; import { useResumeProject } from "./useResumeProject"; export interface ResumeProjectPanelProps { /** Project being (re)opened. */ projectId: string; /** Working directory the resumed agents launch in (the project root). */ cwd: string; } export function ResumeProjectPanel({ projectId, cwd }: ResumeProjectPanelProps) { const vm = useResumeProject(projectId, cwd); // No resumable agents ⇒ no panel at all. if (vm.pending.length === 0) return null; return (
Ces agents tournaient à la dernière fermeture du projet. Choisissez ceux à reprendre.
{vm.error && ({vm.error}
)} {/* ── Per-agent rows ── */}Historique non disponible pour ce moteur — relance à neuf.
)}