mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
Add isModelProxyAvailable (#271872)
* Add isModelProxyAvailable * tests
This commit is contained in:
@@ -27,14 +27,17 @@ import { ExtensionDescriptionRegistry } from '../../services/extensions/common/e
|
||||
import { UIKind } from '../../services/extensions/common/extensionHostProtocol.js';
|
||||
import { checkProposedApiEnabled, isProposedApiEnabled } from '../../services/extensions/common/extensions.js';
|
||||
import { ProxyIdentifier } from '../../services/extensions/common/proxyIdentifier.js';
|
||||
import { ExcludeSettingOptions, TextSearchCompleteMessageType, TextSearchContext2, TextSearchMatch2, AISearchKeyword } from '../../services/search/common/searchExtTypes.js';
|
||||
import { AISearchKeyword, ExcludeSettingOptions, TextSearchCompleteMessageType, TextSearchContext2, TextSearchMatch2 } from '../../services/search/common/searchExtTypes.js';
|
||||
import { CandidatePortSource, ExtHostContext, ExtHostLogLevelServiceShape, MainContext } from './extHost.protocol.js';
|
||||
import { ExtHostRelatedInformation } from './extHostAiRelatedInformation.js';
|
||||
import { ExtHostAiSettingsSearch } from './extHostAiSettingsSearch.js';
|
||||
import { ExtHostApiCommands } from './extHostApiCommands.js';
|
||||
import { IExtHostApiDeprecationService } from './extHostApiDeprecationService.js';
|
||||
import { IExtHostAuthentication } from './extHostAuthentication.js';
|
||||
import { ExtHostBulkEdits } from './extHostBulkEdits.js';
|
||||
import { ExtHostChatAgents2 } from './extHostChatAgents2.js';
|
||||
import { ExtHostChatOutputRenderer } from './extHostChatOutputRenderer.js';
|
||||
import { ExtHostChatSessions } from './extHostChatSessions.js';
|
||||
import { ExtHostChatStatus } from './extHostChatStatus.js';
|
||||
import { ExtHostClipboard } from './extHostClipboard.js';
|
||||
import { ExtHostEditorInsets } from './extHostCodeInsets.js';
|
||||
@@ -111,9 +114,6 @@ 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';
|
||||
import { ExtHostChatSessions } from './extHostChatSessions.js';
|
||||
import { ExtHostChatOutputRenderer } from './extHostChatOutputRenderer.js';
|
||||
|
||||
export interface IExtensionRegistries {
|
||||
mine: ExtensionDescriptionRegistry;
|
||||
@@ -1552,6 +1552,14 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
registerLanguageModelChatProvider: (vendor, provider) => {
|
||||
return extHostLanguageModels.registerLanguageModelChatProvider(extension, vendor, provider);
|
||||
},
|
||||
get isModelProxyAvailable() {
|
||||
checkProposedApiEnabled(extension, 'languageModelProxy');
|
||||
return extHostLanguageModels.isModelProxyAvailable;
|
||||
},
|
||||
onDidChangeModelProxyAvailability: (listener, thisArgs?, disposables?) => {
|
||||
checkProposedApiEnabled(extension, 'languageModelProxy');
|
||||
return extHostLanguageModels.onDidChangeModelProxyAvailability(listener, thisArgs, disposables);
|
||||
},
|
||||
getModelProxy: () => {
|
||||
checkProposedApiEnabled(extension, 'languageModelProxy');
|
||||
return extHostLanguageModels.getModelProxy(extension);
|
||||
|
||||
Reference in New Issue
Block a user