import { LineRange0Based } from './lineRange'; /** * A neighbor-file snippet selected via Jaccard similarity, ready to be * embedded into the recently_viewed_code_snippets section of the prompt. */ export interface INeighborFileSnippet { readonly uri: string; readonly relativePath: string | undefined; readonly snippet: string; readonly lineRange: LineRange0Based; readonly score: number; /** * `true` when the snippet comes from a language-service "related" file * (a non-open-tab file suggested by a language service) rather than from an * open tab. Related-file snippets omit line numbers in the prompt. */ readonly isFromRelatedFile: boolean; } export interface ISimilarFilesContextService { readonly _serviceBrand: undefined; /** * Computes GhostText-style similar files context (neighbor code snippets via Jaccard similarity). * @param includeRelatedFiles when `false`, language-service "related" (non-open-tab) files are * skipped and only open-tab neighbors are considered. * @returns JSON-serialized telemetry payload, or `undefined` on any error. Never throws. */ compute(uri: string, languageId: string, source: string, cursorOffset: number, includeRelatedFiles: boolean): Promise; /** * Computes neighbor-file snippets (Jaccard-ranked) intended for inclusion in the prompt. * @param includeRelatedFiles when `false`, language-service "related" (non-open-tab) files are * skipped and only open-tab neighbors are considered. * @returns Snippets ordered with best (highest scores) last, or `undefined` on any error. Never throws. */ getSnippetsForPrompt(uri: string, languageId: string, source: string, cursorOffset: number, includeRelatedFiles: boolean): Promise; } export declare const ISimilarFilesContextService: import("../../../util/common/services").ServiceIdentifier; export declare class NullSimilarFilesContextService implements ISimilarFilesContextService { readonly _serviceBrand: undefined; compute(): Promise; getSnippetsForPrompt(): Promise; } //# sourceMappingURL=similarFilesContextService.d.ts.map