From 6e411adb017e65627ae92fe8433808f1d3f98052 Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 10 Apr 2023 10:28:13 -0800 Subject: [PATCH] Update Code to 1.77.1 (#6135) --- lib/vscode | 2 +- patches/base-path.diff | 2 +- patches/disable-downloads.diff | 16 +++---- patches/display-language.diff | 24 ++++++----- patches/getting-started.diff | 77 +++++++++++++++++++++++----------- patches/integration.diff | 2 +- patches/local-storage.diff | 2 +- patches/logout.diff | 2 +- patches/proposed-api.diff | 28 ++++++------- patches/proxy-uri.diff | 2 +- patches/service-worker.diff | 2 +- patches/telemetry.diff | 4 +- patches/update-check.diff | 2 +- patches/webview.diff | 10 ++--- 14 files changed, 103 insertions(+), 72 deletions(-) diff --git a/lib/vscode b/lib/vscode index 5e805b79f..b7886d746 160000 --- a/lib/vscode +++ b/lib/vscode @@ -1 +1 @@ -Subproject commit 5e805b79fcb6ba4c2d23712967df89a089da575b +Subproject commit b7886d7461186a5eac768481578c1d7ca80e2d21 diff --git a/patches/base-path.diff b/patches/base-path.diff index 4233474d4..93395c2f9 100644 --- a/patches/base-path.diff +++ b/patches/base-path.diff @@ -250,7 +250,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts -@@ -33,6 +33,7 @@ export type ExtensionVirtualWorkspaceSup +@@ -56,6 +56,7 @@ export type ExtensionVirtualWorkspaceSup export interface IProductConfiguration { readonly codeServerVersion?: string diff --git a/patches/disable-downloads.diff b/patches/disable-downloads.diff index 79b47f91f..2ad998768 100644 --- a/patches/disable-downloads.diff +++ b/patches/disable-downloads.diff @@ -40,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi } export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService { -@@ -104,6 +109,13 @@ export class BrowserWorkbenchEnvironment +@@ -101,6 +106,13 @@ export class BrowserWorkbenchEnvironment return this.options.userDataPath; } @@ -92,10 +92,10 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts +++ code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts @@ -7,12 +7,11 @@ import { Event } from 'vs/base/common/ev import { Disposable } from 'vs/base/common/lifecycle'; - import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; + import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from 'vs/platform/contextkey/common/contextkey'; import { InputFocusedContext, IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from 'vs/platform/contextkey/common/contextkeys'; --import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext } from 'vs/workbench/common/contextkeys'; -+import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, IsEnabledFileDownloads } from 'vs/workbench/common/contextkeys'; +-import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext } from 'vs/workbench/common/contextkeys'; ++import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, IsEnabledFileDownloads } from 'vs/workbench/common/contextkeys'; import { TEXT_DIFF_EDITOR_ID, EditorInputCapabilities, SIDE_BY_SIDE_EDITOR_ID, DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor'; import { trackFocus, addDisposableListener, EventType } from 'vs/base/browser/dom'; import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; @@ -121,7 +121,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts @IProductService private readonly productService: IProductService, @IEditorService private readonly editorService: IEditorService, @IEditorResolverService private readonly editorResolverService: IEditorResolverService, -@@ -202,6 +202,9 @@ export class WorkbenchContextKeysHandler +@@ -205,6 +205,9 @@ export class WorkbenchContextKeysHandler this.auxiliaryBarVisibleContext = AuxiliaryBarVisibleContext.bindTo(this.contextKeyService); this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible(Parts.AUXILIARYBAR_PART)); @@ -144,7 +144,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ThemeIcon } from 'vs/base/common/themables'; -@@ -484,13 +484,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo +@@ -485,13 +485,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo id: DOWNLOAD_COMMAND_ID, title: DOWNLOAD_LABEL }, @@ -172,9 +172,9 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts +++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts -@@ -33,6 +33,8 @@ export const IsFullscreenContext = new R +@@ -35,6 +35,8 @@ export const HasWebFileSystemAccess = ne - export const HasWebFileSystemAccess = new RawContextKey('hasWebFileSystemAccess', false, true); // Support for FileSystemAccess web APIs (https://wicg.github.io/file-system-access) + export const EmbedderIdentifierContext = new RawContextKey('embedderIdentifier', undefined, localize('embedderIdentifier', 'The identifier of the embedder according to the product service, if one is defined')); +export const IsEnabledFileDownloads = new RawContextKey('isEnabledFileDownloads', true, true); + diff --git a/patches/display-language.diff b/patches/display-language.diff index 796953582..f8b57366c 100644 --- a/patches/display-language.diff +++ b/patches/display-language.diff @@ -21,7 +21,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts +++ code-server/lib/vscode/src/vs/server/node/serverServices.ts -@@ -234,6 +234,9 @@ export async function setupServerService +@@ -233,6 +233,9 @@ export async function setupServerService const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)); socketServer.registerChannel('extensions', channel); @@ -44,7 +44,7 @@ Index: code-server/lib/vscode/src/vs/base/common/platform.ts export const LANGUAGE_DEFAULT = 'en'; let _isWindows = false; -@@ -86,17 +84,19 @@ if (typeof navigator === 'object' && !is +@@ -90,17 +88,21 @@ if (typeof navigator === 'object' && !is _isMobile = _userAgent?.indexOf('Mobi') >= 0; _isWeb = true; @@ -58,16 +58,18 @@ Index: code-server/lib/vscode/src/vs/base/common/platform.ts - - _locale = configuredLocale || LANGUAGE_DEFAULT; + _locale = LANGUAGE_DEFAULT; - _language = _locale; + _platformLocale = navigator.language; + const el = typeof document !== 'undefined' && document.getElementById('vscode-remote-nls-configuration'); + const rawNlsConfig = el && el.getAttribute('data-settings'); + if (rawNlsConfig) { + try { + const nlsConfig: NLSConfig = JSON.parse(rawNlsConfig); ++ const resolved = nlsConfig.availableLanguages['*']; + _locale = nlsConfig.locale; ++ _platformLocale = nlsConfig.osLocale; ++ _language = resolved ? resolved : LANGUAGE_DEFAULT; + _translationsConfigFile = nlsConfig._translationsConfigFile; -+ _language = nlsConfig.availableLanguages['*'] || LANGUAGE_DEFAULT; + } catch (error) { /* Oh well. */ } + } } @@ -127,7 +129,7 @@ Index: code-server/lib/vscode/src/vs/platform/environment/common/environmentServ =================================================================== --- code-server.orig/lib/vscode/src/vs/platform/environment/common/environmentService.ts +++ code-server/lib/vscode/src/vs/platform/environment/common/environmentService.ts -@@ -107,7 +107,7 @@ export abstract class AbstractNativeEnvi +@@ -101,7 +101,7 @@ export abstract class AbstractNativeEnvi return URI.file(join(vscodePortable, 'argv.json')); } @@ -337,7 +339,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts -@@ -318,9 +318,6 @@ export abstract class AbstractInstallAct +@@ -335,9 +335,6 @@ export abstract class AbstractInstallAct if (this.extension.isBuiltin) { return; } @@ -345,9 +347,9 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens - return; - } if (this.extension.state === ExtensionState.Uninstalled && await this.extensionsWorkbenchService.canInstall(this.extension)) { - this.enabled = this.installPreReleaseVersion ? this.extension.hasPreReleaseVersion : this.extension.hasReleaseVersion; + this.enabled = this.options.installPreReleaseVersion ? this.extension.hasPreReleaseVersion : this.extension.hasReleaseVersion; this.updateLabel(); -@@ -697,7 +694,7 @@ export abstract class InstallInOtherServ +@@ -715,7 +712,7 @@ export abstract class InstallInOtherServ } if (isLanguagePackExtension(this.extension.local.manifest)) { @@ -356,7 +358,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens } // Prefers to run on UI -@@ -1785,17 +1782,6 @@ export class SetLanguageAction extends E +@@ -1803,17 +1800,6 @@ export class SetLanguageAction extends E update(): void { this.enabled = false; this.class = SetLanguageAction.DisabledClass; @@ -374,7 +376,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens } override async run(): Promise { -@@ -1812,7 +1798,6 @@ export class ClearLanguageAction extends +@@ -1830,7 +1816,6 @@ export class ClearLanguageAction extends private static readonly DisabledClass = `${ClearLanguageAction.EnabledClass} disabled`; constructor( @@ -382,7 +384,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens @ILocaleService private readonly localeService: ILocaleService, ) { super(ClearLanguageAction.ID, ClearLanguageAction.TITLE.value, ClearLanguageAction.DisabledClass, false); -@@ -1822,17 +1807,6 @@ export class ClearLanguageAction extends +@@ -1840,17 +1825,6 @@ export class ClearLanguageAction extends update(): void { this.enabled = false; this.class = ClearLanguageAction.DisabledClass; diff --git a/patches/getting-started.diff b/patches/getting-started.diff index 635fdd81f..98ab25a54 100644 --- a/patches/getting-started.diff +++ b/patches/getting-started.diff @@ -19,7 +19,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro import { OpenFolderViaWorkspaceAction } from 'vs/workbench/browser/actions/workspaceActions'; import { OpenRecentAction } from 'vs/workbench/browser/actions/windowActions'; import { Toggle } from 'vs/base/browser/ui/toggle/toggle'; -@@ -759,6 +759,72 @@ export class GettingStartedPage extends +@@ -795,6 +795,72 @@ export class GettingStartedPage extends $('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved")) ); @@ -87,16 +87,56 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro + ), + ), + ); -+ } ++ } + - const leftColumn = $('.categories-column.categories-column-left', {},); const rightColumn = $('.categories-column.categories-column-right', {},); -@@ -776,13 +842,23 @@ export class GettingStartedPage extends + +@@ -813,13 +879,23 @@ export class GettingStartedPage extends const layoutLists = () => { if (gettingStartedList.itemCount) { this.container.classList.remove('noWalkthroughs'); - reset(leftColumn, startList.getDomElement(), recentList.getDomElement()); +- reset(rightColumn, featuredExtensionList.getDomElement(), gettingStartedList.getDomElement()); ++ if (this.contextService.contextMatchesRules(IsEnabledCoderGettingStarted)) { ++ reset(leftColumn, startList.getDomElement(), recentList.getDomElement(), featuredExtensionList.getDomElement(), gettingStartedList.getDomElement()); ++ reset(rightColumn, gettingStartedCoder); ++ } else { ++ reset(leftColumn, startList.getDomElement(), recentList.getDomElement()); ++ reset(rightColumn, featuredExtensionList.getDomElement(), gettingStartedList.getDomElement()); ++ } + } + else { + this.container.classList.add('noWalkthroughs'); +- reset(leftColumn, startList.getDomElement(), recentList.getDomElement()); +- reset(rightColumn, featuredExtensionList.getDomElement()); ++ if (this.contextService.contextMatchesRules(IsEnabledCoderGettingStarted)) { ++ reset(leftColumn, startList.getDomElement(), recentList.getDomElement(), featuredExtensionList.getDomElement()); ++ reset(rightColumn, gettingStartedCoder); ++ } else { ++ reset(leftColumn, startList.getDomElement(), recentList.getDomElement()); ++ reset(rightColumn, featuredExtensionList.getDomElement()); ++ } + } + setTimeout(() => this.categoriesPageScrollbar?.scanDomNode(), 50); + }; +@@ -827,13 +903,23 @@ export class GettingStartedPage extends + const layoutFeaturedExtension = () => { + if (featuredExtensionList.itemCount) { + this.container.classList.remove('noExtensions'); +- reset(leftColumn, startList.getDomElement(), recentList.getDomElement()); +- reset(rightColumn, featuredExtensionList.getDomElement(), gettingStartedList.getDomElement()); ++ if (this.contextService.contextMatchesRules(IsEnabledCoderGettingStarted)) { ++ reset(leftColumn, startList.getDomElement(), recentList.getDomElement(), featuredExtensionList.getDomElement(), gettingStartedList.getDomElement()); ++ reset(rightColumn, gettingStartedCoder); ++ } else { ++ reset(leftColumn, startList.getDomElement(), recentList.getDomElement()); ++ reset(rightColumn, featuredExtensionList.getDomElement(), gettingStartedList.getDomElement()); ++ } + } + else { + this.container.classList.add('noExtensions'); +- reset(leftColumn, startList.getDomElement(), recentList.getDomElement()); - reset(rightColumn, gettingStartedList.getDomElement()); + if (this.contextService.contextMatchesRules(IsEnabledCoderGettingStarted)) { + reset(leftColumn, startList.getDomElement(), recentList.getDomElement(), gettingStartedList.getDomElement()); @@ -105,20 +145,9 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro + reset(leftColumn, startList.getDomElement(), recentList.getDomElement()); + reset(rightColumn, gettingStartedList.getDomElement()); + } -+ - recentList.setLimit(5); - } - else { - this.container.classList.add('noWalkthroughs'); -- reset(leftColumn, startList.getDomElement()); -+ if (this.contextService.contextMatchesRules(IsEnabledCoderGettingStarted)) { -+ reset(leftColumn, startList.getDomElement(), gettingStartedCoder); -+ } else { -+ reset(leftColumn, startList.getDomElement()); -+ } - reset(rightColumn, recentList.getDomElement()); - recentList.setLimit(10); } + setTimeout(() => this.categoriesPageScrollbar?.scanDomNode(), 50); + }; Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css @@ -171,7 +200,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi } export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService { -@@ -116,6 +121,13 @@ export class BrowserWorkbenchEnvironment +@@ -113,6 +118,13 @@ export class BrowserWorkbenchEnvironment return this.options.isEnabledFileDownloads; } @@ -223,14 +252,14 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts +++ code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts @@ -7,7 +7,7 @@ import { Event } from 'vs/base/common/ev import { Disposable } from 'vs/base/common/lifecycle'; - import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; + import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from 'vs/platform/contextkey/common/contextkey'; import { InputFocusedContext, IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from 'vs/platform/contextkey/common/contextkeys'; --import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, IsEnabledFileDownloads } from 'vs/workbench/common/contextkeys'; -+import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, IsEnabledFileDownloads, IsEnabledCoderGettingStarted } from 'vs/workbench/common/contextkeys'; +-import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, IsEnabledFileDownloads } from 'vs/workbench/common/contextkeys'; ++import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, IsEnabledFileDownloads, IsEnabledCoderGettingStarted } from 'vs/workbench/common/contextkeys'; import { TEXT_DIFF_EDITOR_ID, EditorInputCapabilities, SIDE_BY_SIDE_EDITOR_ID, DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor'; import { trackFocus, addDisposableListener, EventType } from 'vs/base/browser/dom'; import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; -@@ -204,6 +204,7 @@ export class WorkbenchContextKeysHandler +@@ -207,6 +207,7 @@ export class WorkbenchContextKeysHandler // code-server IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true) @@ -242,8 +271,8 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts +++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts -@@ -34,6 +34,7 @@ export const IsFullscreenContext = new R - export const HasWebFileSystemAccess = new RawContextKey('hasWebFileSystemAccess', false, true); // Support for FileSystemAccess web APIs (https://wicg.github.io/file-system-access) +@@ -36,6 +36,7 @@ export const HasWebFileSystemAccess = ne + export const EmbedderIdentifierContext = new RawContextKey('embedderIdentifier', undefined, localize('embedderIdentifier', 'The identifier of the embedder according to the product service, if one is defined')); export const IsEnabledFileDownloads = new RawContextKey('isEnabledFileDownloads', true, true); +export const IsEnabledCoderGettingStarted = new RawContextKey('isEnabledCoderGettingStarted', true, true); diff --git a/patches/integration.diff b/patches/integration.diff index c39c99253..c31c7c0d6 100644 --- a/patches/integration.diff +++ b/patches/integration.diff @@ -198,7 +198,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts -@@ -32,6 +32,8 @@ export type ExtensionVirtualWorkspaceSup +@@ -55,6 +55,8 @@ export type ExtensionVirtualWorkspaceSup }; export interface IProductConfiguration { diff --git a/patches/local-storage.diff b/patches/local-storage.diff index 7a542d7cc..1a7c2f40d 100644 --- a/patches/local-storage.diff +++ b/patches/local-storage.diff @@ -48,7 +48,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts -@@ -95,7 +95,14 @@ export class BrowserWorkbenchEnvironment +@@ -92,7 +92,14 @@ export class BrowserWorkbenchEnvironment get logFile(): URI { return joinPath(this.windowLogsPath, 'window.log'); } @memoize diff --git a/patches/logout.diff b/patches/logout.diff index 75af7e6bc..ca2cf2e85 100644 --- a/patches/logout.diff +++ b/patches/logout.diff @@ -8,7 +8,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts -@@ -35,6 +35,7 @@ export interface IProductConfiguration { +@@ -58,6 +58,7 @@ export interface IProductConfiguration { readonly codeServerVersion?: string readonly rootEndpoint?: string readonly updateEndpoint?: string diff --git a/patches/proposed-api.diff b/patches/proposed-api.diff index dd0605849..b5ab3bdb1 100644 --- a/patches/proposed-api.diff +++ b/patches/proposed-api.diff @@ -6,24 +6,11 @@ https://github.com/microsoft/vscode-extension-samples/tree/ddae6c0c9ff203b4ed6f6 We also override isProposedApiEnabled in case an extension does not declare the APIs it needs correctly (the Jupyter extension had this issue). -Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts -=================================================================== ---- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts -+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts -@@ -1488,7 +1488,7 @@ class ProposedApiController { - - this._envEnabledExtensions = new Set((_environmentService.extensionEnabledProposedApi ?? []).map(id => ExtensionIdentifier.toKey(id))); - -- this._envEnablesProposedApiForAll = -+ this._envEnablesProposedApiForAll = true || - !_environmentService.isBuilt || // always allow proposed API when running out of sources - (_environmentService.isExtensionDevelopment && productService.quality !== 'stable') || // do not allow proposed API against stable builds when developing an extension - (this._envEnabledExtensions.size === 0 && Array.isArray(_environmentService.extensionEnabledProposedApi)); // always allow proposed API if --enable-proposed-api is provided without extension ID Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts +++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts -@@ -364,10 +364,7 @@ function extensionDescriptionArrayToMap( +@@ -260,10 +260,7 @@ function extensionDescriptionArrayToMap( } export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean { @@ -35,3 +22,16 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extens } export function checkProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): void { +Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.ts +=================================================================== +--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.ts ++++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.ts +@@ -24,7 +24,7 @@ export class ExtensionsProposedApi { + + this._envEnabledExtensions = new Set((_environmentService.extensionEnabledProposedApi ?? []).map(id => ExtensionIdentifier.toKey(id))); + +- this._envEnablesProposedApiForAll = ++ this._envEnablesProposedApiForAll = true || + !_environmentService.isBuilt || // always allow proposed API when running out of sources + (_environmentService.isExtensionDevelopment && productService.quality !== 'stable') || // do not allow proposed API against stable builds when developing an extension + (this._envEnabledExtensions.size === 0 && Array.isArray(_environmentService.extensionEnabledProposedApi)); // always allow proposed API if --enable-proposed-api is provided without extension ID diff --git a/patches/proxy-uri.diff b/patches/proxy-uri.diff index b2e16e5cd..64eef03fc 100644 --- a/patches/proxy-uri.diff +++ b/patches/proxy-uri.diff @@ -30,7 +30,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts -@@ -36,6 +36,7 @@ export interface IProductConfiguration { +@@ -59,6 +59,7 @@ export interface IProductConfiguration { readonly rootEndpoint?: string readonly updateEndpoint?: string readonly logoutEndpoint?: string diff --git a/patches/service-worker.diff b/patches/service-worker.diff index 3432da8d2..61dc8da56 100644 --- a/patches/service-worker.diff +++ b/patches/service-worker.diff @@ -6,7 +6,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts -@@ -37,6 +37,10 @@ export interface IProductConfiguration { +@@ -60,6 +60,10 @@ export interface IProductConfiguration { readonly updateEndpoint?: string readonly logoutEndpoint?: string readonly proxyEndpointTemplate?: string diff --git a/patches/telemetry.diff b/patches/telemetry.diff index a24b56680..35dafceb3 100644 --- a/patches/telemetry.diff +++ b/patches/telemetry.diff @@ -12,7 +12,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts +++ code-server/lib/vscode/src/vs/server/node/serverServices.ts -@@ -70,6 +70,7 @@ import { IExtensionsScannerService } fro +@@ -69,6 +69,7 @@ import { IExtensionsScannerService } fro import { ExtensionsScannerService } from 'vs/server/node/extensionsScannerService'; import { IExtensionsProfileScannerService } from 'vs/platform/extensionManagement/common/extensionsProfileScannerService'; import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile'; @@ -20,7 +20,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts import { NullPolicyService } from 'vs/platform/policy/common/policy'; import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender'; import { LoggerService } from 'vs/platform/log/node/loggerService'; -@@ -151,10 +152,13 @@ export async function setupServerService +@@ -150,10 +151,13 @@ export async function setupServerService let oneDsAppender: ITelemetryAppender = NullAppender; const isInternal = isInternalTelemetry(productService, configurationService); if (supportsTelemetry(productService, environmentService)) { diff --git a/patches/update-check.diff b/patches/update-check.diff index 5ee8d05d6..0e9426ca2 100644 --- a/patches/update-check.diff +++ b/patches/update-check.diff @@ -93,7 +93,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts -@@ -34,6 +34,7 @@ export type ExtensionVirtualWorkspaceSup +@@ -57,6 +57,7 @@ export type ExtensionVirtualWorkspaceSup export interface IProductConfiguration { readonly codeServerVersion?: string readonly rootEndpoint?: string diff --git a/patches/webview.diff b/patches/webview.diff index 64791c8ff..ba7623434 100644 --- a/patches/webview.diff +++ b/patches/webview.diff @@ -41,7 +41,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts -@@ -224,7 +224,7 @@ export class BrowserWorkbenchEnvironment +@@ -215,7 +215,7 @@ export class BrowserWorkbenchEnvironment @memoize get webviewExternalEndpoint(): string { @@ -70,12 +70,12 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index -+ content="default-src 'none'; script-src 'sha256-mi72idjvdhsPSBMKFqU82FG/kZVJjKR0TfHLE13gB+w=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> +- content="default-src 'none'; script-src 'sha256-4A7BC3A+gc8e1t5I0rfDNtBiGlA0/GTojKdfdDHAWYw=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> ++ content="default-src 'none'; script-src 'sha256-8I6aYsGyWES1C043+SeEOyeZlC0Y0HN5WevEDh97c1Y=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">