import { ResourceMap } from "@codingame/monaco-vscode-api/vscode/vs/base/common/map"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service"; import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service"; import { ISnapshotEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService"; import { IChatEditingTimelineState } from "./chatEditingOperations.js"; export interface StoredSessionState { readonly initialFileContents: ResourceMap; readonly recentSnapshot: IChatEditingSessionStop; readonly timeline: IChatEditingTimelineState | undefined; } export declare class ChatEditingSessionStorage { private readonly _chatSessionResource; private readonly _fileService; private readonly _environmentService; private readonly _logService; private readonly _workspaceContextService; private readonly storageKey; constructor(_chatSessionResource: URI, _fileService: IFileService, _environmentService: IEnvironmentService, _logService: ILogService, _workspaceContextService: IWorkspaceContextService); protected _getStorageLocation(): URI; restoreState(): Promise; storeState(state: StoredSessionState): Promise; clearState(): Promise; } export interface IChatEditingSessionSnapshot { /** * Index of this session in the linear history. It's the sum of the lengths * of all {@link stops} prior this one. */ readonly startIndex: number; readonly requestId: string | undefined; /** * Edit stops in the request. Always initially populatd with stopId: undefind * for th request's initial state. * * Invariant: never empty. */ readonly stops: IChatEditingSessionStop[]; } export interface IChatEditingSessionStop { /** Edit stop ID, first for a request is always undefined. */ stopId: string | undefined; readonly entries: ResourceMap; }