Add two-phase AI Settings Search (#247177)

* Add AI settings search proposed API
* Use Progress API
* Implement new API into remote search provider
This commit is contained in:
Raymond Zhao
2025-04-23 12:20:23 -07:00
committed by GitHub
parent 917dbd8694
commit 68f70843d6
14 changed files with 366 additions and 60 deletions

View File

@@ -110,6 +110,7 @@ import { ExtHostWebviewPanels } from './extHostWebviewPanels.js';
import { ExtHostWebviewViews } from './extHostWebviewView.js';
import { IExtHostWindow } from './extHostWindow.js';
import { IExtHostWorkspace } from './extHostWorkspace.js';
import { ExtHostAiSettingsSearch } from './extHostAiSettingsSearch.js';
export interface IExtensionRegistries {
mine: ExtensionDescriptionRegistry;
@@ -218,6 +219,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
const extHostChatAgents2 = rpcProtocol.set(ExtHostContext.ExtHostChatAgents2, new ExtHostChatAgents2(rpcProtocol, extHostLogService, extHostCommands, extHostDocuments, extHostLanguageModels, extHostDiagnostics, extHostLanguageModelTools));
const extHostAiRelatedInformation = rpcProtocol.set(ExtHostContext.ExtHostAiRelatedInformation, new ExtHostRelatedInformation(rpcProtocol));
const extHostAiEmbeddingVector = rpcProtocol.set(ExtHostContext.ExtHostAiEmbeddingVector, new ExtHostAiEmbeddingVector(rpcProtocol));
const extHostAiSettingsSearch = rpcProtocol.set(ExtHostContext.ExtHostAiSettingsSearch, new ExtHostAiSettingsSearch(rpcProtocol));
const extHostStatusBar = rpcProtocol.set(ExtHostContext.ExtHostStatusBar, new ExtHostStatusBar(rpcProtocol, extHostCommands.converter));
const extHostSpeech = rpcProtocol.set(ExtHostContext.ExtHostSpeech, new ExtHostSpeech(rpcProtocol));
const extHostEmbeddings = rpcProtocol.set(ExtHostContext.ExtHostEmbeddings, new ExtHostEmbeddings(rpcProtocol));
@@ -1438,6 +1440,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
registerEmbeddingVectorProvider(model: string, provider: vscode.EmbeddingVectorProvider) {
checkProposedApiEnabled(extension, 'aiRelatedInformation');
return extHostAiEmbeddingVector.registerEmbeddingVectorProvider(extension, model, provider);
},
registerSettingsSearchProvider(provider: vscode.SettingsSearchProvider) {
checkProposedApiEnabled(extension, 'aiSettingsSearch');
return extHostAiSettingsSearch.registerSettingsSearchProvider(extension, provider);
}
};
@@ -1835,6 +1841,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
ChatErrorLevel: extHostTypes.ChatErrorLevel,
McpHttpServerDefinition: extHostTypes.McpHttpServerDefinition,
McpStdioServerDefinition: extHostTypes.McpStdioServerDefinition,
SettingsSearchResultKind: extHostTypes.SettingsSearchResultKind
};
};
}