diff --git a/lib/vscode b/lib/vscode index fdb988331..f1b07bd25 160000 --- a/lib/vscode +++ b/lib/vscode @@ -1 +1 @@ -Subproject commit fdb98833154679dbaa7af67a5a29fe19e55c2b73 +Subproject commit f1b07bd25dfad64b0167beb15359ae573aecd2cc diff --git a/patches/disable-downloads.diff b/patches/disable-downloads.diff index 10565d899..f3d28ad92 100644 --- a/patches/disable-downloads.diff +++ b/patches/disable-downloads.diff @@ -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/lib/vscode/src/vs/workbench/browser/web.api.ts -@@ -288,6 +288,11 @@ export interface IWorkbenchConstructionO +@@ -281,6 +281,11 @@ export interface IWorkbenchConstructionO */ readonly userDataPath?: string diff --git a/patches/display-language.diff b/patches/display-language.diff index f57c40b87..a4955e6e8 100644 --- a/patches/display-language.diff +++ b/patches/display-language.diff @@ -21,15 +21,24 @@ 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 -@@ -231,6 +231,9 @@ export async function setupServerService +@@ -11,7 +11,7 @@ import * as path from 'vs/base/common/pa + import { IURITransformer } from 'vs/base/common/uriIpc'; + import { getMachineId } from 'vs/base/node/id'; + import { Promises } from 'vs/base/node/pfs'; +-import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, StaticRouter } from 'vs/base/parts/ipc/common/ipc'; ++import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, ProxyChannel, StaticRouter } from 'vs/base/parts/ipc/common/ipc'; + import { ProtocolConstants } from 'vs/base/parts/ipc/common/ipc.net'; + import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; + import { ConfigurationService } from 'vs/platform/configuration/common/configurationService'; +@@ -227,6 +227,9 @@ export async function setupServerService const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)); socketServer.registerChannel('extensions', channel); -+ const languagePackChannel = ProxyChannel.fromService(accessor.get(ILanguagePackService)); ++ const languagePackChannel = ProxyChannel.fromService(accessor.get(ILanguagePackService), disposables); + socketServer.registerChannel('languagePacks', languagePackChannel); + - const credentialsChannel = ProxyChannel.fromService(accessor.get(ICredentialsMainService)); - socketServer.registerChannel('credentials', credentialsChannel); + // clean up extensions folder + remoteExtensionsScanner.whenExtensionsReady().then(() => extensionManagementService.cleanUp()); Index: code-server/lib/vscode/src/vs/base/common/platform.ts =================================================================== @@ -252,7 +261,7 @@ Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/workbench.web.main.ts +++ code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts -@@ -52,7 +52,7 @@ import 'vs/workbench/services/dialogs/br +@@ -50,7 +50,7 @@ import 'vs/workbench/services/dialogs/br import 'vs/workbench/services/host/browser/browserHostService'; import 'vs/workbench/services/lifecycle/browser/lifecycleService'; import 'vs/workbench/services/clipboard/browser/clipboardService'; @@ -261,7 +270,7 @@ Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts import 'vs/workbench/services/path/browser/pathService'; import 'vs/workbench/services/themes/browser/browserHostColorSchemeService'; import 'vs/workbench/services/encryption/browser/encryptionService'; -@@ -117,8 +117,9 @@ registerSingleton(ILanguagePackService, +@@ -115,8 +115,9 @@ registerSingleton(ILanguagePackService, // Logs import 'vs/workbench/contrib/logs/browser/logs.contribution'; diff --git a/patches/getting-started.diff b/patches/getting-started.diff index 47e598202..c4d81d63c 100644 --- a/patches/getting-started.diff +++ b/patches/getting-started.diff @@ -135,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/lib/vscode/src/vs/workbench/browser/web.api.ts -@@ -293,6 +293,11 @@ export interface IWorkbenchConstructionO +@@ -286,6 +286,11 @@ export interface IWorkbenchConstructionO */ readonly isEnabledFileDownloads?: boolean diff --git a/patches/integration.diff b/patches/integration.diff index 868f18f94..bb91e0a7a 100644 --- a/patches/integration.diff +++ b/patches/integration.diff @@ -176,15 +176,15 @@ 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/lib/vscode/src/vs/workbench/browser/web.main.ts -@@ -67,6 +67,7 @@ import { IndexedDB } from 'vs/base/brows - import { BrowserCredentialsService } from 'vs/workbench/services/credentials/browser/credentialsService'; +@@ -65,6 +65,7 @@ import { mixin, safeStringify } from 'vs + import { IndexedDB } from 'vs/base/browser/indexedDB'; import { IWorkspace } from 'vs/workbench/services/host/browser/browserHostService'; import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess'; +import { CodeServerClient } from 'vs/workbench/browser/client'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { DelayedLogChannel } from 'vs/workbench/services/output/common/delayedLogChannel'; -@@ -132,6 +133,9 @@ export class BrowserMain extends Disposa +@@ -130,6 +131,9 @@ export class BrowserMain extends Disposa // Startup const instantiationService = workbench.startup(); diff --git a/patches/local-storage.diff b/patches/local-storage.diff index 2a183bb18..7b604837d 100644 --- a/patches/local-storage.diff +++ b/patches/local-storage.diff @@ -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/lib/vscode/src/vs/workbench/browser/web.api.ts -@@ -283,6 +283,11 @@ export interface IWorkbenchConstructionO +@@ -276,6 +276,11 @@ export interface IWorkbenchConstructionO */ readonly configurationDefaults?: Record; diff --git a/patches/proposed-api.diff b/patches/proposed-api.diff index b5ab3bdb1..03d61aecf 100644 --- a/patches/proposed-api.diff +++ b/patches/proposed-api.diff @@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extens =================================================================== --- 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 -@@ -260,10 +260,7 @@ function extensionDescriptionArrayToMap( +@@ -282,10 +282,7 @@ function extensionDescriptionArrayToMap( } export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean { diff --git a/patches/safari.diff b/patches/safari.diff index 5feb7bc78..2d31b8f7b 100644 --- a/patches/safari.diff +++ b/patches/safari.diff @@ -66,3 +66,17 @@ Index: code-server/lib/vscode/build/lib/tsb/transpiler.ts loose: false, minify: { compress: false, +Index: code-server/lib/vscode/src/vs/base/common/tfIdf.ts +=================================================================== +--- code-server.orig/lib/vscode/src/vs/base/common/tfIdf.ts ++++ code-server/lib/vscode/src/vs/base/common/tfIdf.ts +@@ -88,8 +88,7 @@ export class TfIdfCalculator { + for (const [word] of input.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)) { + yield normalize(word); + +- // eslint-disable-next-line local/code-no-look-behind-regex +- const camelParts = word.split(/(?<=[a-z])(?=[A-Z])/g); ++ const camelParts = word.split(/(?=[A-Z])/g); + if (camelParts.length > 1) { + for (const part of camelParts) { + // Require at least 3 letters in the parts of a camel case word diff --git a/patches/telemetry.diff b/patches/telemetry.diff index 4d54482fc..c1da09569 100644 --- a/patches/telemetry.diff +++ b/patches/telemetry.diff @@ -12,23 +12,23 @@ 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 -@@ -67,6 +67,7 @@ import { IExtensionsScannerService } fro +@@ -65,6 +65,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'; -+import { TelemetryClient } from "vs/server/node/telemetryClient"; ++import { TelemetryClient } from 'vs/server/node/telemetryClient'; import { NullPolicyService } from 'vs/platform/policy/common/policy'; import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender'; import { LoggerService } from 'vs/platform/log/node/loggerService'; -@@ -150,7 +151,10 @@ export async function setupServerService +@@ -148,7 +149,10 @@ export async function setupServerService let oneDsAppender: ITelemetryAppender = NullAppender; const isInternal = isInternalTelemetry(productService, configurationService); if (supportsTelemetry(productService, environmentService)) { -- if (productService.aiConfig && productService.aiConfig.ariaKey) { +- if (!isLoggingOnly(productService, environmentService) && productService.aiConfig?.ariaKey) { + const telemetryEndpoint = process.env.CS_TELEMETRY_URL || "https://v1.telemetry.coder.com/track"; + if (telemetryEndpoint) { + oneDsAppender = new OneDataSystemAppender(requestService, false, eventPrefix, null, () => new TelemetryClient(telemetryEndpoint)); -+ } else if (productService.aiConfig && productService.aiConfig.ariaKey) { ++ } else if (!isLoggingOnly(productService, environmentService) && productService.aiConfig?.ariaKey) { oneDsAppender = new OneDataSystemAppender(requestService, isInternal, eventPrefix, null, productService.aiConfig.ariaKey); disposables.add(toDisposable(() => oneDsAppender?.flush())); // Ensure the AI appender is disposed so that it flushes remaining data }