mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
don't mention locale for now, make env a namespace and move to namespace region, make sure env exists event in case of telemetry failure
This commit is contained in:
@@ -55,7 +55,6 @@ export class ExtHostAPIImplementation {
|
||||
private _threadService: IThreadService;
|
||||
private _proxy: MainProcessVSCodeAPIHelper;
|
||||
private _pluginService: IPluginService;
|
||||
private _telemetryService: ITelemetryService;
|
||||
|
||||
version: typeof vscode.version;
|
||||
env: typeof vscode.env;
|
||||
@@ -100,18 +99,9 @@ export class ExtHostAPIImplementation {
|
||||
) {
|
||||
this._pluginService = pluginService;
|
||||
this._threadService = threadService;
|
||||
this._telemetryService = telemetryService;
|
||||
this._proxy = threadService.getRemotable(MainProcessVSCodeAPIHelper);
|
||||
|
||||
this.version = contextService.getConfiguration().env.version;
|
||||
this._telemetryService.getTelemetryInfo().then((info) => {
|
||||
this.env = {
|
||||
machineId: info.machineId,
|
||||
sessionId: info.sessionId,
|
||||
locale: null
|
||||
}
|
||||
});
|
||||
|
||||
this.Uri = URI;
|
||||
this.Location = extHostTypes.Location;
|
||||
this.Diagnostic = <any> extHostTypes.Diagnostic;
|
||||
@@ -151,6 +141,17 @@ export class ExtHostAPIImplementation {
|
||||
const pluginHostStatusBar = new ExtHostStatusBar(this._threadService);
|
||||
const extHostOutputService = new ExtHostOutputService(this._threadService);
|
||||
|
||||
// env namespace
|
||||
this.env = {
|
||||
machineId: undefined,
|
||||
sessionId: undefined,
|
||||
// locale: undefined
|
||||
}
|
||||
telemetryService.getTelemetryInfo().then(info => {
|
||||
this.env.machineId = info.machineId;
|
||||
this.env.sessionId = info.sessionId;
|
||||
}, errors.onUnexpectedError);
|
||||
|
||||
// commands namespace
|
||||
this.commands = {
|
||||
registerCommand<T>(id: string, command: <T>(...args: any[]) => T | Thenable<T>, thisArgs?: any): vscode.Disposable {
|
||||
|
||||
Reference in New Issue
Block a user