import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer"; import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { IObservable, IReader, ITransaction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IEditSessionDiffStats, IEditSessionEntryDiff } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService"; import { IChatRequestDisablement } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel"; import { FileOperation, IChatEditingTimelineState, IFileBaseline } from "./chatEditingOperations.js"; /** * Interface for the new checkpoint-based timeline system */ export interface IChatEditingCheckpointTimeline { readonly requestDisablement: IObservable; readonly canUndo: IObservable; readonly canRedo: IObservable; createCheckpoint(requestId: string | undefined, undoStopId: string | undefined, label: string, description?: string): void; navigateToCheckpoint(checkpointId: string): Promise; undoToLastCheckpoint(): Promise; redoToNextCheckpoint(): Promise; getCheckpointIdForRequest(requestId: string, undoStopId?: string): string | undefined; recordFileOperation(operation: FileOperation): void; incrementEpoch(): number; recordFileBaseline(baseline: IFileBaseline): void; hasFileBaseline(uri: URI, requestId: string): boolean; getContentURIAtStop(requestId: string, fileURI: URI, stopId: string | undefined): URI; getContentAtStop(requestId: string, contentURI: URI, stopId: string | undefined): Promise; onDidChangeContentsAtStop(requestId: string, contentURI: URI, stopId: string | undefined, callback: (data: string) => void): IDisposable; getStateForPersistence(): IChatEditingTimelineState; restoreFromState(state: IChatEditingTimelineState, tx: ITransaction): void; getEntryDiffBetweenStops(uri: URI, requestId: string | undefined, stopId: string | undefined): IObservable | undefined; getEntryDiffBetweenRequests(uri: URI, startRequestId: string, stopRequestId: string): IObservable; getDiffsForFilesInRequest(requestId: string): IObservable; getDiffsForFilesInSession(): IObservable; getDiffForSession(): IObservable; hasEditsInRequest(requestId: string, reader?: IReader): boolean; }