import { IObservable, IReader } from "../../../../../../base/common/observable.js"; import { URI } from "../../../../../../base/common/uri.js"; import type { IAgentConnection } from "../../../../../../platform/agentHost/common/agentService.js"; import { type BackgroundWork } from "../../../../../../platform/agentHost/common/state/protocol/state.js"; import type { ChatBackgroundShellOutput, IChatBackgroundShell } from "../../../common/sessionChatPills.js"; /** Projects a chat's background work onto the shells its Background Shells pill lists. */ export declare function toChatBackgroundShells(work: readonly BackgroundWork[] | undefined, getOutput?: (terminal: string) => IObservable, getStop?: (id: string) => () => Promise): readonly IChatBackgroundShell[]; /** The live output of an Agent Host terminal, subscribed only while something reads it. */ export declare function observeAgentHostTerminalOutput(getConnection: (reader: IReader) => IAgentConnection | undefined, terminal: URI): IObservable; /** * Projects background work while reusing one output observable per terminal * and one stop handle per stoppable shell, so an unchanged list stays * structurally equal and open views keep their subscription. */ export declare class AgentHostBackgroundShellOutputs { private readonly _getConnection; private readonly _outputs; private readonly _stops; constructor(_getConnection: (reader: IReader | undefined) => IAgentConnection | undefined); /** `chat` is the host's URI for the chat that lists `work`, which stop requests address. */ project(work: readonly BackgroundWork[] | undefined, chat?: URI): readonly IChatBackgroundShell[]; private _stop; }