Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/extension/survey/vscode-node/surveyCommands.ts
13399 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 * as vscode from 'vscode';
7
import { ISurveyService } from '../../../platform/survey/common/surveyService';
8
import { Disposable } from '../../../util/vs/base/common/lifecycle';
9
10
export const SURVEY_SIGNAL_USAGE_ID = 'github.copilot.survey.signalUsage';
11
12
export class SurveyCommandContribution extends Disposable {
13
constructor(@ISurveyService private readonly _surveyService: ISurveyService) {
14
super();
15
this._register(vscode.commands.registerCommand(SURVEY_SIGNAL_USAGE_ID, (source: string, languageId?: string) => {
16
this._surveyService.signalUsage(source, languageId);
17
}));
18
}
19
}
20
21