import type * as vscode from 'vscode';
import { IConfigurationService } from '../../../platform/configuration/common/configurationService';
import { DocumentId } from '../../../platform/inlineEdits/common/dataTypes/documentId';
import { InlineEditRequestLogContext } from '../../../platform/inlineEdits/common/inlineEditLogContext';
import { ObservableWorkspace } from '../../../platform/inlineEdits/common/observableWorkspace';
import { IStatelessNextEditProvider } from '../../../platform/inlineEdits/common/statelessNextEditProvider';
import { IHistoryContextProvider } from '../../../platform/inlineEdits/common/workspaceEditTracker/historyContextProvider';
import { NesXtabHistoryTracker } from '../../../platform/inlineEdits/common/workspaceEditTracker/nesXtabHistoryTracker';
import { ILogService } from '../../../platform/log/common/logService';
import { ISnippyService } from '../../../platform/snippy/common/snippyService';
import { IExperimentationService } from '../../../platform/telemetry/common/nullExperimentationService';
import { CancellationToken } from '../../../util/vs/base/common/cancellation';
import { Disposable, IDisposable } from '../../../util/vs/base/common/lifecycle';
import { DebugRecorder } from './debugRecorder';
import { LlmNESTelemetryBuilder } from './nextEditProviderTelemetry';
import { INextEditResult, NextEditResult } from './nextEditResult';
export interface INextEditProvider<T extends INextEditResult, TTelemetry, TData = void> extends IDisposable {
    readonly ID: string;
    getNextEdit(docId: DocumentId, context: vscode.InlineCompletionContext, logContext: InlineEditRequestLogContext, cancellationToken: CancellationToken, telemetryBuilder: TTelemetry, data?: TData): Promise<T>;
    handleShown(suggestion: T): void;
    handleAcceptance(docId: DocumentId, suggestion: T): void;
    handleRejection(docId: DocumentId, suggestion: T): void;
    handleIgnored(docId: DocumentId, suggestion: T, supersededByRequestUuid: INextEditResult | undefined): void;
    lastRejectionTime: number;
    lastTriggerTime: number;
}
export declare class NextEditProvider extends Disposable implements INextEditProvider<NextEditResult, LlmNESTelemetryBuilder> {
    private readonly _workspace;
    private readonly _statelessNextEditProvider;
    private readonly _historyContextProvider;
    private readonly _xtabHistoryTracker;
    private readonly _debugRecorder;
    private readonly _configService;
    private readonly _snippyService;
    private readonly _logService;
    private readonly _expService;
    readonly ID: string;
    private readonly _rejectionCollector;
    private readonly _nextEditCache;
    private _pendingStatelessNextEditRequest;
    private _lastShownTime;
    private _lastRejectionTime;
    get lastRejectionTime(): number;
    private _lastTriggerTime;
    get lastTriggerTime(): number;
    private _lastNextEditResult;
    private _shouldExpandEditWindow;
    private _tracer;
    constructor(_workspace: ObservableWorkspace, _statelessNextEditProvider: IStatelessNextEditProvider, _historyContextProvider: IHistoryContextProvider, _xtabHistoryTracker: NesXtabHistoryTracker, _debugRecorder: DebugRecorder | undefined, _configService: IConfigurationService, _snippyService: ISnippyService, _logService: ILogService, _expService: IExperimentationService);
    private _cancelPendingRequestDueToDocChange;
    getNextEdit(docId: DocumentId, context: vscode.InlineCompletionContext, logContext: InlineEditRequestLogContext, cancellationToken: CancellationToken, telemetryBuilder: LlmNESTelemetryBuilder): Promise<NextEditResult>;
    private _getNextEditCanThrow;
    private determineNesConfigs;
    private _processDoc;
    private fetchNextEdit;
    private _joinNextEditRequest;
    private _executeNewNextEditRequest;
    private _hookupCancellation;
    private computeMinimumResponseDelay;
    handleShown(suggestion: NextEditResult): void;
    handleAcceptance(docId: DocumentId, suggestion: NextEditResult): void;
    handleRejection(docId: DocumentId, suggestion: NextEditResult): void;
    handleIgnored(docId: DocumentId, suggestion: NextEditResult, supersededBy: INextEditResult | undefined): void;
    private runSnippy;
    clearCache(): void;
}
export declare class NextEditFetchRequest {
    readonly opportunityId: string;
    readonly log: InlineEditRequestLogContext;
    readonly providerRequestStartDateTime: number | undefined;
    readonly headerRequestId: string;
    constructor(opportunityId: string, log: InlineEditRequestLogContext, providerRequestStartDateTime: number | undefined);
}
//# sourceMappingURL=nextEditProvider.d.ts.map