Path: blob/main/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.ts
13406 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { InstantiationType, registerSingleton } from '../../../../../platform/instantiation/common/extensions.js';6import {7CustomizationHarnessServiceBase,8ICustomizationHarnessService,9createVSCodeHarnessDescriptor,10} from '../../common/customizationHarnessService.js';11import { IPromptsService, PromptsStorage } from '../../common/promptSyntax/service/promptsService.js';12import { BUILTIN_STORAGE } from '../../common/aiCustomizationWorkspaceService.js';13import { SessionType } from '../../common/chatSessionsService.js';1415/**16* Core implementation of the customization harness service.17*18* Only the Local harness is registered statically. All other harnesses19* (e.g. Copilot CLI) are contributed by extensions via the provider API.20*/21class CustomizationHarnessService extends CustomizationHarnessServiceBase {22constructor(23@IPromptsService promptsService: IPromptsService24) {25const localExtras = [PromptsStorage.extension, BUILTIN_STORAGE];26super(27[createVSCodeHarnessDescriptor(localExtras)],28SessionType.Local,29promptsService,30);31}32}3334registerSingleton(ICustomizationHarnessService, CustomizationHarnessService, InstantiationType.Delayed);35363738