/* ── Agent Activity Panel (Gemini-style sidebar) ── * Non-coder friendly show what the agent is doing without cluttering the chat. */ import { useEffect, useState, useCallback, useRef } from "react"; import { OrchestrationApi, openOrchestrationWs, type SubTaskItem, type WorkingMemoryEntry, type ManagerStatus, type LessonItem, type WsStateMessage, } from "#/api/orchestration-service/orchestration-service.api"; interface Props { goal: string; conversationId?: string; } function RelTime({ ts }: { ts: number }) { const diff = Date.now() - ts * 1000; const label = diff < 60_000 ? "now" : diff < 3600_000 ? `${Math.floor(diff / 60_000)}m` : `${Math.floor(diff / 3600_000)}h`; return ( {label} ); } function Section({ title, open, onToggle, children, }: { title: string; open: boolean; onToggle: () => void; children: React.ReactNode; }) { return (
{goal.slice(0, 80)}
Waiting for activity...