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:
Rob Lourens
2026-02-04 05:03:06 +00:00
committed by GitHub
parent 6976ad0b78
commit 7914379935
12 changed files with 486 additions and 334 deletions

View File

@@ -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);
},
};