import { IObservable, IReader } from "../../../../base/common/observable.js"; import { ICanvasReference, ICanvas } from "../../../../workbench/contrib/canvases/common/canvas.js"; import { IPinnedCanvas, PinnedCanvasTarget } from "./pinnedCanvases.js"; export declare const IPinnedCanvasService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; /** * Canvases pinned to the Agents window sidebar. A pinned canvas stays owned by its * chat but is kept live while another chat is shown, and can be shown full-page. */ export interface IPinnedCanvasService { readonly _serviceBrand: undefined; /** Whether canvases are enabled, so pins are kept live and listed. */ readonly enabled: IObservable; /** The pins in the order they were added, empty while canvases are disabled. */ readonly entries: IObservable; /** The pin that the canvas page shows. */ readonly selected: IObservable; /** Returns the pin of a live canvas reference, or the pin itself. */ getEntry(target: PinnedCanvasTarget, reader?: IReader): IPinnedCanvas | undefined; isPinned(reference: ICanvasReference, reader?: IReader): boolean; /** Whether the canvas page currently shows this canvas. */ isShown(reference: ICanvasReference, reader?: IReader): boolean; /** The live state of a pinned canvas bound to this reference, or `undefined` when it is not pinned. */ getTrackedCanvas(reference: ICanvasReference, reader?: IReader): ICanvas | undefined; /** * Pins a live canvas of a chat. Returns `false` and tells the user when the canvas * cannot be pinned, for example when {@link MAX_PINNED_CANVASES} are pinned already. */ pin(reference: ICanvasReference): boolean; unpin(target: PinnedCanvasTarget): void; /** * Shows a pin on the canvas page, never its chat, and reconnects it when it is not * connected to its live canvas. */ show(target: PinnedCanvasTarget): Promise; /** Looks for the live canvas of a pin that is not connected, without showing its chat. */ reconnect(target: PinnedCanvasTarget): void; /** Shows the chat that owns a pin. */ goToChat(target: PinnedCanvasTarget): Promise; /** Closes the live canvas of a pin, which also removes the pin. */ closeCanvas(target: PinnedCanvasTarget): Promise; }