mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-21 02:11:11 +00:00
* Refactor hook execution * Fix compilation: add IExtHostHooks import, remove unused IHookResult, inline ChatRequestHooks type * Move hooks property to chatHooks proposal, sync DTS * cleanup * Remove dead hook execution code: proxy, RPC, output channel, progress events All hook execution now happens in the extension via NodeHookExecutor. HooksExecutionService is now a pure registry (registerHooks/getHooksForSession). Removed: - executeHook, setProxy, onDidHookProgress from service - IHooksExecutionProxy, IHookProgressEvent, HookAbortError, formatHookErrorMessage - hooksCommandTypes.ts, hooksTypes.ts (dead type files) - mainThreadHooks proxy setup - extHostHooksNode., extHostHooksWorker. - ExtHostHooksShape. protocol - IExtHostHooks DI registrations - ChatHooksProgressContribution - All associated test files * Remove HooksExecutionService entirely The service was only a registry for session hooks, but hooks are already passed directly on the chat request DTO. The registerHooks/getHooksForSession pattern was redundant. * Restore modelName support in chatSubagentContentPart that was accidentally removed during merge * Revert unrelated tabIndex change on chatSubagentContentPart * Remove empty hooks ext host infrastructure Delete IExtHostHooks, NodeExtHostHooks, WorkerExtHostHooks, MainThreadHooks, ExtHostHooksShape, MainThreadHooksShape - all were empty stubs after hook execution moved to extension. * Remove mainThreadHooks import from extensionHost.contribution * Fix DTS comments: env and timeoutSec are values, not implementation promises
56 lines
4.0 KiB
TypeScript
56 lines
4.0 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { InstantiationType, registerSingleton } from '../../../platform/instantiation/common/extensions.js';
|
|
import { ExtHostTerminalService } from './extHostTerminalService.js';
|
|
import { ExtHostTask } from './extHostTask.js';
|
|
import { ExtHostDebugService } from './extHostDebugService.js';
|
|
import { NativeExtHostSearch } from './extHostSearch.js';
|
|
import { ExtHostExtensionService } from './extHostExtensionService.js';
|
|
import { NodeExtHostTunnelService } from './extHostTunnelService.js';
|
|
import { IExtHostDebugService } from '../common/extHostDebugService.js';
|
|
import { IExtHostExtensionService } from '../common/extHostExtensionService.js';
|
|
import { IExtHostSearch } from '../common/extHostSearch.js';
|
|
import { IExtHostTask } from '../common/extHostTask.js';
|
|
import { IExtHostTerminalService } from '../common/extHostTerminalService.js';
|
|
import { IExtHostTunnelService } from '../common/extHostTunnelService.js';
|
|
import { IExtensionStoragePaths } from '../common/extHostStoragePaths.js';
|
|
import { ExtensionStoragePaths } from './extHostStoragePaths.js';
|
|
import { ExtHostLoggerService } from './extHostLoggerService.js';
|
|
import { ILogService, ILoggerService } from '../../../platform/log/common/log.js';
|
|
import { NodeExtHostVariableResolverProviderService } from './extHostVariableResolverService.js';
|
|
import { IExtHostVariableResolverProvider } from '../common/extHostVariableResolverService.js';
|
|
import { ExtHostLogService } from '../common/extHostLogService.js';
|
|
import { SyncDescriptor } from '../../../platform/instantiation/common/descriptors.js';
|
|
import { ISignService } from '../../../platform/sign/common/sign.js';
|
|
import { SignService } from '../../../platform/sign/node/signService.js';
|
|
import { ExtHostTelemetry, IExtHostTelemetry } from '../common/extHostTelemetry.js';
|
|
import { IExtHostMpcService } from '../common/extHostMcp.js';
|
|
import { NodeExtHostMpcService } from './extHostMcpNode.js';
|
|
import { IExtHostAuthentication } from '../common/extHostAuthentication.js';
|
|
import { NodeExtHostAuthentication } from './extHostAuthentication.js';
|
|
|
|
// #########################################################################
|
|
// ### ###
|
|
// ### !!! PLEASE ADD COMMON IMPORTS INTO extHost.common.services.ts !!! ###
|
|
// ### ###
|
|
// #########################################################################
|
|
|
|
registerSingleton(IExtHostExtensionService, ExtHostExtensionService, InstantiationType.Eager);
|
|
registerSingleton(ILoggerService, ExtHostLoggerService, InstantiationType.Delayed);
|
|
registerSingleton(ILogService, new SyncDescriptor(ExtHostLogService, [false], true));
|
|
registerSingleton(ISignService, SignService, InstantiationType.Delayed);
|
|
registerSingleton(IExtensionStoragePaths, ExtensionStoragePaths, InstantiationType.Eager);
|
|
registerSingleton(IExtHostTelemetry, new SyncDescriptor(ExtHostTelemetry, [false], true));
|
|
|
|
registerSingleton(IExtHostAuthentication, NodeExtHostAuthentication, InstantiationType.Eager);
|
|
registerSingleton(IExtHostDebugService, ExtHostDebugService, InstantiationType.Eager);
|
|
registerSingleton(IExtHostSearch, NativeExtHostSearch, InstantiationType.Eager);
|
|
registerSingleton(IExtHostTask, ExtHostTask, InstantiationType.Eager);
|
|
registerSingleton(IExtHostTerminalService, ExtHostTerminalService, InstantiationType.Eager);
|
|
registerSingleton(IExtHostTunnelService, NodeExtHostTunnelService, InstantiationType.Eager);
|
|
registerSingleton(IExtHostVariableResolverProvider, NodeExtHostVariableResolverProviderService, InstantiationType.Eager);
|
|
registerSingleton(IExtHostMpcService, NodeExtHostMpcService, InstantiationType.Eager);
|