mirror of https://github.com/coder/code-server.git
Update Code to 1.79.1 (#6264)
Mostly just the usual shifting or changing of the surrounding context but I did refactor the getting started block we insert because it keeps getting mangled on each update. Instead of shifting things around the columns I just prepend it to the right column. Getting 404s on some vsda module but everything seems to work without it and I do not see it referenced in the package.json nor a nywhere on npmjs.com so it seems to be optional.
This commit is contained in:
parent
fdeaba9581
commit
9955cd91a4
|
@ -1 +1 @@
|
||||||
Subproject commit b3e4e68a0bc097f0ae7907b217c1119af9e03435
|
Subproject commit 695af097c7bd098fbf017ce3ac85e09bbc5dda06
|
|
@ -99,21 +99,14 @@ Index: code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactor
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
|
--- code-server.orig/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
|
||||||
+++ code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
|
+++ code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
|
||||||
@@ -274,6 +274,7 @@ export class BrowserSocketFactory implem
|
@@ -280,6 +280,7 @@ export class BrowserSocketFactory implem
|
||||||
|
connect({ host, port }: WebSocketRemoteConnection, path: string, query: string, debugLabel: string): Promise<ISocket> {
|
||||||
connect(host: string, port: number, path: string, query: string, debugLabel: string, callback: IConnectCallback): void {
|
return new Promise<ISocket>((resolve, reject) => {
|
||||||
const webSocketSchema = (/^https:/.test(window.location.href) ? 'wss' : 'ws');
|
const webSocketSchema = (/^https:/.test(window.location.href) ? 'wss' : 'ws');
|
||||||
+ path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/")
|
+ path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/")
|
||||||
const socket = this._webSocketFactory.create(`${webSocketSchema}://${(/:/.test(host) && !/\[/.test(host)) ? `[${host}]` : host}:${port}${path}?${query}&skipWebSocketFrames=false`, debugLabel);
|
const socket = this._webSocketFactory.create(`${webSocketSchema}://${(/:/.test(host) && !/\[/.test(host)) ? `[${host}]` : host}:${port}${path}?${query}&skipWebSocketFrames=false`, debugLabel);
|
||||||
const errorListener = socket.onError((err) => callback(err, undefined));
|
const errorListener = socket.onError(reject);
|
||||||
socket.onOpen(() => {
|
socket.onOpen(() => {
|
||||||
@@ -282,6 +283,3 @@ export class BrowserSocketFactory implem
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
|
@ -261,7 +254,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
||||||
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
||||||
@@ -489,6 +489,7 @@ function doCreateUri(path: string, query
|
@@ -484,6 +484,7 @@ function doCreateUri(path: string, query
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +262,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
||||||
return URI.parse(window.location.href).with({ path, query });
|
return URI.parse(window.location.href).with({ path, query });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,7 +501,7 @@ function doCreateUri(path: string, query
|
@@ -495,7 +496,7 @@ function doCreateUri(path: string, query
|
||||||
if (!configElement || !configElementAttribute) {
|
if (!configElement || !configElementAttribute) {
|
||||||
throw new Error('Missing web configuration element');
|
throw new Error('Missing web configuration element');
|
||||||
}
|
}
|
||||||
|
@ -288,12 +281,12 @@ Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/ext
|
||||||
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
|
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||||
-import { RemoteAuthorities } from 'vs/base/common/network';
|
-import { RemoteAuthorities } from 'vs/base/common/network';
|
||||||
import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts';
|
import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts';
|
||||||
|
import { TargetPlatform } from 'vs/platform/extensions/common/extensions';
|
||||||
|
|
||||||
const WEB_EXTENSION_RESOURCE_END_POINT = 'web-extension-resource';
|
@@ -102,7 +101,7 @@ export abstract class AbstractExtensionR
|
||||||
@@ -75,7 +74,7 @@ export abstract class AbstractExtensionR
|
: version,
|
||||||
public getExtensionGalleryResourceURL(galleryExtension: { publisher: string; name: string; version: string }, path?: string): URI | undefined {
|
path: 'extension'
|
||||||
if (this._extensionGalleryResourceUrlTemplate) {
|
}));
|
||||||
const uri = URI.parse(format2(this._extensionGalleryResourceUrlTemplate, { publisher: galleryExtension.publisher, name: galleryExtension.name, version: galleryExtension.version, path: 'extension' }));
|
|
||||||
- return this._isWebExtensionResourceEndPoint(uri) ? uri.with({ scheme: RemoteAuthorities.getPreferredWebSchema() }) : uri;
|
- return this._isWebExtensionResourceEndPoint(uri) ? uri.with({ scheme: RemoteAuthorities.getPreferredWebSchema() }) : uri;
|
||||||
+ return this._isWebExtensionResourceEndPoint(uri) ? URI.joinPath(URI.parse(window.location.href), uri.path) : uri;
|
+ return this._isWebExtensionResourceEndPoint(uri) ? URI.joinPath(URI.parse(window.location.href), uri.path) : uri;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
@@ -260,6 +260,11 @@ export interface IWorkbenchConstructionO
|
@@ -281,6 +281,11 @@ export interface IWorkbenchConstructionO
|
||||||
*/
|
*/
|
||||||
readonly userDataPath?: string
|
readonly userDataPath?: string
|
||||||
|
|
||||||
|
@ -28,19 +28,19 @@ 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.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
||||||
@@ -32,6 +32,11 @@ export interface IBrowserWorkbenchEnviro
|
@@ -34,6 +34,11 @@ export interface IBrowserWorkbenchEnviro
|
||||||
* Options used to configure the workbench.
|
|
||||||
*/
|
|
||||||
readonly options?: IWorkbenchConstructionOptions;
|
readonly options?: IWorkbenchConstructionOptions;
|
||||||
+
|
|
||||||
+ /**
|
/**
|
||||||
+ * Enable downloading files via menu actions.
|
+ * Enable downloading files via menu actions.
|
||||||
+ */
|
+ */
|
||||||
+ readonly isEnabledFileDownloads?: boolean;
|
+ readonly isEnabledFileDownloads?: boolean;
|
||||||
}
|
+
|
||||||
|
+ /**
|
||||||
export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService {
|
* Gets whether a resolver extension is expected for the environment.
|
||||||
@@ -101,6 +106,13 @@ export class BrowserWorkbenchEnvironment
|
*/
|
||||||
|
readonly expectsResolverExtension: boolean;
|
||||||
|
@@ -111,6 +116,13 @@ export class BrowserWorkbenchEnvironment
|
||||||
return this.options.userDataPath;
|
return this.options.userDataPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,29 +90,22 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
||||||
+++ 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
|
@@ -7,12 +7,12 @@ import { Event } from 'vs/base/common/ev
|
||||||
import { Disposable } from 'vs/base/common/lifecycle';
|
import { Disposable } from 'vs/base/common/lifecycle';
|
||||||
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } 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 { 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, 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, ActiveEditorCanToggleReadonlyContext } 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, ActiveEditorCanToggleReadonlyContext } 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 { TEXT_DIFF_EDITOR_ID, EditorInputCapabilities, SIDE_BY_SIDE_EDITOR_ID, DEFAULT_EDITOR_ASSOCIATION, EditorResourceAccessor, SideBySideEditor } from 'vs/workbench/common/editor';
|
||||||
import { trackFocus, addDisposableListener, EventType } from 'vs/base/browser/dom';
|
import { trackFocus, addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||||
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||||
-import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
-import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||||
|
+import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService';
|
||||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||||
import { WorkbenchState, IWorkspaceContextService, isTemporaryWorkspace } from 'vs/platform/workspace/common/workspace';
|
import { WorkbenchState, IWorkspaceContextService, isTemporaryWorkspace } from 'vs/platform/workspace/common/workspace';
|
||||||
import { IWorkbenchLayoutService, Parts, positionToString } from 'vs/workbench/services/layout/browser/layoutService';
|
import { IWorkbenchLayoutService, Parts, positionToString } from 'vs/workbench/services/layout/browser/layoutService';
|
||||||
@@ -25,6 +24,7 @@ import { IPaneCompositePartService } fro
|
@@ -80,7 +80,7 @@ export class WorkbenchContextKeysHandler
|
||||||
import { Schemas } from 'vs/base/common/network';
|
|
||||||
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess';
|
|
||||||
import { IProductService } from 'vs/platform/product/common/productService';
|
|
||||||
+import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService';
|
|
||||||
|
|
||||||
export class WorkbenchContextKeysHandler extends Disposable {
|
|
||||||
private inputFocusedContext: IContextKey<boolean>;
|
|
||||||
@@ -77,7 +77,7 @@ export class WorkbenchContextKeysHandler
|
|
||||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
||||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||||
|
@ -121,7 +114,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
||||||
@IProductService private readonly productService: IProductService,
|
@IProductService private readonly productService: IProductService,
|
||||||
@IEditorService private readonly editorService: IEditorService,
|
@IEditorService private readonly editorService: IEditorService,
|
||||||
@IEditorResolverService private readonly editorResolverService: IEditorResolverService,
|
@IEditorResolverService private readonly editorResolverService: IEditorResolverService,
|
||||||
@@ -205,6 +205,9 @@ export class WorkbenchContextKeysHandler
|
@@ -210,6 +210,9 @@ export class WorkbenchContextKeysHandler
|
||||||
this.auxiliaryBarVisibleContext = AuxiliaryBarVisibleContext.bindTo(this.contextKeyService);
|
this.auxiliaryBarVisibleContext = AuxiliaryBarVisibleContext.bindTo(this.contextKeyService);
|
||||||
this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible(Parts.AUXILIARYBAR_PART));
|
this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible(Parts.AUXILIARYBAR_PART));
|
||||||
|
|
||||||
|
@ -144,7 +137,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions
|
||||||
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';
|
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';
|
||||||
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { ThemeIcon } from 'vs/base/common/themables';
|
import { ThemeIcon } from 'vs/base/common/themables';
|
||||||
@@ -485,13 +485,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
@@ -489,13 +489,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
||||||
id: DOWNLOAD_COMMAND_ID,
|
id: DOWNLOAD_COMMAND_ID,
|
||||||
title: DOWNLOAD_LABEL
|
title: DOWNLOAD_LABEL
|
||||||
},
|
},
|
||||||
|
|
|
@ -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.orig/lib/vscode/src/vs/server/node/serverServices.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
||||||
@@ -233,6 +233,9 @@ export async function setupServerService
|
@@ -234,6 +234,9 @@ export async function setupServerService
|
||||||
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
|
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
|
||||||
socketServer.registerChannel('extensions', channel);
|
socketServer.registerChannel('extensions', channel);
|
||||||
|
|
||||||
|
|
|
@ -10,16 +10,25 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
||||||
@@ -60,7 +60,7 @@ import { GettingStartedIndexList } from
|
@@ -10,7 +10,7 @@ import { IInstantiationService } from 'v
|
||||||
|
import { IEditorSerializer, IEditorOpenContext } from 'vs/workbench/common/editor';
|
||||||
|
import { DisposableStore, toDisposable } from 'vs/base/common/lifecycle';
|
||||||
|
import { assertIsDefined } from 'vs/base/common/types';
|
||||||
|
-import { $, addDisposableListener, append, clearNode, Dimension, reset } from 'vs/base/browser/dom';
|
||||||
|
+import { $, addDisposableListener, append, clearNode, Dimension, reset, prepend } from 'vs/base/browser/dom';
|
||||||
|
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||||
|
import { IProductService } from 'vs/platform/product/common/productService';
|
||||||
|
import { hiddenEntriesConfigurationKey, IResolvedWalkthrough, IResolvedWalkthroughStep, IWalkthroughsService } from 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService';
|
||||||
|
@@ -59,7 +59,7 @@ import { GettingStartedIndexList } from
|
||||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||||
import { getTelemetryLevel } from 'vs/platform/telemetry/common/telemetryUtils';
|
import { getTelemetryLevel } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||||
-import { WorkbenchStateContext } from 'vs/workbench/common/contextkeys';
|
-import { WorkbenchStateContext } from 'vs/workbench/common/contextkeys';
|
||||||
+import { IsEnabledCoderGettingStarted, WorkbenchStateContext } from 'vs/workbench/common/contextkeys';
|
+import { IsEnabledCoderGettingStarted, WorkbenchStateContext } from 'vs/workbench/common/contextkeys';
|
||||||
import { OpenFolderViaWorkspaceAction } from 'vs/workbench/browser/actions/workspaceActions';
|
import { OpenFolderAction, OpenFileFolderAction, OpenFolderViaWorkspaceAction } from 'vs/workbench/browser/actions/workspaceActions';
|
||||||
import { OpenRecentAction } from 'vs/workbench/browser/actions/windowActions';
|
import { OpenRecentAction } from 'vs/workbench/browser/actions/windowActions';
|
||||||
import { Toggle } from 'vs/base/browser/ui/toggle/toggle';
|
import { Toggle } from 'vs/base/browser/ui/toggle/toggle';
|
||||||
@@ -817,6 +817,72 @@ export class GettingStartedPage extends
|
@@ -770,6 +770,72 @@ export class GettingStartedPage extends
|
||||||
$('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved"))
|
$('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved"))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -92,62 +101,16 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
|
||||||
const leftColumn = $('.categories-column.categories-column-left', {},);
|
const leftColumn = $('.categories-column.categories-column-left', {},);
|
||||||
const rightColumn = $('.categories-column.categories-column-right', {},);
|
const rightColumn = $('.categories-column.categories-column-right', {},);
|
||||||
|
|
||||||
@@ -835,13 +901,23 @@ export class GettingStartedPage extends
|
@@ -819,6 +885,9 @@ export class GettingStartedPage extends
|
||||||
const layoutLists = () => {
|
recentList.setLimit(5);
|
||||||
if (gettingStartedList.itemCount) {
|
reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
||||||
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 {
|
+ if (this.contextService.contextMatchesRules(IsEnabledCoderGettingStarted)) {
|
||||||
this.container.classList.add('noWalkthroughs');
|
+ prepend(rightColumn, gettingStartedCoder)
|
||||||
- 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);
|
|
||||||
};
|
|
||||||
@@ -849,13 +925,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());
|
|
||||||
+ reset(rightColumn, gettingStartedCoder);
|
|
||||||
+ } else {
|
|
||||||
+ reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
|
||||||
+ reset(rightColumn, gettingStartedList.getDomElement());
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
setTimeout(() => this.categoriesPageScrollbar?.scanDomNode(), 50);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
featuredExtensionList.onDidChange(layoutFeaturedExtension);
|
||||||
Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css
|
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
|
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css
|
||||||
|
@ -172,7 +135,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
@@ -265,6 +265,11 @@ export interface IWorkbenchConstructionO
|
@@ -286,6 +286,11 @@ export interface IWorkbenchConstructionO
|
||||||
*/
|
*/
|
||||||
readonly isEnabledFileDownloads?: boolean
|
readonly isEnabledFileDownloads?: boolean
|
||||||
|
|
||||||
|
@ -188,19 +151,19 @@ 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.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
||||||
@@ -37,6 +37,11 @@ export interface IBrowserWorkbenchEnviro
|
@@ -39,6 +39,11 @@ export interface IBrowserWorkbenchEnviro
|
||||||
* Enable downloading files via menu actions.
|
|
||||||
*/
|
|
||||||
readonly isEnabledFileDownloads?: boolean;
|
readonly isEnabledFileDownloads?: boolean;
|
||||||
+
|
|
||||||
+ /**
|
/**
|
||||||
+ * Enable Coder's custom getting started text.
|
+ * Enable Coder's custom getting started text.
|
||||||
+ */
|
+ */
|
||||||
+ readonly isEnabledCoderGettingStarted?: boolean;
|
+ readonly isEnabledCoderGettingStarted?: boolean;
|
||||||
}
|
+
|
||||||
|
+ /**
|
||||||
export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService {
|
* Gets whether a resolver extension is expected for the environment.
|
||||||
@@ -113,6 +118,13 @@ export class BrowserWorkbenchEnvironment
|
*/
|
||||||
|
readonly expectsResolverExtension: boolean;
|
||||||
|
@@ -123,6 +128,13 @@ export class BrowserWorkbenchEnvironment
|
||||||
return this.options.isEnabledFileDownloads;
|
return this.options.isEnabledFileDownloads;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,12 +217,12 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
||||||
import { Disposable } from 'vs/base/common/lifecycle';
|
import { Disposable } from 'vs/base/common/lifecycle';
|
||||||
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } 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 { 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, 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, ActiveEditorCanToggleReadonlyContext } 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 { 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, ActiveEditorCanToggleReadonlyContext } 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 { TEXT_DIFF_EDITOR_ID, EditorInputCapabilities, SIDE_BY_SIDE_EDITOR_ID, DEFAULT_EDITOR_ASSOCIATION, EditorResourceAccessor, SideBySideEditor } from 'vs/workbench/common/editor';
|
||||||
import { trackFocus, addDisposableListener, EventType } from 'vs/base/browser/dom';
|
import { trackFocus, addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||||
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||||
@@ -207,6 +207,7 @@ export class WorkbenchContextKeysHandler
|
@@ -212,6 +212,7 @@ export class WorkbenchContextKeysHandler
|
||||||
|
|
||||||
// code-server
|
// code-server
|
||||||
IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true)
|
IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true)
|
||||||
|
|
|
@ -176,7 +176,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
|
+++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
|
||||||
@@ -69,6 +69,7 @@ import { IndexedDB } from 'vs/base/brows
|
@@ -67,6 +67,7 @@ import { IndexedDB } from 'vs/base/brows
|
||||||
import { BrowserCredentialsService } from 'vs/workbench/services/credentials/browser/credentialsService';
|
import { BrowserCredentialsService } from 'vs/workbench/services/credentials/browser/credentialsService';
|
||||||
import { IWorkspace } from 'vs/workbench/services/host/browser/browserHostService';
|
import { IWorkspace } from 'vs/workbench/services/host/browser/browserHostService';
|
||||||
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess';
|
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess';
|
||||||
|
@ -184,7 +184,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
|
||||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||||
import { DelayedLogChannel } from 'vs/workbench/services/output/common/delayedLogChannel';
|
import { DelayedLogChannel } from 'vs/workbench/services/output/common/delayedLogChannel';
|
||||||
@@ -123,6 +124,9 @@ export class BrowserMain extends Disposa
|
@@ -127,6 +128,9 @@ export class BrowserMain extends Disposa
|
||||||
// Startup
|
// Startup
|
||||||
const instantiationService = workbench.startup();
|
const instantiationService = workbench.startup();
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
@@ -255,6 +255,11 @@ export interface IWorkbenchConstructionO
|
@@ -276,6 +276,11 @@ export interface IWorkbenchConstructionO
|
||||||
*/
|
*/
|
||||||
readonly configurationDefaults?: Record<string, any>;
|
readonly configurationDefaults?: Record<string, any>;
|
||||||
|
|
||||||
|
@ -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.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
||||||
@@ -92,7 +92,14 @@ export class BrowserWorkbenchEnvironment
|
@@ -102,7 +102,14 @@ export class BrowserWorkbenchEnvironment
|
||||||
get logFile(): URI { return joinPath(this.windowLogsPath, 'window.log'); }
|
get logFile(): URI { return joinPath(this.windowLogsPath, 'window.log'); }
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
|
|
|
@ -74,10 +74,10 @@ Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/ext
|
||||||
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
|
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
|
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||||
-import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts';
|
-import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts';
|
||||||
|
import { TargetPlatform } from 'vs/platform/extensions/common/extensions';
|
||||||
|
|
||||||
const WEB_EXTENSION_RESOURCE_END_POINT = 'web-extension-resource';
|
const WEB_EXTENSION_RESOURCE_END_POINT = 'web-extension-resource';
|
||||||
|
@@ -77,7 +76,7 @@ export abstract class AbstractExtensionR
|
||||||
@@ -60,7 +59,7 @@ export abstract class AbstractExtensionR
|
|
||||||
private readonly _environmentService: IEnvironmentService,
|
private readonly _environmentService: IEnvironmentService,
|
||||||
private readonly _configurationService: IConfigurationService,
|
private readonly _configurationService: IConfigurationService,
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -42,17 +42,8 @@ Index: code-server/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityReso
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts
|
--- code-server.orig/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts
|
+++ code-server/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts
|
||||||
@@ -11,7 +11,7 @@ import { StopWatch } from 'vs/base/commo
|
@@ -33,7 +33,7 @@ export class RemoteAuthorityResolverServ
|
||||||
import { URI } from 'vs/base/common/uri';
|
isWorkbenchOptionsBasedResolution: boolean,
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
|
||||||
import { IProductService } from 'vs/platform/product/common/productService';
|
|
||||||
-import { IRemoteAuthorityResolverService, IRemoteConnectionData, ResolvedAuthority, ResolverResult, getRemoteAuthorityPrefix } from 'vs/platform/remote/common/remoteAuthorityResolver';
|
|
||||||
+import { IRemoteAuthorityResolverService, IRemoteConnectionData, ResolvedAuthority, ResolvedOptions, ResolverResult, getRemoteAuthorityPrefix } from 'vs/platform/remote/common/remoteAuthorityResolver';
|
|
||||||
import { getRemoteServerRootPath, parseAuthorityWithOptionalPort } from 'vs/platform/remote/common/remoteHosts';
|
|
||||||
|
|
||||||
export class RemoteAuthorityResolverService extends Disposable implements IRemoteAuthorityResolverService {
|
|
||||||
@@ -29,7 +29,7 @@ export class RemoteAuthorityResolverServ
|
|
||||||
constructor(
|
|
||||||
connectionToken: Promise<string> | string | undefined,
|
connectionToken: Promise<string> | string | undefined,
|
||||||
resourceUriProvider: ((uri: URI) => URI) | undefined,
|
resourceUriProvider: ((uri: URI) => URI) | undefined,
|
||||||
- @IProductService productService: IProductService,
|
- @IProductService productService: IProductService,
|
||||||
|
@ -60,7 +51,7 @@ Index: code-server/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityReso
|
||||||
@ILogService private readonly _logService: ILogService,
|
@ILogService private readonly _logService: ILogService,
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
@@ -75,9 +75,14 @@ export class RemoteAuthorityResolverServ
|
@@ -84,9 +84,14 @@ export class RemoteAuthorityResolverServ
|
||||||
const connectionToken = await Promise.resolve(this._connectionTokens.get(authority) || this._connectionToken);
|
const connectionToken = await Promise.resolve(this._connectionTokens.get(authority) || this._connectionToken);
|
||||||
performance.mark(`code/didResolveConnectionToken/${authorityPrefix}`);
|
performance.mark(`code/didResolveConnectionToken/${authorityPrefix}`);
|
||||||
this._logService.info(`Resolved connection token (${authorityPrefix}) after ${sw.elapsed()} ms`);
|
this._logService.info(`Resolved connection token (${authorityPrefix}) after ${sw.elapsed()} ms`);
|
||||||
|
@ -71,9 +62,9 @@ Index: code-server/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityReso
|
||||||
+ }
|
+ }
|
||||||
const defaultPort = (/^https:/.test(window.location.href) ? 443 : 80);
|
const defaultPort = (/^https:/.test(window.location.href) ? 443 : 80);
|
||||||
const { host, port } = parseAuthorityWithOptionalPort(authority, defaultPort);
|
const { host, port } = parseAuthorityWithOptionalPort(authority, defaultPort);
|
||||||
- const result: ResolverResult = { authority: { authority, host: host, port: port, connectionToken } };
|
- const result: ResolverResult = { authority: { authority, connectTo: new WebSocketRemoteConnection(host, port), connectionToken } };
|
||||||
+ const result: ResolverResult = { authority: { authority, host: host, port: port, connectionToken }, options };
|
+ const result: ResolverResult = { authority: { authority, connectTo: new WebSocketRemoteConnection(host, port), connectionToken }, options };
|
||||||
RemoteAuthorities.set(authority, result.authority.host, result.authority.port);
|
RemoteAuthorities.set(authority, host, port);
|
||||||
this._cache.set(authority, result);
|
this._cache.set(authority, result);
|
||||||
this._onDidChangeConnectionData.fire();
|
this._onDidChangeConnectionData.fire();
|
||||||
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
|
@ -92,7 +83,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalE
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
|
||||||
@@ -383,7 +383,7 @@ export async function createTerminalEnvi
|
@@ -384,7 +384,7 @@ export async function createTerminalEnvi
|
||||||
|
|
||||||
// Sanitize the environment, removing any undesirable VS Code and Electron environment
|
// Sanitize the environment, removing any undesirable VS Code and Electron environment
|
||||||
// variables
|
// variables
|
||||||
|
@ -113,29 +104,26 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
||||||
|
|
||||||
interface ICredential {
|
interface ICredential {
|
||||||
service: string;
|
service: string;
|
||||||
@@ -511,6 +512,42 @@ function doCreateUri(path: string, query
|
@@ -505,6 +506,39 @@ function doCreateUri(path: string, query
|
||||||
} : undefined,
|
settingsSyncOptions: config.settingsSyncOptions ? { enabled: config.settingsSyncOptions.enabled, } : undefined,
|
||||||
workspaceProvider: WorkspaceProvider.create(config),
|
workspaceProvider: WorkspaceProvider.create(config),
|
||||||
urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
|
urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
|
||||||
- credentialsProvider: config.remoteAuthority ? undefined : new LocalStorageCredentialsProvider() // with a remote, we don't use a local credentials provider
|
- credentialsProvider: config.remoteAuthority ? undefined /* with a remote, we don't use a local credentials provider */ : new LocalStorageCredentialsProvider()
|
||||||
+ credentialsProvider: config.remoteAuthority ? undefined : new LocalStorageCredentialsProvider(), // with a remote, we don't use a local credentials provider
|
+ credentialsProvider: config.remoteAuthority ? undefined /* with a remote, we don't use a local credentials provider */ : new LocalStorageCredentialsProvider(),
|
||||||
+ resolveExternalUri: (uri: URI): Promise<URI> => {
|
+ resolveExternalUri: (uri: URI): Promise<URI> => {
|
||||||
+ let resolvedUri = uri
|
+ let resolvedUri = uri
|
||||||
+ const localhostMatch = extractLocalHostUriMetaDataForPortMapping(resolvedUri)
|
+ const localhostMatch = extractLocalHostUriMetaDataForPortMapping(resolvedUri)
|
||||||
+
|
|
||||||
+ if (localhostMatch && resolvedUri.authority !== location.host) {
|
+ if (localhostMatch && resolvedUri.authority !== location.host) {
|
||||||
+ if (config.productConfiguration && config.productConfiguration.proxyEndpointTemplate) {
|
+ if (config.productConfiguration && config.productConfiguration.proxyEndpointTemplate) {
|
||||||
+ const renderedTemplate = config.productConfiguration.proxyEndpointTemplate
|
+ const renderedTemplate = config.productConfiguration.proxyEndpointTemplate
|
||||||
+ .replace('{{port}}', localhostMatch.port.toString())
|
+ .replace('{{port}}', localhostMatch.port.toString())
|
||||||
+ .replace('{{host}}', window.location.host)
|
+ .replace('{{host}}', window.location.host)
|
||||||
+
|
|
||||||
+ resolvedUri = URI.parse(new URL(renderedTemplate, window.location.href).toString())
|
+ resolvedUri = URI.parse(new URL(renderedTemplate, window.location.href).toString())
|
||||||
+ } else {
|
+ } else {
|
||||||
+ throw new Error(`Failed to resolve external URI: ${uri.toString()}. Could not determine base url because productConfiguration missing.`)
|
+ throw new Error(`Failed to resolve external URI: ${uri.toString()}. Could not determine base url because productConfiguration missing.`)
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+ // If not localhost, return unmodified.
|
||||||
+ // If not localhost, return unmodified
|
|
||||||
+ return Promise.resolve(resolvedUri)
|
+ return Promise.resolve(resolvedUri)
|
||||||
+ },
|
+ },
|
||||||
+ tunnelProvider: {
|
+ tunnelProvider: {
|
||||||
|
|
|
@ -10,7 +10,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
|
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
|
||||||
+++ code-server/lib/vscode/build/gulpfile.reh.js
|
+++ code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
@@ -197,8 +197,7 @@ function packageTask(type, platform, arc
|
@@ -199,8 +199,7 @@ function packageTask(type, platform, arc
|
||||||
|
|
||||||
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
|
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
|
||||||
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); }))
|
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); }))
|
||||||
|
@ -20,7 +20,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
|
|
||||||
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
|
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
|
||||||
const isUIExtension = (manifest) => {
|
const isUIExtension = (manifest) => {
|
||||||
@@ -237,9 +236,9 @@ function packageTask(type, platform, arc
|
@@ -239,9 +238,9 @@ function packageTask(type, platform, arc
|
||||||
.map(name => `.build/extensions/${name}/**`);
|
.map(name => `.build/extensions/${name}/**`);
|
||||||
|
|
||||||
const extensions = gulp.src(extensionPaths, { base: '.build', dot: true });
|
const extensions = gulp.src(extensionPaths, { base: '.build', dot: true });
|
||||||
|
@ -32,7 +32,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
|
|
||||||
let version = packageJson.version;
|
let version = packageJson.version;
|
||||||
const quality = product.quality;
|
const quality = product.quality;
|
||||||
@@ -394,7 +393,7 @@ function tweakProductForServerWeb(produc
|
@@ -387,7 +386,7 @@ function tweakProductForServerWeb(produc
|
||||||
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
|
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
|
||||||
optimizeTask,
|
optimizeTask,
|
||||||
util.rimraf(`out-vscode-${type}-min`),
|
util.rimraf(`out-vscode-${type}-min`),
|
||||||
|
|
|
@ -31,10 +31,10 @@ Index: code-server/lib/vscode/src/vs/workbench/api/node/extHostExtensionService.
|
||||||
import { realpathSync } from 'vs/base/node/extpath';
|
import { realpathSync } from 'vs/base/node/extpath';
|
||||||
import { ExtHostConsoleForwarder } from 'vs/workbench/api/node/extHostConsoleForwarder';
|
import { ExtHostConsoleForwarder } from 'vs/workbench/api/node/extHostConsoleForwarder';
|
||||||
+import { IExtHostWorkspace } from '../common/extHostWorkspace';
|
+import { IExtHostWorkspace } from '../common/extHostWorkspace';
|
||||||
|
import { ExtHostDiskFileSystemProvider } from 'vs/workbench/api/node/extHostDiskFileSystemProvider';
|
||||||
|
|
||||||
class NodeModuleRequireInterceptor extends RequireInterceptor {
|
class NodeModuleRequireInterceptor extends RequireInterceptor {
|
||||||
|
@@ -83,6 +86,52 @@ export class ExtHostExtensionService ext
|
||||||
@@ -79,6 +82,52 @@ export class ExtHostExtensionService ext
|
|
||||||
await interceptor.install();
|
await interceptor.install();
|
||||||
performance.mark('code/extHost/didInitAPI');
|
performance.mark('code/extHost/didInitAPI');
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
||||||
import { NullPolicyService } from 'vs/platform/policy/common/policy';
|
import { NullPolicyService } from 'vs/platform/policy/common/policy';
|
||||||
import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender';
|
import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender';
|
||||||
import { LoggerService } from 'vs/platform/log/node/loggerService';
|
import { LoggerService } from 'vs/platform/log/node/loggerService';
|
||||||
@@ -150,10 +151,13 @@ export async function setupServerService
|
@@ -151,10 +152,13 @@ export async function setupServerService
|
||||||
let oneDsAppender: ITelemetryAppender = NullAppender;
|
let oneDsAppender: ITelemetryAppender = NullAppender;
|
||||||
const isInternal = isInternalTelemetry(productService, configurationService);
|
const isInternal = isInternalTelemetry(productService, configurationService);
|
||||||
if (supportsTelemetry(productService, environmentService)) {
|
if (supportsTelemetry(productService, environmentService)) {
|
||||||
|
|
|
@ -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.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
||||||
@@ -215,7 +215,7 @@ export class BrowserWorkbenchEnvironment
|
@@ -225,7 +225,7 @@ export class BrowserWorkbenchEnvironment
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
get webviewExternalEndpoint(): string {
|
get webviewExternalEndpoint(): string {
|
||||||
|
|
Loading…
Reference in New Issue