mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 23:59:43 +01:00
speech - core service and extension API (#195365)
* speech - scaffold a basic core service for registration * speech - scaffold a basic extension API for speech providers * cleanup * speech - improve API to work with events * simplify * better api * cleanup
This commit is contained in:
@@ -104,6 +104,7 @@ import { ExtHostIssueReporter } from 'vs/workbench/api/common/extHostIssueReport
|
||||
import { IExtHostManagedSockets } from 'vs/workbench/api/common/extHostManagedSockets';
|
||||
import { ExtHostShare } from 'vs/workbench/api/common/extHostShare';
|
||||
import { ExtHostChatProvider } from 'vs/workbench/api/common/extHostChatProvider';
|
||||
import { ExtHostSpeech } from 'vs/workbench/api/common/extHostSpeech';
|
||||
import { ExtHostChatVariables } from 'vs/workbench/api/common/extHostChatVariables';
|
||||
import { ExtHostRelatedInformation } from 'vs/workbench/api/common/extHostAiRelatedInformation';
|
||||
import { ExtHostAiEmbeddingVector } from 'vs/workbench/api/common/extHostEmbeddingVector';
|
||||
@@ -217,6 +218,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
const extHostAiEmbeddingVector = rpcProtocol.set(ExtHostContext.ExtHostAiEmbeddingVector, new ExtHostAiEmbeddingVector(rpcProtocol));
|
||||
const extHostIssueReporter = rpcProtocol.set(ExtHostContext.ExtHostIssueReporter, new ExtHostIssueReporter(rpcProtocol));
|
||||
const extHostStatusBar = rpcProtocol.set(ExtHostContext.ExtHostStatusBar, new ExtHostStatusBar(rpcProtocol, extHostCommands.converter));
|
||||
const extHostSpeech = rpcProtocol.set(ExtHostContext.ExtHostSpeech, new ExtHostSpeech(rpcProtocol));
|
||||
|
||||
// Check that no named customers are missing
|
||||
const expected = Object.values<ProxyIdentifier<any>>(ExtHostContext);
|
||||
@@ -1378,6 +1380,14 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
}
|
||||
};
|
||||
|
||||
// namespace: speech
|
||||
const speech: typeof vscode.speech = {
|
||||
registerSpeechProvider(id: string, provider: vscode.SpeechProvider) {
|
||||
checkProposedApiEnabled(extension, 'speech');
|
||||
return extHostSpeech.registerProvider(extension.identifier, id, provider);
|
||||
}
|
||||
};
|
||||
|
||||
return <typeof vscode>{
|
||||
version: initData.version,
|
||||
// namespaces
|
||||
@@ -1394,6 +1404,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
languages,
|
||||
notebooks,
|
||||
scm,
|
||||
speech,
|
||||
tasks,
|
||||
tests,
|
||||
window,
|
||||
@@ -1593,7 +1604,8 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
InteractiveEditorResponseFeedbackKind: extHostTypes.InteractiveEditorResponseFeedbackKind,
|
||||
StackFrameFocus: extHostTypes.StackFrameFocus,
|
||||
ThreadFocus: extHostTypes.ThreadFocus,
|
||||
RelatedInformationType: extHostTypes.RelatedInformationType
|
||||
RelatedInformationType: extHostTypes.RelatedInformationType,
|
||||
SpeechToTextStatus: extHostTypes.SpeechToTextStatus
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user