diff --git a/src/vs/code/browser/workbench/workbench.html b/src/vs/code/browser/workbench/workbench.html index 378b7f594bd..ef812e5f344 100644 --- a/src/vs/code/browser/workbench/workbench.html +++ b/src/vs/code/browser/workbench/workbench.html @@ -15,8 +15,6 @@ self.CONNECTION_AUTH_TOKEN = '{{CONNECTION_AUTH_TOKEN}}'; self.SERVER_APP_ROOT = '{{SERVER_APP_ROOT}}'; self.WINDOW_CONFIGURATION = { - settingsPath: '{{SETTINGS}}', - keybindingsPath: '{{KEYBINDINGS}}', folderPath: '{{FOLDER}}', workspacePath: '{{WORKSPACE}}', userDataPath: '{{USER_DATA}}' diff --git a/src/vs/workbench/browser/web.main.ts b/src/vs/workbench/browser/web.main.ts index 8823bca3d5f..bcc32718f39 100644 --- a/src/vs/workbench/browser/web.main.ts +++ b/src/vs/workbench/browser/web.main.ts @@ -37,8 +37,6 @@ import { joinPath } from 'vs/base/common/resources'; interface IWindowConfiguration { userDataUri: URI; - settingsUri: URI; - keybindingsUri: URI; remoteAuthority: string; folderUri?: URI; workspaceUri?: URI; @@ -123,7 +121,7 @@ class CodeRendererMain extends Disposable { const payload = await this.resolveWorkspaceInitializationPayload(); await Promise.all([ - this.createWorkspaceService(payload, fileService, remoteAgentService, logService).then(service => { + this.createWorkspaceService(payload, environmentService, fileService, remoteAgentService, logService).then(service => { // Workspace serviceCollection.set(IWorkspaceContextService, service); @@ -143,8 +141,8 @@ class CodeRendererMain extends Disposable { environmentService.appRoot = '/web/'; environmentService.args = { _: [] }; environmentService.appSettingsHome = joinPath(this.configuration.userDataUri, 'User'); - environmentService.settingsResource = this.configuration.settingsUri; - environmentService.keybindingsResource = this.configuration.keybindingsUri; + environmentService.settingsResource = joinPath(environmentService.appSettingsHome, 'settings.json'); + environmentService.keybindingsResource = joinPath(environmentService.appSettingsHome, 'keybindings.json'); environmentService.logsPath = '/web/logs'; environmentService.debugExtensionHost = { port: null, @@ -154,8 +152,8 @@ class CodeRendererMain extends Disposable { return environmentService; } - private async createWorkspaceService(payload: IWorkspaceInitializationPayload, fileService: FileService, remoteAgentService: IRemoteAgentService, logService: ILogService): Promise { - const workspaceService = new WorkspaceService({ userSettingsResource: this.configuration.settingsUri, remoteAuthority: this.configuration.remoteAuthority, configurationCache: new ConfigurationCache() }, new ConfigurationFileService(fileService), remoteAgentService); + private async createWorkspaceService(payload: IWorkspaceInitializationPayload, environmentService: IWorkbenchEnvironmentService, fileService: FileService, remoteAgentService: IRemoteAgentService, logService: ILogService): Promise { + const workspaceService = new WorkspaceService({ userSettingsResource: environmentService.settingsResource, remoteAuthority: this.configuration.remoteAuthority, configurationCache: new ConfigurationCache() }, new ConfigurationFileService(fileService), remoteAgentService); try { await workspaceService.initialize(payload); @@ -196,8 +194,6 @@ export interface IWindowConfigurationContents { export function main(windowConfigurationContents: IWindowConfigurationContents): Promise { const windowConfiguration: IWindowConfiguration = { userDataUri: toResource(windowConfigurationContents.userDataPath), - settingsUri: toResource(windowConfigurationContents.settingsPath), - keybindingsUri: toResource(windowConfigurationContents.keybindingsPath), folderUri: windowConfigurationContents.folderPath ? toResource(windowConfigurationContents.folderPath) : undefined, workspaceUri: windowConfigurationContents.workspacePath ? toResource(windowConfigurationContents.workspacePath) : undefined, remoteAuthority: document.location.host