import { CancellationTokenSource } from "../../../../base/common/cancellation.js"; import { IDisposable } from "../../../../base/common/lifecycle.js"; import { Event, URI } from "../../../../sessions/sessions.web.main.internal.js"; import { IEditableData } from "../../../common/views.js"; import { type TimelineProvidersChangeEvent, type TimelineChangeEvent, type TimelineEditable, type TimelineProvider, type WorkspaceTimelineProvider, type TimelineSource, type TimelineOptions, type TimelineRequest, type TimelineItemIdentifier } from "./timeline.js"; export declare const ITimelineService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; /** * Timelines are shown for a file or folder, or for the whole workspace. Throughout * the timeline APIs, a `uri` of `undefined` stands for the workspace timeline. */ export interface ITimelineService { readonly _serviceBrand: undefined; readonly onDidChangeProviders: Event; readonly onDidChangeTimeline: Event; /** * Fires when a timeline is requested to be shown, with `undefined` for the workspace timeline. */ readonly onDidChangeUri: Event; /** * Fires when a timeline item starts or stops being edited inline. */ readonly onDidChangeEditable: Event; /** * The timeline item that is being edited inline, if any. */ readonly editable: TimelineEditable | undefined; registerTimelineProvider(provider: TimelineProvider): IDisposable; unregisterTimelineProvider(id: string): void; registerWorkspaceTimelineProvider(provider: WorkspaceTimelineProvider): IDisposable; unregisterWorkspaceTimelineProvider(id: string): void; /** * All sources, from both timeline and workspace timeline providers. */ getSources(): TimelineSource[]; /** * Whether any provider contributes to the workspace timeline. */ hasWorkspaceProviders(): boolean; getTimeline(id: string, uri: URI | undefined, options: TimelineOptions, tokenSource: CancellationTokenSource): TimelineRequest | undefined; /** * Opens the Timeline view and pins it to the given file or folder, or to the workspace timeline when `uri` is `undefined`. */ setUri(uri: URI | undefined): Promise; /** * Starts editing the given timeline item inline in the Timeline view, or stops editing when `data` is `null`. */ setEditable(item: TimelineItemIdentifier, data: IEditableData | null): void; }