import { TextDocument } from 'vscode-languageserver-textdocument'; import { WorkspaceFolder } from 'vscode-languageserver-protocol'; import { IDocContext } from '../../document_transformer_service'; /** * Represents a resolution derived by a context resolver. * Typically, there will be multiple resolutions. */ export type ContextResolution = { /** * The uri of the resolution */ uri: TextDocument['uri']; /** * The type of resolution, either a file or a snippet * `file` - indicates the content is a whole file * `snippet` - indicates the content is a snippet of a file */ type: 'file' | 'snippet'; /** * The content of the resolution */ content: string; /** * relative path of the file */ fileRelativePath: string; /** * resolution strategy */ strategy: 'open_tabs'; /** * workspace folder for the item */ workspaceFolder: WorkspaceFolder; }; /** * Resolves additional (or advanced) context for a given `IDocContext`. * Each resolution strategy will have its own resolver, eg. Open Files (LRU), * Symbols, EcmaScript Imports, etc */ export declare abstract class AdvancedContextResolver { abstract buildContext({ documentContext, }: { documentContext: IDocContext; }): AsyncGenerator; }