import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation"; import { Emitter, Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"; import { DisposableStore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser"; import { ISingleEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editOperation"; import { Position } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/position"; import { IModelDeltaDecoration, IValidEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model"; import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { HunkInformation, Session } from "./inlineChatSession.js"; import { InlineChatZoneWidget } from "./inlineChatZoneWidget.js"; import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service"; import { VersionedExtensionId } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages"; export interface IEditObserver { start(): void; stop(): void; } export declare enum HunkAction { Accept = 0, Discard = 1, MoveNext = 2, MovePrev = 3, ToggleDiff = 4 } export declare class LiveStrategy { protected readonly _session: Session; protected readonly _editor: ICodeEditor; protected readonly _zone: InlineChatZoneWidget; private readonly _showOverlayToolbar; protected readonly _editorWorkerService: IEditorWorkerService; private readonly _accessibilityService; private readonly _configService; private readonly _menuService; private readonly _contextService; private readonly _textFileService; protected readonly _instaService: IInstantiationService; private readonly _decoInsertedText; private readonly _decoInsertedTextRange; protected readonly _store: DisposableStore; protected readonly _onDidAccept: Emitter; protected readonly _onDidDiscard: Emitter; private readonly _ctxCurrentChangeHasDiff; private readonly _ctxCurrentChangeShowsDiff; private readonly _progressiveEditingDecorations; private readonly _lensActionsFactory; private _editCount; private readonly _hunkData; readonly onDidAccept: Event; readonly onDidDiscard: Event; constructor(_session: Session, _editor: ICodeEditor, _zone: InlineChatZoneWidget, _showOverlayToolbar: boolean, contextKeyService: IContextKeyService, _editorWorkerService: IEditorWorkerService, _accessibilityService: IAccessibilityService, _configService: IConfigurationService, _menuService: IMenuService, _contextService: IContextKeyService, _textFileService: ITextFileService, _instaService: IInstantiationService); dispose(): void; private _resetDiff; apply(): Promise; cancel(): IValidEditOperation[]; makeChanges(edits: ISingleEditOperation[], obs: IEditObserver, undoStopBefore: boolean, metadata: IInlineChatMetadata): Promise; makeProgressiveChanges(edits: ISingleEditOperation[], obs: IEditObserver, opts: ProgressingEditsOptions, undoStopBefore: boolean, metadata: IInlineChatMetadata): Promise; private _makeChanges; performHunkAction(hunk: HunkInformation | undefined, action: HunkAction): void; private _findDisplayData; renderChanges(): Promise; getWholeRangeDecoration(): IModelDeltaDecoration[]; private _doApplyChanges; } export interface ProgressingEditsOptions { duration: number; token: CancellationToken; } export interface IInlineChatMetadata { modelId: string | undefined; extensionId: VersionedExtensionId | undefined; requestId: string | undefined; }