Path: blob/main/extensions/copilot/src/extension/prompt/node/intentRegistry.ts
13399 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 { ChatLocation } from '../../../platform/chat/common/commonTypes';6import { SyncDescriptor } from '../../../util/vs/platform/instantiation/common/descriptors';7import { ContributedToolName } from '../../tools/common/toolNames';8import { IIntent } from './intents';910export interface CommandDetails {11commandId: string;12intent?: IIntent;13details: string;14locations: ChatLocation[];15readonly toolEquivalent?: ContributedToolName;16}1718export const IntentRegistry = new class {19private _descriptors: SyncDescriptor<IIntent>[] = [];2021public setIntents(intentDescriptors: SyncDescriptor<IIntent>[]) {22this._descriptors = this._descriptors.concat(intentDescriptors);23}2425public getIntents(): readonly SyncDescriptor<IIntent>[] {26return this._descriptors;27}28}();293031