<commit_before>import * as ai from 'applicationinsights';
import * as os from 'os';
import * as vscode from "vscode";
import { getConfiguration } from "./configuration";


class TelemetryReporter extends vscode.Disposable {
  private client: ai.TelemetryClient;
  private userOptIn: boolean = false;
  private disposables: vscode.Disposable[] = [];

  constructor(public extensionId: string, public extensionVersion: string, private aiKey: string) {
    super(() => this.disposables.map((d) => d.dispose()));

    if (!aiKey || aiKey === "")
      return;

    this.updateUserOptIn();
  }

  trackEvent(eventName: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number }) {<commit_msg>Command needs to know if Telemetry is enabled<commit_after>import * as ai from 'applicationinsights';
import * as os from 'os';
import * as vscode from "vscode";
import { getConfiguration } from "./configuration";


class TelemetryReporter extends vscode.Disposable {
  private client: ai.TelemetryClient;
  private userOptIn: boolean = false;
  private disposables: vscode.Disposable[] = [];

  constructor(public extensionId: string, public extensionVersion: string, private aiKey: string) {
    super(() => this.disposables.map((d) => d.dispose()));

    if (!aiKey || aiKey === "")
      return;

    this.updateUserOptIn();
  }

  get enabled(): boolean {
    return this.userOptIn;
  }

  trackEvent(eventName: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number }) {
{'fraction_non_alphanumeric': 0.13836065573770492, 'fraction_numerical': 0.0, 'mean_word_length': 4.549090909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7612532', 'n_tokens_mistral': 451, 'n_tokens_neox': 435, 'n_words': 132}