diff --git a/ci/build/build-vscode.sh b/ci/build/build-vscode.sh index 24836852..b0cf0529 100755 --- a/ci/build/build-vscode.sh +++ b/ci/build/build-vscode.sh @@ -79,7 +79,10 @@ main() { "newsletterSignupUrl": "https://www.research.net/r/vsc-newsletter", "linkProtectionTrustedDomains": [ "https://open-vsx.org" - ] + ], + "aiConfig": { + "ariaKey": "code-server" + } } EOF ) > product.json diff --git a/lib/vscode b/lib/vscode index a44493ae..74b1f979 160000 --- a/lib/vscode +++ b/lib/vscode @@ -1 +1 @@ -Subproject commit a44493aed3c9ccdec18a4bc00869403736b29c64 +Subproject commit 74b1f979648cc44d385a2286793c226e611f59e7 diff --git a/patches/safari-console.diff b/patches/safari-console.diff deleted file mode 100644 index 7164d03f..00000000 --- a/patches/safari-console.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts -=================================================================== ---- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts -+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts -@@ -286,7 +286,7 @@ export class XtermTerminal extends Dispo - } - - private _shouldLoadCanvas(): boolean { -- return (this._configHelper.config.gpuAcceleration === 'auto' && (XtermTerminal._suggestedRendererType === undefined || XtermTerminal._suggestedRendererType === 'canvas')) || this._configHelper.config.gpuAcceleration === 'canvas'; -+ return !isSafari && (this._configHelper.config.gpuAcceleration === 'auto' && (XtermTerminal._suggestedRendererType === undefined || XtermTerminal._suggestedRendererType === 'canvas')) || this._configHelper.config.gpuAcceleration === 'canvas'; - } - - forceRedraw() { diff --git a/patches/series b/patches/series index 8e6f45f8..e5289b4b 100644 --- a/patches/series +++ b/patches/series @@ -20,4 +20,3 @@ telemetry.diff display-language.diff cli-window-open.diff exec-argv.diff -safari-console.diff diff --git a/patches/telemetry.diff b/patches/telemetry.diff index 60643609..ec51ab9c 100644 --- a/patches/telemetry.diff +++ b/patches/telemetry.diff @@ -1,7 +1,5 @@ Add support for telemetry endpoint -Contains some fixes included in https://github.com/microsoft/vscode/commit/b108bc8294ce920fcf2ee8d53f97c3bcf3316e1c - To test: 1. Look inside a build of code-server, inside `lib/vscode/vs/server/node/server.main.js` 2. Search for a `JSON.stringify` near `TelemetryClient` @@ -89,82 +87,6 @@ Index: code-server/lib/vscode/src/vs/server/node/telemetryClient.ts + } catch (error) {} + } +} -Index: code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts -=================================================================== ---- code-server.orig/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts -+++ code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts -@@ -15,7 +15,7 @@ import { ClassifiedEvent, IGDPRProperty, - import { ITelemetryData, ITelemetryInfo, ITelemetryService, TelemetryLevel, TELEMETRY_SETTING_ID } from 'vs/platform/telemetry/common/telemetry'; - import { TelemetryLogAppender } from 'vs/platform/telemetry/common/telemetryLogAppender'; - import { ITelemetryServiceConfig, TelemetryService as BaseTelemetryService } from 'vs/platform/telemetry/common/telemetryService'; --import { isInternalTelemetry, ITelemetryAppender, NullTelemetryService, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils'; -+import { getTelemetryLevel, isInternalTelemetry, ITelemetryAppender, NullTelemetryService, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils'; - import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'; - import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; - import { resolveWorkbenchCommonProperties } from 'vs/workbench/services/telemetry/browser/workbenchCommonProperties'; -@@ -24,7 +24,7 @@ export class TelemetryService extends Di - - declare readonly _serviceBrand: undefined; - -- private impl: ITelemetryService; -+ private impl: ITelemetryService = NullTelemetryService; - public readonly sendErrorTelemetry = true; - - constructor( -@@ -37,11 +37,7 @@ export class TelemetryService extends Di - ) { - super(); - -- if (supportsTelemetry(productService, environmentService) && productService.aiConfig?.ariaKey) { -- this.impl = this.initializeService(environmentService, loggerService, configurationService, storageService, productService, remoteAgentService); -- } else { -- this.impl = NullTelemetryService; -- } -+ this.impl = this.initializeService(environmentService, loggerService, configurationService, storageService, productService, remoteAgentService); - - // When the level changes it could change from off to on and we want to make sure telemetry is properly intialized - this._register(configurationService.onDidChangeConfiguration(e => { -@@ -64,23 +60,28 @@ export class TelemetryService extends Di - productService: IProductService, - remoteAgentService: IRemoteAgentService - ) { -- const telemetrySupported = supportsTelemetry(productService, environmentService) && productService.aiConfig?.ariaKey; -- if (telemetrySupported && this.impl === NullTelemetryService && this.telemetryLevel.value !== TelemetryLevel.NONE) { -+ const telemetrySupported = supportsTelemetry(productService, environmentService); -+ if (telemetrySupported && getTelemetryLevel(configurationService) !== TelemetryLevel.NONE && this.impl === NullTelemetryService) { - // If remote server is present send telemetry through that, else use the client side appender - const appenders = []; - const isInternal = isInternalTelemetry(productService, configurationService); -- const telemetryProvider: ITelemetryAppender = remoteAgentService.getConnection() !== null ? { log: remoteAgentService.logTelemetry.bind(remoteAgentService), flush: remoteAgentService.flushTelemetry.bind(remoteAgentService) } : new OneDataSystemWebAppender(isInternal, 'monacoworkbench', null, productService.aiConfig?.ariaKey); -- appenders.push(telemetryProvider); -- appenders.push(new TelemetryLogAppender(loggerService, environmentService)); -- const config: ITelemetryServiceConfig = { -- appenders, -- commonProperties: resolveWorkbenchCommonProperties(storageService, productService.commit, productService.version, isInternal, environmentService.remoteAuthority, productService.embedderIdentifier, productService.removeTelemetryMachineId, environmentService.options && environmentService.options.resolveCommonTelemetryProperties), -- sendErrorTelemetry: this.sendErrorTelemetry, -- }; -+ const telemetryProvider: ITelemetryAppender | undefined = remoteAgentService.getConnection() !== null ? { log: remoteAgentService.logTelemetry.bind(remoteAgentService), flush: remoteAgentService.flushTelemetry.bind(remoteAgentService) } : productService.aiConfig?.ariaKey ? new OneDataSystemWebAppender(isInternal, 'monacoworkbench', null, productService.aiConfig?.ariaKey) : undefined; -+ if (telemetryProvider) { -+ appenders.push(telemetryProvider); -+ appenders.push(new TelemetryLogAppender(loggerService, environmentService)); -+ const config: ITelemetryServiceConfig = { -+ appenders, -+ commonProperties: resolveWorkbenchCommonProperties(storageService, productService.commit, productService.version, isInternal, environmentService.remoteAuthority, productService.embedderIdentifier, productService.removeTelemetryMachineId, environmentService.options && environmentService.options.resolveCommonTelemetryProperties), -+ sendErrorTelemetry: this.sendErrorTelemetry, -+ }; -+ -+ return this._register(new BaseTelemetryService(config, configurationService, productService)); -+ } else { -+ return this.impl; -+ } - -- return this._register(new BaseTelemetryService(config, configurationService, productService)); - } -- return NullTelemetryService; -+ return this.impl; - } - - setExperimentProperty(name: string, value: string): void { Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts