mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 15:55:59 +01:00
Restructure hook execution to always go through the renderer process (#292763)
* Restructure hook execution to always go through the renderer process Add output channel * cleanup * Fixes
This commit is contained in:
@@ -252,7 +252,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
const extHostDialogs = new ExtHostDialogs(rpcProtocol);
|
||||
const extHostChatStatus = new ExtHostChatStatus(rpcProtocol);
|
||||
const extHostHooks = accessor.get(IExtHostHooks);
|
||||
extHostHooks.initialize(extHostChatAgents2);
|
||||
|
||||
// Register API-ish commands
|
||||
ExtHostApiCommands.register(extHostCommands);
|
||||
@@ -1595,11 +1594,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
checkProposedApiEnabled(extension, 'chatPromptFiles');
|
||||
return extHostChatAgents2.registerPromptFileProvider(extension, PromptsType.skill, provider);
|
||||
},
|
||||
executeHook(hookType: vscode.ChatHookType, options: vscode.ChatHookExecutionOptions, token?: vscode.CancellationToken): Thenable<vscode.ChatHookResult[]> {
|
||||
async executeHook(hookType: vscode.ChatHookType, options: vscode.ChatHookExecutionOptions, token?: vscode.CancellationToken): Promise<vscode.ChatHookResult[]> {
|
||||
checkProposedApiEnabled(extension, 'chatHooks');
|
||||
return extHostHooks.executeHook(hookType, options, token).then(results =>
|
||||
results.map(r => ({ kind: r.kind as unknown as vscode.ChatHookResultKind, result: r.result }))
|
||||
);
|
||||
return extHostHooks.executeHook(hookType, options, token);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user