import { ChatFetchError } from '../../../platform/chat/common/commonTypes';
import { IConfigurationService } from '../../../platform/configuration/common/configurationService';
import { IDiffService } from '../../../platform/diff/common/diffService';
import { IIgnoreService } from '../../../platform/ignore/common/ignoreService';
import { LanguageId } from '../../../platform/inlineEdits/common/dataTypes/languageId';
import * as xtabPromptOptions from '../../../platform/inlineEdits/common/dataTypes/xtabPromptOptions';
import { LanguageContextLanguages, LanguageContextOptions } from '../../../platform/inlineEdits/common/dataTypes/xtabPromptOptions';
import { InlineEditRequestLogContext } from '../../../platform/inlineEdits/common/inlineEditLogContext';
import { IInlineEditsModelService } from '../../../platform/inlineEdits/common/inlineEditsModelService';
import { EditStreamingWithTelemetry, IStatelessNextEditProvider, NoNextEditReason, StatelessNextEditDocument, StatelessNextEditRequest } from '../../../platform/inlineEdits/common/statelessNextEditProvider';
import { ILanguageContextProviderService } from '../../../platform/languageContextProvider/common/languageContextProviderService';
import { ILanguageDiagnosticsService } from '../../../platform/languages/common/languageDiagnosticsService';
import { ILogger } from '../../../platform/log/common/logService';
import { ISimulationTestContext } from '../../../platform/simulationTestContext/common/simulationTestContext';
import { IExperimentationService } from '../../../platform/telemetry/common/nullExperimentationService';
import { IWorkspaceService } from '../../../platform/workspace/common/workspaceService';
import { CancellationToken } from '../../../util/vs/base/common/cancellation';
import { LineReplacement } from '../../../util/vs/editor/common/core/edits/lineEdit';
import { OffsetRange } from '../../../util/vs/editor/common/core/ranges/offsetRange';
import { IInstantiationService } from '../../../util/vs/platform/instantiation/common/instantiation';
import { ISimilarFilesContextService } from '../common/similarFilesContextService';
import { CurrentDocument } from '../common/xtabCurrentDocument';
export interface ModelConfig extends xtabPromptOptions.PromptOptions {
    modelName: string | undefined;
}
export declare class XtabProvider implements IStatelessNextEditProvider {
    private readonly modelService;
    private readonly simulationCtx;
    private readonly instaService;
    private readonly workspaceService;
    private readonly diffService;
    private readonly configService;
    private readonly expService;
    private readonly langCtxService;
    private readonly langDiagService;
    private readonly ignoreService;
    private readonly similarFilesContextService;
    static readonly ID = "XtabProvider";
    readonly ID = "XtabProvider";
    private static computeTokens;
    private readonly userInteractionMonitor;
    private readonly terminalMonitor;
    private forceUseDefaultModel;
    private nextCursorPredictor;
    constructor(modelService: IInlineEditsModelService, simulationCtx: ISimulationTestContext, instaService: IInstantiationService, workspaceService: IWorkspaceService, diffService: IDiffService, configService: IConfigurationService, expService: IExperimentationService, langCtxService: ILanguageContextProviderService, langDiagService: ILanguageDiagnosticsService, ignoreService: IIgnoreService, similarFilesContextService: ISimilarFilesContextService);
    handleAcceptance(): void;
    handleRejection(): void;
    handleIgnored(): void;
    provideNextEdit(request: StatelessNextEditRequest, logger: ILogger, logContext: InlineEditRequestLogContext, cancellationToken: CancellationToken): EditStreamingWithTelemetry;
    private doGetNextEdit;
    private doGetNextEditWithSelection;
    private _configureDebounceTimings;
    private _applyAggressivenessSettings;
    private getAndProcessLanguageContext;
    private getLanguageContext;
    private streamEditsWithFiltering;
    private streamEdits;
    /**
     * Initiates the HTTP fetch, sets up the streaming pipeline, and returns either
     * a clean line stream (with cursor-tag removal and latency logging applied)
     * or an error / retry signal.
     *
     * This method encapsulates all fetch infrastructure so that downstream response
     * format handlers only need an `AsyncIterable<string>` line stream.
     */
    private _performFetch;
    private _streamEditsImpl;
    private doGetNextEditsWithCursorJump;
    private handleCrossFilePrediction;
    private computeEditWindowLinesRange;
    private determineModelConfiguration;
    private getEndpointWithLogging;
    private getEndpoint;
    private getPredictedOutput;
    private debounce;
    private determineArtificialDelayMs;
    private filterEdit;
    static getNextCursorColumn(nextCursorLine: string | undefined): number;
}
export declare function filterOutEditsWithSubstrings(edits: readonly LineReplacement[], substringsToFilterOut: string[]): readonly LineReplacement[];
export declare function computeAreaAroundEditWindowLinesRange(currentDocument: CurrentDocument): OffsetRange;
export declare function mapChatFetcherErrorToNoNextEditReason(fetchError: ChatFetchError): NoNextEditReason;
export declare function overrideModelConfig(modelConfig: ModelConfig, overridingConfig: xtabPromptOptions.ModelConfiguration): ModelConfig;
export declare function pickSystemPrompt(promptingStrategy: xtabPromptOptions.PromptingStrategy | undefined): string;
export declare function determineLanguageContextOptions(languageId: LanguageId, { enabled, enabledLanguages, maxTokens, enableAllContextProviders, traitPosition }: {
    enabled: boolean;
    enabledLanguages: LanguageContextLanguages;
    maxTokens: number;
    enableAllContextProviders: boolean;
    traitPosition: 'before' | 'after';
}): LanguageContextOptions;
export declare function getPredictionContents(doc: StatelessNextEditDocument, editWindowLines: readonly string[], responseFormat: xtabPromptOptions.ResponseFormat): string;
//# sourceMappingURL=xtabProvider.d.ts.map