From d5bd9b8b5a5a08ca22a64963ec91d6cf6e2251a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Mon, 6 May 2024 12:49:26 +0200 Subject: [PATCH 01/10] refactor: extract code --- src/service-override/tools/editor.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/service-override/tools/editor.ts b/src/service-override/tools/editor.ts index 7c5727a1..b190b4c1 100644 --- a/src/service-override/tools/editor.ts +++ b/src/service-override/tools/editor.ts @@ -545,10 +545,22 @@ export class MonacoDelegateEditorGroupsService e const handleCodeEditor = (editor: ICodeEditor) => { if (editor instanceof StandaloneEditor) { let timeout: number | undefined + const updateActiveGroup = (editor: StandaloneEditor | undefined) => { + const newActiveGroup = editor != null ? this.additionalGroups.find(group => group.editor === editor) : undefined + if (this.activeGroupOverride !== newActiveGroup) { + this.activeGroupOverride = newActiveGroup + this._onDidChangeActiveGroup.fire(this.activeGroup) + } + } + const remoteActiveGroup = (editor: StandaloneEditor | undefined) => { + if (this.activeGroupOverride === this.additionalGroups.find(group => group.editor === editor)) { + updateActiveGroup(undefined) + } + } + const onEditorFocused = () => { if (timeout != null) window.clearTimeout(timeout) - this.activeGroupOverride = this.additionalGroups.find(group => group.editor === editor) - this._onDidChangeActiveGroup.fire(this.activeGroup) + updateActiveGroup(editor) } const onEditorBlurred = () => { if (timeout != null) window.clearTimeout(timeout) @@ -556,10 +568,7 @@ export class MonacoDelegateEditorGroupsService e // It happens when the focus goes from the editor itself to the overflow widgets dom node timeout = window.setTimeout(() => { timeout = undefined - if (this.activeGroupOverride === this.additionalGroups.find(group => group.editor === editor)) { - this.activeGroupOverride = undefined - this._onDidChangeActiveGroup.fire(this.activeGroup) - } + remoteActiveGroup(editor) }, 100) } editor.onDidFocusEditorText(onEditorFocused) From 955b09ae7da490e44c4c73b1068eec46ac183eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Mon, 6 May 2024 12:49:35 +0200 Subject: [PATCH 02/10] fix: properly handle editor disposal --- src/service-override/tools/editor.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/service-override/tools/editor.ts b/src/service-override/tools/editor.ts index b190b4c1..336e521b 100644 --- a/src/service-override/tools/editor.ts +++ b/src/service-override/tools/editor.ts @@ -571,6 +571,9 @@ export class MonacoDelegateEditorGroupsService e remoteActiveGroup(editor) }, 100) } + editor.onDidDispose(() => { + remoteActiveGroup(editor) + }) editor.onDidFocusEditorText(onEditorFocused) editor.onDidFocusEditorWidget(onEditorFocused) editor.onDidBlurEditorText(onEditorBlurred) From 20d408aff73bb2ab14b0d7512b8ce981f0ee5ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Mon, 6 May 2024 12:50:55 +0200 Subject: [PATCH 03/10] fix: never set the active goup to null when the delegate is empty anyway it fixes the global command palette on standalone editors by making visible the editor commands --- src/service-override/editor.ts | 1 + src/service-override/tools/editor.ts | 4 ++-- src/service-override/views.ts | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/service-override/editor.ts b/src/service-override/editor.ts index 6ae36a3a..fc239da2 100644 --- a/src/service-override/editor.ts +++ b/src/service-override/editor.ts @@ -131,6 +131,7 @@ class MonacoEditorGroupsService extends MonacoDelegateEditorGroupsService e public additionalGroups: StandaloneEditorGroup[] = [] public activeGroupOverride: StandaloneEditorGroup | undefined = undefined - constructor (protected delegate: D, @IInstantiationService instantiationService: IInstantiationService) { + constructor (protected delegate: D, emptyDelegate: boolean, @IInstantiationService instantiationService: IInstantiationService) { super() setTimeout(() => { const codeEditorService = StandaloneServices.get(ICodeEditorService) @@ -553,7 +553,7 @@ export class MonacoDelegateEditorGroupsService e } } const remoteActiveGroup = (editor: StandaloneEditor | undefined) => { - if (this.activeGroupOverride === this.additionalGroups.find(group => group.editor === editor)) { + if (!emptyDelegate && this.activeGroupOverride === this.additionalGroups.find(group => group.editor === editor)) { updateActiveGroup(undefined) } } diff --git a/src/service-override/views.ts b/src/service-override/views.ts index d45236f9..399133b4 100644 --- a/src/service-override/views.ts +++ b/src/service-override/views.ts @@ -168,6 +168,7 @@ class MonacoEditorParts extends MonacoDelegateEditorGroupsService i constructor (@IInstantiationService instantiationService: IInstantiationService) { super( instantiationService.createInstance(EditorParts), + false, instantiationService ) } From 46b835d80c6d335e8410ddc72d599cbbc5ad2d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Mon, 6 May 2024 16:28:48 +0200 Subject: [PATCH 04/10] lib!: update to VSCode 1.89 --- package-lock.json | 81 +++++++++---------- package.json | 28 +++---- src/localExtensionHost.ts | 2 +- src/missing-services.ts | 68 ++++++++++------ src/service-override/chat.ts | 12 +-- src/service-override/editor.ts | 4 + src/service-override/terminal.ts | 6 +- src/service-override/tools/editor.ts | 18 ++++- ...fix-allow-importing-vscode-oniguruma.patch | 4 +- ...o-register-a-locale-with-translation.patch | 22 +++-- ...-feat-add-static-asset-url-mechanism.patch | 16 ++-- ...ply-style-only-on-standalone-editors.patch | 78 +++++++++--------- .../0016-fix-use-existing-method.patch | 4 +- vscode-paches/0017-refactor-split-code.patch | 4 +- ...ode-already-done-in-EditorFeaturesIn.patch | 8 +- ...imports-by-regular-esm-dynamic-impor.patch | 32 ++++---- ...update-import-syntax-for-node-in-ESM.patch | 4 +- ...-classes-and-make-some-methods-acces.patch | 30 +++---- ...improve-extension-contribution-types.patch | 5 +- .../0023-fix-fix-dependency-injection.patch | 4 +- ...y-run-some-code-if-inside-the-worker.patch | 2 +- ...ome-modules-to-be-able-to-import-the.patch | 50 ++++++------ ...t-only-apply-style-on-specific-class.patch | 12 +-- ...FileAccess.asBrowserUri-at-the-root-.patch | 12 +-- ...anup-remove-some-checks-and-warnings.patch | 6 +- ...-supported-as-soon-as-there-is-a-reg.patch | 6 +- ...move-code-that-we-will-run-ourselves.patch | 20 ++++- ...al-view-if-there-is-no-backend-avail.patch | 4 +- ...on-from-service-file-to-contribution.patch | 24 +++--- ...efactor-split-workbench-contribution.patch | 6 +- ...ode-to-be-able-to-import-only-requir.patch | 6 +- 31 files changed, 316 insertions(+), 262 deletions(-) diff --git a/package-lock.json b/package-lock.json index a3231762..5a19185a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,17 +16,17 @@ "@vscode/proxy-agent": "^0.19.0", "@vscode/ripgrep": "^1.15.9", "@vscode/spdlog": "^0.15.0", - "@vscode/vscode-languagedetection": "npm:@codingame/vscode-languagedetection@1.0.23", + "@vscode/vscode-languagedetection": "1.0.21", "@vscode/windows-process-tree": "^0.6.0", "@vscode/windows-registry": "^1.1.0", - "@xterm/addon-canvas": "0.7.0-beta.12", - "@xterm/addon-image": "0.8.0-beta.12", - "@xterm/addon-search": "0.15.0-beta.12", - "@xterm/addon-serialize": "0.13.0-beta.12", - "@xterm/addon-unicode11": "0.8.0-beta.12", - "@xterm/addon-webgl": "0.18.0-beta.12", - "@xterm/headless": "5.5.0-beta.12", - "@xterm/xterm": "5.5.0-beta.12", + "@xterm/addon-canvas": "0.8.0-beta.17", + "@xterm/addon-image": "0.9.0-beta.17", + "@xterm/addon-search": "0.16.0-beta.17", + "@xterm/addon-serialize": "0.14.0-beta.17", + "@xterm/addon-unicode11": "0.9.0-beta.17", + "@xterm/addon-webgl": "0.19.0-beta.17", + "@xterm/headless": "5.6.0-beta.17", + "@xterm/xterm": "5.6.0-beta.17", "cookie": "^0.4.0", "css-url-parser": "^1.1.3", "jschardet": "3.0.0", @@ -61,7 +61,7 @@ "@types/mime-types": "^2.1.4", "@types/node": "18.19.8", "@types/semver": "^7.5.8", - "@types/vscode": "~1.88.0", + "@types/vscode": "~1.89.0", "@types/vscode-marked": "npm:@types/marked@^3.0.2", "@types/vscode-semver": "npm:@types/semver@=5.5.0", "@types/yargs": "^17.0.32", @@ -3572,9 +3572,9 @@ "dev": true }, "node_modules/@types/vscode": { - "version": "1.88.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.88.0.tgz", - "integrity": "sha512-rWY+Bs6j/f1lvr8jqZTyp5arRMfovdxolcqGi+//+cPDOh8SBvzXH90e7BiSXct5HJ9HGW6jATchbRTpTJpEkw==", + "version": "1.89.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.89.0.tgz", + "integrity": "sha512-TMfGKLSVxfGfoO8JfIE/neZqv7QLwS4nwPwL/NwMvxtAY2230H2I4Z5xx6836pmJvMAzqooRQ4pmLm7RUicP3A==", "dev": true }, "node_modules/@types/vscode-marked": { @@ -3901,10 +3901,9 @@ } }, "node_modules/@vscode/vscode-languagedetection": { - "name": "@codingame/vscode-languagedetection", - "version": "1.0.23", - "resolved": "https://registry.npmjs.org/@codingame/vscode-languagedetection/-/vscode-languagedetection-1.0.23.tgz", - "integrity": "sha512-PqMisj1WEb1d9YtFapOjDQYACq8HD3f5/d+tFfZltsqAomGvoQxl7LBtftPUDT4zpvxls0IsJHiWrR/wvwyuzg==", + "version": "1.0.21", + "resolved": "https://registry.npmjs.org/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.21.tgz", + "integrity": "sha512-zSUH9HYCw5qsCtd7b31yqkpaCU6jhtkKLkvOOA8yTrIRfBSOFb8PPhgmMicD7B/m+t4PwOJXzU1XDtrM9Fd3/g==", "bin": { "vscode-languagedetection": "cli/index.js" } @@ -3993,62 +3992,62 @@ } }, "node_modules/@xterm/addon-canvas": { - "version": "0.7.0-beta.12", - "resolved": "https://registry.npmjs.org/@xterm/addon-canvas/-/addon-canvas-0.7.0-beta.12.tgz", - "integrity": "sha512-euzQyWdklaSxzmb87kuwwiVP06vuYe1oUK+CiQW24UggSXThOEvZhvYV3O6iEgLe3p+7QfgnRWohXhCM84VOew==", + "version": "0.8.0-beta.17", + "resolved": "https://registry.npmjs.org/@xterm/addon-canvas/-/addon-canvas-0.8.0-beta.17.tgz", + "integrity": "sha512-1km1RE02rxdbJWp1sev6Um6T/4tWlpEhJ88OP7xwfUFuedhFEby0JXmKzP7qB0cFzEvFTCq1bOAHSA3DX8vlFQ==", "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "node_modules/@xterm/addon-image": { - "version": "0.8.0-beta.12", - "resolved": "https://registry.npmjs.org/@xterm/addon-image/-/addon-image-0.8.0-beta.12.tgz", - "integrity": "sha512-YsBhmzwxRmym2dUA2CSm52Wt3OLhydVHM+SZmRAJ0/hvfB7dDjtuXBUSIdQWB16WWbGdi4Iazcs/TTxtarX/yA==", + "version": "0.9.0-beta.17", + "resolved": "https://registry.npmjs.org/@xterm/addon-image/-/addon-image-0.9.0-beta.17.tgz", + "integrity": "sha512-g0r2hpBcLABY5as4llsMP36RHtkWooEn7tf+7U0/hTndJoCAvs4uGDqZNQigFgeAM3lJ4PnRYh4lfnEh9bGt8A==", "peerDependencies": { "@xterm/xterm": "^5.2.0" } }, "node_modules/@xterm/addon-search": { - "version": "0.15.0-beta.12", - "resolved": "https://registry.npmjs.org/@xterm/addon-search/-/addon-search-0.15.0-beta.12.tgz", - "integrity": "sha512-63ZhxXj6jBYumVrWJ7ZssICSMz+jHsXbi67tDQNMwTRO/MJxTittZeTHQ7IQrRYzKQgixrX0rLH7AwrLBrn2uQ==", + "version": "0.16.0-beta.17", + "resolved": "https://registry.npmjs.org/@xterm/addon-search/-/addon-search-0.16.0-beta.17.tgz", + "integrity": "sha512-wBfxmWOeqG6HHHE5mVamDJ75zBdHC35ERNy5/aTpQsQsyxrnV0Ks76c8ZVTaTu9wyBCAyx7UmZT42Ot80khY/g==", "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "node_modules/@xterm/addon-serialize": { - "version": "0.13.0-beta.12", - "resolved": "https://registry.npmjs.org/@xterm/addon-serialize/-/addon-serialize-0.13.0-beta.12.tgz", - "integrity": "sha512-/32Gpcj37Ftqf6b4+H62rcB70jLXi9IQspod/2mK3K+Yza9X+Yc8VkAz8VgpKa6tzbh3Xk0XEo/dB6kVFv1Jsg==", + "version": "0.14.0-beta.17", + "resolved": "https://registry.npmjs.org/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.17.tgz", + "integrity": "sha512-/c3W39kdRgGGYDoYjXb5HrUC421qwPn6NryAT4WJuJWnyMtFbe2DPwKsTfHuCBPiPyovS3a9j950Md3O3YXDZA==", "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "node_modules/@xterm/addon-unicode11": { - "version": "0.8.0-beta.12", - "resolved": "https://registry.npmjs.org/@xterm/addon-unicode11/-/addon-unicode11-0.8.0-beta.12.tgz", - "integrity": "sha512-uNsWmRpl4LaBfykpP9CKMo+49gVxRxHoC5MFuMhqPPNhXShsdBii3YxglwoKtit1fwzVT0CIWEniZQMlGiTIuw==", + "version": "0.9.0-beta.17", + "resolved": "https://registry.npmjs.org/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.17.tgz", + "integrity": "sha512-z7v8uojFVrO1aLSWtnz5MzSrfWRT8phde7kh9ufqHLBv7YYtMHxlPVjSuW8PZ2h4eY1LOZf6icUAzrmyJmJ7Kg==", "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "node_modules/@xterm/addon-webgl": { - "version": "0.18.0-beta.12", - "resolved": "https://registry.npmjs.org/@xterm/addon-webgl/-/addon-webgl-0.18.0-beta.12.tgz", - "integrity": "sha512-wnIf5Xv0qAWQ0I1G5drKpEThA+D0f03iOTdtPR3uSLDfR8OsmpnSRgiR0Y0nAOnDmiCnDxu/wdBCKOAcXhWl2Q==", + "version": "0.19.0-beta.17", + "resolved": "https://registry.npmjs.org/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.17.tgz", + "integrity": "sha512-X8ObRgoZl7UZTgdndM+mpSO3hLzAhWKoXXrGvUQg/7XabRKAPrQ2XvdyZm04nYwibE6Tpit2h5kkxjlVqupIig==", "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "node_modules/@xterm/headless": { - "version": "5.5.0-beta.12", - "resolved": "https://registry.npmjs.org/@xterm/headless/-/headless-5.5.0-beta.12.tgz", - "integrity": "sha512-s1AS30MYb0KJ7sEruyywAi79lAjSgjVOasb6EOgOalaQBYWf5BY2HKBU+GOyRPFkusgEIBg0f/ID8uS1fiku9A==" + "version": "5.6.0-beta.17", + "resolved": "https://registry.npmjs.org/@xterm/headless/-/headless-5.6.0-beta.17.tgz", + "integrity": "sha512-ehS7y/XRqX1ppx4RPiYc0vu0SdIQ91aA4lSN/2XNOf3IGdP0A38Q7a0T6mzqxRGZKiiyA0kTR1szr78wnY+wmA==" }, "node_modules/@xterm/xterm": { - "version": "5.5.0-beta.12", - "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.5.0-beta.12.tgz", - "integrity": "sha512-+I/vQh16ndYt8erj7zrxywPb+niyZC1W0H0w/ueDB3IPC7zPXxcETR0OGmglL7kq8Erb76ukBYXw9byXR2vtxg==" + "version": "5.6.0-beta.17", + "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.6.0-beta.17.tgz", + "integrity": "sha512-+wAv8PhaGQSN9yXWIa8EFtT33pbrA4lZakMB1P05fr+DQ7zoH66QOAUoDY95uOf/4+S6Ihz8wzP2+FH8zETQEA==" }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", diff --git a/package.json b/package.json index 90322bf4..1ee07259 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,9 @@ }, "config": { "vscode": { - "version": "1.88.1", - "ref": "1.88.1", - "commit": "e170252f762678dec6ca2cc69aba1570769a5d39" + "version": "1.89.0", + "ref": "1.89.0", + "commit": "9645520c4ae4961f1e927dca9b291f786f11013e" }, "monaco": { "ref": "v0.48.0", @@ -60,7 +60,7 @@ "@types/mime-types": "^2.1.4", "@types/node": "18.19.8", "@types/semver": "^7.5.8", - "@types/vscode": "~1.88.0", + "@types/vscode": "~1.89.0", "@types/vscode-marked": "npm:@types/marked@^3.0.2", "@types/vscode-semver": "npm:@types/semver@=5.5.0", "@types/yargs": "^17.0.32", @@ -106,17 +106,17 @@ "@vscode/proxy-agent": "^0.19.0", "@vscode/ripgrep": "^1.15.9", "@vscode/spdlog": "^0.15.0", - "@vscode/vscode-languagedetection": "npm:@codingame/vscode-languagedetection@1.0.23", + "@vscode/vscode-languagedetection": "1.0.21", "@vscode/windows-process-tree": "^0.6.0", "@vscode/windows-registry": "^1.1.0", - "@xterm/addon-canvas": "0.7.0-beta.12", - "@xterm/addon-image": "0.8.0-beta.12", - "@xterm/addon-search": "0.15.0-beta.12", - "@xterm/addon-serialize": "0.13.0-beta.12", - "@xterm/addon-unicode11": "0.8.0-beta.12", - "@xterm/addon-webgl": "0.18.0-beta.12", - "@xterm/headless": "5.5.0-beta.12", - "@xterm/xterm": "5.5.0-beta.12", + "@xterm/addon-canvas": "0.8.0-beta.17", + "@xterm/addon-image": "0.9.0-beta.17", + "@xterm/addon-search": "0.16.0-beta.17", + "@xterm/addon-serialize": "0.14.0-beta.17", + "@xterm/addon-unicode11": "0.9.0-beta.17", + "@xterm/addon-webgl": "0.19.0-beta.17", + "@xterm/headless": "5.6.0-beta.17", + "@xterm/xterm": "5.6.0-beta.17", "cookie": "^0.4.0", "css-url-parser": "^1.1.3", "kerberos": "^2.0.1", @@ -136,7 +136,7 @@ "typescript": "$typescript", "rollup": "$rollup", "recast": "$recast", - "@xterm/xterm": "5.5.0-beta.12", + "@xterm/xterm": "5.6.0-beta.17", "eslint-plugin-n": "$eslint-plugin-n" }, "volta": { diff --git a/src/localExtensionHost.ts b/src/localExtensionHost.ts index a8fb0054..01c5df43 100644 --- a/src/localExtensionHost.ts +++ b/src/localExtensionHost.ts @@ -221,7 +221,7 @@ class LocalExtensionHost implements IExtensionHost { } } - getInspectPort (): number | undefined { + getInspectPort (): { port: number, host: string } | undefined { return undefined } diff --git a/src/missing-services.ts b/src/missing-services.ts index a0d8b42d..4c95823e 100644 --- a/src/missing-services.ts +++ b/src/missing-services.ts @@ -1,5 +1,5 @@ import { mainWindow } from 'vs/base/browser/window' -import { Event } from 'vs/base/common/event' +import { DynamicListEventMultiplexer, Event, IDynamicListEventMultiplexer } from 'vs/base/common/event' import { Disposable, IDisposable } from 'vs/base/common/lifecycle' import { ResourceSet } from 'vs/base/common/map' import { OS } from 'vs/base/common/platform' @@ -27,7 +27,6 @@ import { IExtensionResourceLoaderService } from 'vs/platform/extensionResourceLo import { IExtension, IRelaxedExtensionDescription } from 'vs/platform/extensions/common/extensions' import { IBuiltinExtensionsScannerService } from 'vs/platform/extensions/common/extensions.service' import { IFileService } from 'vs/platform/files/common/files.service' -import { IHoverService } from 'vs/platform/hover/browser/hover.service' import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions' import { IKeyboardLayoutService } from 'vs/platform/keyboardLayout/common/keyboardLayout.service' import { ILanguagePackItem } from 'vs/platform/languagePacks/common/languagePacks' @@ -46,7 +45,6 @@ import { ISignService } from 'vs/platform/sign/common/sign.service' import { IMessage } from 'vs/platform/sign/common/sign' import { ICustomEndpointTelemetryService } from 'vs/platform/telemetry/common/telemetry.service' import { NullEndpointTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils' -import { TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities' import { TerminalLocation } from 'vs/platform/terminal/common/terminal' import { ITerminalLogService } from 'vs/platform/terminal/common/terminal.service' import { ITunnelService } from 'vs/platform/tunnel/common/tunnel.service' @@ -73,7 +71,6 @@ import { IViewDescriptorService } from 'vs/workbench/common/views.service' import { IAccessibleViewService } from 'vs/workbench/contrib/accessibility/browser/accessibleView.service' import { IChatAccessibilityService, IChatCodeBlockContextProviderService, IChatWidgetService, IQuickChatService } from 'vs/workbench/contrib/chat/browser/chat.service' import { IChatAgentService } from 'vs/workbench/contrib/chat/common/chatAgents.service' -import { IChatContributionService } from 'vs/workbench/contrib/chat/common/chatContributionService.service' import { IChatService } from 'vs/workbench/contrib/chat/common/chatService.service' import { IChatSlashCommandService } from 'vs/workbench/contrib/chat/common/chatSlashCommands.service' import { IChatVariablesService } from 'vs/workbench/contrib/chat/common/chatVariables.service' @@ -119,8 +116,7 @@ import { ISpeechService } from 'vs/workbench/contrib/speech/common/speechService import { NoOpWorkspaceTagsService } from 'vs/workbench/contrib/tags/browser/workspaceTagsService' import { IWorkspaceTagsService } from 'vs/workbench/contrib/tags/common/workspaceTags.service' import { ITaskService } from 'vs/workbench/contrib/tasks/common/taskService.service' -import { ITerminalEditorService, ITerminalGroupService, ITerminalInstanceService, ITerminalService } from 'vs/workbench/contrib/terminal/browser/terminal.service' -import { createInstanceCapabilityEventMultiplexer } from 'vs/workbench/contrib/terminal/browser/terminalEvents' +import { ITerminalConfigurationService, ITerminalEditorService, ITerminalGroupService, ITerminalInstanceService, ITerminalService } from 'vs/workbench/contrib/terminal/browser/terminal.service' import { IEnvironmentVariableService } from 'vs/workbench/contrib/terminal/common/environmentVariable.service' import { ITerminalProfileResolverService, ITerminalProfileService } from 'vs/workbench/contrib/terminal/common/terminal.service' import { ITerminalContributionService } from 'vs/workbench/contrib/terminal/common/terminalExtensionPoints.service' @@ -225,8 +221,9 @@ import { ITerminalInstance, TerminalConnectionState } from 'vs/workbench/contrib import { AccountStatus } from 'vs/workbench/services/userDataSync/common/userDataSync' import { IWebview } from 'vs/workbench/contrib/webview/browser/webview' import { SyncResource } from 'vs/workbench/contrib/editSessions/common/editSessions' -import { unsupported } from './tools' +import { ILanguageModelStatsService } from 'vs/workbench/contrib/chat/common/languageModelStats.service' import { getBuiltInExtensionTranslationsUris, getExtensionIdProvidingCurrentLocale } from './l10n' +import { unsupported } from './tools' registerSingleton(ILoggerService, class NullLoggerService extends AbstractLoggerService { constructor () { @@ -495,6 +492,10 @@ class EmptyEditorPart implements IEditorPart { } class EmptyEditorGroupsService implements IEditorGroupsService { + saveWorkingSet = unsupported + getWorkingSets = unsupported + applyWorkingSet = unsupported + deleteWorkingSet = unsupported onDidCreateAuxiliaryEditorPart = Event.None mainPart = new EmptyEditorPart() activePart = this.mainPart @@ -1523,13 +1524,6 @@ registerSingleton(IBuiltinExtensionsScannerService, class BuiltinExtensionsScann } }, InstantiationType.Eager) -registerSingleton(IHoverService, class HoverService implements IHoverService { - showAndFocusLastHover = unsupported - _serviceBrand: undefined - showHover = unsupported - hideHover = unsupported -}, InstantiationType.Eager) - registerSingleton(IExplorerService, class ExplorerService implements IExplorerService { _serviceBrand: undefined roots = [] @@ -1672,6 +1666,13 @@ registerSingleton(IExtensionGalleryService, class ExtensionGalleryService implem }, InstantiationType.Eager) registerSingleton(ITerminalService, class TerminalService implements ITerminalService { + createOnInstanceCapabilityEvent (): IDynamicListEventMultiplexer<{ instance: ITerminalInstance, data: K }> { + return { + event: Event.None, + dispose () {} + } + } + _serviceBrand: undefined onAnyInstanceData = Event.None moveIntoNewEditor = unsupported @@ -1683,8 +1684,10 @@ registerSingleton(ITerminalService, class TerminalService implements ITerminalSe onAnyInstanceProcessIdReady = Event.None onAnyInstanceSelectionChange = Event.None onAnyInstanceTitleChange = Event.None - createOnInstanceEvent = () => Event.None - createOnInstanceCapabilityEvent = (capabilityId: T) => createInstanceCapabilityEventMultiplexer([], Event.None, Event.None, capabilityId, () => Event.None) + createOnInstanceEvent (getEvent: (instance: ITerminalInstance) => Event): DynamicListEventMultiplexer { + return new DynamicListEventMultiplexer(this.instances, this.onDidCreateInstance, this.onDidDisposeInstance, getEvent) + } + createDetachedTerminal = unsupported onDidChangeSelection = Event.None @@ -1757,6 +1760,18 @@ registerSingleton(ITerminalService, class TerminalService implements ITerminalSe focusActiveInstance = unsupported getInstanceFromResource = unsupported }, InstantiationType.Delayed) + +registerSingleton(ITerminalConfigurationService, class TerminalConfigurationService implements ITerminalConfigurationService { + _serviceBrand: undefined + get config () { + return unsupported() + } + + onConfigChanged = Event.None + setPanelContainer = unsupported + configFontIsMonospace = unsupported + getFont = unsupported +}, InstantiationType.Delayed) registerSingleton(ITerminalEditorService, class TerminalEditorService implements ITerminalEditorService { _serviceBrand: undefined instances = [] @@ -2106,6 +2121,8 @@ registerSingleton(IWorkbenchAssignmentService, class WorkbenchAssignmentService registerSingleton(IChatService, class ChatService implements IChatService { _serviceBrand: undefined + isEnabled = () => false + resendRequest = unsupported onDidUnregisterProvider = Event.None clearAllHistoryEntries = unsupported onDidSubmitAgent = Event.None @@ -2138,6 +2155,11 @@ registerSingleton(IChatService, class ChatService implements IChatService { notifyUserAction = unsupported }, InstantiationType.Delayed) +registerSingleton(ILanguageModelStatsService, class LanguageModelStatsService implements ILanguageModelStatsService { + _serviceBrand: undefined + update = unsupported +}, InstantiationType.Delayed) + registerSingleton(IQuickChatService, class QuickChatService implements IQuickChatService { focused = false _serviceBrand: undefined @@ -2152,6 +2174,7 @@ registerSingleton(IQuickChatService, class QuickChatService implements IQuickCha registerSingleton(IChatAgentService, class QuickChatService implements IChatAgentService { _serviceBrand = undefined + getContributedDefaultAgent = () => undefined registerAgentImplementation = unsupported registerDynamicAgent = unsupported getActivatedAgents = () => [] @@ -2250,6 +2273,8 @@ registerSingleton(IExternalUriOpenerService, class ExternalUriOpenerService impl }, InstantiationType.Delayed) registerSingleton(IAccessibleViewService, class AccessibleViewService implements IAccessibleViewService { + _serviceBrand: undefined + navigateToCodeBlock = unsupported getCodeBlockContext = () => undefined showLastProvider = unsupported showAccessibleViewHelp = unsupported @@ -2258,7 +2283,6 @@ registerSingleton(IAccessibleViewService, class AccessibleViewService implements next = unsupported previous = unsupported getOpenAriaHint = unsupported - _serviceBrand: undefined show = unsupported registerProvider = unsupported getPosition = unsupported @@ -2721,14 +2745,6 @@ registerSingleton(INotebookExecutionStateService, class NotebookExecutionStateSe getLastFailedCellForNotebook = unsupported }, InstantiationType.Delayed) -registerSingleton(IChatContributionService, class ChatContributionService implements IChatContributionService { - _serviceBrand: undefined - registeredProviders = [] - getViewIdForProvider = unsupported - registerChatProvider = unsupported - deregisterChatProvider = unsupported -}, InstantiationType.Delayed) - registerSingleton(ITestProfileService, class TestProfileService implements ITestProfileService { _serviceBrand: undefined onDidChange = Event.None @@ -2806,6 +2822,7 @@ registerSingleton(INotebookSearchService, class NotebookSearchService implements registerSingleton(ILanguageModelsService, class LanguageModelsService implements ILanguageModelsService { _serviceBrand: undefined + computeTokenLength = unsupported onDidChangeLanguageModels = Event.None getLanguageModelIds = () => [] lookupLanguageModel = () => undefined @@ -2910,6 +2927,7 @@ registerSingleton(ITestingPeekOpener, class TestingPeekOpener implements ITestin registerSingleton(IAuxiliaryWindowService, class AuxiliaryWindowService implements IAuxiliaryWindowService { _serviceBrand: undefined + getWindow = () => undefined onDidOpenAuxiliaryWindow = Event.None hasWindow = () => false open = unsupported diff --git a/src/service-override/chat.ts b/src/service-override/chat.ts index 249b2063..5ee7b852 100644 --- a/src/service-override/chat.ts +++ b/src/service-override/chat.ts @@ -1,16 +1,13 @@ import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standaloneServices' import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' -import 'vs/workbench/contrib/chat/browser/chat.contribution' import { IChatAccessibilityService, IChatCodeBlockContextProviderService, IChatWidgetService, IQuickChatService } from 'vs/workbench/contrib/chat/browser/chat.service' import { ChatAccessibilityService } from 'vs/workbench/contrib/chat/browser/chatAccessibilityService' -import { ChatContributionService } from 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl' import { QuickChatService } from 'vs/workbench/contrib/chat/browser/chatQuick' import { ChatVariablesService } from 'vs/workbench/contrib/chat/browser/chatVariables' import { ChatWidgetService } from 'vs/workbench/contrib/chat/browser/chatWidget' import { ChatCodeBlockContextProviderService } from 'vs/workbench/contrib/chat/browser/codeBlockContextProviderService' import { ChatAgentService } from 'vs/workbench/contrib/chat/common/chatAgents' import { IChatAgentService } from 'vs/workbench/contrib/chat/common/chatAgents.service' -import { IChatContributionService } from 'vs/workbench/contrib/chat/common/chatContributionService.service' import { IChatService } from 'vs/workbench/contrib/chat/common/chatService.service' import { ChatService } from 'vs/workbench/contrib/chat/common/chatServiceImpl' import { ChatSlashCommandService } from 'vs/workbench/contrib/chat/common/chatSlashCommands' @@ -18,20 +15,22 @@ import { IChatSlashCommandService } from 'vs/workbench/contrib/chat/common/chatS import { IChatVariablesService } from 'vs/workbench/contrib/chat/common/chatVariables.service' import { ChatWidgetHistoryService } from 'vs/workbench/contrib/chat/common/chatWidgetHistoryService' import { IChatWidgetHistoryService } from 'vs/workbench/contrib/chat/common/chatWidgetHistoryService.service' +import { ILanguageModelStatsService } from 'vs/workbench/contrib/chat/common/languageModelStats.service' import { LanguageModelsService } from 'vs/workbench/contrib/chat/common/languageModels' import { ILanguageModelsService } from 'vs/workbench/contrib/chat/common/languageModels.service' -import 'vs/workbench/contrib/inlineChat/browser/inlineChat.contribution' import { IInlineChatSavingService } from 'vs/workbench/contrib/inlineChat/browser/inlineChatSavingService.service' import { InlineChatSavingServiceImpl } from 'vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl' import { IInlineChatSessionService } from 'vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service' import { InlineChatSessionServiceImpl } from 'vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl' import { IInlineChatService } from 'vs/workbench/contrib/inlineChat/common/inlineChat.service' import { InlineChatServiceImpl } from 'vs/workbench/contrib/inlineChat/common/inlineChatServiceImpl' +import { LanguageModelStatsService } from 'vs/workbench/contrib/chat/common/languageModelStats' +import 'vs/workbench/contrib/chat/browser/chat.contribution' +import 'vs/workbench/contrib/inlineChat/browser/inlineChat.contribution' export default function getServiceOverride (): IEditorOverrideServices { return { [IChatService.toString()]: new SyncDescriptor(ChatService, [], true), - [IChatContributionService.toString()]: new SyncDescriptor(ChatContributionService, [], true), [IChatWidgetService.toString()]: new SyncDescriptor(ChatWidgetService, [], true), [IQuickChatService.toString()]: new SyncDescriptor(QuickChatService, [], true), [IChatAccessibilityService.toString()]: new SyncDescriptor(ChatAccessibilityService, [], true), @@ -43,6 +42,7 @@ export default function getServiceOverride (): IEditorOverrideServices { [IInlineChatService.toString()]: new SyncDescriptor(InlineChatServiceImpl, [], true), [IInlineChatSessionService.toString()]: new SyncDescriptor(InlineChatSessionServiceImpl, [], true), [IInlineChatSavingService.toString()]: new SyncDescriptor(InlineChatSavingServiceImpl, [], true), - [IChatCodeBlockContextProviderService.toString()]: new SyncDescriptor(ChatCodeBlockContextProviderService, [], true) + [IChatCodeBlockContextProviderService.toString()]: new SyncDescriptor(ChatCodeBlockContextProviderService, [], true), + [ILanguageModelStatsService.toString()]: new SyncDescriptor(LanguageModelStatsService, [], true) } } diff --git a/src/service-override/editor.ts b/src/service-override/editor.ts index fc239da2..d303666a 100644 --- a/src/service-override/editor.ts +++ b/src/service-override/editor.ts @@ -71,6 +71,10 @@ class EmptyEditorPart implements IEditorPart { } class EmptyEditorGroupsService implements IEditorGroupsService { + saveWorkingSet = unsupported + getWorkingSets = unsupported + applyWorkingSet = unsupported + deleteWorkingSet = unsupported onDidCreateAuxiliaryEditorPart = Event.None mainPart = new EmptyEditorPart() diff --git a/src/service-override/terminal.ts b/src/service-override/terminal.ts index b6356ae0..9816e0f1 100644 --- a/src/service-override/terminal.ts +++ b/src/service-override/terminal.ts @@ -3,7 +3,7 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' import { ITerminalsLayoutInfo, IProcessReadyEvent, ITerminalBackend, ITerminalBackendRegistry, ITerminalChildProcess, ITerminalLaunchError, ITerminalProfile, TerminalExtensions, IPtyHostLatencyMeasurement } from 'vs/platform/terminal/common/terminal' import { ITerminalLogService } from 'vs/platform/terminal/common/terminal.service' import { ITerminalProfileResolverService, ITerminalProfileService } from 'vs/workbench/contrib/terminal/common/terminal.service' -import { ITerminalEditorService, ITerminalGroupService, ITerminalInstanceService, ITerminalService } from 'vs/workbench/contrib/terminal/browser/terminal.service' +import { ITerminalConfigurationService, ITerminalEditorService, ITerminalGroupService, ITerminalInstanceService, ITerminalService } from 'vs/workbench/contrib/terminal/browser/terminal.service' import { TerminalService } from 'vs/workbench/contrib/terminal/browser/terminalService' import { TerminalEditorService } from 'vs/workbench/contrib/terminal/browser/terminalEditorService' import { TerminalGroupService } from 'vs/workbench/contrib/terminal/browser/terminalGroupService' @@ -26,6 +26,7 @@ import { PerformanceMark } from 'vs/base/common/performance' import { DeferredPromise } from 'vs/base/common/async' import { EmbedderTerminalService } from 'vs/workbench/services/terminal/common/embedderTerminalService' import { IEmbedderTerminalService } from 'vs/workbench/services/terminal/common/embedderTerminalService.service' +import { TerminalConfigurationService } from 'vs/workbench/contrib/terminal/browser/terminalConfigurationService' import { unsupported } from '../tools' import 'vs/workbench/contrib/terminal/browser/terminal.contribution' import 'vs/workbench/contrib/terminal/terminal.all' @@ -146,7 +147,8 @@ export default function getServiceOverride (backend?: ITerminalBackend): IEditor [ITerminalProfileResolverService.toString()]: new SyncDescriptor(ElectronTerminalProfileResolverService, [], true), [IEnvironmentVariableService.toString()]: new SyncDescriptor(EnvironmentVariableService, [], true), [ITerminalQuickFixService.toString()]: new SyncDescriptor(TerminalQuickFixService, [], true), - [IEmbedderTerminalService.toString()]: new SyncDescriptor(EmbedderTerminalService, [], true) + [IEmbedderTerminalService.toString()]: new SyncDescriptor(EmbedderTerminalService, [], true), + [ITerminalConfigurationService.toString()]: new SyncDescriptor(TerminalConfigurationService, [], true) } } diff --git a/src/service-override/tools/editor.ts b/src/service-override/tools/editor.ts index 12598bcd..868d302b 100644 --- a/src/service-override/tools/editor.ts +++ b/src/service-override/tools/editor.ts @@ -13,7 +13,7 @@ import { IResolvedTextEditorModel, ITextModelService } from 'vs/editor/common/se import { IStandaloneCodeEditor, StandaloneCodeEditor, StandaloneEditor } from 'vs/editor/standalone/browser/standaloneCodeEditor' import { Disposable, IDisposable, IReference } from 'vs/base/common/lifecycle' import { EditorService } from 'vs/workbench/services/editor/browser/editorService' -import { IAuxiliaryEditorPart, IEditorDropTargetDelegate, IEditorPart, IActiveEditorActions, IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService' +import { IAuxiliaryEditorPart, IEditorDropTargetDelegate, IEditorPart, IActiveEditorActions, IEditorGroup, IEditorWorkingSet } from 'vs/workbench/services/editor/common/editorGroupsService' import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService.service' import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' import { IConfigurationService } from 'vs/platform/configuration/common/configuration.service' @@ -607,6 +607,22 @@ export class MonacoDelegateEditorGroupsService e }) } + saveWorkingSet (name: string): IEditorWorkingSet { + return this.delegate.saveWorkingSet(name) + } + + getWorkingSets (): IEditorWorkingSet[] { + return this.delegate.getWorkingSets() + } + + applyWorkingSet (workingSet: IEditorWorkingSet | 'empty'): Promise { + return this.delegate.applyWorkingSet(workingSet) + } + + deleteWorkingSet (workingSet: IEditorWorkingSet): void { + return this.delegate.deleteWorkingSet(workingSet) + } + get isReady (): IEditorGroupsService['isReady'] { return this.delegate.isReady } diff --git a/vscode-paches/0001-fix-allow-importing-vscode-oniguruma.patch b/vscode-paches/0001-fix-allow-importing-vscode-oniguruma.patch index 7318b9a8..e31dec38 100644 --- a/vscode-paches/0001-fix-allow-importing-vscode-oniguruma.patch +++ b/vscode-paches/0001-fix-allow-importing-vscode-oniguruma.patch @@ -8,10 +8,10 @@ Subject: [PATCH] fix: allow importing vscode-oniguruma 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json -index b174b6f348a..851564cf0e5 100644 +index 19d2c1e06a5..eab054aab59 100644 --- a/.eslintrc.json +++ b/.eslintrc.json -@@ -669,6 +669,7 @@ +@@ -670,6 +670,7 @@ "v8-inspect-profiler", "vscode-regexpp", "vscode-textmate", diff --git a/vscode-paches/0006-feat-add-a-way-to-register-a-locale-with-translation.patch b/vscode-paches/0006-feat-add-a-way-to-register-a-locale-with-translation.patch index 3535c707..e2ff766a 100644 --- a/vscode-paches/0006-feat-add-a-way-to-register-a-locale-with-translation.patch +++ b/vscode-paches/0006-feat-add-a-way-to-register-a-locale-with-translation.patch @@ -4,13 +4,13 @@ Date: Mon, 11 Mar 2024 16:45:29 +0100 Subject: [PATCH] feat: add a way to register a locale with translations --- - build/lib/standalone.js | 16 ++++++++++++++-- - build/lib/standalone.ts | 12 ++++++++++++ + build/lib/standalone.js | 15 +++++++++++++-- + build/lib/standalone.ts | 11 +++++++++++ src/vs/nls.ts | 31 ++++++++++++++++++++++++++++++- - 3 files changed, 56 insertions(+), 3 deletions(-) + 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/build/lib/standalone.js b/build/lib/standalone.js -index 723a1127492..a7072610326 100644 +index 723a1127492..02b239898f1 100644 --- a/build/lib/standalone.js +++ b/build/lib/standalone.js @@ -4,8 +4,7 @@ @@ -31,7 +31,7 @@ index 723a1127492..a7072610326 100644 function createESMSourcesAndResources2(options) { const ts = require('typescript'); const SRC_FOLDER = path.join(REPO_ROOT, options.srcFolder); -@@ -190,6 +190,17 @@ function createESMSourcesAndResources2(options) { +@@ -190,6 +190,16 @@ function createESMSourcesAndResources2(options) { fileContents = fileContents.replace(/import ([a-zA-Z0-9]+) = require\(('[^']+')\);/g, function (_, m1, m2) { return `import * as ${m1} from ${m2};`; }); @@ -44,12 +44,11 @@ index 723a1127492..a7072610326 100644 + } + fileContents = newFileContents; + } -+ fileContents = fileContents.replace(/import { (localize2?) }/g, 'import { $1WithPath }'); -+ fileContents = fileContents.replace(/import { (localize2?), *(localize2?) }/g, 'import { $1WithPath, $2WithPath }'); ++ fileContents = fileContents.replace(/(?<=import \{.*)\b(localize2?)\b(?=.* from '.*\/nls')/g, '$1WithPath'); write(getDestAbsoluteFilePath(file), fileContents); continue; } -@@ -258,6 +269,7 @@ function createESMSourcesAndResources2(options) { +@@ -258,6 +268,7 @@ function createESMSourcesAndResources2(options) { } } } @@ -58,10 +57,10 @@ index 723a1127492..a7072610326 100644 if (!/\.css/.test(module)) { return false; diff --git a/build/lib/standalone.ts b/build/lib/standalone.ts -index 90517a9236f..7e074315308 100644 +index 90517a9236f..0c0b4b03610 100644 --- a/build/lib/standalone.ts +++ b/build/lib/standalone.ts -@@ -223,6 +223,18 @@ export function createESMSourcesAndResources2(options: IOptions2): void { +@@ -223,6 +223,17 @@ export function createESMSourcesAndResources2(options: IOptions2): void { return `import * as ${m1} from ${m2};`; }); @@ -74,8 +73,7 @@ index 90517a9236f..7e074315308 100644 + } + fileContents = newFileContents; + } -+ fileContents = fileContents.replace(/import { (localize2?) }/g, 'import { $1WithPath }'); -+ fileContents = fileContents.replace(/import { (localize2?), *(localize2?) }/g, 'import { $1WithPath, $2WithPath }'); ++ fileContents = fileContents.replace(/(?<=import \{.*)\b(localize2?)\b(?=.* from '.*\/nls')/g, '$1WithPath'); + write(getDestAbsoluteFilePath(file), fileContents); continue; diff --git a/vscode-paches/0011-feat-add-static-asset-url-mechanism.patch b/vscode-paches/0011-feat-add-static-asset-url-mechanism.patch index 14b8917a..08782b9e 100644 --- a/vscode-paches/0011-feat-add-static-asset-url-mechanism.patch +++ b/vscode-paches/0011-feat-add-static-asset-url-mechanism.patch @@ -12,7 +12,7 @@ Subject: [PATCH] feat: add static asset url mechanism 5 files changed, 218 insertions(+), 59 deletions(-) diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts -index cfc5b173887..f7e8874332c 100644 +index 1bf071d09c5..ad7b13918a2 100644 --- a/src/vs/base/common/network.ts +++ b/src/vs/base/common/network.ts @@ -4,6 +4,8 @@ @@ -24,7 +24,7 @@ index cfc5b173887..f7e8874332c 100644 import * as platform from 'vs/base/common/platform'; import { equalsIgnoreCase, startsWithIgnoreCase } from 'vs/base/common/strings'; import { URI } from 'vs/base/common/uri'; -@@ -231,6 +233,30 @@ export const VSCODE_AUTHORITY = 'vscode-app'; +@@ -238,6 +240,30 @@ export const VSCODE_AUTHORITY = 'vscode-app'; class FileAccessImpl { private static readonly FALLBACK_AUTHORITY = VSCODE_AUTHORITY; @@ -55,7 +55,7 @@ index cfc5b173887..f7e8874332c 100644 /** * Returns a URI to use in contexts where the browser is responsible -@@ -239,7 +265,7 @@ class FileAccessImpl { +@@ -246,7 +272,7 @@ class FileAccessImpl { * **Note:** use `dom.ts#asCSSUrl` whenever the URL is to be used in CSS context. */ asBrowserUri(resourcePath: AppResourcePath | ''): URI { @@ -64,7 +64,7 @@ index cfc5b173887..f7e8874332c 100644 return this.uriToBrowserUri(uri); } -@@ -278,7 +304,7 @@ class FileAccessImpl { +@@ -285,7 +311,7 @@ class FileAccessImpl { }); } @@ -73,7 +73,7 @@ index cfc5b173887..f7e8874332c 100644 } /** -@@ -286,7 +312,7 @@ class FileAccessImpl { +@@ -293,7 +319,7 @@ class FileAccessImpl { * is responsible for loading. */ asFileUri(resourcePath: AppResourcePath | ''): URI { @@ -82,7 +82,7 @@ index cfc5b173887..f7e8874332c 100644 return this.uriToFileUri(uri); } -@@ -318,6 +344,19 @@ class FileAccessImpl { +@@ -325,6 +351,19 @@ class FileAccessImpl { return URI.parse(moduleIdToUrl.toUrl(uriOrModule)); } @@ -121,10 +121,10 @@ index 6732d38f5e6..72abfc8af21 100644 class ExtensionHostProxy implements IExtensionHostProxy { diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts -index c4f5c720677..4a83e7e54ae 100644 +index e847d35fd95..8843e9cfd43 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts -@@ -1443,6 +1443,7 @@ export interface MainThreadExtensionServiceShape extends IDisposable { +@@ -1437,6 +1437,7 @@ export interface MainThreadExtensionServiceShape extends IDisposable { $onExtensionRuntimeError(extensionId: ExtensionIdentifier, error: SerializedError): void; $setPerformanceMarks(marks: performance.PerformanceMark[]): Promise; $asBrowserUri(uri: UriComponents): Promise; diff --git a/vscode-paches/0015-fix-apply-style-only-on-standalone-editors.patch b/vscode-paches/0015-fix-apply-style-only-on-standalone-editors.patch index 3c1da27f..aa2d8fe8 100644 --- a/vscode-paches/0015-fix-apply-style-only-on-standalone-editors.patch +++ b/vscode-paches/0015-fix-apply-style-only-on-standalone-editors.patch @@ -5,42 +5,43 @@ Subject: [PATCH] fix: apply style only on standalone editors --- .../browser/config/editorConfiguration.ts | 12 ++++++-- - .../widget/codeEditor/codeEditorWidget.ts | 12 ++++++-- + .../widget/codeEditor/codeEditorWidget.ts | 11 ++++++-- .../widget/diffEditor/diffEditorWidget.ts | 8 ++++++ .../standalone/browser/standalone-tokens.css | 28 +++++++++---------- .../browser/standaloneCodeEditor.ts | 4 +-- .../test/browser/config/testConfiguration.ts | 2 +- src/vs/editor/test/browser/testCodeEditor.ts | 2 +- - 7 files changed, 44 insertions(+), 24 deletions(-) + 7 files changed, 44 insertions(+), 23 deletions(-) diff --git a/src/vs/editor/browser/config/editorConfiguration.ts b/src/vs/editor/browser/config/editorConfiguration.ts -index 06e8339cbc7..799c2f81cd0 100644 +index 4de800bd521..de9b4b9143c 100644 --- a/src/vs/editor/browser/config/editorConfiguration.ts +++ b/src/vs/editor/browser/config/editorConfiguration.ts -@@ -43,6 +43,7 @@ export class EditorConfiguration extends Disposable implements IEditorConfigurat - public readonly onDidChangeFast: Event = this._onDidChangeFast.event; +@@ -45,6 +45,7 @@ export class EditorConfiguration extends Disposable implements IEditorConfigurat public readonly isSimpleWidget: boolean; + public readonly contextMenuId: MenuId; + public readonly isStandaloneEditor: boolean; private readonly _containerObserver: ElementSizeObserver; private _isDominatedByLongLines: boolean = false; -@@ -68,12 +69,14 @@ export class EditorConfiguration extends Disposable implements IEditorConfigurat - +@@ -71,6 +72,7 @@ export class EditorConfiguration extends Disposable implements IEditorConfigurat constructor( isSimpleWidget: boolean, + contextMenuId: MenuId, + isStandaloneEditor: boolean, options: Readonly, container: HTMLElement | null, @IAccessibilityService private readonly _accessibilityService: IAccessibilityService - ) { +@@ -78,6 +80,7 @@ export class EditorConfiguration extends Disposable implements IEditorConfigurat super(); this.isSimpleWidget = isSimpleWidget; + this.contextMenuId = contextMenuId; + this.isStandaloneEditor = isStandaloneEditor; this._containerObserver = this._register(new ElementSizeObserver(container, options.dimension)); this._targetWindowId = getWindow(container).vscodeWindowId; -@@ -130,7 +133,7 @@ export class EditorConfiguration extends Disposable implements IEditorConfigurat +@@ -134,7 +137,7 @@ export class EditorConfiguration extends Disposable implements IEditorConfigurat protected _readEnvConfiguration(): IEnvConfiguration { return { @@ -49,7 +50,7 @@ index 06e8339cbc7..799c2f81cd0 100644 outerWidth: this._containerObserver.getWidth(), outerHeight: this._containerObserver.getHeight(), emptySelectionClipboard: browser.isWebKit || browser.isFirefox, -@@ -218,7 +221,7 @@ function digitCount(n: number): number { +@@ -222,7 +225,7 @@ function digitCount(n: number): number { return r ? r : 1; } @@ -58,7 +59,7 @@ index 06e8339cbc7..799c2f81cd0 100644 let extra = ''; if (!browser.isSafari && !browser.isWebkitWebView) { // Use user-select: none in all browsers except Safari and native macOS WebView -@@ -232,6 +235,9 @@ function getExtraEditorClassName(): string { +@@ -236,6 +239,9 @@ function getExtraEditorClassName(): string { if (platform.isMacintosh) { extra += 'mac '; } @@ -68,7 +69,7 @@ index 06e8339cbc7..799c2f81cd0 100644 return extra; } -@@ -273,7 +279,7 @@ export class ComputedEditorOptions implements IComputedEditorOptions { +@@ -277,7 +283,7 @@ export class ComputedEditorOptions implements IComputedEditorOptions { } } @@ -78,30 +79,29 @@ index 06e8339cbc7..799c2f81cd0 100644 public static validateOptions(options: IEditorOptions): ValidatedEditorOptions { const result = new ValidatedEditorOptions(); diff --git a/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts -index 108aa52fa8a..dd294d50a2e 100644 +index 2bf7d7afb8e..ff546aeb0e0 100644 --- a/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts -@@ -254,7 +254,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE - this._decorationTypeSubtypes = {}; - this._telemetryData = codeEditorWidgetOptions.telemetryData; +@@ -261,6 +261,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE -- this._configuration = this._register(this._createConfiguration(codeEditorWidgetOptions.isSimpleWidget || false, options, accessibilityService)); -+ this._configuration = this._register(this._createConfiguration(codeEditorWidgetOptions.isSimpleWidget || false, codeEditorWidgetOptions.isStandaloneEditor || false, options, accessibilityService)); + this._configuration = this._register(this._createConfiguration(codeEditorWidgetOptions.isSimpleWidget || false, + codeEditorWidgetOptions.contextMenuId ?? (codeEditorWidgetOptions.isSimpleWidget ? MenuId.SimpleEditorContext : MenuId.EditorContext), ++ codeEditorWidgetOptions.isStandaloneEditor || false, + options, accessibilityService)); this._register(this._configuration.onDidChange((e) => { this._onDidChangeConfiguration.fire(e); - -@@ -362,8 +362,8 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE +@@ -369,8 +370,8 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE this._modelData?.view.writeScreenReaderContent(reason); } -- protected _createConfiguration(isSimpleWidget: boolean, options: Readonly, accessibilityService: IAccessibilityService): EditorConfiguration { -- return new EditorConfiguration(isSimpleWidget, options, this._domElement, accessibilityService); -+ protected _createConfiguration(isSimpleWidget: boolean, isStandaloneEditor: boolean, options: Readonly, accessibilityService: IAccessibilityService): EditorConfiguration { -+ return new EditorConfiguration(isSimpleWidget, isStandaloneEditor, options, this._domElement, accessibilityService); +- protected _createConfiguration(isSimpleWidget: boolean, contextMenuId: MenuId, options: Readonly, accessibilityService: IAccessibilityService): EditorConfiguration { +- return new EditorConfiguration(isSimpleWidget, contextMenuId, options, this._domElement, accessibilityService); ++ protected _createConfiguration(isSimpleWidget: boolean, contextMenuId: MenuId, isStandaloneEditor: boolean, options: Readonly, accessibilityService: IAccessibilityService): EditorConfiguration { ++ return new EditorConfiguration(isSimpleWidget, contextMenuId, isStandaloneEditor, options, this._domElement, accessibilityService); } public getId(): string { -@@ -1896,6 +1896,12 @@ export interface ICodeEditorWidgetOptions { +@@ -1905,6 +1906,12 @@ export interface ICodeEditorWidgetOptions { */ isSimpleWidget?: boolean; @@ -115,10 +115,10 @@ index 108aa52fa8a..dd294d50a2e 100644 * Contributions to instantiate. * When provided, only the contributions included will be instantiated. diff --git a/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.ts -index ecdc471e69e..5ab68a61136 100644 +index 40763f34568..95141e7ca43 100644 --- a/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.ts -@@ -50,6 +50,12 @@ import { DiffEditorGutter } from 'vs/editor/browser/widget/diffEditor/features/g +@@ -50,6 +50,12 @@ import { DiffEditorViewModel, DiffMapping, DiffState } from './diffEditorViewMod export interface IDiffCodeEditorWidgetOptions { originalEditor?: ICodeEditorWidgetOptions; modifiedEditor?: ICodeEditorWidgetOptions; @@ -131,7 +131,7 @@ index ecdc471e69e..5ab68a61136 100644 } export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor { -@@ -111,6 +117,8 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor { +@@ -110,6 +116,8 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor { this._contextKeyService.createKey('isInDiffEditor', true); @@ -194,10 +194,10 @@ index 1fc85078f9e..c74aca00541 100644 outline-style: solid; outline-offset: -1px; diff --git a/src/vs/editor/standalone/browser/standaloneCodeEditor.ts b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts -index c80bdf63686..37f7bd893ba 100644 +index 84deb53c57d..d9b8c63cfb3 100644 --- a/src/vs/editor/standalone/browser/standaloneCodeEditor.ts +++ b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts -@@ -282,7 +282,7 @@ export class StandaloneCodeEditor extends CodeEditorWidget implements IStandalon +@@ -284,7 +284,7 @@ export class StandaloneCodeEditor extends CodeEditorWidget implements IStandalon const options = { ..._options }; options.ariaLabel = options.ariaLabel || StandaloneCodeEditorNLS.editorViewAccessibleLabel; options.ariaLabel = options.ariaLabel + ';' + (StandaloneCodeEditorNLS.accessibilityHelpMessage); @@ -206,7 +206,7 @@ index c80bdf63686..37f7bd893ba 100644 if (keybindingService instanceof StandaloneKeybindingService) { this._standaloneKeybindingService = keybindingService; -@@ -518,7 +518,7 @@ export class StandaloneDiffEditor2 extends DiffEditorWidget implements IStandalo +@@ -522,7 +522,7 @@ export class StandaloneDiffEditor2 extends DiffEditorWidget implements IStandalo super( domElement, options, @@ -216,28 +216,28 @@ index c80bdf63686..37f7bd893ba 100644 instantiationService, codeEditorService, diff --git a/src/vs/editor/test/browser/config/testConfiguration.ts b/src/vs/editor/test/browser/config/testConfiguration.ts -index b5d42908ded..3815f8fb823 100644 +index 4a2e87e6d48..d96690e36ee 100644 --- a/src/vs/editor/test/browser/config/testConfiguration.ts +++ b/src/vs/editor/test/browser/config/testConfiguration.ts -@@ -13,7 +13,7 @@ import { TestAccessibilityService } from 'vs/platform/accessibility/test/common/ +@@ -14,7 +14,7 @@ import { MenuId } from 'vs/platform/actions/common/actions'; export class TestConfiguration extends EditorConfiguration { constructor(opts: Readonly) { -- super(false, opts, null, new TestAccessibilityService()); -+ super(false, false, opts, null, new TestAccessibilityService()); +- super(false, MenuId.EditorContext, opts, null, new TestAccessibilityService()); ++ super(false, MenuId.EditorContext, false, opts, null, new TestAccessibilityService()); } protected override _readEnvConfiguration(): IEnvConfiguration { diff --git a/src/vs/editor/test/browser/testCodeEditor.ts b/src/vs/editor/test/browser/testCodeEditor.ts -index c0a4b9d1cf3..f260372b1fc 100644 +index 5fcd0c1bd4c..9ad5fefd0c8 100644 --- a/src/vs/editor/test/browser/testCodeEditor.ts +++ b/src/vs/editor/test/browser/testCodeEditor.ts -@@ -68,7 +68,7 @@ export interface ITestCodeEditor extends IActiveCodeEditor { +@@ -69,7 +69,7 @@ export interface ITestCodeEditor extends IActiveCodeEditor { export class TestCodeEditor extends CodeEditorWidget implements ICodeEditor { //#region testing overrides -- protected override _createConfiguration(isSimpleWidget: boolean, options: Readonly): EditorConfiguration { -+ protected override _createConfiguration(isSimpleWidget: boolean, isStandaloneEditor: boolean, options: Readonly): EditorConfiguration { +- protected override _createConfiguration(isSimpleWidget: boolean, contextMenuId: MenuId, options: Readonly): EditorConfiguration { ++ protected override _createConfiguration(isSimpleWidget: boolean, contextMenuId: MenuId, isStandaloneEditor: boolean, options: Readonly): EditorConfiguration { return new TestConfiguration(options); } protected override _createView(viewModel: ViewModel): [View, boolean] { diff --git a/vscode-paches/0016-fix-use-existing-method.patch b/vscode-paches/0016-fix-use-existing-method.patch index 2f5e96b5..7deb3a35 100644 --- a/vscode-paches/0016-fix-use-existing-method.patch +++ b/vscode-paches/0016-fix-use-existing-method.patch @@ -8,10 +8,10 @@ Subject: [PATCH] fix: use existing method 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts -index c3d2f3c41c3..9e012841726 100644 +index 31ee2f5038b..1881230c0ed 100644 --- a/src/vs/editor/standalone/browser/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts -@@ -554,7 +554,7 @@ export class StandaloneKeybindingService extends AbstractKeybindingService { +@@ -555,7 +555,7 @@ export class StandaloneKeybindingService extends AbstractKeybindingService { // This might be a removal keybinding item in user settings => accept it result[resultLen++] = new ResolvedKeybindingItem(undefined, item.command, item.commandArgs, when, isDefault, null, false); } else { diff --git a/vscode-paches/0017-refactor-split-code.patch b/vscode-paches/0017-refactor-split-code.patch index 68a78b7a..acc3635e 100644 --- a/vscode-paches/0017-refactor-split-code.patch +++ b/vscode-paches/0017-refactor-split-code.patch @@ -9,10 +9,10 @@ Subject: [PATCH] refactor: split code 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts -index 9e012841726..df611c4ad7f 100644 +index 1881230c0ed..84a019c7717 100644 --- a/src/vs/editor/standalone/browser/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts -@@ -525,15 +525,19 @@ export class StandaloneKeybindingService extends AbstractKeybindingService { +@@ -526,15 +526,19 @@ export class StandaloneKeybindingService extends AbstractKeybindingService { }); } diff --git a/vscode-paches/0018-cleanup-remove-code-already-done-in-EditorFeaturesIn.patch b/vscode-paches/0018-cleanup-remove-code-already-done-in-EditorFeaturesIn.patch index fd87d3bf..acdcbe93 100644 --- a/vscode-paches/0018-cleanup-remove-code-already-done-in-EditorFeaturesIn.patch +++ b/vscode-paches/0018-cleanup-remove-code-already-done-in-EditorFeaturesIn.patch @@ -9,19 +9,19 @@ Subject: [PATCH] cleanup: remove code already done in 1 file changed, 12 deletions(-) diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts -index df611c4ad7f..85fc1c5f58d 100644 +index 84a019c7717..7a24c608f8f 100644 --- a/src/vs/editor/standalone/browser/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts @@ -90,8 +90,6 @@ import { DefaultConfiguration } from 'vs/platform/configuration/common/configura import { WorkspaceEdit } from 'vs/editor/common/languages'; - import { AccessibilitySignal, IAccessibilitySignalService, Sound } from 'vs/platform/accessibilitySignal/browser/accessibilitySignalService'; + import { AccessibilitySignal, AccessibilityModality, IAccessibilitySignalService, Sound } from 'vs/platform/accessibilitySignal/browser/accessibilitySignalService'; import { LogService } from 'vs/platform/log/common/logService'; -import { getEditorFeatures } from 'vs/editor/common/editorFeatures'; -import { onUnexpectedError } from 'vs/base/common/errors'; import { ExtensionKind, IEnvironmentService, IExtensionHostDebugParams } from 'vs/platform/environment/common/environment'; import { mainWindow } from 'vs/base/browser/window'; - -@@ -1187,16 +1185,6 @@ export module StandaloneServices { + import { ResourceMap } from 'vs/base/common/map'; +@@ -1201,16 +1199,6 @@ export module StandaloneServices { } } diff --git a/vscode-paches/0019-fix-replace-amd-imports-by-regular-esm-dynamic-impor.patch b/vscode-paches/0019-fix-replace-amd-imports-by-regular-esm-dynamic-impor.patch index 24bcf974..4f2e4220 100644 --- a/vscode-paches/0019-fix-replace-amd-imports-by-regular-esm-dynamic-impor.patch +++ b/vscode-paches/0019-fix-replace-amd-imports-by-regular-esm-dynamic-impor.patch @@ -18,10 +18,10 @@ Subject: [PATCH] fix: replace amd imports by regular esm dynamic imports 11 files changed, 31 insertions(+), 50 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json -index 851564cf0e5..ca34f633edd 100644 +index eab054aab59..e7ceb332d0f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json -@@ -295,14 +295,6 @@ +@@ -296,14 +296,6 @@ "jsdoc/require-returns": "warn" } }, @@ -36,14 +36,14 @@ index 851564cf0e5..ca34f633edd 100644 { "files": [ "src/**/{browser,electron-sandbox}/**/*.ts" -@@ -858,6 +850,7 @@ +@@ -859,6 +851,7 @@ }, // TODO@layers "tas-client-umd", // node module allowed even in /common/ "vscode-textmate", // node module allowed even in /common/ + "vscode-oniguruma", - "@vscode/vscode-languagedetection" // node module allowed even in /common/ - ] - }, + "@vscode/vscode-languagedetection", // node module allowed even in /common/ + { + "when": "hasBrowser", diff --git a/src/vs/platform/assignment/common/assignmentService.ts b/src/vs/platform/assignment/common/assignmentService.ts index c573b727e0b..8c52126a590 100644 --- a/src/vs/platform/assignment/common/assignmentService.ts @@ -89,10 +89,10 @@ index c54187f89c9..a4729fabe2e 100644 const collectorChannelPlugin: PostChannel = new postPlugin.PostChannel(); // Configure the app insights core to send to collector++ and disable logging of debug info diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts -index 99f6f8b4357..2682e80eaae 100644 +index 97f735e675c..ecb4ef4d557 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts -@@ -83,7 +83,6 @@ import { IHistoryService } from 'vs/workbench/services/history/common/history'; +@@ -82,7 +82,6 @@ import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IWorkbenchLayoutService, Position } from 'vs/workbench/services/layout/browser/layoutService'; import { IPathService } from 'vs/workbench/services/path/common/pathService'; import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences'; @@ -100,7 +100,7 @@ index 99f6f8b4357..2682e80eaae 100644 import type { IMarker, Terminal as XTermTerminal } from '@xterm/xterm'; import { AccessibilityCommandId } from 'vs/workbench/contrib/accessibility/common/accessibilityCommands'; import { terminalStrings } from 'vs/workbench/contrib/terminal/common/terminalStrings'; -@@ -703,7 +702,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance { +@@ -707,7 +706,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance { return xtermConstructor; } xtermConstructor = Promises.withAsyncBody(async (resolve) => { @@ -110,10 +110,10 @@ index 99f6f8b4357..2682e80eaae 100644 Terminal.strings.promptLabel = nls.localize('terminal.integrated.a11yPromptLabel', 'Terminal input'); Terminal.strings.tooMuchOutput = keybinding ? nls.localize('terminal.integrated.useAccessibleBuffer', 'Use the accessible buffer {0} to manually review output', keybinding.getLabel()) : nls.localize('terminal.integrated.useAccessibleBufferNoKb', 'Use the Terminal: Focus Accessible Buffer command to manually review output'); diff --git a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts -index c304610faa7..1a2362cf7b8 100644 +index 7aeb0a59417..f96bcc71a42 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts -@@ -35,7 +35,6 @@ import { DecorationAddon } from 'vs/workbench/contrib/terminal/browser/xterm/dec +@@ -31,7 +31,6 @@ import { DecorationAddon } from 'vs/workbench/contrib/terminal/browser/xterm/dec import { ITerminalCapabilityStore, ITerminalCommand, TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities'; import { Emitter } from 'vs/base/common/event'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -121,7 +121,7 @@ index c304610faa7..1a2362cf7b8 100644 import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { TerminalContextKeys } from 'vs/workbench/contrib/terminal/common/terminalContextKey'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; -@@ -756,7 +755,7 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach +@@ -729,7 +728,7 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach protected async _getCanvasAddonConstructor(): Promise { if (!CanvasAddon) { @@ -130,7 +130,7 @@ index c304610faa7..1a2362cf7b8 100644 } return CanvasAddon; } -@@ -782,35 +781,35 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach +@@ -755,35 +754,35 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach protected async _getImageAddonConstructor(): Promise { if (!ImageAddon) { @@ -172,7 +172,7 @@ index c304610faa7..1a2362cf7b8 100644 return SerializeAddon; } diff --git a/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.ts b/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.ts -index f3c1633701d..61ddc698f93 100644 +index eac420466bb..3bf0dd38699 100644 --- a/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.ts +++ b/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.ts @@ -5,7 +5,6 @@ @@ -183,7 +183,7 @@ index f3c1633701d..61ddc698f93 100644 import { $, addDisposableListener, addStandardDisposableListener, getWindow } from 'vs/base/browser/dom'; import { CancelablePromise, createCancelablePromise } from 'vs/base/common/async'; import { memoize, throttle } from 'vs/base/common/decorators'; -@@ -480,13 +479,13 @@ export class TerminalStickyScrollOverlay extends Disposable { +@@ -488,13 +487,13 @@ export class TerminalStickyScrollOverlay extends Disposable { @memoize private async _getCanvasAddonConstructor(): Promise { @@ -310,7 +310,7 @@ index bc98f7239ce..5937fa2286a 100644 } diff --git a/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts b/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts -index 1ba671448d2..9b682c0746c 100644 +index 74a52fae9ff..2266456fb53 100644 --- a/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts +++ b/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts @@ -3,7 +3,6 @@ diff --git a/vscode-paches/0020-fix-update-import-syntax-for-node-in-ESM.patch b/vscode-paches/0020-fix-update-import-syntax-for-node-in-ESM.patch index 85eeb037..9efbf147 100644 --- a/vscode-paches/0020-fix-update-import-syntax-for-node-in-ESM.patch +++ b/vscode-paches/0020-fix-update-import-syntax-for-node-in-ESM.patch @@ -13,7 +13,7 @@ Subject: [PATCH] fix: update import syntax for node in ESM 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts -index 327c18c18ad..49b3d6d47c5 100644 +index 91b5d5aeaba..4a09932c773 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -3,7 +3,7 @@ @@ -39,7 +39,7 @@ index d8cefb6df67..a94fca911ea 100644 import { localize } from 'vs/nls'; import { NativeParsedArgs } from 'vs/platform/environment/common/argv'; diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts -index a1d28301611..2ffbae2fd9c 100644 +index 64737b07d00..3124bdce945 100644 --- a/src/vs/platform/native/electron-main/nativeHostMainService.ts +++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts @@ -495,7 +495,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain diff --git a/vscode-paches/0021-feat-export-some-classes-and-make-some-methods-acces.patch b/vscode-paches/0021-feat-export-some-classes-and-make-some-methods-acces.patch index 61d85e3f..c8f332cd 100644 --- a/vscode-paches/0021-feat-export-some-classes-and-make-some-methods-acces.patch +++ b/vscode-paches/0021-feat-export-some-classes-and-make-some-methods-acces.patch @@ -56,7 +56,7 @@ index 99dd3279fe8..b692381eaa2 100644 declare readonly _serviceBrand: undefined; diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts -index 69fd77ff4ff..3ff2d974cb6 100644 +index 94ec1087453..4aa2834584f 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -52,7 +52,7 @@ import { CustomTitleBarVisibility } from '../../platform/window/common/window'; @@ -98,10 +98,10 @@ index 69fd77ff4ff..3ff2d974cb6 100644 readonly filesToDiff?: IPathToOpen[]; readonly filesToMerge?: IPathToOpen[]; diff --git a/src/vs/workbench/browser/workbench.ts b/src/vs/workbench/browser/workbench.ts -index c7302a6be67..cbc07dc7fb0 100644 +index 3678a7f6286..0dc55e03b6a 100644 --- a/src/vs/workbench/browser/workbench.ts +++ b/src/vs/workbench/browser/workbench.ts -@@ -76,7 +76,7 @@ export class Workbench extends Layout { +@@ -79,7 +79,7 @@ export class Workbench extends Layout { this.registerErrorHandler(logService); } @@ -109,8 +109,8 @@ index c7302a6be67..cbc07dc7fb0 100644 + protected registerErrorHandler(logService: ILogService): void { // Listen on unhandled rejection events - this._register(addDisposableListener(mainWindow, 'unhandledrejection', event => { -@@ -192,7 +192,7 @@ export class Workbench extends Layout { + // Note: intentionally not registered as disposable to handle +@@ -199,7 +199,7 @@ export class Workbench extends Layout { } } @@ -119,7 +119,7 @@ index c7302a6be67..cbc07dc7fb0 100644 // Layout Service serviceCollection.set(IWorkbenchLayoutService, this); -@@ -231,7 +231,7 @@ export class Workbench extends Layout { +@@ -238,7 +238,7 @@ export class Workbench extends Layout { return instantiationService; } @@ -128,16 +128,16 @@ index c7302a6be67..cbc07dc7fb0 100644 // Configuration changes this._register(configurationService.onDidChangeConfiguration(e => this.updateFontAliasing(e, configurationService))); -@@ -320,7 +320,7 @@ export class Workbench extends Layout { +@@ -327,7 +327,7 @@ export class Workbench extends Layout { } } - private renderWorkbench(instantiationService: IInstantiationService, notificationService: NotificationService, storageService: IStorageService, configurationService: IConfigurationService): void { + protected renderWorkbench(instantiationService: IInstantiationService, notificationService: NotificationService, storageService: IStorageService, configurationService: IConfigurationService): void { - // ARIA + // ARIA & Signals setARIAContainer(this.mainContainer); -@@ -386,7 +386,7 @@ export class Workbench extends Layout { +@@ -394,7 +394,7 @@ export class Workbench extends Layout { return part; } @@ -146,7 +146,7 @@ index c7302a6be67..cbc07dc7fb0 100644 // Instantiate Notification components const notificationsCenter = this._register(instantiationService.createInstance(NotificationsCenter, this.mainContainer, notificationService.model)); -@@ -414,7 +414,7 @@ export class Workbench extends Layout { +@@ -422,7 +422,7 @@ export class Workbench extends Layout { }); } @@ -252,7 +252,7 @@ index 65672a170be..0426642269a 100644 readonly _serviceBrand: undefined; diff --git a/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts b/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts -index b6d4f0f3831..a5f5e42eddd 100644 +index 77969d88de9..848d8e9a4d2 100644 --- a/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts +++ b/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts @@ -76,7 +76,7 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost @@ -265,10 +265,10 @@ index b6d4f0f3831..a5f5e42eddd 100644 if (this._environmentService.debugExtensionHost && this._environmentService.debugRenderer) { suffixSearchParams.set('debugged', '1'); diff --git a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts -index 4b2a585afc3..70b20e8fd08 100644 +index 124b22f400b..771c289dbca 100644 --- a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts -@@ -94,9 +94,9 @@ export abstract class AbstractExtensionService extends Disposable implements IEx +@@ -95,9 +95,9 @@ export abstract class AbstractExtensionService extends Disposable implements IEx private _resolveAuthorityAttempt: number = 0; constructor( @@ -281,7 +281,7 @@ index 4b2a585afc3..70b20e8fd08 100644 @IInstantiationService protected readonly _instantiationService: IInstantiationService, @INotificationService protected readonly _notificationService: INotificationService, @IWorkbenchEnvironmentService protected readonly _environmentService: IWorkbenchEnvironmentService, -@@ -220,7 +220,7 @@ export abstract class AbstractExtensionService extends Disposable implements IEx +@@ -221,7 +221,7 @@ export abstract class AbstractExtensionService extends Disposable implements IEx //#region deltaExtensions @@ -290,7 +290,7 @@ index 4b2a585afc3..70b20e8fd08 100644 this._deltaExtensionsQueue.push(item); if (this._inHandleDeltaExtensions) { // Let the current item finish, the new one will be picked up -@@ -1206,7 +1206,7 @@ export interface IExtensionHostFactory { +@@ -1207,7 +1207,7 @@ export interface IExtensionHostFactory { createExtensionHost(runningLocations: ExtensionRunningLocationTracker, runningLocation: ExtensionRunningLocation, isInitialStart: boolean): IExtensionHost | null; } diff --git a/vscode-paches/0022-fix-improve-extension-contribution-types.patch b/vscode-paches/0022-fix-improve-extension-contribution-types.patch index 926cf1a5..17351ac0 100644 --- a/vscode-paches/0022-fix-improve-extension-contribution-types.patch +++ b/vscode-paches/0022-fix-improve-extension-contribution-types.patch @@ -11,7 +11,7 @@ Subject: [PATCH] fix: improve extension contribution types 4 files changed, 1127 insertions(+), 78 deletions(-) diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts -index 331aba1b55f..7b6a935ec9c 100644 +index cfe5313b905..7c5c680c551 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts @@ -3,6 +3,7 @@ @@ -740,7 +740,7 @@ index 331aba1b55f..7b6a935ec9c 100644 } export interface IDebugVisualizationContribution { -@@ -168,43 +699,560 @@ export interface IDebugVisualizationContribution { +@@ -168,44 +699,561 @@ export interface IDebugVisualizationContribution { } export interface ITranslation { @@ -1271,6 +1271,7 @@ index 331aba1b55f..7b6a935ec9c 100644 + */ readonly notebookRenderer?: INotebookRendererContribution[]; readonly debugVisualizers?: IDebugVisualizationContribution[]; + readonly chatParticipants?: ReadonlyArray<{ id: string }>; + /** + * Contributes notebook preloads. + */ diff --git a/vscode-paches/0023-fix-fix-dependency-injection.patch b/vscode-paches/0023-fix-fix-dependency-injection.patch index 5d6b6c72..ea68b8dc 100644 --- a/vscode-paches/0023-fix-fix-dependency-injection.patch +++ b/vscode-paches/0023-fix-fix-dependency-injection.patch @@ -8,10 +8,10 @@ Subject: [PATCH] fix: fix dependency injection 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/instantiation/common/instantiationService.ts b/src/vs/platform/instantiation/common/instantiationService.ts -index ef9ae6601ce..6182c4881a6 100644 +index fd95305865a..cda6a0c9ae1 100644 --- a/src/vs/platform/instantiation/common/instantiationService.ts +++ b/src/vs/platform/instantiation/common/instantiationService.ts -@@ -195,8 +195,10 @@ export class InstantiationService implements IInstantiationService { +@@ -235,8 +235,10 @@ export class InstantiationService implements IInstantiationService { if (instanceOrDesc instanceof SyncDescriptor) { const d = { id: dependency.id, desc: instanceOrDesc, _trace: item._trace.branch(dependency.id, true) }; diff --git a/vscode-paches/0024-fix-only-run-some-code-if-inside-the-worker.patch b/vscode-paches/0024-fix-only-run-some-code-if-inside-the-worker.patch index ceabe046..c9c09ff4 100644 --- a/vscode-paches/0024-fix-only-run-some-code-if-inside-the-worker.patch +++ b/vscode-paches/0024-fix-only-run-some-code-if-inside-the-worker.patch @@ -10,7 +10,7 @@ Subject: [PATCH] fix: only run some code if inside the worker 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/api/common/extHostExtensionService.ts b/src/vs/workbench/api/common/extHostExtensionService.ts -index 2679364d945..acb1625ad3f 100644 +index 4ea250c3bf8..1af6c78ff25 100644 --- a/src/vs/workbench/api/common/extHostExtensionService.ts +++ b/src/vs/workbench/api/common/extHostExtensionService.ts @@ -45,7 +45,7 @@ import { Schemas } from 'vs/base/common/network'; diff --git a/vscode-paches/0030-refactor-split-some-modules-to-be-able-to-import-the.patch b/vscode-paches/0030-refactor-split-some-modules-to-be-able-to-import-the.patch index 1f5f0169..4d1c0f35 100644 --- a/vscode-paches/0030-refactor-split-some-modules-to-be-able-to-import-the.patch +++ b/vscode-paches/0030-refactor-split-some-modules-to-be-able-to-import-the.patch @@ -10,11 +10,11 @@ Subject: [PATCH] refactor: split some modules to be able to import them .../files/browser/fileCommands.save.ts | 198 ++++++ .../contrib/files/browser/fileCommands.ts | 245 +------ .../files.configuration.contribution.ts | 313 +++++++++ - .../files/browser/files.contribution.ts | 639 +----------------- - .../browser/files.editorPane.contribution.ts | 94 +++ + .../files/browser/files.contribution.ts | 638 +----------------- + .../browser/files.editorPane.contribution.ts | 93 +++ .../browser/files.explorer.contribution.ts | 270 ++++++++ .../files.fileEditorFactory.contribution.ts | 23 + - 9 files changed, 946 insertions(+), 848 deletions(-) + 9 files changed, 945 insertions(+), 847 deletions(-) create mode 100644 src/vs/workbench/browser/parts/editor/editor.autosave.contribution.ts create mode 100644 src/vs/workbench/contrib/files/browser/fileCommands.save.ts create mode 100644 src/vs/workbench/contrib/files/browser/files.configuration.contribution.ts @@ -860,10 +860,10 @@ index 00000000000..500edea7d1b + } +}); diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts -index cc35374830e..98d8dec26be 100644 +index 4af58b0bd45..98d8dec26be 100644 --- a/src/vs/workbench/contrib/files/browser/files.contribution.ts +++ b/src/vs/workbench/contrib/files/browser/files.contribution.ts -@@ -3,638 +3,7 @@ +@@ -3,637 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ @@ -871,7 +871,7 @@ index cc35374830e..98d8dec26be 100644 -import { sep } from 'vs/base/common/path'; -import { Registry } from 'vs/platform/registry/common/platform'; -import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope, IConfigurationPropertySchema } from 'vs/platform/configuration/common/configurationRegistry'; --import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, IWorkbenchContribution, WorkbenchPhase, registerWorkbenchContribution2 } from 'vs/workbench/common/contributions'; +-import { IWorkbenchContribution, WorkbenchPhase, registerWorkbenchContribution2 } from 'vs/workbench/common/contributions'; -import { IFileEditorInput, IEditorFactoryRegistry, EditorExtensions } from 'vs/workbench/common/editor'; -import { AutoSaveConfiguration, HotExitConfiguration, FILES_EXCLUDE_CONFIG, FILES_ASSOCIATIONS_CONFIG, FILES_READONLY_INCLUDE_CONFIG, FILES_READONLY_EXCLUDE_CONFIG, FILES_READONLY_FROM_PERMISSIONS_CONFIG } from 'vs/platform/files/common/files'; -import { SortOrder, LexicographicOptions, FILE_EDITOR_INPUT_ID, BINARY_TEXT_FILE_MODE, UndoConfirmLevel, IFilesConfiguration } from 'vs/workbench/contrib/files/common/files'; @@ -884,7 +884,6 @@ index cc35374830e..98d8dec26be 100644 -import { isNative, isWeb, isWindows } from 'vs/base/common/platform'; -import { ExplorerViewletViewsContribution } from 'vs/workbench/contrib/files/browser/explorerViewlet'; -import { IEditorPaneRegistry, EditorPaneDescriptor } from 'vs/workbench/browser/editor'; --import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; -import { ILabelService } from 'vs/platform/label/common/label'; -import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ExplorerService, UNDO_REDO_SOURCE } from 'vs/workbench/contrib/files/browser/explorerService'; @@ -977,7 +976,7 @@ index cc35374830e..98d8dec26be 100644 -registerWorkbenchContribution2(FileUriLabelContribution.ID, FileUriLabelContribution, WorkbenchPhase.BlockStartup); - -// Register Workspace Watcher --Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(WorkspaceWatcher, LifecyclePhase.Restored); +-registerWorkbenchContribution2(WorkspaceWatcher.ID, WorkspaceWatcher, WorkbenchPhase.AfterRestored); - -// Register Dirty Files Indicator -registerWorkbenchContribution2(DirtyFilesIndicator.ID, DirtyFilesIndicator, WorkbenchPhase.BlockStartup); @@ -1508,36 +1507,35 @@ index cc35374830e..98d8dec26be 100644 +import './files.explorer.contribution'; diff --git a/src/vs/workbench/contrib/files/browser/files.editorPane.contribution.ts b/src/vs/workbench/contrib/files/browser/files.editorPane.contribution.ts new file mode 100644 -index 00000000000..18a1975b685 +index 00000000000..afc1d8cc34a --- /dev/null +++ b/src/vs/workbench/contrib/files/browser/files.editorPane.contribution.ts -@@ -0,0 +1,94 @@ +@@ -0,0 +1,93 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + -+import * as nls from 'vs/nls'; ++import { Schemas } from 'vs/base/common/network'; +import { sep } from 'vs/base/common/path'; ++import { isWindows } from 'vs/base/common/platform'; ++import { ModesRegistry } from 'vs/editor/common/languages/modesRegistry'; ++import * as nls from 'vs/nls'; ++import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; ++import { ILabelService } from 'vs/platform/label/common/label'; +import { Registry } from 'vs/platform/registry/common/platform'; -+import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, IWorkbenchContribution, WorkbenchPhase, registerWorkbenchContribution2 } from 'vs/workbench/common/contributions'; -+import { IEditorFactoryRegistry, EditorExtensions } from 'vs/workbench/common/editor'; -+import { FILE_EDITOR_INPUT_ID, BINARY_TEXT_FILE_MODE } from 'vs/workbench/contrib/files/common/files'; ++import { EditorPaneDescriptor, IEditorPaneRegistry } from 'vs/workbench/browser/editor'; ++import { IWorkbenchContribution, WorkbenchPhase, registerWorkbenchContribution2 } from 'vs/workbench/common/contributions'; ++import { EditorExtensions, IEditorFactoryRegistry } from 'vs/workbench/common/editor'; ++import { BinaryFileEditor } from 'vs/workbench/contrib/files/browser/editors/binaryFileEditor'; ++import { FileEditorInputSerializer, FileEditorWorkingCopyEditorHandler } from 'vs/workbench/contrib/files/browser/editors/fileEditorHandler'; ++import { FileEditorInput } from 'vs/workbench/contrib/files/browser/editors/fileEditorInput'; ++import { TextFileEditor } from 'vs/workbench/contrib/files/browser/editors/textFileEditor'; +import { TextFileEditorTracker } from 'vs/workbench/contrib/files/browser/editors/textFileEditorTracker'; +import { TextFileSaveErrorHandler } from 'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler'; -+import { FileEditorInput } from 'vs/workbench/contrib/files/browser/editors/fileEditorInput'; -+import { BinaryFileEditor } from 'vs/workbench/contrib/files/browser/editors/binaryFileEditor'; -+import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -+import { isWindows } from 'vs/base/common/platform'; -+import { IEditorPaneRegistry, EditorPaneDescriptor } from 'vs/workbench/browser/editor'; -+import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; -+import { ILabelService } from 'vs/platform/label/common/label'; -+import { Schemas } from 'vs/base/common/network'; +import { WorkspaceWatcher } from 'vs/workbench/contrib/files/browser/workspaceWatcher'; +import { DirtyFilesIndicator } from 'vs/workbench/contrib/files/common/dirtyFilesIndicator'; -+import { FileEditorInputSerializer, FileEditorWorkingCopyEditorHandler } from 'vs/workbench/contrib/files/browser/editors/fileEditorHandler'; -+import { ModesRegistry } from 'vs/editor/common/languages/modesRegistry'; -+import { TextFileEditor } from 'vs/workbench/contrib/files/browser/editors/textFileEditor'; ++import { BINARY_TEXT_FILE_MODE, FILE_EDITOR_INPUT_ID } from 'vs/workbench/contrib/files/common/files'; +import './files.fileEditorFactory.contribution'; + +class FileUriLabelContribution implements IWorkbenchContribution { @@ -1596,7 +1594,7 @@ index 00000000000..18a1975b685 +registerWorkbenchContribution2(FileUriLabelContribution.ID, FileUriLabelContribution, WorkbenchPhase.BlockStartup); + +// Register Workspace Watcher -+Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(WorkspaceWatcher, LifecyclePhase.Restored); ++registerWorkbenchContribution2(WorkspaceWatcher.ID, WorkspaceWatcher, WorkbenchPhase.AfterRestored); + +// Register Dirty Files Indicator +registerWorkbenchContribution2(DirtyFilesIndicator.ID, DirtyFilesIndicator, WorkbenchPhase.BlockStartup); diff --git a/vscode-paches/0032-feat-only-apply-style-on-specific-class.patch b/vscode-paches/0032-feat-only-apply-style-on-specific-class.patch index 5f371877..7ff44f7f 100644 --- a/vscode-paches/0032-feat-only-apply-style-on-specific-class.patch +++ b/vscode-paches/0032-feat-only-apply-style-on-specific-class.patch @@ -9,7 +9,7 @@ Subject: [PATCH] feat: only apply style on specific class 2 files changed, 87 insertions(+), 103 deletions(-) diff --git a/src/vs/workbench/browser/media/style.css b/src/vs/workbench/browser/media/style.css -index 9299856d6ff..7e3f89d012d 100644 +index 8d4313f5f15..1d8f17f56f1 100644 --- a/src/vs/workbench/browser/media/style.css +++ b/src/vs/workbench/browser/media/style.css @@ -9,56 +9,38 @@ @@ -233,10 +233,10 @@ index 9299856d6ff..7e3f89d012d 100644 -.monaco-workbench .select-container:after { +.monaco-workbench-part .select-container:after { - content: "\eab4"; + content: var(--vscode-icon-chevron-down-content); + font-family: var(--vscode-icon-chevron-down-font-family); font-family: codicon; - font-size: 16px; -@@ -212,16 +196,16 @@ body.web { +@@ -213,16 +197,16 @@ body.web { /* Keyboard Focus Indication Styles */ @@ -263,7 +263,7 @@ index 9299856d6ff..7e3f89d012d 100644 outline-width: 1px; outline-style: solid; outline-offset: -1px; -@@ -234,19 +218,19 @@ body.web { +@@ -235,19 +219,19 @@ body.web { background: transparent; /* Search input focus fix when in high contrast */ } @@ -290,7 +290,7 @@ index 9299856d6ff..7e3f89d012d 100644 border-color: transparent; /* outline is a square, but border has a radius, so we avoid this glitch when focused (https://github.com/microsoft/vscode/issues/26045) */ } -@@ -274,38 +258,38 @@ body.web { +@@ -275,38 +259,38 @@ body.web { color: var(--vscode-list-focusHighlightForeground); } diff --git a/vscode-paches/0033-fix-do-not-call-FileAccess.asBrowserUri-at-the-root-.patch b/vscode-paches/0033-fix-do-not-call-FileAccess.asBrowserUri-at-the-root-.patch index 6a8bd042..cc70dbac 100644 --- a/vscode-paches/0033-fix-do-not-call-FileAccess.asBrowserUri-at-the-root-.patch +++ b/vscode-paches/0033-fix-do-not-call-FileAccess.asBrowserUri-at-the-root-.patch @@ -13,7 +13,7 @@ to be able to register the file before 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts b/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts -index 7c7fbac3a95..47df45a0773 100644 +index 1ee623c22a0..b283d23ee70 100644 --- a/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts @@ -42,7 +42,7 @@ import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsSe @@ -25,7 +25,7 @@ index 7c7fbac3a95..47df45a0773 100644 import { LocalWebWorkerRunningLocation } from 'vs/workbench/services/extensions/common/extensionRunningLocation'; import { IExtensionHostProfile, IExtensionService, IExtensionsStatus } from 'vs/workbench/services/extensions/common/extensions'; -@@ -275,8 +275,8 @@ export abstract class AbstractRuntimeExtensionsEditor extends EditorPane { +@@ -276,8 +276,8 @@ export abstract class AbstractRuntimeExtensionsEditor extends EditorPane { data.root.classList.toggle('odd', index % 2 === 1); @@ -37,7 +37,7 @@ index 7c7fbac3a95..47df45a0773 100644 if (!data.icon.complete) { data.icon.style.visibility = 'hidden'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts -index 89ea0e56a44..2979deec456 100644 +index f3ef2fb217c..1c09cb112ed 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -18,7 +18,7 @@ import { @@ -49,7 +49,7 @@ index 89ea0e56a44..2979deec456 100644 import { getGalleryExtensionTelemetryData, getLocalExtensionTelemetryData, areSameExtensions, groupByExtension, getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -@@ -240,7 +240,7 @@ export class Extension implements IExtension { +@@ -241,7 +241,7 @@ export class Extension implements IExtension { } } } @@ -59,7 +59,7 @@ index 89ea0e56a44..2979deec456 100644 get repository(): string | undefined { diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts -index abafe190b8d..ae62d18f2d0 100644 +index db46c01330b..ad87eb90c41 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts @@ -33,7 +33,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -81,7 +81,7 @@ index abafe190b8d..ae62d18f2d0 100644 when: ContextKeyExpr.deserialize(override ?? walkthrough.when) ?? ContextKeyExpr.true(), } as const; diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts -index 59bea5e74fc..5a8c9083989 100644 +index d17f98f886a..3323eb4bd77 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts @@ -40,7 +40,7 @@ export interface IExtensionManagementServerService { diff --git a/vscode-paches/0034-cleanup-remove-some-checks-and-warnings.patch b/vscode-paches/0034-cleanup-remove-some-checks-and-warnings.patch index 56a4b749..79b678a8 100644 --- a/vscode-paches/0034-cleanup-remove-some-checks-and-warnings.patch +++ b/vscode-paches/0034-cleanup-remove-some-checks-and-warnings.patch @@ -53,10 +53,10 @@ index 3d5d21f080f..44c0c97a128 100644 if (this.element && this._messagePort) { this._messagePort.postMessage({ channel, args: data }, transferable); diff --git a/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.ts b/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.ts -index 321ce8ea27e..bad236b82ea 100644 +index e47c8923019..a84f9374e0f 100644 --- a/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.ts +++ b/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.ts -@@ -321,13 +321,6 @@ export class BrowserAuxiliaryWindowService extends Disposable implements IAuxili +@@ -356,13 +356,6 @@ export class BrowserAuxiliaryWindowService extends Disposable implements IAuxili } protected createContainer(auxiliaryWindow: CodeWindow, disposables: DisposableStore, options?: IAuxiliaryWindowOpenOptions): { stylesLoaded: Barrier; container: HTMLElement } { @@ -71,7 +71,7 @@ index 321ce8ea27e..bad236b82ea 100644 const { stylesLoaded } = this.applyCSS(auxiliaryWindow, disposables); const container = this.applyHTML(auxiliaryWindow, disposables); diff --git a/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts b/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts -index a5f5e42eddd..7d462411a9c 100644 +index 848d8e9a4d2..dbd26575acf 100644 --- a/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts +++ b/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts @@ -111,8 +111,6 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost diff --git a/vscode-paches/0036-fix-mark-process-supported-as-soon-as-there-is-a-reg.patch b/vscode-paches/0036-fix-mark-process-supported-as-soon-as-there-is-a-reg.patch index 54bee074..df638941 100644 --- a/vscode-paches/0036-fix-mark-process-supported-as-soon-as-there-is-a-reg.patch +++ b/vscode-paches/0036-fix-mark-process-supported-as-soon-as-there-is-a-reg.patch @@ -9,7 +9,7 @@ Subject: [PATCH] fix: mark process supported as soon as there is a registered 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalService.ts b/src/vs/workbench/contrib/terminal/browser/terminalService.ts -index 2b1dc0a6b13..42e0d5788e9 100644 +index a297ece6fd1..94dded09457 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalService.ts @@ -19,7 +19,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c @@ -21,7 +21,7 @@ index 2b1dc0a6b13..42e0d5788e9 100644 import { formatMessageForTerminal } from 'vs/platform/terminal/common/terminalStrings'; import { iconForeground } from 'vs/platform/theme/common/colorRegistry'; import { getIconRegistry } from 'vs/platform/theme/common/iconRegistry'; -@@ -54,6 +54,7 @@ import { TerminalCapabilityStore } from 'vs/platform/terminal/common/capabilitie +@@ -53,6 +53,7 @@ import { TerminalCapabilityStore } from 'vs/platform/terminal/common/capabilitie import { ITimerService } from 'vs/workbench/services/timer/browser/timerService'; import { mark } from 'vs/base/common/performance'; import { DetachedTerminal } from 'vs/workbench/contrib/terminal/browser/detachedTerminal'; @@ -29,7 +29,7 @@ index 2b1dc0a6b13..42e0d5788e9 100644 import { ITerminalCapabilityImplMap, TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities'; import { createInstanceCapabilityEventMultiplexer } from 'vs/workbench/contrib/terminal/browser/terminalEvents'; import { mainWindow } from 'vs/base/browser/window'; -@@ -218,7 +219,7 @@ export class TerminalService extends Disposable implements ITerminalService { +@@ -216,7 +217,7 @@ export class TerminalService extends Disposable implements ITerminalService { this._handleInstanceContextKeys(); this._terminalShellTypeContextKey = TerminalContextKeys.shellType.bindTo(this._contextKeyService); this._processSupportContextKey = TerminalContextKeys.processSupported.bindTo(this._contextKeyService); diff --git a/vscode-paches/0044-cleanup-remove-code-that-we-will-run-ourselves.patch b/vscode-paches/0044-cleanup-remove-code-that-we-will-run-ourselves.patch index f326521e..82388bd3 100644 --- a/vscode-paches/0044-cleanup-remove-code-that-we-will-run-ourselves.patch +++ b/vscode-paches/0044-cleanup-remove-code-that-we-will-run-ourselves.patch @@ -4,11 +4,11 @@ Date: Mon, 11 Mar 2024 18:26:35 +0100 Subject: [PATCH] cleanup: remove code that we will run ourselves --- - src/vs/workbench/browser/workbench.ts | 11 ----------- - 1 file changed, 11 deletions(-) + src/vs/workbench/browser/workbench.ts | 17 ----------------- + 1 file changed, 17 deletions(-) diff --git a/src/vs/workbench/browser/workbench.ts b/src/vs/workbench/browser/workbench.ts -index cbc07dc7fb0..455bb043b5d 100644 +index 0dc55e03b6a..c254942820b 100644 --- a/src/vs/workbench/browser/workbench.ts +++ b/src/vs/workbench/browser/workbench.ts @@ -11,10 +11,7 @@ import { RunOnceScheduler, timeout } from 'vs/base/common/async'; @@ -30,7 +30,19 @@ index cbc07dc7fb0..455bb043b5d 100644 import { coalesce } from 'vs/base/common/arrays'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { Layout } from 'vs/workbench/browser/layout'; -@@ -161,13 +157,6 @@ export class Workbench extends Layout { +@@ -156,25 +152,12 @@ export class Workbench extends Layout { + const storageService = accessor.get(IStorageService); + const configurationService = accessor.get(IConfigurationService); + const hostService = accessor.get(IHostService); +- const hoverService = accessor.get(IHoverService); + const dialogService = accessor.get(IDialogService); + const notificationService = accessor.get(INotificationService) as NotificationService; + +- // Default Hover Delegate must be registered before creating any workbench/layout components +- // as these possibly will use the default hover delegate +- setHoverDelegateFactory((placement, enableInstantHover) => instantiationService.createInstance(WorkbenchHoverDelegate, placement, enableInstantHover, {})); +- setBaseLayerHoverDelegate(hoverService); +- // Layout this.initLayout(accessor); diff --git a/vscode-paches/0048-feat-hide-terminal-view-if-there-is-no-backend-avail.patch b/vscode-paches/0048-feat-hide-terminal-view-if-there-is-no-backend-avail.patch index 52988500..17771547 100644 --- a/vscode-paches/0048-feat-hide-terminal-view-if-there-is-no-backend-avail.patch +++ b/vscode-paches/0048-feat-hide-terminal-view-if-there-is-no-backend-avail.patch @@ -8,10 +8,10 @@ Subject: [PATCH] feat: hide terminal view if there is no backend available 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts -index 19b81cf9659..fce5c1d4eb4 100644 +index b9f06d1546f..29d44d9dd6e 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts -@@ -137,6 +137,7 @@ Registry.as(ViewContainerExtensions.ViewsRegistry).registerViews +@@ -141,6 +141,7 @@ Registry.as(ViewContainerExtensions.ViewsRegistry).registerViews canToggleVisibility: false, canMoveView: true, ctorDescriptor: new SyncDescriptor(TerminalViewPane), diff --git a/vscode-paches/0049-fix-move-action-from-service-file-to-contribution.patch b/vscode-paches/0049-fix-move-action-from-service-file-to-contribution.patch index 4d45cd8f..f69c8655 100644 --- a/vscode-paches/0049-fix-move-action-from-service-file-to-contribution.patch +++ b/vscode-paches/0049-fix-move-action-from-service-file-to-contribution.patch @@ -4,12 +4,12 @@ Date: Mon, 15 Apr 2024 10:52:20 +0200 Subject: [PATCH] fix: move action from service file to contribution --- - .../browser/gettingStarted.contribution.ts | 45 +++++++++++++++++- - .../browser/gettingStartedService.ts | 46 +------------------ - 2 files changed, 46 insertions(+), 45 deletions(-) + .../browser/gettingStarted.contribution.ts | 48 +++++++++++++++++- + .../browser/gettingStartedService.ts | 49 +------------------ + 2 files changed, 49 insertions(+), 48 deletions(-) diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts -index 66b9062611f..353af173d3f 100644 +index c957f53f54c..09dd9b2c409 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts @@ -15,7 +15,7 @@ import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegis @@ -30,7 +30,7 @@ index 66b9062611f..353af173d3f 100644 export * as icons from 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons'; -@@ -341,3 +343,44 @@ configurationRegistry.registerConfiguration({ +@@ -344,3 +346,47 @@ configurationRegistry.registerConfiguration({ registerWorkbenchContribution2(WorkspacePlatformContribution.ID, WorkspacePlatformContribution, WorkbenchPhase.AfterRestored); registerWorkbenchContribution2(StartupPageEditorResolverContribution.ID, StartupPageEditorResolverContribution, WorkbenchPhase.BlockRestore); registerWorkbenchContribution2(StartupPageRunnerContribution.ID, StartupPageRunnerContribution, WorkbenchPhase.AfterRestored); @@ -41,7 +41,10 @@ index 66b9062611f..353af173d3f 100644 + id: 'resetGettingStartedProgress', + category: localize2('developer', "Developer"), + title: localize2('resetWelcomePageWalkthroughProgress', "Reset Welcome Page Walkthrough Progress"), -+ f1: true ++ f1: true, ++ metadata: { ++ description: localize2('resetGettingStartedProgressDescription', 'Reset the progress of all Walkthrough steps on the Welcome Page to make them appear as if they are being viewed for the first time, providing a fresh start to the getting started experience.'), ++ } + }); + } + @@ -76,7 +79,7 @@ index 66b9062611f..353af173d3f 100644 + } +}); diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts -index ae62d18f2d0..5bf6ad46471 100644 +index ad87eb90c41..5bf6ad46471 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts @@ -3,11 +3,10 @@ @@ -101,7 +104,7 @@ index ae62d18f2d0..5bf6ad46471 100644 import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { checkGlobFileExists } from 'vs/workbench/services/extensions/common/workspaceContains'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -@@ -668,45 +667,4 @@ const convertInternalMediaPathsToBrowserURIs = (path: string | { hc: string; hcL +@@ -668,48 +667,4 @@ const convertInternalMediaPathsToBrowserURIs = (path: string | { hc: string; hcL } }; @@ -111,7 +114,10 @@ index ae62d18f2d0..5bf6ad46471 100644 - id: 'resetGettingStartedProgress', - category: localize2('developer', "Developer"), - title: localize2('resetWelcomePageWalkthroughProgress', "Reset Welcome Page Walkthrough Progress"), -- f1: true +- f1: true, +- metadata: { +- description: localize2('resetGettingStartedProgressDescription', 'Reset the progress of all Walkthrough steps on the Welcome Page to make them appear as if they are being viewed for the first time, providing a fresh start to the getting started experience.'), +- } - }); - } - diff --git a/vscode-paches/0050-refactor-split-workbench-contribution.patch b/vscode-paches/0050-refactor-split-workbench-contribution.patch index 2091e244..31504f4c 100644 --- a/vscode-paches/0050-refactor-split-workbench-contribution.patch +++ b/vscode-paches/0050-refactor-split-workbench-contribution.patch @@ -15,7 +15,7 @@ Subject: [PATCH] refactor: split workbench contribution 8 files changed, 93 insertions(+), 31 deletions(-) diff --git a/src/vs/workbench/api/browser/extensionHost.contribution.ts b/src/vs/workbench/api/browser/extensionHost.contribution.ts -index 1fc190391ff..dd5b1a22022 100644 +index b8d406e1691..789c96e1e80 100644 --- a/src/vs/workbench/api/browser/extensionHost.contribution.ts +++ b/src/vs/workbench/api/browser/extensionHost.contribution.ts @@ -3,17 +3,6 @@ @@ -36,10 +36,10 @@ index 1fc190391ff..dd5b1a22022 100644 // --- mainThread participants import './mainThreadLocalization'; import './mainThreadBulkEdits'; -@@ -89,22 +78,3 @@ import './mainThreadProfileContentHandlers'; +@@ -87,22 +76,3 @@ import './mainThreadShare'; + import './mainThreadProfileContentHandlers'; import './mainThreadAiRelatedInformation'; import './mainThreadAiEmbeddingVector'; - import './mainThreadIssueReporter'; - -export class ExtensionPoints implements IWorkbenchContribution { - diff --git a/vscode-paches/0057-refactor-split-code-to-be-able-to-import-only-requir.patch b/vscode-paches/0057-refactor-split-code-to-be-able-to-import-only-requir.patch index f84641f8..ccbc2d92 100644 --- a/vscode-paches/0057-refactor-split-code-to-be-able-to-import-only-requir.patch +++ b/vscode-paches/0057-refactor-split-code-to-be-able-to-import-only-requir.patch @@ -10,10 +10,10 @@ Subject: [PATCH] refactor: split code to be able to import only required part 3 files changed, 236 insertions(+), 206 deletions(-) diff --git a/src/vs/platform/extensionManagement/common/extensionsScannerService.ts b/src/vs/platform/extensionManagement/common/extensionsScannerService.ts -index 0b64c8b9b33..484316edbae 100644 +index e92897f174f..ca7cfbd127b 100644 --- a/src/vs/platform/extensionManagement/common/extensionsScannerService.ts +++ b/src/vs/platform/extensionManagement/common/extensionsScannerService.ts -@@ -544,23 +544,169 @@ export class ExtensionScannerInput { +@@ -545,23 +545,169 @@ export class ExtensionScannerInput { } } @@ -188,7 +188,7 @@ index 0b64c8b9b33..484316edbae 100644 } async scanExtensions(input: ExtensionScannerInput): Promise { -@@ -716,144 +862,6 @@ class ExtensionsScanner extends Disposable { +@@ -718,144 +864,6 @@ class ExtensionsScanner extends Disposable { } return manifest; } From 1dee161a9d94bef0e01b4bff6431a72b9faaec61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Mon, 6 May 2024 16:30:05 +0200 Subject: [PATCH 05/10] fix: cleanup useless files sooner --- scripts/install-vscode | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/install-vscode b/scripts/install-vscode index b1db9aec..26765abb 100755 --- a/scripts/install-vscode +++ b/scripts/install-vscode @@ -58,6 +58,12 @@ BUILD_SOURCEVERSION=$vscodeRef NODE_OPTIONS=--max-old-space-size=8192 yarn gulp rm -rf $extension_output_directory cp -R .build/web/extensions "$extension_output_directory" +# Remove useless files +cd src +rm -rf `find . -name '*.test.ts' -o -name 'test' -o -name 'electron-browser'` +rm -rf vs/code +cd .. + # transform to relative imports, replace ESM comments and vs/css! imports cat << EOF | node - require('./build/lib/standalone').createESMSourcesAndResources2({ @@ -80,10 +86,6 @@ cd .. cd src -# Remove useless files -rm -rf `find . -name '*.test.ts' -o -name 'test' -o -name 'electron-browser'` -rm -rf vs/code - mkdir -p $output_directory echo $vscodeRef > $version_info From 0dd476c9f79d8aadbe8404501e1337b8cb5cac2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Mon, 6 May 2024 16:30:58 +0200 Subject: [PATCH 06/10] cleanup: remove HoverService which is now registered by default --- src/service-override/viewCommon.ts | 3 --- src/service-override/views.ts | 2 -- 2 files changed, 5 deletions(-) diff --git a/src/service-override/viewCommon.ts b/src/service-override/viewCommon.ts index 9ac427f6..349b8324 100644 --- a/src/service-override/viewCommon.ts +++ b/src/service-override/viewCommon.ts @@ -34,10 +34,8 @@ import { BrowserAuxiliaryWindowService } from 'vs/workbench/services/auxiliaryWi import { IAuxiliaryWindowService } from 'vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.service' import { IViewsService } from 'vs/workbench/services/views/common/viewsService.service' import { ViewsService } from 'vs/workbench/services/views/browser/viewsService' -import { IHoverService } from 'vs/platform/hover/browser/hover.service' import { IEditorPaneService } from 'vs/workbench/services/editor/common/editorPaneService.service' import { EditorPaneService } from 'vs/workbench/services/editor/browser/editorPaneService' -import { HoverService } from 'vs/editor/browser/services/hoverService/hoverService' import { CustomEditorLabelService } from 'vs/workbench/services/editor/common/customEditorLabelService' import { ICustomEditorLabelService } from 'vs/workbench/services/editor/common/customEditorLabelService.service' import getBulkEditServiceOverride from './bulkEdit' @@ -88,7 +86,6 @@ function getServiceOverride (_webviewIframeAlternateDomains?: string): IEditorOv [IViewDescriptorService.toString()]: new SyncDescriptor(ViewDescriptorService, [], true), [IActivityService.toString()]: new SyncDescriptor(ActivityService, [], true), [IPaneCompositePartService.toString()]: new SyncDescriptor(PaneCompositePartService, [], true), - [IHoverService.toString()]: new SyncDescriptor(HoverService, [], true), [ICodeEditorService.toString()]: new SyncDescriptor(CodeEditorService, [], true), [ITextEditorService.toString()]: new SyncDescriptor(TextEditorService, [], false), diff --git a/src/service-override/views.ts b/src/service-override/views.ts index 399133b4..c1f36111 100644 --- a/src/service-override/views.ts +++ b/src/service-override/views.ts @@ -40,7 +40,6 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { coalesce } from 'vs/base/common/arrays' import { IWorkingCopyBackupService } from 'vs/workbench/services/workingCopy/common/workingCopyBackup.service' import { EditorParts } from 'vs/workbench/browser/parts/editor/editorParts' -import { HoverService } from 'vs/editor/browser/services/hoverService/hoverService' import { MonacoDelegateEditorGroupsService, MonacoEditorService, OpenEditor } from './tools/editor' import { LayoutService } from './layout' import getQuickAccessOverride from './quickaccess' @@ -693,7 +692,6 @@ export { IResolvedTextEditorModel, IReference, - HoverService, ActivityService, SidebarPart, ActivitybarPart, From b6749c48257edd1c6f7d3403992683fdadea37d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Mon, 6 May 2024 16:31:50 +0200 Subject: [PATCH 07/10] fix: add missing hover deledates --- src/lifecycle.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lifecycle.ts b/src/lifecycle.ts index 09d30aeb..d54c373c 100644 --- a/src/lifecycle.ts +++ b/src/lifecycle.ts @@ -9,6 +9,10 @@ import { EditorExtensions, IEditorFactoryRegistry } from 'vs/workbench/common/ed import { StandaloneServices } from 'vs/editor/standalone/browser/standaloneServices' import { Disposable } from 'vs/base/common/lifecycle' import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService.service' +import { setHoverDelegateFactory } from 'vs/base/browser/ui/hover/hoverDelegateFactory' +import { setBaseLayerHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate2' +import { WorkbenchHoverDelegate } from 'vs/platform/hover/browser/hover' +import { IHoverService } from 'vs/platform/hover/browser/hover.service' const layoutEmitter = new Emitter() export const onLayout = layoutEmitter.event @@ -59,6 +63,9 @@ export async function startup (instantiationService: IInstantiationService): Pro void instantiationService.invokeFunction(async accessor => { const lifecycleService = accessor.get(ILifecycleService) + setHoverDelegateFactory((placement, enableInstantHover) => instantiationService.createInstance(WorkbenchHoverDelegate, placement, enableInstantHover, {})) + setBaseLayerHoverDelegate(accessor.get(IHoverService)) + Registry.as(WorkbenchExtensions.Workbench).start(accessor) Registry.as(EditorExtensions.EditorFactory).start(accessor) From a0a2c457ce3066d7e173bc7b0db1f854e7012071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Mon, 6 May 2024 18:33:52 +0200 Subject: [PATCH 08/10] fix: properly set editor pane group --- demo/src/features/customView.views.ts | 6 +++--- demo/src/features/customView.workbench.ts | 6 +++--- src/service-override/tools/views.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/demo/src/features/customView.views.ts b/demo/src/features/customView.views.ts index d24a09bc..88586d05 100644 --- a/demo/src/features/customView.views.ts +++ b/demo/src/features/customView.views.ts @@ -1,4 +1,4 @@ -import { IDialogService, EditorInput, createInstance, IInstantiationService } from 'vscode/services' +import { IDialogService, EditorInput, createInstance, IInstantiationService, IEditorGroup } from 'vscode/services' import { IEditorCloseHandler, IEditorSerializer, registerCustomView, registerEditorPane, registerEditor, registerEditorSerializer, ViewContainerLocation, SimpleEditorPane, SimpleEditorInput, RegisteredEditorPriority, ConfirmResult } from '@codingame/monaco-vscode-views-service-override' import * as monaco from 'monaco-editor' @@ -45,8 +45,8 @@ registerCustomView({ class CustomEditorPane extends SimpleEditorPane { static readonly ID = 'workbench.editors.customEditor' - constructor () { - super(CustomEditorPane.ID) + constructor (group: IEditorGroup) { + super(CustomEditorPane.ID, group) } initialize (): HTMLElement { diff --git a/demo/src/features/customView.workbench.ts b/demo/src/features/customView.workbench.ts index 5d251973..4bdc7d3a 100644 --- a/demo/src/features/customView.workbench.ts +++ b/demo/src/features/customView.workbench.ts @@ -1,4 +1,4 @@ -import { IDialogService, EditorInput, createInstance, IInstantiationService } from 'vscode/services' +import { IDialogService, EditorInput, createInstance, IInstantiationService, IEditorGroup } from 'vscode/services' import { IEditorCloseHandler, IEditorSerializer, registerCustomView, registerEditorPane, registerEditor, registerEditorSerializer, ViewContainerLocation, SimpleEditorPane, SimpleEditorInput, RegisteredEditorPriority, ConfirmResult } from '@codingame/monaco-vscode-workbench-service-override' import * as monaco from 'monaco-editor' @@ -45,8 +45,8 @@ registerCustomView({ class CustomEditorPane extends SimpleEditorPane { static readonly ID = 'workbench.editors.customEditor' - constructor () { - super(CustomEditorPane.ID) + constructor (group: IEditorGroup) { + super(CustomEditorPane.ID, group) } initialize (): HTMLElement { diff --git a/src/service-override/tools/views.ts b/src/service-override/tools/views.ts index 8f27b618..c7a94921 100644 --- a/src/service-override/tools/views.ts +++ b/src/service-override/tools/views.ts @@ -36,7 +36,6 @@ import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/la import { StandaloneServices } from 'vs/editor/standalone/browser/standaloneServices' import { Event } from 'vs/base/common/event' import { IView, SplitView } from 'vs/base/browser/ui/splitview/splitview' -import { fakeActiveGroup } from './editor' import type { LayoutService } from '../layout' import { IEditorGroup, withReadyServices } from '../../services' @@ -48,9 +47,10 @@ type Label = string | { abstract class InjectedEditorPane extends EditorPane { constructor ( - id: string + id: string, + group: IEditorGroup ) { - super(id, fakeActiveGroup, StandaloneServices.get(ITelemetryService), StandaloneServices.get(IThemeService), StandaloneServices.get(IStorageService)) + super(id, group, StandaloneServices.get(ITelemetryService), StandaloneServices.get(IThemeService), StandaloneServices.get(IStorageService)) } } From fca1981a49e73d5b10fb56a435abfccd3c0848de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Mon, 6 May 2024 18:34:28 +0200 Subject: [PATCH 09/10] fixup! lib!: update to VSCode 1.89 --- ...emove-code-that-we-will-run-ourselves.patch | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/vscode-paches/0044-cleanup-remove-code-that-we-will-run-ourselves.patch b/vscode-paches/0044-cleanup-remove-code-that-we-will-run-ourselves.patch index 82388bd3..7fe175cc 100644 --- a/vscode-paches/0044-cleanup-remove-code-that-we-will-run-ourselves.patch +++ b/vscode-paches/0044-cleanup-remove-code-that-we-will-run-ourselves.patch @@ -4,11 +4,11 @@ Date: Mon, 11 Mar 2024 18:26:35 +0100 Subject: [PATCH] cleanup: remove code that we will run ourselves --- - src/vs/workbench/browser/workbench.ts | 17 ----------------- - 1 file changed, 17 deletions(-) + src/vs/workbench/browser/workbench.ts | 20 -------------------- + 1 file changed, 20 deletions(-) diff --git a/src/vs/workbench/browser/workbench.ts b/src/vs/workbench/browser/workbench.ts -index 0dc55e03b6a..c254942820b 100644 +index 0dc55e03b6a..3e3c485a6a7 100644 --- a/src/vs/workbench/browser/workbench.ts +++ b/src/vs/workbench/browser/workbench.ts @@ -11,10 +11,7 @@ import { RunOnceScheduler, timeout } from 'vs/base/common/async'; @@ -30,7 +30,17 @@ index 0dc55e03b6a..c254942820b 100644 import { coalesce } from 'vs/base/common/arrays'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { Layout } from 'vs/workbench/browser/layout'; -@@ -156,25 +152,12 @@ export class Workbench extends Layout { +@@ -43,9 +39,6 @@ import { IHostService } from 'vs/workbench/services/host/browser/host'; + import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; + import { mainWindow } from 'vs/base/browser/window'; + import { PixelRatio } from 'vs/base/browser/pixelRatio'; +-import { IHoverService, WorkbenchHoverDelegate } from 'vs/platform/hover/browser/hover'; +-import { setHoverDelegateFactory } from 'vs/base/browser/ui/hover/hoverDelegateFactory'; +-import { setBaseLayerHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate2'; + import { AccessibilityProgressSignalScheduler } from 'vs/platform/accessibilitySignal/browser/progressAccessibilitySignalScheduler'; + import { setProgressAcccessibilitySignalScheduler } from 'vs/base/browser/ui/progressbar/progressAccessibilitySignal'; + +@@ -156,25 +149,12 @@ export class Workbench extends Layout { const storageService = accessor.get(IStorageService); const configurationService = accessor.get(IConfigurationService); const hostService = accessor.get(IHostService); From b540ebaf6f30d60e1a6a375f024b002b240cf981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Mon, 6 May 2024 18:34:50 +0200 Subject: [PATCH 10/10] fix(demo): regenerate package-lock --- demo/package-lock.json | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/demo/package-lock.json b/demo/package-lock.json index cef7c0b0..d6c973f2 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -820,7 +820,9 @@ "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release", "@codingame/monaco-vscode-host-service-override": "0.0.0-semantic-release", "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release", - "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release" + "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release", + "@vscode/iconv-lite-umd": "0.7.0", + "jschardet": "3.0.0" } }, "../dist/rollup-vsix-plugin": { @@ -829,7 +831,11 @@ "dev": true, "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "css-url-parser": "^1.1.3", + "memfs": "^4.8.1", + "mime-types": "^2.1.35", + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "yauzl": "^3.0.0" } }, "../dist/service-override-accessibility": { @@ -1016,7 +1022,7 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "@vscode/vscode-languagedetection": "npm:@codingame/vscode-languagedetection@1.0.23", + "@vscode/vscode-languagedetection": "1.0.21", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1238,13 +1244,13 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "@xterm/addon-canvas": "0.7.0-beta.12", - "@xterm/addon-image": "0.8.0-beta.12", - "@xterm/addon-search": "0.15.0-beta.12", - "@xterm/addon-serialize": "0.13.0-beta.12", - "@xterm/addon-unicode11": "0.8.0-beta.12", - "@xterm/addon-webgl": "0.18.0-beta.12", - "@xterm/xterm": "5.5.0-beta.12", + "@xterm/addon-canvas": "0.8.0-beta.17", + "@xterm/addon-image": "0.9.0-beta.17", + "@xterm/addon-search": "0.16.0-beta.17", + "@xterm/addon-serialize": "0.14.0-beta.17", + "@xterm/addon-unicode11": "0.9.0-beta.17", + "@xterm/addon-webgl": "0.19.0-beta.17", + "@xterm/xterm": "5.6.0-beta.17", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } },