Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.ts
13406 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { InstantiationType, registerSingleton } from '../../../../../platform/instantiation/common/extensions.js';
7
import {
8
CustomizationHarnessServiceBase,
9
ICustomizationHarnessService,
10
createVSCodeHarnessDescriptor,
11
} from '../../common/customizationHarnessService.js';
12
import { IPromptsService, PromptsStorage } from '../../common/promptSyntax/service/promptsService.js';
13
import { BUILTIN_STORAGE } from '../../common/aiCustomizationWorkspaceService.js';
14
import { SessionType } from '../../common/chatSessionsService.js';
15
16
/**
17
* Core implementation of the customization harness service.
18
*
19
* Only the Local harness is registered statically. All other harnesses
20
* (e.g. Copilot CLI) are contributed by extensions via the provider API.
21
*/
22
class CustomizationHarnessService extends CustomizationHarnessServiceBase {
23
constructor(
24
@IPromptsService promptsService: IPromptsService
25
) {
26
const localExtras = [PromptsStorage.extension, BUILTIN_STORAGE];
27
super(
28
[createVSCodeHarnessDescriptor(localExtras)],
29
SessionType.Local,
30
promptsService,
31
);
32
}
33
}
34
35
registerSingleton(ICustomizationHarnessService, CustomizationHarnessService, InstantiationType.Delayed);
36
37
38