mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
new install proprosed api (#117059)
* new install proprosed api * address comments
This commit is contained in:
@@ -388,6 +388,7 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
|
||||
const extensionMode = extensionDescription.isUnderDevelopment
|
||||
? (this._initData.environment.extensionTestsLocationURI ? ExtensionMode.Test : ExtensionMode.Development)
|
||||
: ExtensionMode.Production;
|
||||
const installAge = Date.now() - new Date(this._initData.telemetryInfo.firstSessionDate).getTime();
|
||||
|
||||
this._logService.trace(`ExtensionService#loadExtensionContext ${extensionDescription.identifier.value}`);
|
||||
|
||||
@@ -424,6 +425,10 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
|
||||
checkProposedApiEnabled(extensionDescription);
|
||||
return that.extensionRuntime;
|
||||
},
|
||||
get isNewInstall() {
|
||||
checkProposedApiEnabled(extensionDescription);
|
||||
return isNaN(installAge) ? false : installAge < 1000 * 60 * 60 * 24; // installAge is less than a day;
|
||||
},
|
||||
get environmentVariableCollection() { return that._extHostTerminalService.getEnvironmentVariableCollection(extensionDescription); }
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user