jiebi/CodeConvo huggingface dataset:
get isNewAppInstall() { return isNewAppInstall(initData.telemetryInfo.firstSessionDate); }, <del> createTelemetryLogger(appender: vscode.TelemetrySender): vscode.TelemetryLogger { </del> <ins> createTelemetryLogger(sender: vscode.TelemetrySender): vscode.TelemetryLogger { </ins> checkProposedApiEnabled(extension, 'telemetryLogger'); <del> return extHostTelemetry.instantiateLogger(extension, appender); </del> <ins> ExtHostTelemetryLogger.validateSender(sender); return extHostTelemetry.instantiateLogger(extension, sender); </ins> }, openExternal(uri: URI, options?: { allowContributedOpeners?: boolean | string }) { return extHostWindow.openUri(uri, {
} export class ExtHostTelemetryLogger { <del> private _appender: vscode.TelemetrySender; </del> <ins> static validateSender(sender: vscode.TelemetrySender): void { if (typeof sender !== 'object') { throw new TypeError('TelemetrySender argument is invalid'); } if (typeof sender.sendEventData !== 'function') { throw new TypeError('TelemetrySender.sendEventData must be a function'); } if (typeof sender.sendErrorData !== 'function') { throw new TypeError('TelemetrySender.sendErrorData must be a function'); } if (typeof sender.flush !== 'undefined' && typeof sender.flush !== 'function') { throw new TypeError('TelemetrySender.flush must be a function or undefined'); } } private readonly _sender: vscode.TelemetrySender; </ins> private readonly _onDidChangeEnableStates = new Emitter<vscode.TelemetryLogger>(); <del> private _telemetryEnablements: { isUsageEnabled: boolean; isErrorsEnabled: boolean }; private _apiObject: vscode.TelemetryLogger | undefined; </del> private readonly _ignoreBuiltinCommonProperties: boolean; private readonly _additionalCommonProperties: Record<string, any> | undefined; public readonly ignoreUnhandledExtHostErrors: boolean; <ins> private _telemetryEnablements: { isUsageEnabled: boolean; isErrorsEnabled: boolean }; private _apiObject: vscode.TelemetryLogger | undefined; </ins> constructor( sender: vscode.TelemetrySender, options: vscode.TelemetryLoggerOptions | undefined,
this.ignoreUnhandledExtHostErrors = options?.ignoreUnhandledErrors ?? false; this._ignoreBuiltinCommonProperties = options?.ignoreBuiltInCommonProperties ?? false; this._additionalCommonProperties = options?.additionalCommonProperties; <del> this._appender = sender; </del> <ins> this._sender = sender; </ins> this._telemetryEnablements = { isUsageEnabled: telemetryEnablements.isUsageEnabled, isErrorsEnabled: telemetryEnablements.isErrorsEnabled }; }
import { ITelemetryInfo, TelemetryLevel } from 'vs/platform/telemetry/common/telemetry'; import { TestTelemetryLoggerService } from 'vs/platform/telemetry/test/common/telemetryLogAppender.test'; import { IExtHostInitDataService } from 'vs/workbench/api/common/extHostInitDataService'; <del> import { ExtHostTelemetry } from 'vs/workbench/api/common/extHostTelemetry'; </del> <ins> import { ExtHostTelemetry, ExtHostTelemetryLogger } from 'vs/workbench/api/common/extHostTelemetry'; </ins> import { IEnvironment } from 'vs/workbench/services/extensions/common/extensionHostProtocol'; import { mock } from 'vs/workbench/test/common/workbenchTestServices'; import type { TelemetrySender } from 'vscode';
return logger; }; <ins> test('Validate sender instances', function () { assert.throws(() => ExtHostTelemetryLogger.validateSender(<any>null)); assert.throws(() => ExtHostTelemetryLogger.validateSender(<any>1)); assert.throws(() => ExtHostTelemetryLogger.validateSender(<any>{})); assert.throws(() => { ExtHostTelemetryLogger.validateSender(<any>{ sendErrorData: () => { }, sendEventData: true }); }); assert.throws(() => { ExtHostTelemetryLogger.validateSender(<any>{ sendErrorData: 123, sendEventData: () => { }, }); }); assert.throws(() => { ExtHostTelemetryLogger.validateSender(<any>{ sendErrorData: () => { }, sendEventData: () => { }, flush: true }); }); }); </ins> test('Ensure logger gets proper telemetry level during initialization', function () { const extensionTelemetry = createExtHostTelemetry(); let config = extensionTelemetry.getTelemetryDetails();
'no-cached-data': { type: 'boolean' }, 'prof-startup-prefix': { type: 'string' }, 'prof-v8-extensions': { type: 'boolean' }, <del> 'disable-extensions': { type: 'boolean', deprecates: ['disableExtensions'], cat: 't', description: localize('disableExtensions', "Disable all installed extensions.") }, 'disable-extension': { type: 'string[]', cat: 't', args: 'ext-id', description: localize('disableExtension', "Disable an extension.") }, </del> <ins> 'disable-extensions': { type: 'boolean', deprecates: ['disableExtensions'], cat: 't', description: localize('disableExtensions', "Disable all installed extensions. This option is not persisted and is effective only when the command opens a new window.") }, 'disable-extension': { type: 'string[]', cat: 't', args: 'ext-id', description: localize('disableExtension', "Disable the provided extension. This option is not persisted and is effective only when the command opens a new window.") }, </ins> 'sync': { type: 'string', cat: 't', description: localize('turn sync', "Turn sync on or off."), args: ['on | off'] }, 'inspect-extensions': { type: 'string', allowEmptyValue: true, deprecates: ['debugPluginHost'], args: 'port', cat: 't', description: localize('inspect-extensions', "Allow debugging and profiling of extensions. Check the developer tools for the connection URI.") },
import * as nls from 'vs/nls'; import { ContextKeyExpr, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; <del> import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; </del> export class GhostTextController extends Disposable { public static readonly inlineSuggestionVisible = new RawContextKey<boolean>('inlineSuggestionVisible', false, nls.localize('inlineSuggestionVisible', "Whether an inline suggestion is visible")); public static readonly inlineSuggestionHasIndentation = new RawContextKey<boolean>('inlineSuggestionHasIndentation', false, nls.localize('inlineSuggestionHasIndentation', "Whether the inline suggestion starts with whitespace")); public static readonly inlineSuggestionHasIndentationLessThanTabSize = new RawContextKey<boolean>('inlineSuggestionHasIndentationLessThanTabSize', true, nls.localize('inlineSuggestionHasIndentationLessThanTabSize', "Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")); <del> /** * Enables to use Ctrl+Left to undo fully (partially) accepted inline completions (the completion is no longer visible then). */ public static readonly inlineSuggestionJustCommitted = new RawContextKey<boolean>('inlineSuggestionJustCommitted', false, nls.localize('inlineSuggestionJustCommitted', "Whether an inline suggestion just got committed")); </del> static ID = 'editor.contrib.ghostTextController';
public commitPartially(): void { this.activeModel?.commitInlineCompletionPartially(); <del> this.activeController?.value?.contextKeys.inlineSuggestionJustCommitted.set(true); </del> } public commit(): void { this.activeModel?.commitInlineCompletion(); <del> this.activeController?.value?.contextKeys.inlineSuggestionJustCommitted.set(true); </del> } public hide(): void {
public readonly inlineCompletionVisible = GhostTextController.inlineSuggestionVisible.bindTo(this.contextKeyService); public readonly inlineCompletionSuggestsIndentation = GhostTextController.inlineSuggestionHasIndentation.bindTo(this.contextKeyService); public readonly inlineCompletionSuggestsIndentationLessThanTabSize = GhostTextController.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService); <del> public readonly inlineSuggestionJustCommitted = GhostTextController.inlineSuggestionJustCommitted.bindTo(this.contextKeyService); </del> constructor(private readonly contextKeyService: IContextKeyService) { }
* Must be disposed as soon as the model detaches from the editor. */ export class ActiveGhostTextController extends Disposable { <del> public readonly contextKeys = new GhostTextContextKeys(this.contextKeyService); </del> <ins> private readonly contextKeys = new GhostTextContextKeys(this.contextKeyService); </ins> public readonly model = this._register(this.instantiationService.createInstance(GhostTextModel, this.editor)); public readonly widget = this._register(this.instantiationService.createInstance(GhostTextWidget, this.editor, this.model));
this._register(this.model.onDidChange(() => { this.updateContextKeys(); })); <del> this._register(this.editor.onDidChangeModelContent(() => { this.contextKeys.inlineSuggestionJustCommitted.reset(); })); this._register(this.editor.onDidChangeCursorPosition(() => { this.contextKeys.inlineSuggestionJustCommitted.reset(); })); </del> this.updateContextKeys(); }
id: 'editor.action.inlineSuggest.acceptNextWord', label: nls.localize('action.inlineSuggest.acceptNextWord', "Accept Next Word Of Inline Suggestion"), alias: 'Accept Next Word Of Inline Suggestion', <del> precondition: ContextKeyExpr.and(EditorContextKeys.writable, GhostTextController.inlineSuggestionVisible), kbOpts: { weight: 1000, primary: KeyMod.CtrlCmd | KeyCode.RightArrow, } </del> <ins> precondition: EditorContextKeys.writable </ins> }); }
} } } <del> KeybindingsRegistry.registerKeybindingRule({ id: 'undo', weight: 1000, primary: KeyMod.CtrlCmd | KeyCode.LeftArrow, when: ContextKeyExpr.and(EditorContextKeys.writable, ContextKeyExpr.or(GhostTextController.inlineSuggestionVisible, GhostTextController.inlineSuggestionJustCommitted)), }); </del>
let debugKeybindingLabel = ''; viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, { <del> content: localize( { key: 'runAndDebugAction', comment: [ '{0} will be replaced with a keybinding', 'Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{1})"}' ] }, "[Run and Debug{0}](command:{1})", debugKeybindingLabel, DEBUG_START_COMMAND_ID), </del> <ins> content: `[${localize('runAndDebugAction', "Run and Debug")}${debugKeybindingLabel}](command:${DEBUG_START_COMMAND_ID})`, </ins> when: CONTEXT_DEBUGGERS_AVAILABLE, group: ViewContentGroups.Debug, // Allow inserting more buttons directly after this one (by setting order to 1).
}); viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, { <del> content: localize( { key: 'detectThenRunAndDebug', comment: [ 'Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}', ] }, "[Show all automatic debug configurations](command:{0}).", SELECT_AND_START_ID), </del> <ins> content: `[${localize('detectThenRunAndDebug', "Show all automatic debug configurations")}](command:${SELECT_AND_START_ID}).`, </ins> when: CONTEXT_DEBUGGERS_AVAILABLE, group: ViewContentGroups.Debug, order: 10
dependencies: is-number "^7.0.0" <del> typescript@4.9.4: version "4.9.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== </del> <ins> typescript@4.9.5: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== </ins> vscode-grammar-updater@^1.1.0: version "1.1.0"
`script-src 'self' 'unsafe-eval' ${this._getScriptCspHashes(data).join(' ')} 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=' http://${remoteAuthority};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html 'child-src 'self';', `frame-src 'self' https://*.vscode-cdn.net data:;`, <del> 'worker-src 'self' data:;', </del> <ins> 'worker-src 'self' data: blob:;', </ins> 'style-src 'self' 'unsafe-inline';', 'connect-src 'self' ws: wss: https:;', 'font-src 'self' blob:;',
<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // https://github.com/microsoft/vscode/blob/6cb34eb22385bc93ab25aa2e5113f59c7a2299ac/src/vs/platform/extensions/common/extensionValidator.ts export interface IParsedVersion { hasCaret: boolean; hasGreaterEquals: boolean; majorBase: number; majorMustEqual: boolean; minorBase: number; minorMustEqual: boolean; patchBase: number; patchMustEqual: boolean; preRelease: string | null; } export interface INormalizedVersion { majorBase: number; majorMustEqual: boolean; minorBase: number; minorMustEqual: boolean; patchBase: number; patchMustEqual: boolean; notBefore: number; /* milliseconds timestamp, or 0 */ isMinimum: boolean; } const VERSION_REGEXP = /^(^|>=)?((d+)|x).((d+)|x).((d+)|x)(-.*)?$/; const NOT_BEFORE_REGEXP = /^-(d{4})(d{2})(d{2})$/; export function isValidVersionStr(version: string): boolean { version = version.trim(); return (version === '*' || VERSION_REGEXP.test(version)); } export function parseVersion(version: string): IParsedVersion | null { if (!isValidVersionStr(version)) { return null; } version = version.trim(); if (version === '*') { return { hasCaret: false, hasGreaterEquals: false, majorBase: 0, majorMustEqual: false, minorBase: 0, minorMustEqual: false, patchBase: 0, patchMustEqual: false, preRelease: null }; } const m = version.match(VERSION_REGEXP); if (!m) { return null; } return { hasCaret: m[1] === '^', hasGreaterEquals: m[1] === '>=', majorBase: m[2] === 'x' ? 0 : parseInt(m[2], 10), majorMustEqual: (m[2] === 'x' ? false : true), minorBase: m[4] === 'x' ? 0 : parseInt(m[4], 10), minorMustEqual: (m[4] === 'x' ? false : true), patchBase: m[6] === 'x' ? 0 : parseInt(m[6], 10), patchMustEqual: (m[6] === 'x' ? false : true), preRelease: m[8] || null }; } export function normalizeVersion(version: IParsedVersion | null): INormalizedVersion | null { if (!version) { return null; } const majorBase = version.majorBase; const majorMustEqual = version.majorMustEqual; const minorBase = version.minorBase; let minorMustEqual = version.minorMustEqual; const patchBase = version.patchBase; let patchMustEqual = version.patchMustEqual; if (version.hasCaret) { if (majorBase === 0) { patchMustEqual = false; } else { minorMustEqual = false; patchMustEqual = false; } } let notBefore = 0; if (version.preRelease) { const match = NOT_BEFORE_REGEXP.exec(version.preRelease); if (match) { const [, year, month, day] = match; notBefore = Date.UTC(Number(year), Number(month) - 1, Number(day)); } } return { majorBase: majorBase, majorMustEqual: majorMustEqual, minorBase: minorBase, minorMustEqual: minorMustEqual, patchBase: patchBase, patchMustEqual: patchMustEqual, isMinimum: version.hasGreaterEquals, notBefore, }; } </ins>
import * as MarkdownItType from 'markdown-it'; import { languages, workspace, Disposable, TextDocument, Uri, Diagnostic, Range, DiagnosticSeverity, Position, env, l10n } from 'vscode'; <ins> import { INormalizedVersion, normalizeVersion, parseVersion } from './extensionEngineValidation'; </ins> const product = JSON.parse(fs.readFileSync(path.join(env.appRoot, 'product.json'), { encoding: 'utf-8' })); const allowedBadgeProviders: string[] = (product.extensionAllowedBadgeProviders || []).map((s: string) => s.toLowerCase());
const apiProposalNotListed = l10n.t("This proposal cannot be used because for this extension the product defines a fixed set of API proposals. You can test your extension but before publishing you MUST reach out to the VS Code team."); const implicitActivationEvent = l10n.t("This activation event cannot be explicitly listed by your extension."); const redundantImplicitActivationEvent = l10n.t("This activation event can be removed as VS Code generates these automatically from your package.json contribution declarations."); <ins> const bumpEngineForImplicitActivationEvents = l10n.t("This activation event can be removed for extensions targeting engine version ^1.75 as VS Code will generate these automatically from your package.json contribution declarations."); </ins> const starActivation = l10n.t("Using '*' activation is usually a bad idea as it impacts performance."); enum Context {
if (activationEventsNode?.type === 'array' && activationEventsNode.children) { for (const activationEventNode of activationEventsNode.children) { const activationEvent = getNodeValue(activationEventNode); <ins> const isImplicitActivationSupported = info.engineVersion && info.engineVersion?.majorBase >= 1 && info.engineVersion?.minorBase >= 75; </ins> // Redundant Implicit Activation if (info.implicitActivationEvents?.has(activationEvent) && redundantImplicitActivationEventPrefixes.some((prefix) => activationEvent.startsWith(prefix))) { const start = document.positionAt(activationEventNode.offset); const end = document.positionAt(activationEventNode.offset + activationEventNode.length); <del> diagnostics.push(new Diagnostic(new Range(start, end), redundantImplicitActivationEvent, DiagnosticSeverity.Warning)); </del> <ins> const message = isImplicitActivationSupported ? redundantImplicitActivationEvent : bumpEngineForImplicitActivationEvents; diagnostics.push(new Diagnostic(new Range(start, end), message, isImplicitActivationSupported ? DiagnosticSeverity.Warning : DiagnosticSeverity.Information)); </ins> } // Reserved Implicit Activation for (const implicitActivationEventPrefix of reservedImplicitActivationEventPrefixes) { <del> if (activationEvent.startsWith(implicitActivationEventPrefix)) { </del> <ins> if (isImplicitActivationSupported && activationEvent.startsWith(implicitActivationEventPrefix)) { </ins> const start = document.positionAt(activationEventNode.offset); const end = document.positionAt(activationEventNode.offset + activationEventNode.length); diagnostics.push(new Diagnostic(new Range(start, end), implicitActivationEvent, DiagnosticSeverity.Error));
private readPackageJsonInfo(folder: Uri, tree: JsonNode | undefined) { const engine = tree && findNodeAtLocation(tree, ['engines', 'vscode']); <ins> const parsedEngineVersion = engine?.type === 'string' ? normalizeVersion(parseVersion(engine.value)) : null; </ins> const repo = tree && findNodeAtLocation(tree, ['repository', 'url']); const uri = repo && parseUri(repo.value); const activationEvents = tree && parseImplicitActivationEvents(tree);
isExtension: !!(engine && engine.type === 'string'), hasHttpsRepository: !!(repo && repo.type === 'string' && repo.value && uri && uri.scheme.toLowerCase() === 'https'), repository: uri!, <del> implicitActivationEvents: activationEvents </del> <ins> implicitActivationEvents: activationEvents, engineVersion: parsedEngineVersion </ins> }; const str = folder.toString(); const oldInfo = this.folderToPackageJsonInfo[str];
} foundAnyProviders = true; counter++; <del> provider.provideTasks(validTypes).then((taskSet: ITaskSet) => { </del> <ins> raceTimeout(provider.provideTasks(validTypes).then((taskSet: ITaskSet) => { </ins> // Check that the tasks provided are of the correct type for (const task of taskSet.tasks) { if (task.type !== this._providerTypes.get(handle)) {
return new Map(); } await this._waitForSupportedExecutions; <del> if (this._workspaceTasksPromise) { </del> <ins> // The build task might be run before folder open. On folder open, we need to update the tasks so that // all tasks are parsed. #173384 if (runSource !== TaskRunSource.FolderOpen && this._workspaceTasksPromise) { </ins> return this._workspaceTasksPromise; } return this._updateWorkspaceTasks(runSource);
return new Map(); } await this._waitForSupportedExecutions; <del> // The build task might be run before folder open. On folder open, we need to update the tasks so that // all tasks are parsed. #173384 if (runSource !== TaskRunSource.FolderOpen && this._workspaceTasksPromise) { </del> <ins> await this._whenTaskSystemReady; if (this._workspaceTasksPromise) { </ins> return this._workspaceTasksPromise; } return this._updateWorkspaceTasks(runSource);
return { workspaceFolder, set: undefined, configurations: undefined, hasErrors: false }; } <del> private async _computeTasksForSingleConfig(workspaceFolder: IWorkspaceFolder | undefined, config: TaskConfig.IExternalTaskRunnerConfiguration | undefined, runSource: TaskRunSource, custom: CustomTask[], customized: IStringDictionary<ConfiguringTask>, source: TaskConfig.TaskConfigSource, isRecentTask: boolean = false): Promise<boolean> { if (!config || !workspaceFolder) { </del> <ins> private async _computeTasksForSingleConfig(workspaceFolder: IWorkspaceFolder, config: TaskConfig.IExternalTaskRunnerConfiguration | undefined, runSource: TaskRunSource, custom: CustomTask[], customized: IStringDictionary<ConfiguringTask>, source: TaskConfig.TaskConfigSource, isRecentTask: boolean = false): Promise<boolean> { if (!config) { </ins> return false; } <del> const taskSystemInfo: ITaskSystemInfo | undefined = workspaceFolder ? this._getTaskSystemInfo(workspaceFolder.uri.scheme) : undefined; </del> <ins> const taskSystemInfo: ITaskSystemInfo | undefined = this._getTaskSystemInfo(workspaceFolder.uri.scheme); </ins> const problemReporter = new ProblemReporter(this._outputChannel); if (!taskSystemInfo) { problemReporter.fatal(nls.localize('TaskSystem.workspaceFolderError', 'Workspace folder was undefined'));
return true; } <del> private async _ensureWorkspaceTasks(): Promise<void> { if (!this._workspaceTasksPromise) { await this.getWorkspaceTasks(); } else { await this._workspaceTasksPromise; } } </del> private async _runTaskCommand(filter?: string | ITaskIdentifier): Promise<void> { <del> await this._ensureWorkspaceTasks(); </del> if (!filter) { return this._doRunTaskCommand(); }
// We only want to fire a telemetry if we haven't seen this account yet in this session. if (!this._accountsSeen.has(session.account.id)) { this._accountsSeen.add(session.account.id); <del> this._githubServer.sendAdditionalTelemetryInfo(session.accessToken); </del> <ins> this._githubServer.sendAdditionalTelemetryInfo(session); </ins> } }
export interface IGitHubServer { login(scopes: string): Promise<string>; getUserInfo(token: string): Promise<{ id: string; accountName: string }>; <del> sendAdditionalTelemetryInfo(token: string): Promise<void>; </del> <ins> sendAdditionalTelemetryInfo(session: vscode.AuthenticationSession): Promise<void>; </ins> friendlyName: string; }
} if (this._type === AuthProviderType.github) { <del> return await this.checkUserDetails(token); </del> <ins> return await this.checkUserDetails(session); </ins> } // GHES <del> await this.checkEnterpriseVersion(token); </del> <ins> await this.checkEnterpriseVersion(session.accessToken); </ins> } <del> private async checkUserDetails(token: string): Promise<void> { </del> <ins> private async checkUserDetails(session: vscode.AuthenticationSession): Promise<void> { </ins> let edu: string | undefined; try { const result = await fetching('https://education.github.com/api/user', { headers: { <del> Authorization: `token ${token}`, </del> <ins> Authorization: `token ${session.accessToken}`, </ins> 'faculty-check-preview': 'true', <del> 'User-Agent': 'Visual-Studio-Code' </del> <ins> 'User-Agent': `${vscode.env.appName} (${vscode.env.appHost})` </ins> } });
: json.faculty ? 'faculty' : 'none'; <ins> } else { edu = 'unknown'; </ins> } } catch (e) { <del> // No-op } let managed: string | undefined; try { const user = await this.getUserInfo(token); // Apparently, this is how you tell if a user is an EMU... managed = user.accountName.includes('_') ? 'true' : 'false'; } catch (e) { // No-op } if (edu === undefined && managed === undefined) { return; </del> <ins> edu = 'unknown'; </ins> } /* __GDPR__
} */ this._telemetryReporter.sendTelemetryEvent('session', { <del> isEdu: edu ?? 'unknown', isManaged: managed ?? 'unknown' </del> <ins> isEdu: edu, // Apparently, this is how you tell if a user is an EMU... isManaged: session.account.label.includes('_') ? 'true' : 'false' </ins> }); }