@@ -769,10 +769,10 @@ index 096b9e23493539c9937940a56e555d95bbae38d9..ef37e614004f550f7b64eacd362f6894
769
769
remove(key: string, scope: StorageScope): void {
770
770
diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
771
771
new file mode 100644
772
- index 0000000000000000000000000000000000000000..71df1d2b0a718c6a6fbb66a075be52d1be3ff00d
772
+ index 0000000000000000000000000000000000000000..bae5b43e07e33b24ed5cc62d39c6b929c0bc4e5f
773
773
--- /dev/null
774
774
+++ b/src/vs/server/browser/client.ts
775
- @@ -0,0 +1,239 @@
775
+ @@ -0,0 +1,241 @@
776
776
+ import { Emitter } from 'vs/base/common/event';
777
777
+ import { URI } from 'vs/base/common/uri';
778
778
+ import { localize } from 'vs/nls';
@@ -926,7 +926,7 @@ index 0000000000000000000000000000000000000000..71df1d2b0a718c6a6fbb66a075be52d1
926
926
+
927
927
+ const logService = (services.get(ILogService) as ILogService);
928
928
+ const storageService = (services.get(IStorageService) as IStorageService);
929
- + const updateCheckEndpoint = path.join(options.base, "/update/check")
929
+ + const updateCheckEndpoint = path.join(options.base, "/update/check");
930
930
+ const getUpdate = async (): Promise<void> => {
931
931
+ logService.debug("Checking for update...");
932
932
+
@@ -946,8 +946,8 @@ index 0000000000000000000000000000000000000000..71df1d2b0a718c6a6fbb66a075be52d1
946
946
+
947
947
+ const lastNoti = storageService.getNumber("csLastUpdateNotification", StorageScope.GLOBAL);
948
948
+ if (lastNoti) {
949
- + // Only remind them again after two days .
950
- + const timeout = 1000*60*24*2 ;
949
+ + // Only remind them again after 1 week .
950
+ + const timeout = 1000*60*24*7 ;
951
951
+ const threshold = lastNoti + timeout;
952
952
+ if (Date.now() < threshold) {
953
953
+ return;
@@ -970,7 +970,9 @@ index 0000000000000000000000000000000000000000..71df1d2b0a718c6a6fbb66a075be52d1
970
970
+ });
971
971
+ };
972
972
+
973
- + updateLoop();
973
+ + if (!options.disableUpdateCheck) {
974
+ + updateLoop();
975
+ + }
974
976
+
975
977
+ // This will be used to set the background color while VS Code loads.
976
978
+ const theme = storageService.get("colorThemeData", StorageScope.GLOBAL);
@@ -1404,17 +1406,18 @@ index 0000000000000000000000000000000000000000..56331ff1fc32bbd82e769aaecb551e42
1404
1406
+ require('../../bootstrap-amd').load('vs/server/entry');
1405
1407
diff --git a/src/vs/server/ipc.d.ts b/src/vs/server/ipc.d.ts
1406
1408
new file mode 100644
1407
- index 0000000000000000000000000000000000000000..fd0115a74eb2d7362a3bf2543cb354a29a58936a
1409
+ index 0000000000000000000000000000000000000000..14f658f2702034a0500aebb5417576e5d6ffe406
1408
1410
--- /dev/null
1409
1411
+++ b/src/vs/server/ipc.d.ts
1410
- @@ -0,0 +1,132 @@
1412
+ @@ -0,0 +1,133 @@
1411
1413
+ /**
1412
1414
+ * External interfaces for integration into code-server over IPC. No vs imports
1413
1415
+ * should be made in this file.
1414
1416
+ */
1415
1417
+ export interface Options {
1416
- + disableTelemetry: boolean
1417
1418
+ base: string
1419
+ + disableTelemetry: boolean
1420
+ + disableUpdateCheck: boolean
1418
1421
+ }
1419
1422
+
1420
1423
+ export interface InitMessage {
0 commit comments