import { ICompletionsLogTargetService } from '../../logger';
import { IIgnoreService } from '../../../../../../../platform/ignore/common/ignoreService';
import { IInstantiationService } from '../../../../../../../util/vs/platform/instantiation/common/instantiation';
import { ICompletionsTelemetryService } from '../../../../bridge/src/completionsTelemetryServiceBridge';
import { VirtualPrompt } from '../../../../prompt/src/components/virtualPrompt';
import { TokenizerName } from '../../../../prompt/src/tokenization';
import { CancellationToken, Position } from '../../../../types/src';
import { CompletionState } from '../../completionState';
import { TelemetryWithExp } from '../../telemetry';
import { TextDocumentContents } from '../../textDocument';
import { ICompletionsContextProviderBridgeService } from '../components/contextProviderBridge';
import { ILanguageDiagnosticsService } from '../../../../../../../platform/languages/common/languageDiagnosticsService';
import { ResolvedContextItem, type DefaultDiagnosticSettings } from '../contextProviderRegistry';
import { CodeSnippetWithId, TraitWithId, type DiagnosticBagWithId } from '../contextProviders/contextItemSchemas';
import { ICompletionsContextProviderService } from '../contextProviderStatistics';
import { PromptResponse } from '../prompt';
import { CompletionsPromptOptions, IPromptFactory } from './completionsPromptFactory';
export type CompletionRequestDocument = TextDocumentContents;
export type CompletionRequestData = {
    document: CompletionRequestDocument;
    position: Position;
    telemetryData: TelemetryWithExp;
    cancellationToken?: CancellationToken;
    data?: unknown;
    traits?: TraitWithId[];
    codeSnippets?: CodeSnippetWithId[];
    diagnostics?: DiagnosticBagWithId[];
    turnOffSimilarFiles?: boolean;
    suffixMatchThreshold?: number;
    maxPromptTokens: number;
    tokenizer?: TokenizerName;
};
export declare function isCompletionRequestData(data: unknown): data is CompletionRequestData;
export declare enum PromptOrdering {
    Default = "default",
    SplitContext = "splitContext"
}
declare abstract class BaseComponentsCompletionsPromptFactory implements IPromptFactory {
    private readonly instantiationService;
    private readonly completionsTelemetryService;
    private readonly ignoreService;
    private readonly contextProviderBridge;
    private readonly logTarget;
    private readonly contextProviderStatistics;
    private readonly languageDiagnosticsService;
    _serviceBrand: undefined;
    private virtualPrompt;
    private pipe;
    private renderer;
    private promptOrdering;
    constructor(virtualPrompt: VirtualPrompt | undefined, ordering: PromptOrdering | undefined, instantiationService: IInstantiationService, completionsTelemetryService: ICompletionsTelemetryService, ignoreService: IIgnoreService, contextProviderBridge: ICompletionsContextProviderBridgeService, logTarget: ICompletionsLogTargetService, contextProviderStatistics: ICompletionsContextProviderService, languageDiagnosticsService: ILanguageDiagnosticsService);
    prompt(opts: CompletionsPromptOptions, cancellationToken?: CancellationToken): Promise<PromptResponse>;
    createPromptUnsafe({ completionId, completionState, telemetryData, promptOpts }: CompletionsPromptOptions, cancellationToken?: CancellationToken): Promise<PromptResponse>;
    private updateComponentData;
    private resolveContext;
    private failFastPrompt;
    private createRequestData;
    private resetIfEmpty;
    private successPrompt;
    private errorPrompt;
    private reset;
    private setPromptOrdering;
    private completionsPrompt;
    private getRenderer;
    /** Public for testing */
    addDefaultDiagnosticBag(resolvedContextItems: ResolvedContextItem[], bags: DiagnosticBagWithId[] | undefined, completionId: string, completionState: CompletionState, settings: DefaultDiagnosticSettings | undefined): DiagnosticBagWithId[] | undefined;
}
export declare class ComponentsCompletionsPromptFactory extends BaseComponentsCompletionsPromptFactory {
    constructor(instantiationService: IInstantiationService, completionsTelemetryService: ICompletionsTelemetryService, ignoreService: IIgnoreService, contextProviderBridge: ICompletionsContextProviderBridgeService, logTarget: ICompletionsLogTargetService, contextProviderStatistics: ICompletionsContextProviderService, languageDiagnosticsService: ILanguageDiagnosticsService);
}
export declare class TestComponentsCompletionsPromptFactory extends BaseComponentsCompletionsPromptFactory {
}
export {};
//# sourceMappingURL=componentsCompletionsPromptFactory.d.ts.map