import { DocumentId } from '../../../platform/inlineEdits/common/dataTypes/documentId';
import { LanguageContextResponse } from '../../../platform/inlineEdits/common/dataTypes/languageContext';
import { CurrentFileOptions, PromptOptions } from '../../../platform/inlineEdits/common/dataTypes/xtabPromptOptions';
import { StatelessNextEditDocument } from '../../../platform/inlineEdits/common/statelessNextEditProvider';
import { IXtabHistoryEntry } from '../../../platform/inlineEdits/common/workspaceEditTracker/nesXtabHistoryTracker';
import { Result } from '../../../util/common/result';
import { OffsetRange } from '../../../util/vs/editor/common/core/ranges/offsetRange';
import { StringText } from '../../../util/vs/editor/common/core/text/abstractText';
import { CurrentDocument } from './xtabCurrentDocument';
export declare class PromptPieces {
    readonly currentDocument: CurrentDocument;
    readonly editWindowLinesRange: OffsetRange;
    readonly areaAroundEditWindowLinesRange: OffsetRange;
    readonly activeDoc: StatelessNextEditDocument;
    readonly xtabHistory: readonly IXtabHistoryEntry[];
    readonly taggedCurrentDocLines: readonly string[];
    readonly areaAroundCodeToEdit: string;
    readonly langCtx: LanguageContextResponse | undefined;
    readonly computeTokens: (s: string) => number;
    readonly opts: PromptOptions;
    constructor(currentDocument: CurrentDocument, editWindowLinesRange: OffsetRange, areaAroundEditWindowLinesRange: OffsetRange, activeDoc: StatelessNextEditDocument, xtabHistory: readonly IXtabHistoryEntry[], taggedCurrentDocLines: readonly string[], areaAroundCodeToEdit: string, langCtx: LanguageContextResponse | undefined, computeTokens: (s: string) => number, opts: PromptOptions);
}
export declare function getUserPrompt(promptPieces: PromptPieces): string;
export declare function toUniquePath(documentId: DocumentId, workspaceRootPath: string | undefined): string;
/**
 * Build code snippets using paged clipping.
 *
 * @param recentlyViewedCodeSnippets List of recently viewed code snippets from most to least recent
 */
export declare function buildCodeSnippetsUsingPagedClipping(recentlyViewedCodeSnippets: {
    id: DocumentId;
    content: StringText;
    visibleRanges?: readonly OffsetRange[];
}[], computeTokens: (s: string) => number, opts: PromptOptions): {
    snippets: string[];
    docsInPrompt: Set<DocumentId>;
};
export declare function countTokensForLines(page: string[], computeTokens: (s: string) => number): number;
export declare function truncateCode(lines: string[], fromBeginning: boolean, maxTokens: number): [number, number];
export declare const N_LINES_ABOVE = 2;
export declare const N_LINES_BELOW = 5;
export declare const N_LINES_AS_CONTEXT = 15;
export declare function clipPreservingRange(docLines: string[], rangeToPreserve: OffsetRange, computeTokens: (s: string) => number, pageSize: number, opts: CurrentFileOptions): Result<OffsetRange, 'outOfBudget'>;
export declare function createTaggedCurrentFileContentUsingPagedClipping(currentDocLines: string[], areaAroundCodeToEdit: string, areaAroundEditWindowLinesRange: OffsetRange, computeTokens: (s: string) => number, pageSize: number, opts: CurrentFileOptions): Result<readonly string[], 'outOfBudget'>;
//# sourceMappingURL=promptCrafting.d.ts.map