@@ -21,7 +21,6 @@ import type {
2121 IWorkbenchConstructionOptions ,
2222 IWorkspaceProvider
2323} from 'vs/workbench/browser/web.api'
24- import type { IProductConfiguration } from 'vs/base/common/product'
2524import {
2625 type ILazyWorkbenchContributionInstantiation ,
2726 type IOnEditorWorkbenchContributionInstantiation ,
@@ -50,6 +49,8 @@ import getLayoutServiceOverride from './service-override/layout'
5049import getHostServiceOverride from './service-override/host'
5150import getBaseServiceOverride from './service-override/base'
5251import { injectCss } from './css'
52+ import deprecatedProduct from 'vs/platform/product/common/product'
53+ import { mixin } from 'vs/base/common/objects'
5354
5455declare global {
5556 interface Window {
@@ -76,22 +77,13 @@ export async function initialize(
7677 injectCss ( container )
7778 initializeWorkbench ( container , configuration , env )
7879
80+ const productService : IProductService = mixin (
81+ { _serviceBrand : undefined , ...deprecatedProduct } ,
82+ configuration . productConfiguration
83+ )
84+
7985 const instantiationService = StandaloneServices . initialize ( {
80- [ IProductService . toString ( ) ] : < Partial < IProductConfiguration > > {
81- version : VSCODE_VERSION ,
82- quality : 'stable' ,
83- commit : VSCODE_COMMIT ,
84- nameShort : 'Code - OSS' ,
85- nameLong : 'Code - OSS' ,
86- applicationName : 'code-oss' ,
87- dataFolderName : '.vscode-oss' ,
88- urlProtocol : 'code-oss' ,
89- reportIssueUrl : 'https://github.com/microsoft/vscode/issues/new' ,
90- licenseName : 'MIT' ,
91- licenseUrl : 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt' ,
92- serverApplicationName : 'code-server-oss' ,
93- ...( configuration . productConfiguration ?? { } )
94- } ,
86+ [ IProductService . toString ( ) ] : productService ,
9587 ...getLayoutServiceOverride ( ) , // Always override layout service to break cyclic dependency with ICodeEditorService
9688 ...getEnvironmentServiceOverride ( ) ,
9789 ...getExtensionsServiceOverride ( ) ,
0 commit comments