import { APIChoice } from '../openai/openai';
import { ResultType } from './resultType';
export declare const ICompletionsCurrentGhostText: import("../../../../../../util/common/services").ServiceIdentifier<ICompletionsCurrentGhostText>;
export interface ICompletionsCurrentGhostText {
    readonly _serviceBrand: undefined;
    readonly clientCompletionId: string | undefined;
    currentRequestId: string | undefined;
    setGhostText(prefix: string, suffix: string, choices: APIChoice[], resultType: ResultType): void;
    getCompletionsForUserTyping(prefix: string, suffix: string): APIChoice[] | undefined;
    hasAcceptedCurrentCompletion(prefix: string, suffix: string): boolean;
}
/**
 * Stores the internal concept of the currently shown completion, as inferred by
 * the output of getGhostText. Used to check if a subsequent call to
 * getGhostText is typing-as-suggested.
 */
export declare class CurrentGhostText implements ICompletionsCurrentGhostText {
    _serviceBrand: undefined;
    /** The document prefix at the start of the typing-as-suggested flow. This
     * does not use the prompt prefix since the ellision means that prefix is a
     * sliding window over long documents. */
    private prefix?;
    /** The prompt suffix at the start of the typing-as-suggested flow. */
    private suffix?;
    /** The original APIChoice array created at the start of the
     * typing-as-suggested flow. The first element in the array should be the
     * completion shown to the user. */
    private choices;
    /** The currently shown completion id. */
    get clientCompletionId(): string | undefined;
    /** The most recent inline completion request id, excluding speculative requests. */
    currentRequestId: string | undefined;
    /** Updates the current ghost text if it was not produced via
     * TypingAsSuggested. Should only be called from the end of getGhostText. */
    setGhostText(prefix: string, suffix: string, choices: APIChoice[], resultType: ResultType): void;
    /** Returns the current choices if the request context matches.  */
    getCompletionsForUserTyping(prefix: string, suffix: string): APIChoice[] | undefined;
    /** Returns whether the current completion is fully completed, and covers a full line. */
    hasAcceptedCurrentCompletion(prefix: string, suffix: string): boolean;
    /** If the given document prefix and prompt suffix match the current
     * completion returns the remaining prefix of the document after the stored
     * prefix. Returns undefined if the completion does not match. */
    private getRemainingPrefix;
}
//# sourceMappingURL=current.d.ts.map