Apply suggestions from code review

Adds suggestions from PR.
This commit is contained in:
Henning Dieterichs 2022-11-28 15:16:22 +01:00 committed by GitHub
parent 382498ef4e
commit 1f0fba4a1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as interfaces from './interfaces';
import * as vscode from 'vscode';
import TelemetryReporter from '@vscode/extension-telemetry';
import type TelemetryReporter from '@vscode/extension-telemetry';
export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict {

View file

@ -19,7 +19,7 @@ export default class ServiceWrapper implements vscode.Disposable {
private telemetryReporter: TelemetryReporter;
constructor(private context: vscode.ExtensionContext) {
const { aiKey } = require('../package.json') as { aiKey: string };
const { aiKey } = context.extension.packageJSON as { aiKey: string };
this.telemetryReporter = new TelemetryReporter(aiKey);
context.subscriptions.push(this.telemetryReporter);
}