Path: blob/main/src/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts
3290 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45declare module 'vscode' {67// https://github.com/microsoft/vscode/issues/19090989export enum RelatedInformationType {10SymbolInformation = 1,11CommandInformation = 2,12SearchInformation = 3,13SettingInformation = 414}1516export interface RelatedInformationBaseResult {17type: RelatedInformationType;18weight: number;19}2021// TODO: Symbols and Search2223export interface CommandInformationResult extends RelatedInformationBaseResult {24type: RelatedInformationType.CommandInformation;25command: string;26}2728export interface SettingInformationResult extends RelatedInformationBaseResult {29type: RelatedInformationType.SettingInformation;30setting: string;31}3233export type RelatedInformationResult = CommandInformationResult | SettingInformationResult;3435export interface RelatedInformationProvider {36provideRelatedInformation(query: string, token: CancellationToken): ProviderResult<RelatedInformationResult[]>;37}3839export interface EmbeddingVectorProvider {40provideEmbeddingVector(strings: string[], token: CancellationToken): ProviderResult<number[][]>;41}4243export namespace ai {44export function getRelatedInformation(query: string, types: RelatedInformationType[], token: CancellationToken): Thenable<RelatedInformationResult[]>;45export function registerRelatedInformationProvider(type: RelatedInformationType, provider: RelatedInformationProvider): Disposable;46export function registerEmbeddingVectorProvider(model: string, provider: EmbeddingVectorProvider): Disposable;47}48}495051