import { JupyterFrontEndPlugin } from '@jupyterlab/application'; import { IAgentTerminals } from './tokens'; /** * Adds a left-sidebar panel that lists every running terminal session. * * Each row is labelled with the *real* title the running program * published — the launcher's agent name, or whatever title an xterm * escape sequence set — which the registry caches so it survives the * user closing the tab while the session keeps running on the server. * JupyterLab's built-in "Running Terminals and Kernels" panel lists the * same sessions but only by their `terminals/` name, so this panel * resolves and caches the published title to show something meaningful. * Rows running a coding agent carry a smaller second line below the * title with the agent's latest line of output, so the panel shows what * each agent is doing at a glance — on by default, and switchable off * through the `showAgentActivity` setting. * * Clicking a row activates the existing tab if one is open, or reopens * the session in a fresh terminal widget (`terminal:open`). The inline * `×` button shuts the session down on the server. The header carries a * `+` button and a stop button (the latter shuts every session down at * once, after a confirmation). * * The `+` button drops down a menu — built from the launcher's shared * `IAgentRegistry` — listing each available agent (Claude, Codex, …) * followed by a plain terminal, so starting an agent session is as * consistent here as in the launcher and reuses the very same registered * commands and icons. When the launcher is disabled or no agents are * installed, the button falls back to opening a plain terminal directly. * * The plugin also provides {@link IAgentTerminals} — the sessions with a * detection-confirmed running agent, plus a "paste a prompt into one" * action — which the ask-agent popup uses to offer running agents as * targets next to "new terminal". */ declare const plugin: JupyterFrontEndPlugin; export default plugin;