vscode.patch 115.0 KB
Newer Older
A
Asher 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
diff --git a/build/gulpfile.compile.js b/build/gulpfile.compile.js
index 0dd2e5abf1..fc6875f3c2 100644
--- a/build/gulpfile.compile.js
+++ b/build/gulpfile.compile.js
@@ -12,6 +12,7 @@ const { compileExtensionsBuildTask } = require('./gulpfile.extensions');
 
 // Full compile, including nls and inline sources in sourcemaps, for build
 const compileClientBuildTask = task.define('compile-client-build', task.series(util.rimraf('out-build'), compilation.compileTask('src', 'out-build', true)));
+exports.compileClientBuildTask = compileClientBuildTask;
 
 // All Build
 const compileBuildTask = task.define('compile-build', task.parallel(compileClientBuildTask, compileExtensionsBuildTask));
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
14
index 84a6be26e8..d4c3ebc7bd 100644
A
Asher 已提交
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -34,7 +34,8 @@ const deps = require('./dependencies');
 const getElectronVersion = require('./lib/electron').getElectronVersion;
 const createAsar = require('./lib/asar').createAsar;
 const minimist = require('minimist');
-const { compileBuildTask } = require('./gulpfile.compile');
+const { /*compileBuildTask, */compileClientBuildTask } = require('./gulpfile.compile');
+const { compileExtensionsBuildTask } = require('./gulpfile.extensions');
 
 const productionDependencies = deps.getProductionDependencies(path.dirname(__dirname));
 // @ts-ignore
@@ -47,23 +48,28 @@ const nodeModules = ['electron', 'original-fs']
 
 // Build
 const vscodeEntryPoints = _.flatten([
-	buildfile.entrypoint('vs/workbench/workbench.main'),
+	buildfile.entrypoint('vs/workbench/workbench.web.api'),
+	buildfile.entrypoint('vs/server/src/cli'),
+	buildfile.entrypoint('vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.linux'),
+	buildfile.entrypoint('vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.win'),
+	buildfile.entrypoint('vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.darwin'),
 	buildfile.base,
-	buildfile.workbench,
-	buildfile.code
+	buildfile.workbenchWeb,
+	// buildfile.code
 ]);
 
 const vscodeResources = [
-	'out-build/main.js',
-	'out-build/cli.js',
-	'out-build/driver.js',
+	'out-build/vs/server/main.js',
+	'out-build/vs/server/src/uriTransformer.js',
+	// 'out-build/cli.js',
+	// 'out-build/driver.js',
 	'out-build/bootstrap.js',
 	'out-build/bootstrap-fork.js',
 	'out-build/bootstrap-amd.js',
 	'out-build/bootstrap-window.js',
 	'out-build/paths.js',
57
-	'out-build/vs/**/*.{svg,png,cur,html}',
A
Asher 已提交
58
-	'!out-build/vs/code/browser/**/*.html',
59
+	'out-build/vs/**/*.{svg,png,cur,html,ico}',
A
Asher 已提交
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
+	// '!out-build/vs/code/browser/**/*.html',
 	'out-build/vs/base/common/performance.js',
 	'out-build/vs/base/node/languagePacks.js',
 	'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh,ps.sh}',
@@ -78,10 +84,11 @@ const vscodeResources = [
 	'out-build/vs/workbench/contrib/welcome/walkThrough/**/*.md',
 	'out-build/vs/workbench/services/files/**/*.exe',
 	'out-build/vs/workbench/services/files/**/*.md',
-	'out-build/vs/code/electron-browser/workbench/**',
-	'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js',
-	'out-build/vs/code/electron-browser/issue/issueReporter.js',
-	'out-build/vs/code/electron-browser/processExplorer/processExplorer.js',
+	'out-build/vs/code/browser/workbench/**',
+	// 'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js',
+	// 'out-build/vs/code/electron-browser/issue/issueReporter.js',
+	// 'out-build/vs/code/electron-browser/processExplorer/processExplorer.js',
+	'!out-build/vs/server/doc/**',
 	'!**/test/**'
 ];
 
@@ -94,7 +101,7 @@ const BUNDLED_FILE_HEADER = [
 const optimizeVSCodeTask = task.define('optimize-vscode', task.series(
 	task.parallel(
 		util.rimraf('out-vscode'),
-		compileBuildTask
+		compileClientBuildTask // compileBuildTask
 	),
 	common.optimizeTask({
 		src: 'out-build',
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
@@ -104,7 +111,8 @@ const optimizeVSCodeTask = task.define('optimize-vscode', task.series(
 		header: BUNDLED_FILE_HEADER,
 		out: 'out-vscode',
 		bundleInfo: undefined
-	})
+	}),
+	() => writeProduct()
 ));
 
 
@@ -124,9 +132,36 @@ const minifyVSCodeTask = task.define('minify-vscode', task.series(
 		util.rimraf('out-vscode-min'),
 		optimizeIndexJSTask
 	),
-	common.minifyTask('out-vscode', `${sourceMappingURLBase}/core`)
+	common.minifyTask('out-vscode', `${sourceMappingURLBase}/core`),
+	() => writeProduct('out-vscode-min')
A
Asher 已提交
106 107 108
 ));
 
+function packageExtensionsTask() {
109
+	return () => ext.packageExtensionsStream().pipe(vfs.dest(path.join(root, '.build')));
A
Asher 已提交
110 111 112 113 114 115 116
+}
+gulp.task(task.define('extensions-build-package', task.series(
+	compileExtensionsBuildTask,
+	packageExtensionsTask()
+)));
+gulp.task(optimizeVSCodeTask);
+gulp.task(minifyVSCodeTask);
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
+function writeProduct(sourceFolderName) {
+	const checksums = sourceFolderName && computeChecksums(sourceFolderName, [
+		'vs/workbench/workbench.web.api.js',
+		'vs/workbench/workbench.web.api.css',
+		'vs/code/browser/workbench/workbench.html',
+		'vs/code/browser/workbench/workbench.js',
+		'vs/server/src/cli.js',
+		'vs/server/src/uriTransformer.js',
+		'vs/server/src/login/index.html'
+	]);
+	const date = new Date().toISOString();
+	const productJsonUpdate = { commit, date, checksums };
+	return gulp.src(['product.json'], { base: '.' })
+		.pipe(json(productJsonUpdate))
+		.pipe(vfs.dest(path.join(root, '.build')));
+}
A
Asher 已提交
133 134 135 136
+
 // Package
 
 // @ts-ignore JSON checking: darwinCredits is optional
A
Asher 已提交
137 138 139 140 141 142 143 144 145 146 147 148 149
diff --git a/src/typings/require.d.ts b/src/typings/require.d.ts
index 618861a5be..9d4fdea14e 100644
--- a/src/typings/require.d.ts
+++ b/src/typings/require.d.ts
@@ -46,5 +46,7 @@ interface NodeRequire {
 	config(data: any): any;
 	onError: Function;
 	__$__nodeRequire<T>(moduleName: string): T;
-	getStats(): ReadonlyArray<LoaderEvent>
+	getStats(): ReadonlyArray<LoaderEvent>;
+	withBase(path: string ): string;
+	withBase(resource: { path: string }): { toString: (skipEncoding?: boolean) => string };
 }
A
Asher 已提交
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
diff --git a/src/vs/base/browser/ui/menu/menu.ts b/src/vs/base/browser/ui/menu/menu.ts
index 7913bb42fd..80d5970970 100644
--- a/src/vs/base/browser/ui/menu/menu.ts
+++ b/src/vs/base/browser/ui/menu/menu.ts
@@ -22,7 +22,7 @@ import { isLinux, isMacintosh } from 'vs/base/common/platform';
 
 function createMenuMnemonicRegExp() {
 	try {
-		return new RegExp('\\(&([^\\s&])\\)|(?<!&)&([^\\s&])');
+		return new RegExp('\\(&([^\\s&])\\)|([^&]|^)&([^\\s&])');
 	} catch (err) {
 		return new RegExp('\uFFFF'); // never match please
 	}
@@ -799,7 +799,7 @@ export function cleanMnemonic(label: string): string {
 		return label;
 	}
 
-	const mnemonicInText = matches[0].charAt(0) === '&';
+	const mnemonicInText = matches[3]; // matches[0].charAt(0) === '&';
 
-	return label.replace(regex, mnemonicInText ? '$2' : '').trim();
-}
\ No newline at end of file
+	return label.replace(regex, mnemonicInText ? '$2$3' : '').trim();
+}
A
Asher 已提交
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
diff --git a/src/vs/base/common/buffer.ts b/src/vs/base/common/buffer.ts
index 7b4e9cc8d6..7722cb12c6 100644
--- a/src/vs/base/common/buffer.ts
+++ b/src/vs/base/common/buffer.ts
@@ -138,7 +138,7 @@ export interface VSBufferReadable {
 	 * Read data from the underlying source. Will return
 	 * null to indicate that no more data can be read.
 	 */
-	read(): VSBuffer | null;
+	read(): VSBuffer | null | Promise<VSBuffer | null>;
 }
 
 /**
@@ -185,11 +185,11 @@ export interface VSBufferReadableStream {
 /**
  * Helper to fully read a VSBuffer readable into a single buffer.
  */
-export function readableToBuffer(readable: VSBufferReadable): VSBuffer {
+export async function readableToBuffer(readable: VSBufferReadable): Promise<VSBuffer> {
 	const chunks: VSBuffer[] = [];
 
 	let chunk: VSBuffer | null;
-	while (chunk = readable.read()) {
+	while (chunk = await readable.read()) {
 		chunks.push(chunk);
 	}
 
A
Asher 已提交
202 203 204 205 206 207 208 209 210 211 212
diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts
index a7466e641a..6d91e66ad3 100644
--- a/src/vs/base/common/network.ts
+++ b/src/vs/base/common/network.ts
@@ -46,4 +46,6 @@ export namespace Schemas {
 	export const command: string = 'command';
 
 	export const vscodeRemote: string = 'vscode-remote';
+
+	export const codeServer: string = 'code-server';
 }
A
Asher 已提交
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
diff --git a/src/vs/base/common/platform.ts b/src/vs/base/common/platform.ts
index 4cba839fe5..b216c43bbc 100644
--- a/src/vs/base/common/platform.ts
+++ b/src/vs/base/common/platform.ts
@@ -53,8 +53,18 @@ if (typeof navigator === 'object' && !isElectronRenderer) {
 	_isMacintosh = userAgent.indexOf('Macintosh') >= 0;
 	_isLinux = userAgent.indexOf('Linux') >= 0;
 	_isWeb = true;
-	_locale = navigator.language;
-	_language = _locale;
+	_locale = LANGUAGE_DEFAULT;
+	_language = LANGUAGE_DEFAULT;
+	const rawNlsConfig = typeof document !== 'undefined'
+		&& document.getElementById('vscode-remote-nls-configuration')!.getAttribute('data-settings')!;
+	if (rawNlsConfig) {
+		try {
+			const nlsConfig: NLSConfig = JSON.parse(rawNlsConfig);
+			_locale = nlsConfig.locale;
+			_translationsConfigFile = nlsConfig._translationsConfigFile;
+			_language = nlsConfig.availableLanguages['*'] || LANGUAGE_DEFAULT;
+		} catch (error) { /* Oh well. */ }
+	}
 } else if (typeof process === 'object') {
 	_isWindows = (process.platform === 'win32');
 	_isMacintosh = (process.platform === 'darwin');
A
Asher 已提交
238
diff --git a/src/vs/code/browser/workbench/workbench.html b/src/vs/code/browser/workbench/workbench.html
A
Asher 已提交
239
index ff62e0a65a..924b65fa7a 100644
A
Asher 已提交
240 241 242 243 244 245 246 247 248 249 250
--- a/src/vs/code/browser/workbench/workbench.html
+++ b/src/vs/code/browser/workbench/workbench.html
@@ -4,6 +4,8 @@
 	<head>
 		<meta charset="utf-8" />
 
+		<link rel="shortcut icon" href="./favicon.ico" />
+
 		<!-- Disable pinch zooming -->
 		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
 
A
Asher 已提交
251 252 253 254 255 256 257 258
@@ -20,6 +22,7 @@
 
 		<!-- Workaround to pass remote connection token-->
 		<meta id="vscode-remote-connection-token" data-settings="{{CONNECTION_AUTH_TOKEN}}">
+		<meta id="vscode-remote-nls-configuration" data-settings="{{NLS_CONFIGURATION}}">
 	</head>
 
 	<body class="vs-dark" aria-label="">
A
Asher 已提交
259
diff --git a/src/vs/code/browser/workbench/workbench.js b/src/vs/code/browser/workbench/workbench.js
A
Asher 已提交
260
index 34f321f90d..b1bd6a4ac9 100644
A
Asher 已提交
261 262 263 264 265 266 267 268 269 270 271 272
--- a/src/vs/code/browser/workbench/workbench.js
+++ b/src/vs/code/browser/workbench/workbench.js
@@ -7,14 +7,19 @@
 
 (function () {
 
+	const basePath = window.location.pathname.replace(/\/+$/, '');
+	const base = window.location.origin + basePath;
 	require.config({
-		baseUrl: `${window.location.origin}/out`,
+		baseUrl: `${base}/out`,
+		baseScheme: window.location.protocol.replace(/:$/, ''),
A
Asher 已提交
273
+		basePath: basePath,
A
Asher 已提交
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289
+		baseAuthority: window.location.host,
 		paths: {
-			'vscode-textmate': `${window.location.origin}/node_modules/vscode-textmate/release/main`,
-			'onigasm-umd': `${window.location.origin}/node_modules/onigasm-umd/release/main`,
-			'xterm': `${window.location.origin}/node_modules/xterm/lib/xterm.js`,
-			'xterm-addon-search': `${window.location.origin}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
-			'xterm-addon-web-links': `${window.location.origin}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
+			'vscode-textmate': `${base}/node_modules/vscode-textmate/release/main`,
+			'onigasm-umd': `${base}/node_modules/onigasm-umd/release/main`,
+			'xterm': `${base}/node_modules/xterm/lib/xterm.js`,
+			'xterm-addon-search': `${base}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
+			'xterm-addon-web-links': `${base}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
 		}
 	});
 
diff --git a/src/vs/loader.js b/src/vs/loader.js
A
Asher 已提交
290
index 40b6d2aa32..f64b7e70d8 100644
A
Asher 已提交
291 292
--- a/src/vs/loader.js
+++ b/src/vs/loader.js
A
Asher 已提交
293
@@ -497,6 +497,29 @@ var AMDLoader;
A
Asher 已提交
294 295 296 297
             }
             return this._addUrlArgsIfNecessaryToUrl(result);
         };
+        /**
A
Asher 已提交
298 299
+         * Transform a code-server:// URI, file:// URI, or plain path to use
+         * the site base.
A
Asher 已提交
300 301
+         */
+        Configuration.prototype.requireWithBase = function (resource) {
A
Asher 已提交
302
+            if (typeof this.options.basePath === "undefined" || typeof this.options.baseAuthority === "undefined" || typeof this.options.baseScheme === "undefined") {
A
Asher 已提交
303 304 305
+                return resource;
+            }
+            if (typeof resource === "string") {
A
Asher 已提交
306 307 308 309
+              const base = `${this.options.baseScheme}://${this.options.baseAuthority}${this.options.basePath}`;
+              return resource.indexOf("/") !== 0
+                ? resource.replace(/^(code-server|file):\/\/[^/]*/, `${base}/resources`)
+                : `${base}${resource}`;
A
Asher 已提交
310
+            }
A
Asher 已提交
311
+            if (resource.scheme !== "code-server" && resource.scheme !== "file") {
A
Asher 已提交
312 313 314 315 316
+              return resource;
+            }
+            return resource.with({
+              authority: this.options.baseAuthority,
+              scheme: this.options.baseScheme,
A
Asher 已提交
317
+              path: `${this.options.basePath}/resources${resource.path}`,
A
Asher 已提交
318 319 320 321 322
+            });
+        };
         /**
          * Flag to indicate if current execution is as part of a build.
          */
A
Asher 已提交
323
@@ -1427,6 +1450,9 @@ var AMDLoader;
A
Asher 已提交
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346
             result.getStats = function () {
                 return _this.getLoaderEvents();
             };
+            result.withBase = function (resource) {
+                return _this._config.requireWithBase(resource);
+            };
             result.__$__nodeRequire = AMDLoader.global.nodeRequire;
             return result;
         };
diff --git a/src/vs/platform/actions/browser/menuEntryActionViewItem.ts b/src/vs/platform/actions/browser/menuEntryActionViewItem.ts
index 2dae143385..3fa8ac96d1 100644
--- a/src/vs/platform/actions/browser/menuEntryActionViewItem.ts
+++ b/src/vs/platform/actions/browser/menuEntryActionViewItem.ts
@@ -244,8 +244,8 @@ export class MenuEntryActionViewItem extends ActionViewItem {
 				iconClass = MenuEntryActionViewItem.ICON_PATH_TO_CSS_RULES.get(iconPathMapKey)!;
 			} else {
 				iconClass = ids.nextId();
-				createCSSRule(`.icon.${iconClass}`, `background-image: url("${(item.iconLocation.light || item.iconLocation.dark).toString()}")`);
-				createCSSRule(`.vs-dark .icon.${iconClass}, .hc-black .icon.${iconClass}`, `background-image: url("${item.iconLocation.dark.toString()}")`);
+				createCSSRule(`.icon.${iconClass}`, `background-image: url("${require.withBase(item.iconLocation.light || item.iconLocation.dark).toString()}")`);
+				createCSSRule(`.vs-dark .icon.${iconClass}, .hc-black .icon.${iconClass}`, `background-image: url("${require.withBase(item.iconLocation.dark).toString()}")`);
 				MenuEntryActionViewItem.ICON_PATH_TO_CSS_RULES.set(iconPathMapKey, iconClass);
 			}
A
Asher 已提交
347
 
A
Asher 已提交
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380
diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts
index 443e430fcd..fdd9900598 100644
--- a/src/vs/platform/environment/common/environment.ts
+++ b/src/vs/platform/environment/common/environment.ts
@@ -156,4 +156,7 @@ export interface IEnvironmentService {
 
 	webviewEndpoint?: string;
 	readonly webviewResourceRoot: string;
+
+	extraExtensionPaths: string[];
+	extraBuiltinExtensionPaths: string[];
 }
diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts
index 55c3d8302a..b8568fa785 100644
--- a/src/vs/platform/environment/node/environmentService.ts
+++ b/src/vs/platform/environment/node/environmentService.ts
@@ -276,6 +276,16 @@ export class EnvironmentService implements IEnvironmentService {
 		return 'vscode-resource:';
 	}
 
+	@memoize
+	get extraExtensionPaths(): string[] {
+		return (this._args['extra-extensions-dir'] || []).map((p: string) => parsePathArg(p, process));
+	}
+
+	@memoize
+	get extraBuiltinExtensionPaths(): string[] {
+		return (this._args['extra-builtin-extensions-dir'] || []).map((p: string) => parsePathArg(p, process));
+	}
+
 	constructor(private _args: ParsedArgs, private _execPath: string) {
 		if (!process.env['VSCODE_LOGS']) {
 			const key = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '');
A
Asher 已提交
381 382 383 384 385 386 387 388 389 390 391 392 393
diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryIpc.ts b/src/vs/platform/extensionManagement/node/extensionGalleryIpc.ts
new file mode 100644
index 0000000000..ef1db87989
--- /dev/null
+++ b/src/vs/platform/extensionManagement/node/extensionGalleryIpc.ts
@@ -0,0 +1,96 @@
+import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
+import { IGalleryExtension, IReportedExtension, IExtensionGalleryService, IQueryOptions, InstallOperation, StatisticType, IGalleryExtensionVersion, ITranslation } from 'vs/platform/extensionManagement/common/extensionManagement';
+import { Event } from 'vs/base/common/event';
+import { IExtensionManifest, IExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
+import { IPager } from 'vs/base/common/paging';
+import { CancellationToken } from 'vs/base/common/cancellation';
+import { IProductService } from 'vs/platform/product/common/product';
A
Asher 已提交
394
+
A
Asher 已提交
395
+export class ExtensionGalleryChannel implements IServerChannel {
396
+
A
Asher 已提交
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414
+	constructor(private service: IExtensionGalleryService) {}
+
+	listen(_: unknown, _event: string): Event<any> {
+		throw new Error('Invalid listen');
+	}
+
+	call(_: unknown, command: string, args?: any, cancellationToken?: CancellationToken): Promise<any> {
+		switch (command) {
+			case 'query': return args.length > 0 ? this.service.query(args[0], cancellationToken!) : this.service.query(cancellationToken!);
+			case 'download': return this.service.download(args[0], args[1]);
+			case 'reportStatistic': return this.service.reportStatistic(args[0], args[1], args[2], args[3]);
+			case 'getReadme': return this.service.getReadme(args[0], cancellationToken!);
+			case 'getManifest': return this.service.getManifest(args[0], cancellationToken!);
+			case 'getChangelog': return this.service.getChangelog(args[0], cancellationToken!);
+			case 'getCoreTranslation': return this.service.getCoreTranslation(args[0], args[1]);
+			case 'getAllVersions': return this.service.getAllVersions(args[0], args[1]);
+			case 'getExtensionsReport': return this.service.getExtensionsReport();
+			case 'getCompatibleExtension': return this.service.getCompatibleExtension(args[0], args[1]);
415
+		}
A
Asher 已提交
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470
+
+		throw new Error(`Invalid call: ${command}`);
+	}
+}
+
+export class ExtensionGalleryChannelClient implements IExtensionGalleryService {
+
+	_serviceBrand: any;
+
+	private extensionsGalleryUrl: string | undefined;
+
+	constructor(
+		private readonly channel: IChannel,
+		productService: IProductService,
+	) {
+		const config = productService.extensionsGallery;
+		this.extensionsGalleryUrl = config && config.serviceUrl;
+	}
+
+	isEnabled(): boolean {
+		return !!this.extensionsGalleryUrl;
+	}
+
+	query(token: CancellationToken): Promise<IPager<IGalleryExtension>>;
+	query(options: IQueryOptions, token: CancellationToken): Promise<IPager<IGalleryExtension>>;
+	query(options: IQueryOptions | CancellationToken, token?: CancellationToken): Promise<IPager<IGalleryExtension>> {
+		return this.channel.call('query', CancellationToken.isCancellationToken(options) ? [] : [ options ], token);
+	}
+
+	download(extension: IGalleryExtension, operation: InstallOperation): Promise<string> {
+		return this.channel.call('download', [ extension, operation ]);
+	}
+
+	reportStatistic(publisher: string, name: string, version: string, type: StatisticType): Promise<void> {
+		return this.channel.call('reportStatistic', [ publisher, name, version, type ]);
+	}
+
+	getReadme(extension: IGalleryExtension, token: CancellationToken): Promise<string> {
+		return this.channel.call('getReadme', [ extension ], token);
+	}
+
+	getManifest(extension: IGalleryExtension, token: CancellationToken): Promise<IExtensionManifest | null> {
+		return this.channel.call('getManifest', [ extension ], token);
+	}
+
+	getChangelog(extension: IGalleryExtension, token: CancellationToken): Promise<string> {
+		return this.channel.call('getChangelog', [ extension ], token);
+	}
+
+	getCoreTranslation(extension: IGalleryExtension, languageId: string): Promise<ITranslation | null> {
+		return this.channel.call('getCoreTranslation', [ extension, languageId ]);
+	}
+
+	getAllVersions(extension: IGalleryExtension, compatible: boolean): Promise<IGalleryExtensionVersion[]> {
+		return this.channel.call('getAllVersions', [ extension, compatible ]);
471
+	}
A
Asher 已提交
472 473 474
+
+	getExtensionsReport(): Promise<IReportedExtension[]> {
+		return this.channel.call('getExtensionsReport');
A
Asher 已提交
475
+	}
A
Asher 已提交
476 477 478 479 480
+
+	getCompatibleExtension(extension: IGalleryExtension): Promise<IGalleryExtension | null>;
+	getCompatibleExtension(id: IExtensionIdentifier, version?: string): Promise<IGalleryExtension | null>;
+	getCompatibleExtension(id: IExtensionIdentifier | IGalleryExtension, version?: string): Promise<IGalleryExtension | null> {
+		return this.channel.call('getCompatibleExtension', [ id, version ]);
A
Asher 已提交
481
+	}
A
Asher 已提交
482
+}
A
Asher 已提交
483
diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts
A
Asher 已提交
484
index e09049c5b9..7af2c20efd 100644
A
Asher 已提交
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
--- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts
+++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts
@@ -724,11 +724,15 @@ export class ExtensionManagementService extends Disposable implements IExtension
 
 	private scanSystemExtensions(): Promise<ILocalExtension[]> {
 		this.logService.trace('Started scanning system extensions');
-		const systemExtensionsPromise = this.scanExtensions(this.systemExtensionsPath, ExtensionType.System)
-			.then(result => {
-				this.logService.trace('Scanned system extensions:', result.length);
-				return result;
-			});
+		const systemExtensionsPromise = Promise.all([
+			this.scanExtensions(this.systemExtensionsPath, ExtensionType.System),
+			...this.environmentService.extraBuiltinExtensionPaths
+				.map((path) => this.scanExtensions(path, ExtensionType.System))
+		]).then((results) => {
+			const result = results.reduce((flat, current) => flat.concat(current), []);
+			this.logService.info('Scanned system extensions:', result.length);
+			return result;
+		});
 		if (this.environmentService.isBuilt) {
 			return systemExtensionsPromise;
 		}
@@ -750,9 +754,16 @@ export class ExtensionManagementService extends Disposable implements IExtension
 			.then(([systemExtensions, devSystemExtensions]) => [...systemExtensions, ...devSystemExtensions]);
 	}
 
+	private scanAllUserExtensions(folderName: string, type: ExtensionType): Promise<ILocalExtension[]> {
+		return Promise.all([
+			this.scanExtensions(folderName, type),
+			...this.environmentService.extraExtensionPaths.map((p) => this.scanExtensions(p, ExtensionType.User))
+		]).then((results) => results.reduce((flat, current) => flat.concat(current), []));
+	}
+
 	private scanUserExtensions(excludeOutdated: boolean): Promise<ILocalExtension[]> {
 		this.logService.trace('Started scanning user extensions');
-		return Promise.all([this.getUninstalledExtensions(), this.scanExtensions(this.extensionsPath, ExtensionType.User)])
+		return Promise.all([this.getUninstalledExtensions(), this.scanAllUserExtensions(this.extensionsPath, ExtensionType.User)])
 			.then(([uninstalled, extensions]) => {
 				extensions = extensions.filter(e => !uninstalled[new ExtensionIdentifierWithVersion(e.identifier, e.manifest.version).key()]);
 				if (excludeOutdated) {
@@ -805,7 +816,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
 
 	private async removeUninstalledExtensions(): Promise<void> {
 		const uninstalled = await this.getUninstalledExtensions();
-		const extensions = await this.scanExtensions(this.extensionsPath, ExtensionType.User); // All user extensions
+		const extensions = await this.scanAllUserExtensions(this.extensionsPath, ExtensionType.User); // All user extensions
 		const installed: Set<string> = new Set<string>();
 		for (const e of extensions) {
 			if (!uninstalled[new ExtensionIdentifierWithVersion(e.identifier, e.manifest.version).key()]) {
@@ -824,7 +835,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
 	}
 
 	private removeOutdatedExtensions(): Promise<void> {
-		return this.scanExtensions(this.extensionsPath, ExtensionType.User) // All user extensions
+		return this.scanAllUserExtensions(this.extensionsPath, ExtensionType.User) // All user extensions
 			.then(extensions => {
 				const toRemove: ILocalExtension[] = [];
 
A
Asher 已提交
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572
diff --git a/src/vs/platform/localizations/electron-browser/localizationsService.ts b/src/vs/platform/localizations/electron-browser/localizationsService.ts
index 353161166e..7d64fe93c7 100644
--- a/src/vs/platform/localizations/electron-browser/localizationsService.ts
+++ b/src/vs/platform/localizations/electron-browser/localizationsService.ts
@@ -6,8 +6,9 @@
 import { IChannel } from 'vs/base/parts/ipc/common/ipc';
 import { Event } from 'vs/base/common/event';
 import { ILocalizationsService, LanguageType } from 'vs/platform/localizations/common/localizations';
-import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
+// import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
 import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
+import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
 
 export class LocalizationsService implements ILocalizationsService {
 
@@ -15,8 +16,11 @@ export class LocalizationsService implements ILocalizationsService {
 
 	private channel: IChannel;
 
-	constructor(@ISharedProcessService sharedProcessService: ISharedProcessService) {
-		this.channel = sharedProcessService.getChannel('localizations');
+	constructor(
+		// @ISharedProcessService sharedProcessService: ISharedProcessService
+		@IRemoteAgentService remoteAgentService: IRemoteAgentService,
+	) {
+		this.channel = remoteAgentService.getConnection()!.getChannel('localizations');
 	}
 
 	get onDidLanguagesChange(): Event<void> { return this.channel.listen('onDidLanguagesChange'); }
A
Asher 已提交
573
diff --git a/src/vs/platform/log/common/logIpc.ts b/src/vs/platform/log/common/logIpc.ts
A
Asher 已提交
574
index 9f68b645b6..f0cae7111d 100644
A
Asher 已提交
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
--- a/src/vs/platform/log/common/logIpc.ts
+++ b/src/vs/platform/log/common/logIpc.ts
@@ -26,6 +26,7 @@ export class LogLevelSetterChannel implements IServerChannel {
 	call(_: unknown, command: string, arg?: any): Promise<any> {
 		switch (command) {
 			case 'setLevel': this.service.setLevel(arg); return Promise.resolve();
+			case 'getLevel': return Promise.resolve(this.service.getLevel());
 		}
 
 		throw new Error(`Call not found: ${command}`);
@@ -40,6 +41,10 @@ export class LogLevelSetterChannelClient {
 		return this.channel.listen('onDidChangeLogLevel');
 	}
 
+	getLevel(): Promise<LogLevel> {
+		return this.channel.call('getLevel');
+	}
+
 	setLevel(level: LogLevel): void {
 		this.channel.call('setLevel', level);
 	}
A
Asher 已提交
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620
diff --git a/src/vs/platform/product/browser/productService.ts b/src/vs/platform/product/browser/productService.ts
index 084144d009..d91176c9cd 100644
--- a/src/vs/platform/product/browser/productService.ts
+++ b/src/vs/platform/product/browser/productService.ts
@@ -17,7 +17,7 @@ export class ProductService implements IProductService {
 
 	_serviceBrand: ServiceIdentifier<IProductService>;
 
-	get version(): string { return '1.35.0'; }
+	get version(): string { return this.productConfiguration ? (this.productConfiguration as any).version : 'development'; }
 
 	get commit(): string | undefined { return undefined; }
 
diff --git a/src/vs/platform/product/node/package.ts b/src/vs/platform/product/node/package.ts
index d39c5877d6..c189d6f19f 100644
--- a/src/vs/platform/product/node/package.ts
+++ b/src/vs/platform/product/node/package.ts
@@ -9,6 +9,7 @@ import { getPathFromAmdModule } from 'vs/base/common/amd';
 export interface IPackageConfiguration {
 	name: string;
 	version: string;
+	codeServerVersion: string;
 }
 
 const rootPath = path.dirname(getPathFromAmdModule(require, ''));
A
Asher 已提交
621
diff --git a/src/vs/platform/remote/browser/browserWebSocketFactory.ts b/src/vs/platform/remote/browser/browserWebSocketFactory.ts
622
index 6d9ecbcf5a..a3eb980965 100644
A
Asher 已提交
623 624 625 626 627 628 629
--- a/src/vs/platform/remote/browser/browserWebSocketFactory.ts
+++ b/src/vs/platform/remote/browser/browserWebSocketFactory.ts
@@ -79,7 +79,7 @@ class BrowserSocket implements ISocket {
 export const browserWebSocketFactory = new class implements IWebSocketFactory {
 	connect(host: string, port: number, query: string, callback: IConnectCallback): void {
 		const errorListener = (err: any) => callback(err, undefined);
-		const socket = new WebSocket(`ws://${host}:${port}/?${query}&skipWebSocketFrames=false`);
630
+		const socket = new WebSocket(`${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}${window.location.pathname}?${query}&skipWebSocketFrames=false`);
A
Asher 已提交
631 632 633
 		socket.onopen = function (event) {
 			socket.removeEventListener('error', errorListener);
 			callback(undefined, new BrowserSocket(socket));
A
Asher 已提交
634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700
diff --git a/src/vs/platform/telemetry/node/telemetryIpc.ts b/src/vs/platform/telemetry/node/telemetryIpc.ts
index 8e1b68eb36..2b6a0d5b15 100644
--- a/src/vs/platform/telemetry/node/telemetryIpc.ts
+++ b/src/vs/platform/telemetry/node/telemetryIpc.ts
@@ -6,6 +6,9 @@
 import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
 import { ITelemetryAppender } from 'vs/platform/telemetry/common/telemetryUtils';
 import { Event } from 'vs/base/common/event';
+import { ITelemetryService, ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
+import { ITelemetryData } from 'vs/base/common/actions';
+import { ClassifiedEvent, GDPRClassification, StrictPropertyCheck } from 'vs/platform/telemetry/common/gdprTypings';
 
 export interface ITelemetryLog {
 	eventName: string;
@@ -41,3 +44,52 @@ export class TelemetryAppenderClient implements ITelemetryAppender {
 		// TODO
 	}
 }
+
+export class TelemetryChannel implements IServerChannel {
+
+	constructor(private service: ITelemetryService) {}
+
+	listen(_: unknown, event: string): Event<any> {
+		throw new Error(`Invalid listen ${event}`);
+	}
+
+	call(_: unknown, command: string, args?: any): Promise<any> {
+		switch (command) {
+			case 'publicLog': return this.service.publicLog(args[0], args[1], args[2]);
+			case 'publicLog2': return this.service.publicLog2(args[0], args[1], args[2]);
+			case 'setEnabled': return Promise.resolve(this.service.setEnabled(args[0]));
+			case 'getTelemetryInfo': return this.service.getTelemetryInfo();
+		}
+
+		throw new Error(`Invalid call ${command}`);
+	}
+}
+
+export class TelemetryChannelClient implements ITelemetryService {
+
+	_serviceBrand: any;
+
+	constructor(
+		private readonly channel: IChannel,
+	) { }
+
+	public publicLog(eventName: string, data?: ITelemetryData, anonymizeFilePaths?: boolean): Promise<void> {
+		return this.channel.call('publicLog', [eventName, data, anonymizeFilePaths]);
+	}
+
+	public publicLog2<E extends ClassifiedEvent<T> = never, T extends GDPRClassification<T> = never>(eventName: string, data?: StrictPropertyCheck<T, E>, anonymizeFilePaths?: boolean): Promise<void> {
+		return this.channel.call('publicLog2', [eventName, data, anonymizeFilePaths]);
+	}
+
+	public setEnabled(value: boolean): void {
+		this.channel.call('setEnable', [value]);
+	}
+
+	public getTelemetryInfo(): Promise<ITelemetryInfo> {
+		return this.channel.call('getTelemetryInfo');
+	}
+
+	public get isOptedIn(): boolean {
+		return true;
+	}
+}
A
Asher 已提交
701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792
diff --git a/src/vs/platform/update/electron-browser/updateService.ts b/src/vs/platform/update/electron-browser/updateService.ts
index 023ea3ea7d..455df76ee3 100644
--- a/src/vs/platform/update/electron-browser/updateService.ts
+++ b/src/vs/platform/update/electron-browser/updateService.ts
@@ -6,8 +6,9 @@
 import { IChannel } from 'vs/base/parts/ipc/common/ipc';
 import { Event, Emitter } from 'vs/base/common/event';
 import { IUpdateService, State } from 'vs/platform/update/common/update';
-import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
+// import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
 import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
+import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
 
 export class UpdateService implements IUpdateService {
 
@@ -21,8 +22,11 @@ export class UpdateService implements IUpdateService {
 
 	private channel: IChannel;
 
-	constructor(@IMainProcessService mainProcessService: IMainProcessService) {
-		this.channel = mainProcessService.getChannel('update');
+	constructor(
+		// @IMainProcessService mainProcessService: IMainProcessService
+		@IRemoteAgentService remoteAgentService: IRemoteAgentService
+	) {
+		this.channel = remoteAgentService.getConnection()!.getChannel('update');
 
 		// always set this._state as the state changes
 		this.onStateChange(state => this._state = state);
diff --git a/src/vs/platform/update/electron-main/abstractUpdateService.ts b/src/vs/platform/update/electron-main/abstractUpdateService.ts
index fcca3cbfb9..101f3d33c9 100644
--- a/src/vs/platform/update/electron-main/abstractUpdateService.ts
+++ b/src/vs/platform/update/electron-main/abstractUpdateService.ts
@@ -6,7 +6,7 @@
 import { Event, Emitter } from 'vs/base/common/event';
 import { timeout } from 'vs/base/common/async';
 import { IConfigurationService, getMigratedSettingValue } from 'vs/platform/configuration/common/configuration';
-import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain';
+// import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain';
 import product from 'vs/platform/product/node/product';
 import { IUpdateService, State, StateType, AvailableForDownload, UpdateType } from 'vs/platform/update/common/update';
 import { IEnvironmentService } from 'vs/platform/environment/common/environment';
@@ -40,7 +40,8 @@ export abstract class AbstractUpdateService implements IUpdateService {
 	}
 
 	constructor(
-		@ILifecycleService private readonly lifecycleService: ILifecycleService,
+		_placeholder: any, // To prevent errors from the extending classes.
+		// @ILifecycleService private readonly lifecycleService: ILifecycleService,
 		@IConfigurationService protected configurationService: IConfigurationService,
 		@IEnvironmentService private readonly environmentService: IEnvironmentService,
 		@IRequestService protected requestService: IRequestService,
@@ -51,7 +52,7 @@ export abstract class AbstractUpdateService implements IUpdateService {
 			return;
 		}
 
-		if (!product.updateUrl || !product.commit) {
+		if (/*!product.updateUrl || */!product.commit) {
 			this.logService.info('update#ctor - updates are disabled as there is no update URL');
 			return;
 		}
@@ -82,7 +83,7 @@ export abstract class AbstractUpdateService implements IUpdateService {
 	}
 
 	private getProductQuality(updateMode: string): string | undefined {
-		return updateMode === 'none' ? undefined : product.quality;
+		return updateMode === 'none' ? undefined : 'quality';
 	}
 
 	private scheduleCheckForUpdates(delay = 60 * 60 * 1000): Promise<void> {
@@ -141,15 +142,15 @@ export abstract class AbstractUpdateService implements IUpdateService {
 
 		this.logService.trace('update#quitAndInstall(): before lifecycle quit()');
 
-		this.lifecycleService.quit(true /* from update */).then(vetod => {
-			this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${vetod}`);
-			if (vetod) {
-				return;
-			}
+		// this.quit(true /* from update */).then(vetod => {
+			// this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${vetod}`);
+			// if (vetod) {
+			// 	return;
+			// }
 
 			this.logService.trace('update#quitAndInstall(): running raw#quitAndInstall()');
 			this.doQuitAndInstall();
-		});
+		// });
 
 		return Promise.resolve(undefined);
 	}
A
Asher 已提交
793
diff --git a/src/vs/workbench/api/browser/viewsExtensionPoint.ts b/src/vs/workbench/api/browser/viewsExtensionPoint.ts
A
Asher 已提交
794
index 8bace46843..b261f40493 100644
A
Asher 已提交
795 796 797 798 799 800 801 802 803 804 805
--- a/src/vs/workbench/api/browser/viewsExtensionPoint.ts
+++ b/src/vs/workbench/api/browser/viewsExtensionPoint.ts
@@ -327,7 +327,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
 
 			// Generate CSS to show the icon in the activity bar
 			const iconClass = `.monaco-workbench .activitybar .monaco-action-bar .action-label.${cssClass}`;
-			createCSSRule(iconClass, `-webkit-mask: url('${icon}') no-repeat 50% 50%`);
+			createCSSRule(iconClass, `-webkit-mask: url('${require.withBase(icon)}') no-repeat 50% 50%`);
 		}
 
 		return viewContainer;
A
Asher 已提交
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835
diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts
index 2054ceece3..f99dfd0b73 100644
--- a/src/vs/workbench/browser/dnd.ts
+++ b/src/vs/workbench/browser/dnd.ts
@@ -31,6 +31,7 @@ import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsSe
 import { IRecentFile } from 'vs/platform/history/common/history';
 import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing';
 import { withNullAsUndefined } from 'vs/base/common/types';
+import { IUploadService } from 'vs/server/src/upload';
 
 export interface IDraggedResource {
 	resource: URI;
@@ -166,14 +167,15 @@ export class ResourcesDropHandler {
 		@IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService,
 		@IEditorService private readonly editorService: IEditorService,
 		@IConfigurationService private readonly configurationService: IConfigurationService,
-		@IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService
+		@IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService,
+		@IUploadService private readonly uploadService: IUploadService,
 	) {
 	}
 
 	async handleDrop(event: DragEvent, resolveTargetGroup: () => IEditorGroup | undefined, afterDrop: (targetGroup: IEditorGroup | undefined) => void, targetIndex?: number): Promise<void> {
 		const untitledOrFileResources = extractResources(event).filter(r => this.fileService.canHandleResource(r.resource) || r.resource.scheme === Schemas.untitled);
 		if (!untitledOrFileResources.length) {
-			return;
+			return this.uploadService.handleDrop(event, resolveTargetGroup, afterDrop, targetIndex);
 		}
 
 		// Make the window active to handle the drop properly within
A
Asher 已提交
836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889
diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
index 24d8fe70c7..0670ebb774 100644
--- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
+++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
@@ -173,7 +173,7 @@ export class PlaceHolderViewletActivityAction extends ViewletActivityAction {
 		super({ id, name: id, cssClass: `extensionViewlet-placeholder-${id.replace(/\./g, '-')}` }, viewletService, layoutService, telemetryService);
 
 		const iconClass = `.monaco-workbench .activitybar .monaco-action-bar .action-label.${this.class}`; // Generate Placeholder CSS to show the icon in the activity bar
-		DOM.createCSSRule(iconClass, `-webkit-mask: url('${iconUrl || ''}') no-repeat 50% 50%`);
+		DOM.createCSSRule(iconClass, `-webkit-mask: url('${iconUrl ? require.withBase(iconUrl) : ''}') no-repeat 50% 50%`);
 	}
 
 	setActivity(activity: IActivity): void {
diff --git a/src/vs/workbench/browser/parts/editor/resourceViewer.ts b/src/vs/workbench/browser/parts/editor/resourceViewer.ts
index a5e644112b..99f8271a59 100644
--- a/src/vs/workbench/browser/parts/editor/resourceViewer.ts
+++ b/src/vs/workbench/browser/parts/editor/resourceViewer.ts
@@ -548,7 +548,7 @@ class InlineImageView {
 			const img = container.querySelector('img');
 			if (img) {
 				if (typeof src === 'string') {
-					img.src = src;
+					img.src = require.withBase(src);
 				} else {
 					const url = URL.createObjectURL(src);
 					disposables.add(toDisposable(() => URL.revokeObjectURL(url)));
diff --git a/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts b/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts
index babe949511..7bce969709 100644
--- a/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts
+++ b/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts
@@ -22,8 +22,8 @@ export function getIconClass(iconPath: { dark: URI; light?: URI; } | undefined):
 		iconClass = iconPathToClass[key];
 	} else {
 		iconClass = iconClassGenerator.nextId();
-		dom.createCSSRule(`.${iconClass}`, `background-image: url("${(iconPath.light || iconPath.dark).toString()}")`);
-		dom.createCSSRule(`.vs-dark .${iconClass}, .hc-black .${iconClass}`, `background-image: url("${iconPath.dark.toString()}")`);
+		dom.createCSSRule(`.${iconClass}`, `background-image: url("${require.withBase(iconPath.light || iconPath.dark).toString()}")`);
+		dom.createCSSRule(`.vs-dark .${iconClass}, .hc-black .${iconClass}`, `background-image: url("${require.withBase(iconPath.dark).toString()}")`);
 		iconPathToClass[key] = iconClass;
 	}
 
diff --git a/src/vs/workbench/browser/parts/views/customView.ts b/src/vs/workbench/browser/parts/views/customView.ts
index 5a758eb786..7fcacb5ca7 100644
--- a/src/vs/workbench/browser/parts/views/customView.ts
+++ b/src/vs/workbench/browser/parts/views/customView.ts
@@ -674,7 +674,7 @@ class TreeRenderer implements IRenderer {
 			templateData.resourceLabel.setResource({ name: label, description }, { title, hideIcon: true, extraClasses: ['custom-view-tree-node-item-resourceLabel'], matches });
 		}
 
-		templateData.icon.style.backgroundImage = iconUrl ? `url('${iconUrl.toString(true)}')` : '';
+		templateData.icon.style.backgroundImage = iconUrl ? `url('${require.withBase(iconUrl).toString(true)}')` : '';
 		DOM.toggleClass(templateData.icon, 'custom-view-tree-node-item-icon', !!iconUrl);
 		templateData.actionBar.context = (<TreeViewItemHandleArg>{ $treeViewId: this.treeViewId, $treeItemHandle: node.handle });
 		templateData.actionBar.push(this.menus.getResourceActions(node), { icon: true, label: false });
A
Asher 已提交
890
diff --git a/src/vs/workbench/browser/web.main.ts b/src/vs/workbench/browser/web.main.ts
A
Asher 已提交
891
index 1986fb6642..70b0c789e3 100644
A
Asher 已提交
892 893
--- a/src/vs/workbench/browser/web.main.ts
+++ b/src/vs/workbench/browser/web.main.ts
A
Asher 已提交
894 895 896 897
@@ -35,6 +35,7 @@ import { SignService } from 'vs/platform/sign/browser/signService';
 import { hash } from 'vs/base/common/hash';
 import { IWorkbenchConstructionOptions } from 'vs/workbench/workbench.web.api';
 import { ProductService } from 'vs/platform/product/browser/productService';
A
Asher 已提交
898
+import { initialize } from 'vs/server/src/client';
A
Asher 已提交
899 900 901
 
 class CodeRendererMain extends Disposable {
 
A
Asher 已提交
902
@@ -49,6 +50,7 @@ class CodeRendererMain extends Disposable {
A
Asher 已提交
903
 
A
Asher 已提交
904 905 906
 	async open(): Promise<void> {
 		const services = await this.initServices();
+		await initialize(services.serviceCollection);
A
Asher 已提交
907
 
A
Asher 已提交
908 909 910
 		await domContentLoaded();
 		mark('willStartWorkbench');
@@ -114,7 +116,8 @@ class CodeRendererMain extends Disposable {
A
Asher 已提交
911
 			const channel = connection.getChannel<IChannel>(REMOTE_FILE_SYSTEM_CHANNEL_NAME);
A
Asher 已提交
912
 			const remoteFileSystemProvider = this._register(new RemoteExtensionsFileSystemProvider(channel, remoteAgentService.getEnvironment()));
A
Asher 已提交
913
 
A
Asher 已提交
914 915
-			fileService.registerProvider(Schemas.vscodeRemote, remoteFileSystemProvider);
+			fileService.registerProvider(Schemas.codeServer, remoteFileSystemProvider);
A
Asher 已提交
916
+			fileService.registerProvider(Schemas.file, remoteFileSystemProvider);
A
Asher 已提交
917
 		}
A
Asher 已提交
918
 
A
Asher 已提交
919 920
 		const payload = await this.resolveWorkspaceInitializationPayload();
diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts
A
Asher 已提交
921
index b253e573ae..164e50c3d1 100644
A
Asher 已提交
922 923
--- a/src/vs/workbench/browser/web.simpleservices.ts
+++ b/src/vs/workbench/browser/web.simpleservices.ts
A
Asher 已提交
924
@@ -53,6 +53,14 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
A
Asher 已提交
925 926 927 928 929
 import { ParsedArgs } from 'vs/platform/environment/common/environment';
 import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings';
 import { IProcessEnvironment } from 'vs/base/common/platform';
+import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
+import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/node/extensionManagementIpc';
A
Asher 已提交
930 931
+import { ExtensionGalleryChannelClient } from 'vs/platform/extensionManagement/node/extensionGalleryIpc';
+import { TelemetryChannelClient } from 'vs/platform/telemetry/node/telemetryIpc';
A
Asher 已提交
932
+import { IProductService } from 'vs/platform/product/common/product';
A
Asher 已提交
933 934 935
+import { IUploadService, UploadService } from 'vs/server/src/upload';
+
+registerSingleton(IUploadService, UploadService, true);
A
Asher 已提交
936
 
A
Asher 已提交
937
 //#region Backup File
A
Asher 已提交
938
 
A
Asher 已提交
939
@@ -125,13 +133,11 @@ export class SimpleClipboardService implements IClipboardService {
A
Asher 已提交
940
 	writeText(text: string, type?: string): void { }
A
Asher 已提交
941
 
A
Asher 已提交
942 943 944 945 946
 	readText(type?: string): string {
-		// @ts-ignore
-		return undefined;
+		throw new Error('not implemented');
 	}
A
Asher 已提交
947
 
A
Asher 已提交
948 949 950 951 952
 	readFindText(): string {
-		// @ts-ignore
-		return undefined;
+		throw new Error('not implemented');
 	}
A
Asher 已提交
953
 
A
Asher 已提交
954
 	writeFindText(text: string): void { }
A
Asher 已提交
955
@@ -239,7 +245,17 @@ export class SimpleExtensionGalleryService implements IExtensionGalleryService {
A
Asher 已提交
956 957
 	}
 }
A
Asher 已提交
958
 
A
Asher 已提交
959 960 961 962 963 964 965 966 967
-registerSingleton(IExtensionGalleryService, SimpleExtensionGalleryService, true);
+// registerSingleton(IExtensionGalleryService, SimpleExtensionGalleryService, true);
+
+class ExtensionGalleryService extends ExtensionGalleryChannelClient {
+	public constructor(
+		@IRemoteAgentService remoteAgentService: IRemoteAgentService,
+		@IProductService productService: IProductService,
+	) {
+		super(remoteAgentService.getConnection()!.getChannel('gallery'), productService);
A
Asher 已提交
968
+	}
A
Asher 已提交
969 970
+}
+registerSingleton(IExtensionGalleryService, ExtensionGalleryService, true);
A
Asher 已提交
971
 
A
Asher 已提交
972
 //#endregion
A
Asher 已提交
973
 
A
Asher 已提交
974
@@ -262,7 +278,7 @@ export class SimpleExtensionsWorkbenchService implements IExtensionsWorkbenchSer
A
Asher 已提交
975 976 977 978 979 980
 	checkForUpdates: any;
 	allowedBadgeProviders: string[];
 }
-registerSingleton(IExtensionsWorkbenchService, SimpleExtensionsWorkbenchService, true);
+// registerSingleton(IExtensionsWorkbenchService, SimpleExtensionsWorkbenchService, true);
 //#endregion
A
Asher 已提交
981
 
A
Asher 已提交
982
 //#region ICommentService
A
Asher 已提交
983
@@ -375,7 +391,10 @@ export class SimpleExtensionTipsService implements IExtensionTipsService {
A
Asher 已提交
984
 	}
A
Asher 已提交
985
 
A
Asher 已提交
986 987 988 989 990 991 992 993
 	getAllIgnoredRecommendations(): { global: string[]; workspace: string[]; } {
-		return Object.create(null);
+		return {
+			global: [],
+			workspace: [],
+		};
 	}
 }
A
Asher 已提交
994
 
A
Asher 已提交
995
@@ -436,7 +455,16 @@ export class SimpleExtensionManagementService implements IExtensionManagementSer
A
Asher 已提交
996 997
 	}
 }
A
Asher 已提交
998
 
A
Asher 已提交
999 1000
-registerSingleton(IExtensionManagementService, SimpleExtensionManagementService);
+// registerSingleton(IExtensionManagementService, SimpleExtensionManagementService);
A
Asher 已提交
1001
+
A
Asher 已提交
1002 1003 1004 1005 1006 1007 1008 1009
+class LocalExtensionManagementService extends ExtensionManagementChannelClient {
+	public constructor(
+		@IRemoteAgentService remoteAgentService: IRemoteAgentService,
+	) {
+		super(remoteAgentService.getConnection()!.getChannel('extensions'));
+	}
+}
+registerSingleton(IExtensionManagementService, LocalExtensionManagementService);
A
Asher 已提交
1010
 
A
Asher 已提交
1011
 //#endregion
A
Asher 已提交
1012
 
A
Asher 已提交
1013
@@ -680,7 +708,15 @@ export class SimpleTelemetryService implements ITelemetryService {
A
Asher 已提交
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029
 	}
 }
 
-registerSingleton(ITelemetryService, SimpleTelemetryService);
+// registerSingleton(ITelemetryService, SimpleTelemetryService);
+class TelemetryService extends TelemetryChannelClient {
+	public constructor(
+		@IRemoteAgentService remoteAgentService: IRemoteAgentService,
+	) {
+		super(remoteAgentService.getConnection()!.getChannel('telemetry'));
+	}
+}
+registerSingleton(ITelemetryService, TelemetryService);
 
 //#endregion
 
A
Asher 已提交
1030 1031 1032 1033 1034 1035 1036 1037 1038
@@ -714,7 +750,7 @@ export class SimpleUpdateService implements IUpdateService {
 	}
 }
 
-registerSingleton(IUpdateService, SimpleUpdateService);
+// registerSingleton(IUpdateService, SimpleUpdateService);
 
 //#endregion
 
A
Asher 已提交
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056
@@ -888,7 +924,7 @@ export class SimpleWindowService extends Disposable implements IWindowService {
 		for (let i = 0; i < _uris.length; i++) {
 			const uri = _uris[i];
 			if ('folderUri' in uri) {
-				const newAddress = `${document.location.origin}/?folder=${uri.folderUri.path}`;
+				const newAddress = require.withBase(`/?folder=${uri.folderUri.path}`);
 				if (openFolderInNewWindow) {
 					window.open(newAddress);
 				} else {
@@ -896,7 +932,7 @@ export class SimpleWindowService extends Disposable implements IWindowService {
 				}
 			}
 			if ('workspaceUri' in uri) {
-				const newAddress = `${document.location.origin}/?workspace=${uri.workspaceUri.path}`;
+				const newAddress = require.withBase(`/?workspace=${uri.workspaceUri.path}`);
 				if (openFolderInNewWindow) {
 					window.open(newAddress);
 				} else {
A
Asher 已提交
1057 1058 1059 1060 1061 1062 1063 1064
@@ -1100,6 +1136,7 @@ export class SimpleWindowsService implements IWindowsService {
 	}
 
 	relaunch(_options: { addArgs?: string[], removeArgs?: string[] }): Promise<void> {
+		window.location.reload();
 		return Promise.resolve();
 	}
 
A
Asher 已提交
1065
diff --git a/src/vs/workbench/contrib/comments/browser/commentNode.ts b/src/vs/workbench/contrib/comments/browser/commentNode.ts
A
Asher 已提交
1066
index f4ac3fe8dd..3a3616b39e 100644
A
Asher 已提交
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091
--- a/src/vs/workbench/contrib/comments/browser/commentNode.ts
+++ b/src/vs/workbench/contrib/comments/browser/commentNode.ts
@@ -108,7 +108,7 @@ export class CommentNode extends Disposable {
 		const avatar = dom.append(this._domNode, dom.$('div.avatar-container'));
 		if (comment.userIconPath) {
 			const img = <HTMLImageElement>dom.append(avatar, dom.$('img.avatar'));
-			img.src = comment.userIconPath.toString();
+			img.src = require.withBase(comment.userIconPath).toString();
 			img.onerror = _ => img.remove();
 		}
 		this._commentDetailsContainer = dom.append(this._domNode, dom.$('.review-comment-contents'));
diff --git a/src/vs/workbench/contrib/comments/browser/reactionsAction.ts b/src/vs/workbench/contrib/comments/browser/reactionsAction.ts
index c14030dab8..42b666446d 100644
--- a/src/vs/workbench/contrib/comments/browser/reactionsAction.ts
+++ b/src/vs/workbench/contrib/comments/browser/reactionsAction.ts
@@ -46,7 +46,7 @@ export class ReactionActionViewItem extends ActionViewItem {
 			let reactionIcon = dom.append(this.label, dom.$('.reaction-icon'));
 			reactionIcon.style.display = '';
 			let uri = URI.revive(action.icon);
-			reactionIcon.style.backgroundImage = `url('${uri}')`;
+			reactionIcon.style.backgroundImage = `url('${require.withBase(uri)}')`;
 			reactionIcon.title = action.label;
 		}
 		if (action.count) {
diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts
A
Asher 已提交
1092
index 31b80683ee..720b649c01 100644
A
Asher 已提交
1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105
--- a/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts
+++ b/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts
@@ -108,8 +108,8 @@ export class ExtensionRenderer implements IListRenderer<ITreeNode<IExtensionData
 	public renderElement(node: ITreeNode<IExtensionData>, index: number, data: IExtensionTemplateData): void {
 		const extension = node.element.extension;
 		const onError = Event.once(domEvent(data.icon, 'error'));
-		onError(() => data.icon.src = extension.iconUrlFallback, null, data.extensionDisposables);
-		data.icon.src = extension.iconUrl;
+		onError(() => data.icon.src = require.withBase(extension.iconUrlFallback), null, data.extensionDisposables);
+		data.icon.src = require.withBase(extension.iconUrl);
 
 		if (!data.icon.complete) {
 			data.icon.style.visibility = 'hidden';
A
Asher 已提交
1106
diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionEditor.ts
A
Asher 已提交
1107
index 86949eb39a..b7d04352ce 100644
A
Asher 已提交
1108 1109 1110 1111 1112
--- a/src/vs/workbench/contrib/extensions/electron-browser/extensionEditor.ts
+++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionEditor.ts
@@ -3,6 +3,7 @@
  *  Licensed under the MIT License. See License.txt in the project root for license information.
  *--------------------------------------------------------------------------------------------*/
A
Asher 已提交
1113
 
A
Asher 已提交
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139
+import * as process from 'vs/base/common/process';
 import 'vs/css!./media/extensionEditor';
 import { localize } from 'vs/nls';
 import * as marked from 'vs/base/common/marked/marked';
@@ -28,8 +29,8 @@ import { IExtensionsWorkbenchService, IExtensionsViewlet, VIEWLET_ID, IExtension
 import { RatingsWidget, InstallCountWidget, RemoteBadgeWidget } from 'vs/workbench/contrib/extensions/electron-browser/extensionsWidgets';
 import { EditorOptions } from 'vs/workbench/common/editor';
 import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
-import { CombinedInstallAction, UpdateAction, ExtensionEditorDropDownAction, ReloadAction, MaliciousStatusLabelAction, IgnoreExtensionRecommendationAction, UndoIgnoreExtensionRecommendationAction, EnableDropDownAction, DisableDropDownAction, StatusLabelAction, SetFileIconThemeAction, SetColorThemeAction, RemoteInstallAction, DisabledLabelAction, SystemDisabledWarningAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/electron-browser/extensionsActions';
-import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
+import { CombinedInstallAction, UpdateAction, ExtensionEditorDropDownAction, ReloadAction, MaliciousStatusLabelAction, IgnoreExtensionRecommendationAction, UndoIgnoreExtensionRecommendationAction, EnableDropDownAction, DisableDropDownAction, StatusLabelAction, SetFileIconThemeAction, SetColorThemeAction, /*RemoteInstallAction, */DisabledLabelAction, SystemDisabledWarningAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/electron-browser/extensionsActions';
+import { IFrameWebview as WebviewElement } from 'vs/workbench/contrib/webview/browser/webviewElement';
 import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
 import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement';
 import { IOpenerService } from 'vs/platform/opener/common/opener';
@@ -44,7 +45,7 @@ import { assign } from 'vs/base/common/objects';
 import { INotificationService } from 'vs/platform/notification/common/notification';
 import { CancellationToken } from 'vs/base/common/cancellation';
 import { ExtensionsTree, ExtensionData } from 'vs/workbench/contrib/extensions/browser/extensionsViewer';
-import { ShowCurrentReleaseNotesAction } from 'vs/workbench/contrib/update/electron-browser/update';
+// import { ShowCurrentReleaseNotesAction } from 'vs/workbench/contrib/update/electron-browser/update';
 import { KeybindingParser } from 'vs/base/common/keybindingParser';
 import { IStorageService } from 'vs/platform/storage/common/storage';
 import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
@@ -54,12 +55,12 @@ import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/work
 import { URI } from 'vs/base/common/uri';
A
Asher 已提交
1140
 
A
Asher 已提交
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152
 function renderBody(body: string): string {
-	const styleSheetPath = require.toUrl('./media/markdown.css').replace('file://', 'vscode-resource://');
+	const styleSheetPath = require.toUrl('./media/markdown.css');
 	return `<!DOCTYPE html>
 		<html>
 			<head>
 				<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
-				<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src vscode-resource:; child-src 'none'; frame-src 'none';">
+				<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src ${styleSheetPath}; child-src 'none'; frame-src 'none';">
 				<link rel="stylesheet" type="text/css" href="${styleSheetPath}">
 			</head>
 			<body>
A
Asher 已提交
1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163
@@ -291,8 +292,8 @@ export class ExtensionEditor extends BaseEditor {
 
 		const remoteBadge = this.instantiationService.createInstance(RemoteBadgeWidget, this.iconContainer, true);
 		const onError = Event.once(domEvent(this.icon, 'error'));
-		onError(() => this.icon.src = extension.iconUrlFallback, null, this.transientDisposables);
-		this.icon.src = extension.iconUrl;
+		onError(() => this.icon.src = require.withBase(extension.iconUrlFallback), null, this.transientDisposables);
+		this.icon.src = require.withBase(extension.iconUrl);
 
 		this.name.textContent = extension.displayName;
 		this.identifier.textContent = extension.identifier.id;
A
Asher 已提交
1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182
@@ -370,7 +371,7 @@ export class ExtensionEditor extends BaseEditor {
 			this.instantiationService.createInstance(SetFileIconThemeAction, fileIconThemes),
 			this.instantiationService.createInstance(EnableDropDownAction),
 			this.instantiationService.createInstance(DisableDropDownAction, runningExtensions),
-			this.instantiationService.createInstance(RemoteInstallAction),
+			// this.instantiationService.createInstance(RemoteInstallAction),
 			this.instantiationService.createInstance(LocalInstallAction),
 			combinedInstallAction,
 			systemDisabledWarningAction,
@@ -556,7 +557,7 @@ export class ExtensionEditor extends BaseEditor {
 						return;
 					}
 					// Whitelist supported schemes for links
-					if (['http', 'https', 'mailto'].indexOf(link.scheme) >= 0 || (link.scheme === 'command' && link.path === ShowCurrentReleaseNotesAction.ID)) {
+					if (['http', 'https', 'mailto'].indexOf(link.scheme) >= 0 /*|| (link.scheme === 'command' && link.path === ShowCurrentReleaseNotesAction.ID)*/) {
 						this.openerService.open(link);
 					}
 				}, null, this.contentDisposables));
diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts
A
Asher 已提交
1183
index aa632ac96e..94ab4c042e 100644
A
Asher 已提交
1184 1185 1186 1187 1188 1189 1190 1191
--- a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts
+++ b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts
@@ -9,10 +9,10 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes';
 import { Registry } from 'vs/platform/registry/common/platform';
 import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions';
 import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
-import { IExtensionTipsService, ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
+import { /*IExtensionTipsService, */ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
A
Asher 已提交
1192
 
A
Asher 已提交
1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219
 import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions';
-import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
+// import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
 import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
 import { IOutputChannelRegistry, Extensions as OutputExtensions } from 'vs/workbench/contrib/output/common/output';
 import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
@@ -38,14 +38,14 @@ import { areSameExtensions } from 'vs/platform/extensionManagement/common/extens
 import { GalleryExtensionsHandler, ExtensionsHandler } from 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen';
 import { EditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor';
 import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
-import { RuntimeExtensionsEditor, ShowRuntimeExtensionsAction, IExtensionHostProfileService, DebugExtensionHostAction, StartExtensionHostProfileAction, StopExtensionHostProfileAction, CONTEXT_PROFILE_SESSION_STATE, SaveExtensionHostProfileAction, CONTEXT_EXTENSION_HOST_PROFILE_RECORDED } from 'vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor';
-import { EditorInput, IEditorInputFactory, IEditorInputFactoryRegistry, Extensions as EditorInputExtensions, ActiveEditorContext } from 'vs/workbench/common/editor';
-import { ExtensionHostProfileService } from 'vs/workbench/contrib/extensions/electron-browser/extensionProfileService';
+// import { RuntimeExtensionsEditor, ShowRuntimeExtensionsAction, IExtensionHostProfileService, DebugExtensionHostAction, StartExtensionHostProfileAction, StopExtensionHostProfileAction, CONTEXT_PROFILE_SESSION_STATE, SaveExtensionHostProfileAction, CONTEXT_EXTENSION_HOST_PROFILE_RECORDED } from 'vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor';
+import { EditorInput, IEditorInputFactory, IEditorInputFactoryRegistry, Extensions as EditorInputExtensions/*, ActiveEditorContext*/ } from 'vs/workbench/common/editor';
+// import { ExtensionHostProfileService } from 'vs/workbench/contrib/extensions/electron-browser/extensionProfileService';
 import { RuntimeExtensionsInput } from 'vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput';
 import { URI, UriComponents } from 'vs/base/common/uri';
-import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
+// import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
 import { ExtensionActivationProgress } from 'vs/workbench/contrib/extensions/browser/extensionsActivationProgress';
-import { ExtensionsAutoProfiler } from 'vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler';
+// import { ExtensionsAutoProfiler } from 'vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler';
 import { onUnexpectedError } from 'vs/base/common/errors';
 import { ExtensionDependencyChecker } from 'vs/workbench/contrib/extensions/electron-browser/extensionsDependencyChecker';
 import { CancellationToken } from 'vs/base/common/cancellation';
@@ -53,8 +53,8 @@ import { ExtensionType } from 'vs/platform/extensions/common/extensions';
A
Asher 已提交
1220
 
A
Asher 已提交
1221 1222 1223 1224 1225 1226
 // Singletons
 registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService);
-registerSingleton(IExtensionTipsService, ExtensionTipsService);
-registerSingleton(IExtensionHostProfileService, ExtensionHostProfileService, true);
+// registerSingleton(IExtensionTipsService, ExtensionTipsService);
+// registerSingleton(IExtensionHostProfileService, ExtensionHostProfileService, true);
A
Asher 已提交
1227
 
A
Asher 已提交
1228 1229 1230 1231 1232 1233 1234 1235 1236
 const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
 workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Restored);
@@ -63,7 +63,7 @@ workbenchRegistry.registerWorkbenchContribution(ConfigureRecommendedExtensionsCo
 workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase.Restored);
 workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, LifecyclePhase.Starting);
 workbenchRegistry.registerWorkbenchContribution(ExtensionActivationProgress, LifecyclePhase.Eventually);
-workbenchRegistry.registerWorkbenchContribution(ExtensionsAutoProfiler, LifecyclePhase.Eventually);
+// workbenchRegistry.registerWorkbenchContribution(ExtensionsAutoProfiler, LifecyclePhase.Eventually);
 workbenchRegistry.registerWorkbenchContribution(ExtensionDependencyChecker, LifecyclePhase.Eventually);
A
Asher 已提交
1237
 
A
Asher 已提交
1238 1239
 Registry.as<IOutputChannelRegistry>(OutputExtensions.OutputChannels)
@@ -104,14 +104,14 @@ Registry.as<IEditorRegistry>(EditorExtensions.Editors)
A
Asher 已提交
1240
 
A
Asher 已提交
1241
 // Running Extensions Editor
A
Asher 已提交
1242
 
A
Asher 已提交
1243
-const runtimeExtensionsEditorDescriptor = new EditorDescriptor(
A
Asher 已提交
1244 1245 1246 1247 1248 1249 1250
+/*const runtimeExtensionsEditorDescriptor = new EditorDescriptor(
 	RuntimeExtensionsEditor,
 	RuntimeExtensionsEditor.ID,
 	localize('runtimeExtension', "Running Extensions")
 );
 
 Registry.as<IEditorRegistry>(EditorExtensions.Editors)
A
Asher 已提交
1251
-	.registerEditor(runtimeExtensionsEditorDescriptor, [new SyncDescriptor(RuntimeExtensionsInput)]);
A
Asher 已提交
1252
+	.registerEditor(runtimeExtensionsEditorDescriptor, [new SyncDescriptor(RuntimeExtensionsInput)]);*/
A
Asher 已提交
1253
 
A
Asher 已提交
1254 1255 1256 1257 1258 1259 1260 1261 1262
 class RuntimeExtensionsInputFactory implements IEditorInputFactory {
 	serialize(editorInput: EditorInput): string {
@@ -203,7 +203,7 @@ actionRegistry.registerWorkbenchAction(checkForUpdatesAction, `Extensions: Check
 actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(EnableAutoUpdateAction, EnableAutoUpdateAction.ID, EnableAutoUpdateAction.LABEL), `Extensions: Enable Auto Updating Extensions`, ExtensionsLabel);
 actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisableAutoUpdateAction, DisableAutoUpdateAction.ID, DisableAutoUpdateAction.LABEL), `Extensions: Disable Auto Updating Extensions`, ExtensionsLabel);
 actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(InstallSpecificVersionOfExtensionAction, InstallSpecificVersionOfExtensionAction.ID, InstallSpecificVersionOfExtensionAction.LABEL), 'Install Specific Version of Extension...', ExtensionsLabel);
-actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowRuntimeExtensionsAction, ShowRuntimeExtensionsAction.ID, ShowRuntimeExtensionsAction.LABEL), 'Show Running Extensions', localize('developer', "Developer"));
+// actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowRuntimeExtensionsAction, ShowRuntimeExtensionsAction.ID, ShowRuntimeExtensionsAction.LABEL), 'Show Running Extensions', localize('developer', "Developer"));
 actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReinstallAction, ReinstallAction.ID, ReinstallAction.LABEL), 'Reinstall Extension...', localize('developer', "Developer"));
A
Asher 已提交
1263
 
A
Asher 已提交
1264
 Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
A
Asher 已提交
1265
@@ -270,7 +270,7 @@ CommandsRegistry.registerCommand('extension.open', (accessor: ServicesAccessor,
A
Asher 已提交
1266 1267
 	});
 });
A
Asher 已提交
1268
 
A
Asher 已提交
1269
-CommandsRegistry.registerCommand(DebugExtensionHostAction.ID, (accessor: ServicesAccessor) => {
A
Asher 已提交
1270 1271 1272 1273 1274 1275 1276 1277
+/*CommandsRegistry.registerCommand(DebugExtensionHostAction.ID, (accessor: ServicesAccessor) => {
 	const instantiationService = accessor.get(IInstantiationService);
 	instantiationService.createInstance(DebugExtensionHostAction).run();
 });
@@ -288,7 +288,7 @@ CommandsRegistry.registerCommand(StopExtensionHostProfileAction.ID, (accessor: S
 CommandsRegistry.registerCommand(SaveExtensionHostProfileAction.ID, (accessor: ServicesAccessor) => {
 	const instantiationService = accessor.get(IInstantiationService);
 	instantiationService.createInstance(SaveExtensionHostProfileAction, SaveExtensionHostProfileAction.ID, SaveExtensionHostProfileAction.LABEL).run();
A
Asher 已提交
1278
-});
A
Asher 已提交
1279
+});*/
A
Asher 已提交
1280
 
A
Asher 已提交
1281
 // File menu registration
A
Asher 已提交
1282
 
A
Asher 已提交
1283
@@ -332,7 +332,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
A
Asher 已提交
1284
 
A
Asher 已提交
1285
 // Running extensions
A
Asher 已提交
1286
 
A
Asher 已提交
1287
-MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
A
Asher 已提交
1288 1289 1290 1291 1292 1293 1294 1295
+/*MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
 	command: {
 		id: DebugExtensionHostAction.ID,
 		title: DebugExtensionHostAction.LABEL,
@@ -383,7 +383,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
 	},
 	group: 'navigation',
 	when: ContextKeyExpr.and(ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID))
A
Asher 已提交
1296
-});
A
Asher 已提交
1297
+}); */
A
Asher 已提交
1298
 
A
Asher 已提交
1299 1300 1301
 CommandsRegistry.registerCommand({
 	id: 'workbench.extensions.installExtension',
diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionsList.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionsList.ts
A
Asher 已提交
1302
index 3f6427704d..8d2d78f537 100644
A
Asher 已提交
1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322
--- a/src/vs/workbench/contrib/extensions/electron-browser/extensionsList.ts
+++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionsList.ts
@@ -13,7 +13,7 @@ import { IPagedRenderer } from 'vs/base/browser/ui/list/listPaging';
 import { Event } from 'vs/base/common/event';
 import { domEvent } from 'vs/base/browser/event';
 import { IExtension, ExtensionContainers, ExtensionState, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
-import { InstallAction, UpdateAction, ManageExtensionAction, ReloadAction, MaliciousStatusLabelAction, ExtensionActionViewItem, StatusLabelAction, RemoteInstallAction, SystemDisabledWarningAction, DisabledLabelAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/electron-browser/extensionsActions';
+import { InstallAction, UpdateAction, ManageExtensionAction, ReloadAction, MaliciousStatusLabelAction, ExtensionActionViewItem, StatusLabelAction, /*RemoteInstallAction, */SystemDisabledWarningAction, DisabledLabelAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/electron-browser/extensionsActions';
 import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
 import { Label, RatingsWidget, InstallCountWidget, RecommendationWidget, RemoteBadgeWidget, TooltipWidget } from 'vs/workbench/contrib/extensions/electron-browser/extensionsWidgets';
 import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
@@ -96,7 +96,7 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
 			this.instantiationService.createInstance(UpdateAction),
 			reloadAction,
 			this.instantiationService.createInstance(InstallAction),
-			this.instantiationService.createInstance(RemoteInstallAction),
+			// this.instantiationService.createInstance(RemoteInstallAction),
 			this.instantiationService.createInstance(LocalInstallAction),
 			this.instantiationService.createInstance(MaliciousStatusLabelAction, false),
 			systemDisabledWarningAction,
A
Asher 已提交
1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333
@@ -165,8 +165,8 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
 		this.extensionService.onDidChangeExtensions(() => updateEnablement(), this, data.extensionDisposables);
 
 		const onError = Event.once(domEvent(data.icon, 'error'));
-		onError(() => data.icon.src = extension.iconUrlFallback, null, data.extensionDisposables);
-		data.icon.src = extension.iconUrl;
+		onError(() => data.icon.src = require.withBase(extension.iconUrlFallback), null, data.extensionDisposables);
+		data.icon.src = require.withBase(extension.iconUrl);
 
 		if (!data.icon.complete) {
 			data.icon.style.visibility = 'hidden';
A
Asher 已提交
1334
diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionsViews.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionsViews.ts
A
Asher 已提交
1335
index 6dad2fb580..04e5d2a62b 100644
A
Asher 已提交
1336 1337 1338 1339 1340 1341 1342
--- a/src/vs/workbench/contrib/extensions/electron-browser/extensionsViews.ts
+++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionsViews.ts
@@ -34,7 +34,7 @@ import { INotificationService, Severity } from 'vs/platform/notification/common/
 import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet';
 import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
 import { distinct, coalesce } from 'vs/base/common/arrays';
-import { IExperimentService, IExperiment, ExperimentActionType } from 'vs/workbench/contrib/experiments/electron-browser/experimentService';
A
Asher 已提交
1343
+import { /*IExperimentService, */IExperiment/*, ExperimentActionType*/ } from 'vs/workbench/contrib/experiments/electron-browser/experimentService';
A
Asher 已提交
1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355
 import { alert } from 'vs/base/browser/ui/aria/aria';
 import { IListContextMenuEvent } from 'vs/base/browser/ui/list/list';
 import { createErrorWithActions } from 'vs/base/common/errorsWithActions';
@@ -96,7 +96,7 @@ export class ExtensionsListView extends ViewletPanel {
 		@ITelemetryService private readonly telemetryService: ITelemetryService,
 		@IConfigurationService configurationService: IConfigurationService,
 		@IWorkspaceContextService protected contextService: IWorkspaceContextService,
-		@IExperimentService private readonly experimentService: IExperimentService,
+		// @IExperimentService private readonly experimentService: IExperimentService,
 		@IWorkbenchThemeService private readonly workbenchThemeService: IWorkbenchThemeService,
 		@IExtensionManagementServerService protected readonly extensionManagementServerService: IExtensionManagementServerService,
 		@IProductService protected readonly productService: IProductService,
A
Asher 已提交
1356 1357 1358 1359
@@ -483,7 +483,7 @@ export class ExtensionsListView extends ViewletPanel {
 	private _searchExperiments: Promise<IExperiment[]>;
 	private getSearchExperiments(): Promise<IExperiment[]> {
 		if (!this._searchExperiments) {
A
Asher 已提交
1360
-			this._searchExperiments = this.experimentService.getExperimentsByType(ExperimentActionType.ExtensionSearchResults);
A
Asher 已提交
1361 1362 1363
+			this._searchExperiments = Promise.resolve([]); // this.experimentService.getExperimentsByType(ExperimentActionType.ExtensionSearchResults);
 		}
 		return this._searchExperiments;
A
Asher 已提交
1364
 	}
A
Asher 已提交
1365
@@ -552,7 +552,7 @@ export class ExtensionsListView extends ViewletPanel {
A
Asher 已提交
1366
 
A
Asher 已提交
1367
 	private async getCuratedModel(query: Query, options: IQueryOptions, token: CancellationToken): Promise<IPagedModel<IExtension>> {
A
Asher 已提交
1368
 		const value = query.value.replace(/curated:/g, '').trim();
A
Asher 已提交
1369
-		const names = await this.experimentService.getCuratedExtensionsList(value);
A
Asher 已提交
1370 1371 1372 1373
+		const names = <string[]>[]; // await this.experimentService.getCuratedExtensionsList(value);
 		if (Array.isArray(names) && names.length) {
 			options.source = `curated:${value}`;
 			const pager = await this.extensionsWorkbenchService.queryGallery(assign(options, { names, pageSize: names.length }), token);
A
Asher 已提交
1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389
@@ -843,14 +843,14 @@ export class ServerExtensionsView extends ExtensionsListView {
 		@ITelemetryService telemetryService: ITelemetryService,
 		@IConfigurationService configurationService: IConfigurationService,
 		@IWorkspaceContextService contextService: IWorkspaceContextService,
-		@IExperimentService experimentService: IExperimentService,
+		// @IExperimentService experimentService: IExperimentService,
 		@IWorkbenchThemeService workbenchThemeService: IWorkbenchThemeService,
 		@IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService,
 		@IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService,
 		@IProductService productService: IProductService,
 	) {
 		options.server = server;
-		super(options, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, editorService, tipsService, telemetryService, configurationService, contextService, experimentService, workbenchThemeService, extensionManagementServerService, productService);
+		super(options, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, editorService, tipsService, telemetryService, configurationService, contextService, /*experimentService,*/ workbenchThemeService, extensionManagementServerService, productService);
 		this._register(onDidChangeTitle(title => this.updateTitle(title)));
 	}
A
Asher 已提交
1390
 
A
Asher 已提交
1391
diff --git a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts
A
Asher 已提交
1392
index c08a6e37c1..2e1deb01e6 100644
A
Asher 已提交
1393 1394
--- a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts
+++ b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts
A
Asher 已提交
1395 1396
@@ -4,7 +4,7 @@
  *--------------------------------------------------------------------------------------------*/
A
Asher 已提交
1397
 
A
Asher 已提交
1398 1399 1400 1401 1402 1403
 import * as nls from 'vs/nls';
-import * as semver from 'semver';
+// import * as semver from 'semver';
 import { Event, Emitter } from 'vs/base/common/event';
 import { index, distinct } from 'vs/base/common/arrays';
 import { ThrottledDelayer } from 'vs/base/common/async';
A
Asher 已提交
1404
@@ -26,7 +26,7 @@ import { IExtension, ExtensionState, IExtensionsWorkbenchService, AutoUpdateConf
A
Asher 已提交
1405 1406 1407 1408
 import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService';
 import { IURLService, IURLHandler } from 'vs/platform/url/common/url';
 import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput';
-import product from 'vs/platform/product/node/product';
A
Asher 已提交
1409
+import { IProductService } from 'vs/platform/product/common/product'; // import product from 'vs/platform/product/node/product';
A
Asher 已提交
1410 1411 1412
 import { ILogService } from 'vs/platform/log/common/log';
 import { IProgressService, ProgressLocation } from 'vs/platform/progress/common/progress';
 import { INotificationService } from 'vs/platform/notification/common/notification';
A
Asher 已提交
1413
@@ -53,7 +53,8 @@ class Extension implements IExtension {
A
Asher 已提交
1414 1415 1416 1417 1418
 		public gallery: IGalleryExtension | undefined,
 		private telemetryService: ITelemetryService,
 		private logService: ILogService,
-		private fileService: IFileService
+		private fileService: IFileService,
A
Asher 已提交
1419
+		private productService: IProductService,
A
Asher 已提交
1420
 	) { }
A
Asher 已提交
1421
 
A
Asher 已提交
1422
 	get type(): ExtensionType | undefined {
A
Asher 已提交
1423
@@ -112,11 +113,11 @@ class Extension implements IExtension {
A
Asher 已提交
1424
 	}
A
Asher 已提交
1425
 
A
Asher 已提交
1426 1427 1428 1429 1430
 	get url(): string | undefined {
-		if (!product.extensionsGallery || !this.gallery) {
+		if (!this.productService.extensionsGallery || !this.gallery) {
 			return undefined;
 		}
A
Asher 已提交
1431
 
A
Asher 已提交
1432
-		return `${product.extensionsGallery.itemUrl}?itemName=${this.publisher}.${this.name}`;
A
Asher 已提交
1433 1434
+		return `${this.productService.extensionsGallery.itemUrl}?itemName=${this.publisher}.${this.name}`;
 	}
A
Asher 已提交
1435
 
A
Asher 已提交
1436
 	get iconUrl(): string {
A
Asher 已提交
1437
@@ -183,7 +184,7 @@ class Extension implements IExtension {
A
Asher 已提交
1438
 	}
A
Asher 已提交
1439
 
A
Asher 已提交
1440 1441 1442 1443
 	get outdated(): boolean {
-		return !!this.gallery && this.type === ExtensionType.User && semver.gt(this.latestVersion, this.version);
+		return !!this.gallery && this.type === ExtensionType.User && this.latestVersion !== this.version;
 	}
A
Asher 已提交
1444
 
A
Asher 已提交
1445
 	get telemetryData(): any {
A
Asher 已提交
1446
@@ -201,7 +202,7 @@ class Extension implements IExtension {
A
Asher 已提交
1447
 	}
A
Asher 已提交
1448
 
A
Asher 已提交
1449 1450 1451 1452
 	private isGalleryOutdated(): boolean {
-		return this.local && this.gallery ? semver.gt(this.local.manifest.version, this.gallery.version) : false;
+		return this.local && this.gallery ? this.local.manifest.version !== this.gallery.version : false;
 	}
A
Asher 已提交
1453
 
A
Asher 已提交
1454
 	getManifest(token: CancellationToken): Promise<IExtensionManifest | null> {
A
Asher 已提交
1455
@@ -320,7 +321,8 @@ class Extensions extends Disposable {
A
Asher 已提交
1456 1457 1458 1459 1460 1461 1462 1463 1464
 		@ITelemetryService private readonly telemetryService: ITelemetryService,
 		@ILogService private readonly logService: ILogService,
 		@IFileService private readonly fileService: IFileService,
-		@IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService
+		@IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService,
+		@IProductService private readonly productService: IProductService
 	) {
 		super();
 		this._register(server.extensionManagementService.onInstallExtension(e => this.onInstallExtension(e)));
A
Asher 已提交
1465
@@ -342,7 +344,7 @@ class Extensions extends Disposable {
A
Asher 已提交
1466 1467 1468 1469 1470 1471 1472 1473
 		const installed = await this.server.extensionManagementService.getInstalled();
 		const byId = index(this.installed, e => e.local ? e.local.identifier.id : e.identifier.id);
 		this.installed = installed.map(local => {
-			const extension = byId[local.identifier.id] || new Extension(this.galleryService, this.stateProvider, this.server, local, undefined, this.telemetryService, this.logService, this.fileService);
+			const extension = byId[local.identifier.id] || new Extension(this.galleryService, this.stateProvider, this.server, local, undefined, this.telemetryService, this.logService, this.fileService, this.productService);
 			extension.local = local;
 			extension.enablementState = this.extensionEnablementService.getEnablementState(local);
 			return extension;
A
Asher 已提交
1474
@@ -395,7 +397,7 @@ class Extensions extends Disposable {
A
Asher 已提交
1475 1476 1477 1478 1479 1480 1481 1482
 		const { gallery } = event;
 		if (gallery) {
 			const extension = this.installed.filter(e => areSameExtensions(e.identifier, gallery.identifier))[0]
-				|| new Extension(this.galleryService, this.stateProvider, this.server, undefined, gallery, this.telemetryService, this.logService, this.fileService);
+				|| new Extension(this.galleryService, this.stateProvider, this.server, undefined, gallery, this.telemetryService, this.logService, this.fileService, this.productService);
 			this.installing.push(extension);
 			this._onChange.fire(extension);
 		}
A
Asher 已提交
1483
@@ -406,7 +408,7 @@ class Extensions extends Disposable {
A
Asher 已提交
1484 1485
 		const installingExtension = gallery ? this.installing.filter(e => areSameExtensions(e.identifier, gallery.identifier))[0] : null;
 		this.installing = installingExtension ? this.installing.filter(e => e !== installingExtension) : this.installing;
A
Asher 已提交
1486
 
A
Asher 已提交
1487 1488 1489 1490 1491
-		let extension: Extension | undefined = installingExtension ? installingExtension : zipPath ? new Extension(this.galleryService, this.stateProvider, this.server, local, undefined, this.telemetryService, this.logService, this.fileService) : undefined;
+		let extension: Extension | undefined = installingExtension ? installingExtension : zipPath ? new Extension(this.galleryService, this.stateProvider, this.server, local, undefined, this.telemetryService, this.logService, this.fileService, this.productService) : undefined;
 		if (extension) {
 			if (local) {
 				const installed = this.installed.filter(e => areSameExtensions(e.identifier, extension!.identifier))[0];
A
Asher 已提交
1492
@@ -501,7 +503,8 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
A
Asher 已提交
1493 1494 1495 1496 1497 1498 1499 1500 1501
 		@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService,
 		@IStorageService private readonly storageService: IStorageService,
 		@IFileService private readonly fileService: IFileService,
-		@IModeService private readonly modeService: IModeService
+		@IModeService private readonly modeService: IModeService,
+		@IProductService private readonly productService: IProductService
 	) {
 		super();
 		this.localExtensions = this._register(instantiationService.createInstance(Extensions, extensionManagementServerService.localExtensionManagementServer, ext => this.getExtensionState(ext)));
A
Asher 已提交
1502
@@ -606,7 +609,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
A
Asher 已提交
1503
 			text = text.replace(extensionRegex, (m, ext) => {
A
Asher 已提交
1504
 
A
Asher 已提交
1505 1506 1507 1508
 				// Get curated keywords
-				const lookup = product.extensionKeywords || {};
+				const lookup: {[extension: string]: string[]} = /*this.productService.extensionKeywords || */{};
 				const keywords = lookup[ext] || [];
A
Asher 已提交
1509
 
A
Asher 已提交
1510
 				// Get mode name
A
Asher 已提交
1511
@@ -649,7 +652,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
A
Asher 已提交
1512 1513 1514 1515 1516 1517 1518 1519
 		if (installed) {
 			return installed;
 		}
-		const extension = new Extension(this.galleryService, ext => this.getExtensionState(ext), undefined, undefined, gallery, this.telemetryService, this.logService, this.fileService);
+		const extension = new Extension(this.galleryService, ext => this.getExtensionState(ext), undefined, undefined, gallery, this.telemetryService, this.logService, this.fileService, this.productService);
 		if (maliciousExtensionSet.has(extension.identifier.id)) {
 			extension.isMalicious = true;
 		}
A
Asher 已提交
1520
@@ -999,7 +1002,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
A
Asher 已提交
1521
 
A
Asher 已提交
1522 1523 1524 1525 1526 1527 1528
 	get allowedBadgeProviders(): string[] {
 		if (!this._extensionAllowedBadgeProviders) {
-			this._extensionAllowedBadgeProviders = (product.extensionAllowedBadgeProviders || []).map(s => s.toLowerCase());
+			this._extensionAllowedBadgeProviders = []; // (product.extensionAllowedBadgeProviders || []).map(s => s.toLowerCase());
 		}
 		return this._extensionAllowedBadgeProviders;
 	}
A
Asher 已提交
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571
diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts
index 88ad0027e9..17476d5f26 100644
--- a/src/vs/workbench/contrib/files/browser/files.contribution.ts
+++ b/src/vs/workbench/contrib/files/browser/files.contribution.ts
@@ -200,7 +200,7 @@ configurationRegistry.registerConfiguration({
 		'files.exclude': {
 			'type': 'object',
 			'markdownDescription': nls.localize('exclude', "Configure glob patterns for excluding files and folders. For example, the files explorer decides which files and folders to show or hide based on this setting. Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options)."),
-			'default': { '**/.git': true, '**/.svn': true, '**/.hg': true, '**/CVS': true, '**/.DS_Store': true },
+			'default': { '**/.git': true, '**/.svn': true, '**/.hg': true, '**/CVS': true, '**/.DS_Store': true, '**/.code-server-partial-upload-*': true },
 			'scope': ConfigurationScope.RESOURCE,
 			'additionalProperties': {
 				'anyOf': [
diff --git a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
index 4592b3918e..346292d086 100644
--- a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
+++ b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
@@ -46,6 +46,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
 import { IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces';
 import { findValidPasteFileTarget } from 'vs/workbench/contrib/files/browser/fileActions';
 import { FuzzyScore, createMatches } from 'vs/base/common/filters';
+import { IUploadService } from 'vs/server/src/upload';
 
 export class ExplorerDelegate implements IListVirtualDelegate<ExplorerItem> {
 
@@ -453,7 +454,8 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
 		@IInstantiationService private instantiationService: IInstantiationService,
 		@ITextFileService private textFileService: ITextFileService,
 		@IWindowService private windowService: IWindowService,
-		@IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService
+		@IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService,
+		@IUploadService private readonly uploadService: IUploadService,
 	) {
 		this.toDispose = [];
 
@@ -615,6 +617,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
 
 
 	private async handleExternalDrop(data: DesktopDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> {
+		return this.uploadService.handleExternalDrop(data, target, originalEvent);
 		const droppedResources = extractResources(originalEvent, true);
 		// Check for dropped external files to be folders
 		const result = await this.fileService.resolveAll(droppedResources);
A
Asher 已提交
1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585
diff --git a/src/vs/workbench/contrib/remote/common/remote.contribution.ts b/src/vs/workbench/contrib/remote/common/remote.contribution.ts
index 9235c739fb..32d203eb32 100644
--- a/src/vs/workbench/contrib/remote/common/remote.contribution.ts
+++ b/src/vs/workbench/contrib/remote/common/remote.contribution.ts
@@ -55,7 +55,8 @@ class RemoteChannelsContribution extends Disposable implements IWorkbenchContrib
 		const connection = remoteAgentService.getConnection();
 		if (connection) {
 			const logLevelClient = new LogLevelSetterChannelClient(connection.getChannel('loglevel'));
-			logLevelClient.setLevel(logService.getLevel());
+			logLevelClient.getLevel().then((level) => logService.setLevel(level));
+			logLevelClient.onDidChangeLogLevel((level) => logService.setLevel(level));
 			this._register(logService.onDidChangeLogLevel(level => logLevelClient.setLevel(level)));
 		}
 	}
A
Asher 已提交
1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598
diff --git a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts
index 4d8a5d6907..b464d5276f 100644
--- a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts
+++ b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts
@@ -497,7 +497,7 @@ class ResourceRenderer implements IListRenderer<ISCMResource, ResourceTemplate>
 
 		if (icon) {
 			template.decorationIcon.style.display = '';
-			template.decorationIcon.style.backgroundImage = `url('${icon}')`;
+			template.decorationIcon.style.backgroundImage = `url('${require.withBase(icon)}')`;
 			template.decorationIcon.title = resource.decorations.tooltip || '';
 		} else {
 			template.decorationIcon.style.display = 'none';
A
Asher 已提交
1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889
diff --git a/src/vs/workbench/contrib/update/electron-browser/update.contribution.ts b/src/vs/workbench/contrib/update/electron-browser/update.contribution.ts
index e39fa57979..d0548847a4 100644
--- a/src/vs/workbench/contrib/update/electron-browser/update.contribution.ts
+++ b/src/vs/workbench/contrib/update/electron-browser/update.contribution.ts
@@ -4,26 +4,26 @@
  *--------------------------------------------------------------------------------------------*/
 
 import 'vs/platform/update/node/update.config.contribution';
-import * as platform from 'vs/base/common/platform';
+// import * as platform from 'vs/base/common/platform';
 import { Registry } from 'vs/platform/registry/common/platform';
 import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
-import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
-import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
-import { ShowCurrentReleaseNotesAction, ProductContribution, UpdateContribution, Win3264BitContribution } from './update';
+// import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
+// import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
+import { /*ShowCurrentReleaseNotesAction, ProductContribution, */UpdateContribution/*, Win3264BitContribution */} from './update';
 import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
 
 const workbench = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
 
-workbench.registerWorkbenchContribution(ProductContribution, LifecyclePhase.Restored);
+/* workbench.registerWorkbenchContribution(ProductContribution, LifecyclePhase.Restored);
 
 if (platform.isWindows) {
 	if (process.arch === 'ia32') {
 		workbench.registerWorkbenchContribution(Win3264BitContribution, LifecyclePhase.Restored);
 	}
-}
+} */
 
 workbench.registerWorkbenchContribution(UpdateContribution, LifecyclePhase.Restored);
 
 // Editor
-Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions)
-	.registerWorkbenchAction(new SyncActionDescriptor(ShowCurrentReleaseNotesAction, ShowCurrentReleaseNotesAction.ID, ShowCurrentReleaseNotesAction.LABEL), 'Show Release Notes');
+// Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions)
+// 	.registerWorkbenchAction(new SyncActionDescriptor(ShowCurrentReleaseNotesAction, ShowCurrentReleaseNotesAction.ID, ShowCurrentReleaseNotesAction.LABEL), 'Show Release Notes');
diff --git a/src/vs/workbench/contrib/update/electron-browser/update.ts b/src/vs/workbench/contrib/update/electron-browser/update.ts
index 7078a1bb2f..94b1ce31a7 100644
--- a/src/vs/workbench/contrib/update/electron-browser/update.ts
+++ b/src/vs/workbench/contrib/update/electron-browser/update.ts
@@ -7,32 +7,33 @@ import * as nls from 'vs/nls';
 import severity from 'vs/base/common/severity';
 import { Action } from 'vs/base/common/actions';
 import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
-import pkg from 'vs/platform/product/node/package';
-import product from 'vs/platform/product/node/product';
-import { URI } from 'vs/base/common/uri';
+// import pkg from 'vs/platform/product/node/package';
+// import product from 'vs/platform/product/node/product';
+// import { URI } from 'vs/base/common/uri';
 import { IActivityService, NumberBadge, IBadge, ProgressBadge } from 'vs/workbench/services/activity/common/activity';
-import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
+// import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
 import { GLOBAL_ACTIVITY_ID } from 'vs/workbench/common/activity';
-import { IOpenerService } from 'vs/platform/opener/common/opener';
+// import { IOpenerService } from 'vs/platform/opener/common/opener';
 import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
 import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
 import { IUpdateService, State as UpdateState, StateType, IUpdate } from 'vs/platform/update/common/update';
-import * as semver from 'semver';
-import { IEnvironmentService } from 'vs/platform/environment/common/environment';
+// import * as semver from 'semver';
+// import { IEnvironmentService } from 'vs/platform/environment/common/environment';
 import { INotificationService, INotificationHandle, Severity } from 'vs/platform/notification/common/notification';
 import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
 import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
-import { ReleaseNotesManager } from './releaseNotesEditor';
-import { isWindows } from 'vs/base/common/platform';
-import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
+// import { ReleaseNotesManager } from './releaseNotesEditor';
+// import { isWindows } from 'vs/base/common/platform';
+// import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
 import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
 import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions';
 import { CommandsRegistry } from 'vs/platform/commands/common/commands';
 import { FalseContext } from 'vs/platform/contextkey/common/contextkeys';
+import { IProductService } from 'vs/platform/product/common/product';
 
 const CONTEXT_UPDATE_STATE = new RawContextKey<string>('updateState', StateType.Uninitialized);
 
-let releaseNotesManager: ReleaseNotesManager | undefined = undefined;
+/*let releaseNotesManager: ReleaseNotesManager | undefined = undefined;
 
 function showReleaseNotes(instantiationService: IInstantiationService, version: string) {
 	if (!releaseNotesManager) {
@@ -150,7 +151,7 @@ export class ProductContribution implements IWorkbenchContribution {
 
 		storageService.store(ProductContribution.KEY, pkg.version, StorageScope.GLOBAL);
 	}
-}
+} */
 
 class NeverShowAgain {
 
@@ -175,7 +176,7 @@ class NeverShowAgain {
 	}
 }
 
-export class Win3264BitContribution implements IWorkbenchContribution {
+/* export class Win3264BitContribution implements IWorkbenchContribution {
 
 	private static readonly KEY = 'update/win32-64bits';
 	private static readonly URL = 'https://code.visualstudio.com/updates/v1_15#_windows-64-bit';
@@ -214,7 +215,7 @@ export class Win3264BitContribution implements IWorkbenchContribution {
 			{ sticky: true }
 		);
 	}
-}
+} */
 
 export class UpdateContribution extends Disposable implements IWorkbenchContribution {
 
@@ -224,7 +225,8 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
 
 	constructor(
 		@IStorageService private readonly storageService: IStorageService,
-		@IInstantiationService private readonly instantiationService: IInstantiationService,
+		// @IInstantiationService private readonly instantiationService: IInstantiationService,
+		@IProductService private readonly productService: IProductService,
 		@INotificationService private readonly notificationService: INotificationService,
 		@IDialogService private readonly dialogService: IDialogService,
 		@IUpdateService private readonly updateService: IUpdateService,
@@ -247,7 +249,7 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
 		updated since 5 days.
 		*/
 
-		const currentVersion = product.commit;
+		const currentVersion = this.productService.commit;
 		const lastKnownVersion = this.storageService.get('update/lastKnownVersion', StorageScope.GLOBAL);
 
 		// if current version != stored version, clear both fields
@@ -292,9 +294,9 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
 		let clazz: string | undefined;
 
 		if (state.type === StateType.AvailableForDownload || state.type === StateType.Downloaded || state.type === StateType.Ready) {
-			badge = new NumberBadge(1, () => nls.localize('updateIsReady', "New {0} update available.", product.nameShort));
+			badge = new NumberBadge(1, () => nls.localize('updateIsReady', "New {0} update available.", this.productService.nameLong));
 		} else if (state.type === StateType.CheckingForUpdates || state.type === StateType.Downloading || state.type === StateType.Updating) {
-			badge = new ProgressBadge(() => nls.localize('updateIsReady', "New {0} update available.", product.nameShort));
+			badge = new ProgressBadge(() => nls.localize('updateIsReady', "New {0} update available.", this.productService.nameLong));
 			clazz = 'progress-badge';
 		}
 
@@ -333,21 +335,21 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
 
 		this.notificationService.prompt(
 			severity.Info,
-			nls.localize('thereIsUpdateAvailable', "There is an available update."),
+			nls.localize('updateAvailable', "There's an update available: {0} {1}", this.productService.nameLong, update.productVersion),
 			[{
-				label: nls.localize('download update', "Download Update"),
+				label: nls.localize('installUpdate', "Install Update"),
 				run: () => this.updateService.downloadUpdate()
 			}, {
 				label: nls.localize('later', "Later"),
 				run: () => { }
-			}, {
+			}/*, {
 				label: nls.localize('releaseNotes', "Release Notes"),
 				run: () => {
 					const action = this.instantiationService.createInstance(ShowReleaseNotesAction, update.productVersion);
 					action.run();
 					action.dispose();
 				}
-			}],
+			}*/],
 			{ sticky: true }
 		);
 	}
@@ -360,30 +362,30 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
 
 		this.notificationService.prompt(
 			severity.Info,
-			nls.localize('updateAvailable', "There's an update available: {0} {1}", product.nameLong, update.productVersion),
+			nls.localize('updateAvailable', "There's an update available: {0} {1}", this.productService.nameLong, update.productVersion),
 			[{
 				label: nls.localize('installUpdate', "Install Update"),
 				run: () => this.updateService.applyUpdate()
 			}, {
 				label: nls.localize('later', "Later"),
 				run: () => { }
-			}, {
+			}/*, {
 				label: nls.localize('releaseNotes', "Release Notes"),
 				run: () => {
 					const action = this.instantiationService.createInstance(ShowReleaseNotesAction, update.productVersion);
 					action.run();
 					action.dispose();
 				}
-			}],
+			}*/],
 			{ sticky: true }
 		);
 	}
 
 	// windows fast updates
 	private onUpdateUpdating(update: IUpdate): void {
-		if (isWindows && product.target === 'user') {
-			return;
-		}
+		// if (isWindows && product.target === 'user') {
+		// 	return;
+		// }
 
 		// windows fast updates (target === system)
 		const neverShowAgain = new NeverShowAgain('update/win32-fast-updates', this.storageService);
@@ -394,7 +396,7 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
 
 		const handle = this.notificationService.prompt(
 			severity.Info,
-			nls.localize('updateInstalling', "{0} {1} is being installed in the background; we'll let you know when it's done.", product.nameLong, update.productVersion),
+			nls.localize('updateInstalling', "{0} {1} is being installed in the background; we'll let you know when it's done.", this.productService.nameLong, update.productVersion),
 			[{
 				label: nls.localize('neveragain', "Don't Show Again"),
 				isSecondary: true,
@@ -408,20 +410,23 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
 
 	// windows and mac
 	private onUpdateReady(update: IUpdate): void {
-		if (!(isWindows && product.target !== 'user') && !this.shouldShowNotification()) {
-			return;
-		}
+		// if (!(isWindows && product.target !== 'user') && !this.shouldShowNotification()) {
+		// 	return;
+		// }
 
 		const actions = [{
 			label: nls.localize('updateNow', "Update Now"),
-			run: () => this.updateService.quitAndInstall()
+			run: () => {
+				this.updateService.quitAndInstall();
+				window.location.reload();
+			}
 		}, {
 			label: nls.localize('later', "Later"),
 			run: () => { }
 		}];
 
 		// TODO@joao check why snap updates send `update` as falsy
-		if (update.productVersion) {
+		/*if (update.productVersion) {
 			actions.push({
 				label: nls.localize('releaseNotes', "Release Notes"),
 				run: () => {
@@ -430,19 +435,19 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
 					action.dispose();
 				}
 			});
-		}
+		}*/
 
 		// windows user fast updates and mac
 		this.notificationService.prompt(
 			severity.Info,
-			nls.localize('updateAvailableAfterRestart', "Restart {0} to apply the latest update.", product.nameLong),
+			nls.localize('updateAvailableAfterRestart', "Restart {0} to apply the latest update.", this.productService.nameLong),
 			actions,
 			{ sticky: true }
 		);
 	}
 
 	private shouldShowNotification(): boolean {
-		const currentVersion = product.commit;
+		const currentVersion = this.productService.commit;
 		const currentMillis = new Date().getTime();
 		const lastKnownVersion = this.storageService.get('update/lastKnownVersion', StorageScope.GLOBAL);
 
@@ -485,7 +490,7 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
 			group: '5_update',
 			command: {
 				id: 'update.downloadNow',
-				title: nls.localize('download update', "Download Update")
+				title: nls.localize('installUpdate...', "Install Update...")
 			},
 			when: CONTEXT_UPDATE_STATE.isEqualTo(StateType.AvailableForDownload)
 		});
@@ -522,7 +527,10 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
 			when: CONTEXT_UPDATE_STATE.isEqualTo(StateType.Updating)
 		});
 
-		CommandsRegistry.registerCommand('update.restart', () => this.updateService.quitAndInstall());
+		CommandsRegistry.registerCommand('update.restart', () => {
+			this.updateService.quitAndInstall();
+			window.location.reload();
+		});
 		MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
 			group: '5_update',
 			command: {
A
Asher 已提交
1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902
diff --git a/src/vs/workbench/contrib/webview/browser/pre/main.js b/src/vs/workbench/contrib/webview/browser/pre/main.js
index a6be033e07..a4dcb7357a 100644
--- a/src/vs/workbench/contrib/webview/browser/pre/main.js
+++ b/src/vs/workbench/contrib/webview/browser/pre/main.js
@@ -355,7 +355,7 @@
 					// seeing the service worker applying properly.
 					// Fake load an empty on the correct origin and then write real html
 					// into it to get around this.
-					newFrame.src = `/fake.html?id=${ID}`;
+					newFrame.src = `fake.html?id=${ID}`;
 				}
 				newFrame.style.cssText = 'display: block; margin: 0; overflow: hidden; position: absolute; width: 100%; height: 100%; visibility: hidden';
 				document.body.appendChild(newFrame);
A
Asher 已提交
1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920
diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts
index 6d4d096a9c..bbb7930e7a 100644
--- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts
+++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts
@@ -39,10 +39,10 @@ export class WebviewEditorInput extends EditorInput {
 		this._icons.forEach((value, key) => {
 			const webviewSelector = `.show-file-icons .webview-${key}-name-file-icon::before`;
 			if (URI.isUri(value)) {
-				cssRules.push(`${webviewSelector} { content: ""; background-image: url(${value.toString()}); }`);
+				cssRules.push(`${webviewSelector} { content: ""; background-image: url(${require.withBase(value).toString()}); }`);
 			} else {
-				cssRules.push(`.vs ${webviewSelector} { content: ""; background-image: url(${value.light.toString()}); }`);
-				cssRules.push(`.vs-dark ${webviewSelector} { content: ""; background-image: url(${value.dark.toString()}); }`);
+				cssRules.push(`.vs ${webviewSelector} { content: ""; background-image: url(${require.withBase(value.light).toString()}); }`);
+				cssRules.push(`.vs-dark ${webviewSelector} { content: ""; background-image: url(${require.withBase(value.dark).toString()}); }`);
 			}
 		});
 		this._styleElement.innerHTML = cssRules.join('\n');
A
Asher 已提交
1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933
diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts
index 3525569601..a91a5fce7d 100644
--- a/src/vs/workbench/services/environment/browser/environmentService.ts
+++ b/src/vs/workbench/services/environment/browser/environmentService.ts
@@ -136,6 +136,8 @@ export class BrowserWorkbenchEnvironmentService implements IEnvironmentService {
 	driverHandle?: string;
 	driverVerbose: boolean;
 	webviewEndpoint?: string;
+	extraExtensionPaths: string[];
+	extraBuiltinExtensionPaths: string[];
 
 	get webviewResourceRoot(): string {
 		return this.webviewEndpoint ? this.webviewEndpoint + '/vscode-resource' : 'vscode-resource:';
A
Asher 已提交
1934
diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts
A
Asher 已提交
1935
index 611ab9aec9..820cc92c73 100644
A
Asher 已提交
1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957
--- a/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts
+++ b/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts
@@ -6,15 +6,15 @@
 import { localize } from 'vs/nls';
 import { Schemas } from 'vs/base/common/network';
 import { URI } from 'vs/base/common/uri';
-import { IExtensionManagementServer, IExtensionManagementServerService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
-import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/node/extensionManagementIpc';
+import { IExtensionManagementServer, IExtensionManagementServerService, IExtensionGalleryService, IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement';
+// import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/node/extensionManagementIpc';
 import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
 import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts';
-import { IChannel } from 'vs/base/parts/ipc/common/ipc';
-import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
+// import { IChannel } from 'vs/base/parts/ipc/common/ipc';
+// import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
 import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
 import { ILogService } from 'vs/platform/log/common/log';
-import { RemoteExtensionManagementChannelClient } from 'vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc';
+// import { RemoteExtensionManagementChannelClient } from 'vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc';
 import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
 import { IProductService } from 'vs/platform/product/common/product';
A
Asher 已提交
1958
 
A
Asher 已提交
1959
@@ -28,24 +28,26 @@ export class ExtensionManagementServerService implements IExtensionManagementSer
A
Asher 已提交
1960
 	readonly remoteExtensionManagementServer: IExtensionManagementServer | null = null;
A
Asher 已提交
1961
 
A
Asher 已提交
1962 1963
 	constructor(
-		@ISharedProcessService sharedProcessService: ISharedProcessService,
A
Asher 已提交
1964 1965
+		// This is set to `any` just to keep the tests from showing errors.
+		@IExtensionManagementService localExtensionManagementService: any, // @ISharedProcessService sharedProcessService: ISharedProcessService,
A
Asher 已提交
1966 1967 1968 1969
 		@IRemoteAgentService remoteAgentService: IRemoteAgentService,
 		@IExtensionGalleryService galleryService: IExtensionGalleryService,
 		@IConfigurationService configurationService: IConfigurationService,
 		@IProductService productService: IProductService,
A
Asher 已提交
1970
 		@ILogService logService: ILogService
A
Asher 已提交
1971 1972
 	) {
-		const localExtensionManagementService = new ExtensionManagementChannelClient(sharedProcessService.getChannel('extensions'));
A
Asher 已提交
1973
-
A
Asher 已提交
1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988
-		this.localExtensionManagementServer = { extensionManagementService: localExtensionManagementService, authority: localExtensionManagementServerAuthority, label: localize('local', "Local") };
-		const remoteAgentConnection = remoteAgentService.getConnection();
-		if (remoteAgentConnection) {
-			const extensionManagementService = new RemoteExtensionManagementChannelClient(remoteAgentConnection.getChannel<IChannel>('extensions'), this.localExtensionManagementServer.extensionManagementService, galleryService, logService, configurationService, productService);
-			this.remoteExtensionManagementServer = { authority: remoteAgentConnection.remoteAuthority, extensionManagementService, label: localize('remote', "Remote") };
-		}
+		// const localExtensionManagementService = new ExtensionManagementChannelClient(sharedProcessService.getChannel('extensions'));
+
+		this.localExtensionManagementServer = { extensionManagementService: localExtensionManagementService!, authority: localExtensionManagementServerAuthority, label: localize('remote', "Remote") };
+		// const remoteAgentConnection = remoteAgentService.getConnection();
+		// if (remoteAgentConnection) {
+		// 	const extensionManagementService = new RemoteExtensionManagementChannelClient(remoteAgentConnection.getChannel<IChannel>('extensions'), this.localExtensionManagementServer.extensionManagementService, galleryService, logService, configurationService, productService);
+		// 	this.remoteExtensionManagementServer = { authority: remoteAgentConnection.remoteAuthority, extensionManagementService, label: localize('remote', "Remote") };
+		// }
 	}
A
Asher 已提交
1989
 
A
Asher 已提交
1990 1991 1992 1993 1994
 	getExtensionManagementServer(location: URI): IExtensionManagementServer | null {
+		return this.localExtensionManagementServer;
 		if (location.scheme === Schemas.file) {
 			return this.localExtensionManagementServer;
 		}
A
Asher 已提交
1995
diff --git a/src/vs/workbench/services/files/common/fileService.ts b/src/vs/workbench/services/files/common/fileService.ts
A
Asher 已提交
1996
index a788aadc1f..bcffa2c60a 100644
A
Asher 已提交
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
--- a/src/vs/workbench/services/files/common/fileService.ts
+++ b/src/vs/workbench/services/files/common/fileService.ts
@@ -859,7 +859,7 @@ export class FileService extends Disposable implements IFileService {
 			let posInFile = 0;
 
 			let chunk: VSBuffer | null;
-			while (chunk = readable.read()) {
+			while (chunk = await readable.read()) {
 				await this.doWriteBuffer(provider, handle, chunk, chunk.byteLength, posInFile, 0);
 
 				posInFile += chunk.byteLength;
@@ -888,7 +888,7 @@ export class FileService extends Disposable implements IFileService {
 		if (bufferOrReadable instanceof VSBuffer) {
 			buffer = bufferOrReadable;
 		} else {
-			buffer = readableToBuffer(bufferOrReadable);
+			buffer = await readableToBuffer(bufferOrReadable);
 		}
 
 		return provider.writeFile(resource, buffer.buffer, { create: true, overwrite: true });
A
Asher 已提交
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038
diff --git a/src/vs/workbench/services/themes/common/fileIconThemeData.ts b/src/vs/workbench/services/themes/common/fileIconThemeData.ts
index 306d58f915..58c603ad3d 100644
--- a/src/vs/workbench/services/themes/common/fileIconThemeData.ts
+++ b/src/vs/workbench/services/themes/common/fileIconThemeData.ts
@@ -331,7 +331,7 @@ function _processIconThemeDocument(id: string, iconThemeDocumentLocation: URI, i
 	let fonts = iconThemeDocument.fonts;
 	if (Array.isArray(fonts)) {
 		fonts.forEach(font => {
-			let src = font.src.map(l => `url('${resolvePath(l.path)}') format('${l.format}')`).join(', ');
+			let src = font.src.map(l => `url('${require.withBase(resolvePath(l.path))}') format('${l.format}')`).join(', ');
 			cssRules.push(`@font-face { src: ${src}; font-family: '${font.id}'; font-weight: ${font.weight}; font-style: ${font.style}; }`);
 		});
 		cssRules.push(`.show-file-icons .file-icon::before, .show-file-icons .folder-icon::before, .show-file-icons .rootfolder-icon::before { font-family: '${fonts[0].id}'; font-size: ${fonts[0].size || '150%'}}`);
@@ -342,7 +342,7 @@ function _processIconThemeDocument(id: string, iconThemeDocumentLocation: URI, i
 		let definition = iconThemeDocument.iconDefinitions[defId];
 		if (definition) {
 			if (definition.iconPath) {
-				cssRules.push(`${selectors.join(', ')} { content: ' '; background-image: url("${resolvePath(definition.iconPath)}"); }`);
+				cssRules.push(`${selectors.join(', ')} { content: ' '; background-image: url("${require.withBase(resolvePath(definition.iconPath))}"); }`);
 			}
 			if (definition.fontCharacter || definition.fontColor) {
 				let body = '';
A
Asher 已提交
2039
diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts
A
Asher 已提交
2040
index c28adc0ad9..56c86d7e39 100644
A
Asher 已提交
2041 2042
--- a/src/vs/workbench/workbench.web.main.ts
+++ b/src/vs/workbench/workbench.web.main.ts
A
Asher 已提交
2043
@@ -72,15 +72,15 @@ import { BrowserLifecycleService } from 'vs/platform/lifecycle/browser/lifecycle
A
Asher 已提交
2044 2045 2046 2047 2048 2049 2050 2051 2052 2053
 import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
 import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
 import { DialogService } from 'vs/platform/dialogs/browser/dialogService';
-// import { ILocalizationsService } from 'vs/platform/localizations/common/localizations';
-// import { LocalizationsService } from 'vs/platform/localizations/electron-browser/localizationsService';
+import { ILocalizationsService } from 'vs/platform/localizations/common/localizations';
+import { LocalizationsService } from 'vs/platform/localizations/electron-browser/localizationsService';
 // import { ISharedProcessService, SharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
 // import { IProductService } from 'vs/platform/product/common/product';
 // import { ProductService } from 'vs/platform/product/node/productService';
A
Asher 已提交
2054 2055 2056 2057 2058 2059 2060 2061 2062
 // import { IWindowsService } from 'vs/platform/windows/common/windows';
 // import { WindowsService } from 'vs/platform/windows/electron-browser/windowsService';
-// import { IUpdateService } from 'vs/platform/update/common/update';
-// import { UpdateService } from 'vs/platform/update/electron-browser/updateService';
+import { IUpdateService } from 'vs/platform/update/common/update';
+import { UpdateService } from 'vs/platform/update/electron-browser/updateService';
 // import { IIssueService } from 'vs/platform/issue/common/issue';
 // import { IssueService } from 'vs/platform/issue/electron-browser/issueService';
 // import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces';
A
Asher 已提交
2063 2064 2065 2066 2067 2068 2069 2070 2071
@@ -128,7 +128,7 @@ import 'vs/workbench/services/extensions/browser/extensionService';
 // import 'vs/workbench/services/contextmenu/electron-browser/contextmenuService';
 // import 'vs/workbench/services/extensions/node/multiExtensionManagement';
 import 'vs/workbench/services/label/common/labelService';
-// import 'vs/workbench/services/extensions/electron-browser/extensionManagementServerService';
+import 'vs/workbench/services/extensions/electron-browser/extensionManagementServerService';
 // import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl';
 import 'vs/workbench/services/notification/common/notificationService';
 // import 'vs/workbench/services/window/electron-browser/windowService';
A
Asher 已提交
2072
@@ -156,10 +156,10 @@ registerSingleton(IContextViewService, ContextViewService, true);
A
Asher 已提交
2073 2074 2075 2076 2077 2078 2079
 // registerSingleton(IExtensionGalleryService, ExtensionGalleryService, true);
 // registerSingleton(IRequestService, RequestService, true);
 registerSingleton(ILifecycleService, BrowserLifecycleService);
-// registerSingleton(ILocalizationsService, LocalizationsService);
+registerSingleton(ILocalizationsService, LocalizationsService);
 // registerSingleton(ISharedProcessService, SharedProcessService, true);
 // registerSingleton(IWindowsService, WindowsService);
A
Asher 已提交
2080 2081 2082 2083 2084
-// registerSingleton(IUpdateService, UpdateService);
+registerSingleton(IUpdateService, UpdateService);
 // registerSingleton(IIssueService, IssueService);
 // registerSingleton(IWorkspacesService, WorkspacesService);
 // registerSingleton(IMenubarService, MenubarService);
A
Asher 已提交
2085 2086 2087 2088 2089 2090 2091 2092 2093
@@ -194,7 +194,7 @@ import 'vs/workbench/services/files/common/workspaceWatcher';
 import 'vs/workbench/contrib/telemetry/browser/telemetry.contribution';
 
 // Localizations
-// import 'vs/workbench/contrib/localizations/browser/localizations.contribution';
+import 'vs/workbench/contrib/localizations/browser/localizations.contribution';
 
 // Preferences
 import 'vs/workbench/contrib/preferences/browser/preferences.contribution';
A
Asher 已提交
2094 2095
@@ -260,9 +260,9 @@ registerSingleton(IWebviewService, WebviewService, true);
 registerSingleton(IWebviewEditorService, WebviewEditorService, true);
A
Asher 已提交
2096
 
A
Asher 已提交
2097 2098 2099 2100 2101 2102 2103
 // Extensions Management
-// import 'vs/workbench/contrib/extensions/electron-browser/extensions.contribution';
-// import 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen';
-// import 'vs/workbench/contrib/extensions/electron-browser/extensionsViewlet';
+import 'vs/workbench/contrib/extensions/electron-browser/extensions.contribution';
+import 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen';
+import 'vs/workbench/contrib/extensions/electron-browser/extensionsViewlet';
A
Asher 已提交
2104
 
A
Asher 已提交
2105 2106
 // Output Panel
 import 'vs/workbench/contrib/output/browser/output.contribution';
A
Asher 已提交
2107 2108 2109 2110 2111 2112 2113 2114 2115
@@ -318,7 +318,7 @@ import 'vs/workbench/contrib/format/browser/format.contribution';
 // import 'vs/workbench/contrib/feedback/browser/feedback.contribution';
 
 // Update
-// import 'vs/workbench/contrib/update/electron-browser/update.contribution';
+import 'vs/workbench/contrib/update/electron-browser/update.contribution';
 
 // Surveys
 // import 'vs/workbench/contrib/surveys/electron-browser/nps.contribution';