mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 16:18:58 +01:00
implement and wire-up chatVariables proposal
This commit is contained in:
@@ -106,6 +106,7 @@ import { IExtHostManagedSockets } from 'vs/workbench/api/common/extHostManagedSo
|
||||
import { ExtHostShare } from 'vs/workbench/api/common/extHostShare';
|
||||
import { ExtHostChatProvider } from 'vs/workbench/api/common/extHostChatProvider';
|
||||
import { ExtHostChatSlashCommands } from 'vs/workbench/api/common/extHostChatSlashCommand';
|
||||
import { ExtHostChatVariables } from 'vs/workbench/api/common/extHostChatVariables';
|
||||
|
||||
export interface IExtensionRegistries {
|
||||
mine: ExtensionDescriptionRegistry;
|
||||
@@ -207,6 +208,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
const extHostInteractiveEditor = rpcProtocol.set(ExtHostContext.ExtHostInlineChat, new ExtHostInteractiveEditor(rpcProtocol, extHostCommands, extHostDocuments, extHostLogService));
|
||||
const extHostChatProvider = rpcProtocol.set(ExtHostContext.ExtHostChatProvider, new ExtHostChatProvider(rpcProtocol, extHostLogService));
|
||||
const extHostChatSlashCommands = rpcProtocol.set(ExtHostContext.ExtHostChatSlashCommands, new ExtHostChatSlashCommands(rpcProtocol, extHostChatProvider, extHostLogService));
|
||||
const extHostChatVariables = rpcProtocol.set(ExtHostContext.ExtHostChatVariables, new ExtHostChatVariables(rpcProtocol));
|
||||
const extHostChat = rpcProtocol.set(ExtHostContext.ExtHostChat, new ExtHostChat(rpcProtocol, extHostLogService));
|
||||
const extHostSemanticSimilarity = rpcProtocol.set(ExtHostContext.ExtHostSemanticSimilarity, new ExtHostSemanticSimilarity(rpcProtocol));
|
||||
const extHostIssueReporter = rpcProtocol.set(ExtHostContext.ExtHostIssueReporter, new ExtHostIssueReporter(rpcProtocol));
|
||||
@@ -1345,6 +1347,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
requestChatAccess(id: string) {
|
||||
checkProposedApiEnabled(extension, 'chatRequestAccess');
|
||||
return extHostChatProvider.requestChatResponseProvider(extension.identifier, id);
|
||||
},
|
||||
registerVariable(name, description, resolver) {
|
||||
checkProposedApiEnabled(extension, 'chatVariables');
|
||||
return extHostChatVariables.registerVariableResolver(extension, name, description, resolver);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user