import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer"; import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { IObservable, IReader } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IBulkEditService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service"; import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service"; import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model"; import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service"; import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service"; import { IAccessibilitySignalService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service"; import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service"; import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service"; import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service"; import { ChatEditingSessionState, IChatEditingSession, IEditSessionEntryDiff, IModifiedFileEntry, IStreamingEdits } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService"; import { IChatResponseModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel"; import { IChatProgress, IChatWorkspaceEdit } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService"; import { AbstractChatEditingModifiedFileEntry } from "./chatEditingModifiedFileEntry.js"; import { IChatEditingExplanationModelManager } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.service"; export declare class ChatEditingSession extends Disposable implements IChatEditingSession { readonly chatSessionResource: URI; readonly isGlobalEditingSession: boolean; private _lookupExternalEntry; private readonly _instantiationService; private readonly _modelService; private readonly _languageService; private readonly _textModelService; readonly _bulkEditService: IBulkEditService; private readonly _editorGroupsService; private readonly _editorService; private readonly _notebookService; private readonly _accessibilitySignalService; private readonly _logService; private readonly configurationService; private readonly _fileService; private readonly _explanationModelManager; private readonly _telemetryService; readonly supportsKeepUndo = false; private readonly _state; private readonly _timeline; /** * Contains the contents of a file when the AI first began doing edits to it. */ private readonly _initialFileContents; private readonly _baselineCreationLocks; private readonly _streamingEditLocks; /** * Tracks active external edit operations. * Key is operationId, value contains the operation state. */ private readonly _externalEditOperations; private readonly _entriesObs; readonly entries: IObservable; private _editorPane; private _explanationHandle; get state(): IObservable; readonly canUndo: IObservable; readonly canRedo: IObservable; get requestDisablement(): IObservable; private readonly _onDidDispose; get onDidDispose(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event; constructor(chatSessionResource: URI, isGlobalEditingSession: boolean, _lookupExternalEntry: (uri: URI) => AbstractChatEditingModifiedFileEntry | undefined, transferFrom: IChatEditingSession | undefined, _instantiationService: IInstantiationService, _modelService: IModelService, _languageService: ILanguageService, _textModelService: ITextModelService, _bulkEditService: IBulkEditService, _editorGroupsService: IEditorGroupsService, _editorService: IEditorService, _notebookService: INotebookService, _accessibilitySignalService: IAccessibilitySignalService, _logService: ILogService, configurationService: IConfigurationService, _fileService: IFileService, _explanationModelManager: IChatEditingExplanationModelManager, _telemetryService: ITelemetryService); private _getTimelineDelegate; private _init; private _getEntry; getEntry(uri: URI): IModifiedFileEntry | undefined; readEntry(uri: URI, reader: IReader | undefined): IModifiedFileEntry | undefined; storeState(): Promise; private _getStoredState; getEntryDiffBetweenStops(uri: URI, requestId: string | undefined, stopId: string | undefined): IObservable | undefined; getEntryDiffBetweenRequests(uri: URI, startRequestId: string, stopRequestId: string): IObservable; getDiffsForFilesInSession(): IObservable; getDiffForSession(): IObservable; getDiffsForFilesInRequest(requestId: string): IObservable; hasEditsInRequest(requestId: string, reader?: IReader): boolean; createSnapshot(requestId: string, undoStop: string | undefined): void; getSnapshotContents(requestId: string, uri: URI, stopId: string | undefined): Promise; getSnapshotModel(requestId: string, undoStop: string | undefined, snapshotUri: URI): Promise; getSnapshotUri(requestId: string, uri: URI, stopId: string | undefined): URI | undefined; restoreSnapshot(requestId: string, stopId: string | undefined): Promise; private _assertNotDisposed; accept(...uris: URI[]): Promise; reject(...uris: URI[]): Promise; private _operateEntry; show(previousChanges?: boolean): Promise; private _stopPromise; stop(clearState?: boolean): Promise; private _performStop; dispose(): void; private get isDisposed(); startStreamingEdits(resource: URI, responseModel: IChatResponseModel, inUndoStop: string | undefined): IStreamingEdits; startDeletion(resource: URI, responseModel: IChatResponseModel, undoStopId: string): void; applyWorkspaceEdit(edit: IChatWorkspaceEdit, responseModel: IChatResponseModel, undoStopId: string): void; startExternalEdits(responseModel: IChatResponseModel, operationId: number, resources: URI[], undoStopId: string, contentFor?: URI[]): Promise; stopExternalEdits(responseModel: IChatResponseModel, operationId: number, contentFor?: URI[]): Promise; undoInteraction(): Promise; redoInteraction(): Promise; triggerExplanationGeneration(): Promise; clearExplanations(): void; hasExplanations(): boolean; private _recordEditOperations; private _getCurrentTextOrNotebookSnapshot; private _acceptStreamingEditsStart; private _initEntries; private _acceptEdits; private _getTelemetryInfoForModel; private _countEntryStates; private _resolve; /** * Retrieves or creates a modified file entry. * * @returns The modified file entry. */ private _getOrCreateModifiedFileEntry; private _createModifiedFileEntry; private _collapse; }