/** * agent-top-widget.ts — Persistent AGENT TOP strip above the editor. * * Registers a Pi `setWidget` above the editor and only paints while agents are * running/queued (plus a short linger for finished ones). The session chat * stays fully usable underneath. * * The adaptive tick stays alive whenever a UI context is bound so settings * toggles are picked up on the next tick without a registry-level refresh hook. */ import type { AgentManager } from "../agent-manager.js"; import type { AgentActivity, UICtx } from "./agent-ui-types.js"; export declare class AgentTopWidget { private manager; private agentActivity; private closed; private uiCtx; private widgetRegistered; private tui; private dirty; private snapshotHash; private finishedTurnAge; private readonly tick; constructor(manager: AgentManager, agentActivity: Map); setUICtx(ctx: UICtx): void; ensureTimer(): void; onTurnStart(): void; markFinished(agentId: string): void; /** Immediate redraw (e.g. menu toggle). Prefer this over registry callbacks. */ forceRefresh(): void; private shouldShowFinished; private visibleAgents; private clearWidget; update(): void; private render; dispose(): void; }