mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 16:18:58 +01:00
introduce a SemanticSimilarity provider model (#179640)
* introduce a SemanticSimilarity provider model * have raceCancellablePromises also cancel if it rejects * remove extensionId for now * remove unused code
This commit is contained in:
committed by
GitHub
parent
a58d9dc08f
commit
a0361ed685
@@ -100,6 +100,7 @@ import { ExtHostQuickDiff } from 'vs/workbench/api/common/extHostQuickDiff';
|
||||
import { ExtHostInteractiveSession } from 'vs/workbench/api/common/extHostInteractiveSession';
|
||||
import { ExtHostInteractiveEditor } from 'vs/workbench/api/common/extHostInteractiveEditor';
|
||||
import { ExtHostNotebookDocumentSaveParticipant } from 'vs/workbench/api/common/extHostNotebookDocumentSaveParticipant';
|
||||
import { ExtHostSemanticSimilarity } from 'vs/workbench/api/common/extHostSemanticSimilarity';
|
||||
|
||||
export interface IExtensionRegistries {
|
||||
mine: ExtensionDescriptionRegistry;
|
||||
@@ -197,6 +198,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
rpcProtocol.set(ExtHostContext.ExtHostInteractive, new ExtHostInteractive(rpcProtocol, extHostNotebook, extHostDocumentsAndEditors, extHostCommands, extHostLogService));
|
||||
const extHostInteractiveEditor = rpcProtocol.set(ExtHostContext.ExtHostInteractiveEditor, new ExtHostInteractiveEditor(rpcProtocol, extHostDocuments, extHostLogService));
|
||||
const extHostInteractiveSession = rpcProtocol.set(ExtHostContext.ExtHostInteractiveSession, new ExtHostInteractiveSession(rpcProtocol, extHostLogService));
|
||||
const extHostSemanticSimilarity = rpcProtocol.set(ExtHostContext.ExtHostSemanticSimilarity, new ExtHostSemanticSimilarity(rpcProtocol));
|
||||
|
||||
// Check that no named customers are missing
|
||||
const expected = Object.values<ProxyIdentifier<any>>(ExtHostContext);
|
||||
@@ -1248,9 +1250,18 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
}
|
||||
};
|
||||
|
||||
// namespace: ai
|
||||
const ai: typeof vscode.ai = {
|
||||
registerSemanticSimilarityProvider(provider: vscode.SemanticSimilarityProvider) {
|
||||
checkProposedApiEnabled(extension, 'semanticSimilarity');
|
||||
return extHostSemanticSimilarity.registerSemanticSimilarityProvider(extension, provider);
|
||||
}
|
||||
};
|
||||
|
||||
return <typeof vscode>{
|
||||
version: initData.version,
|
||||
// namespaces
|
||||
ai,
|
||||
authentication,
|
||||
commands,
|
||||
comments,
|
||||
|
||||
Reference in New Issue
Block a user