import { ServicesAccessor } from '../../../../../../util/vs/platform/instantiation/common/instantiation';
import { PromptMetadata } from '../../../prompt/src/components/components';
import { PromptOptions } from '../../../prompt/src/prompt';
import { TokenizerName } from '../../../prompt/src/tokenization';
import { CancellationToken as ICancellationToken } from '../../../types/src';
import { CompletionState } from '../completionState';
import { TelemetryWithExp } from '../telemetry';
import { IntelliSenseInsertion } from '../textDocument';
import { ContextProviderTelemetry } from './contextProviderRegistry';
import { NeighboringFileType } from './similarFiles/neighborFiles';
export declare const MIN_PROMPT_CHARS = 10;
export declare const MIN_PROMPT_EXCLUDED_LANGUAGE_IDS: string[];
export interface Prompt {
    prefix: string;
    suffix: string;
    context?: string[];
    prefixTokens?: number;
    suffixTokens?: number;
    isFimEnabled: boolean;
}
export interface PromptResponsePresent {
    type: 'prompt';
    prompt: Prompt;
    /**
     * The prefix is sent to the model without trailing whitespace. However the trailing whitespace will
     * be kept around to do position adjustments when applying the completion.
     */
    trailingWs: string;
    computeTimeMs: number;
    neighborSource: Map<NeighboringFileType, string[]>;
    metadata: PromptMetadata;
    contextProvidersTelemetry?: ContextProviderTelemetry[];
}
export interface ExtractPromptOptions {
    selectedCompletionInfo?: IntelliSenseInsertion;
    data?: unknown;
    tokenizer?: TokenizerName;
}
interface ContextTooShort {
    type: 'contextTooShort';
}
interface CopilotContentExclusion {
    type: 'copilotContentExclusion';
}
interface PromptError {
    type: 'promptError';
}
interface PromptCancelled {
    type: 'promptCancelled';
}
interface PromptTimeout {
    type: 'promptTimeout';
}
export declare const _contextTooShort: ContextTooShort;
export declare const _copilotContentExclusion: CopilotContentExclusion;
export declare const _promptError: PromptError;
export declare const _promptCancelled: PromptCancelled;
export declare const _promptTimeout: PromptTimeout;
export type PromptResponse = PromptResponsePresent | CopilotContentExclusion | ContextTooShort | PromptError | PromptCancelled | PromptTimeout;
export declare namespace PromptResponse {
    function toString(response: PromptResponse): string;
}
/** Record trailing whitespace, and trim it from prompt if the last line is only whitespace */
export declare function trimLastLine(source: string): [string, string];
export declare function extractPrompt(accessor: ServicesAccessor, completionId: string, completionState: CompletionState, telemetryData: TelemetryWithExp, cancellationToken?: ICancellationToken, promptOpts?: ExtractPromptOptions): Promise<PromptResponse>;
export declare function getPromptOptions(accessor: ServicesAccessor, telemetryData: TelemetryWithExp, languageId: string): PromptOptions;
export {};
//# sourceMappingURL=prompt.d.ts.map