@codingame/monaco-vscode-api 1.82.6 → 1.83.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +5 -5
- package/assets/index-no-csp.html +2 -1
- package/assets/index.html +3 -2
- package/extensions.js +17 -14
- package/external/xterm/typings/xterm.d.ts +171 -109
- package/missing-services.js +33 -22
- package/monaco-editor-treemending.patch +1371 -1254
- package/monaco-treemending.js +2 -2
- package/monaco.js +2 -2
- package/package.json +2 -2
- package/service-override/extensions.js +10 -11
- package/services.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +1 -1
- package/vscode/src/vs/base/common/event.d.ts +13 -17
- package/vscode/src/vs/base/common/keyCodes.d.ts +18 -18
- package/vscode/src/vs/base/common/lifecycle.d.ts +9 -0
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +2 -0
- package/vscode/src/vs/base/common/product.d.ts +1 -0
- package/vscode/src/vs/base/parts/ipc/common/ipc.js +6 -2
- package/vscode/src/vs/base/parts/storage/common/storage.d.ts +1 -0
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +12 -3
- package/vscode/src/vs/editor/common/core/lineRange.d.ts +0 -5
- package/vscode/src/vs/editor/common/core/offsetRange.d.ts +9 -2
- package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +6 -20
- package/vscode/src/vs/editor/common/diff/legacyLinesDiffComputer.d.ts +2 -2
- package/vscode/src/vs/editor/common/diff/linesDiffComputer.d.ts +5 -55
- package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +55 -0
- package/vscode/src/vs/editor/common/languages.d.ts +7 -10
- package/vscode/src/vs/editor/common/model.d.ts +1 -1
- package/vscode/src/vs/platform/actions/common/actions.d.ts +1 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +5 -5
- package/vscode/src/vs/platform/files/common/fileService.js +46 -40
- package/vscode/src/vs/platform/files/common/files.d.ts +46 -1
- package/vscode/src/vs/platform/files/common/inMemoryFilesystemProvider.js +45 -0
- package/vscode/src/vs/platform/storage/common/storage.d.ts +5 -0
- package/vscode/src/vs/platform/storage/common/storage.js +4 -0
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +4 -1
- package/vscode/src/vs/platform/terminal/common/terminal.js +1 -3
- package/vscode/src/vs/platform/tunnel/common/tunnel.d.ts +1 -1
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +11 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents.js +50 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSlashCommands.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +16 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +20 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +8 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +93 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +3 -166
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +3 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +18 -11
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +14 -9
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +11 -2
- package/vscode/src/vs/workbench/api/common/extHostChat.js +10 -1
- package/vscode/src/vs/workbench/api/common/extHostChatAgents.js +62 -0
- package/vscode/src/vs/workbench/api/common/extHostChatSlashCommand.js +13 -4
- package/vscode/src/vs/workbench/api/common/extHostCommands.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostComments.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +36 -4
- package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +6 -29
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +24 -12
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +0 -2
- package/vscode/src/vs/workbench/api/common/extHostRequireInterceptor.js +0 -63
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +80 -0
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +24 -0
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +14 -10
- package/vscode/src/vs/workbench/api/common/extHostTextEditor.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +11 -7
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +34 -16
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +31 -13
- package/vscode/src/vs/workbench/api/common/extHostWebview.js +14 -2
- package/vscode/src/vs/workbench/api/common/extHostWebviewPanels.js +11 -5
- package/vscode/src/vs/workbench/api/common/extensionHostMain.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +32 -9
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +3 -1
- package/vscode/src/vs/workbench/browser/codeeditor.js +1 -1
- package/vscode/src/vs/workbench/browser/dnd.js +7 -6
- package/vscode/src/vs/workbench/browser/media/part.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +7 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editor.js +7 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +9 -3
- package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +9 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +44 -14
- package/vscode/src/vs/workbench/browser/parts/editor/media/editorplaceholder.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +3 -19
- package/vscode/src/vs/workbench/browser/parts/editor/textResourceEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +9 -3
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.d.ts +1 -1
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +10 -9
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +2 -0
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +6 -5
- package/vscode/src/vs/workbench/browser/web.api.d.ts +0 -6
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +34 -3
- package/vscode/src/vs/workbench/common/contextkeys.js +2 -1
- package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +4 -4
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +0 -1
- package/vscode/src/vs/workbench/common/editor/editorInput.js +2 -4
- package/vscode/src/vs/workbench/common/editor/editorModel.d.ts +0 -1
- package/vscode/src/vs/workbench/common/editor/editorModel.js +1 -3
- package/vscode/src/vs/workbench/common/editor.d.ts +2 -0
- package/vscode/src/vs/workbench/common/theme.js +21 -1
- package/vscode/src/vs/workbench/common/views.d.ts +1 -1
- package/vscode/src/vs/workbench/common/views.js +1 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +12 -4
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +335 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +81 -27
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +1 -1
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +22 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +136 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +14 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +78 -1
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +43 -17
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +30 -26
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +23 -18
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +8 -8
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +55 -20
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +26 -10
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +7 -6
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +58 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +9 -6
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +171 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +204 -33
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +3 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +21 -4
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +22 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debugUtils.js +2 -1
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +7 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +2 -1
- package/vscode/src/vs/workbench/contrib/files/common/files.js +7 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +17 -17
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +4 -1
- package/vscode/src/vs/workbench/contrib/output/browser/output.contribution.js +22 -19
- package/vscode/src/vs/workbench/contrib/output/browser/outputServices.js +2 -38
- package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +14 -1
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +3 -8
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +10 -12
- package/vscode/src/vs/workbench/contrib/snippets/browser/tabCompletion.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +0 -16
- package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +2 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +8 -6
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +2 -4
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +2 -4
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +7 -3
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +2 -6
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +18 -20
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +9 -13
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +2 -1
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +47 -15
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +14 -4
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +22 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +15 -14
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +12 -7
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +10 -6
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +27 -11
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +2 -5
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +7 -11
- package/vscode/src/vs/workbench/services/extensions/common/rpcProtocol.js +20 -4
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +24 -16
- package/vscode/src/vs/workbench/services/output/common/output.js +1 -2
- package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +6 -6
- package/vscode/src/vs/workbench/services/preferences/common/preferences.js +4 -3
- package/vscode/src/vs/workbench/services/preferences/common/preferencesModels.d.ts +0 -1
- package/vscode/src/vs/workbench/services/search/common/fileSearchManager.js +3 -1
- package/vscode/src/vs/workbench/services/search/common/search.js +2 -1
- package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +1 -2
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileService.js +3 -8
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +3 -4
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +1 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyBackupService.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyService.js +4 -2
- package/vscode/src/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution.js +0 -180
- package/vscode/src/vs/platform/credentials/common/credentials.d.ts +0 -13
- package/vscode/src/vs/platform/credentials/common/credentials.js +0 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadKeytar.js +0 -31
- package/vscode/src/vs/workbench/browser/iframe.js +0 -16
- package/vscode/src/vs/workbench/browser/parts/editor/accessibilityStatus.js +0 -90
- package/vscode/src/vs/workbench/browser/parts/editor/tabFocus.js +0 -77
- package/vscode/src/vs/workbench/contrib/output/browser/logViewer.js +0 -67
package/monaco-treemending.js
CHANGED
|
@@ -847,8 +847,8 @@ async function run() {
|
|
|
847
847
|
console.info('Monaco-editor has already been tree-mended, ignoring');
|
|
848
848
|
process.exit(0);
|
|
849
849
|
}
|
|
850
|
-
if ("0.
|
|
851
|
-
console.error(`Wrong monaco-editor version: expecting ${"0.
|
|
850
|
+
if ("0.44.0" !== monacoVersion) {
|
|
851
|
+
console.error(`Wrong monaco-editor version: expecting ${"0.44.0"}, got ${monacoVersion}`);
|
|
852
852
|
process.exit(1);
|
|
853
853
|
}
|
|
854
854
|
// pnpm WA: copy files to a temp directory and patch files there. When finished copy back
|
package/monaco.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from './external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { StandaloneServices, StandaloneKeybindingService } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
3
3
|
import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
4
4
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
5
|
-
import {
|
|
5
|
+
import { StandaloneDiffEditor2, StandaloneEditor } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
|
|
6
6
|
import { isObject } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
7
7
|
import { distinct, deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
8
8
|
export { errorHandler } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
@@ -119,7 +119,7 @@ ConfiguredStandaloneEditor = __decorate([
|
|
|
119
119
|
( __param(3, IInstantiationService)),
|
|
120
120
|
( __param(4, ITextResourceConfigurationService))
|
|
121
121
|
], ConfiguredStandaloneEditor);
|
|
122
|
-
class ConfiguredStandaloneDiffEditor extends
|
|
122
|
+
class ConfiguredStandaloneDiffEditor extends StandaloneDiffEditor2 {
|
|
123
123
|
_createInnerEditor(instantiationService, container, options) {
|
|
124
124
|
return instantiationService.createInstance(ConfiguredStandaloneEditor, container, true, options);
|
|
125
125
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.83.1",
|
|
4
4
|
"description": "VSCode public API plugged on the monaco editor",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": {
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
"monaco-treemending": "./monaco-treemending.js"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"monaco-editor": "0.
|
|
83
|
+
"monaco-editor": "0.44.0"
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from '../external/tslib/tslib.es6.js';
|
|
2
2
|
import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
3
3
|
import { ILifecycleService } from '../vscode/src/vs/workbench/services/lifecycle/common/lifecycle.js';
|
|
4
|
-
import { nullExtensionDescription, toExtensionDescription, IExtensionService
|
|
4
|
+
import { nullExtensionDescription, toExtensionDescription, IExtensionService } from '../vscode/src/vs/workbench/services/extensions/common/extensions.js';
|
|
5
5
|
import { ILogService, ILoggerService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
6
6
|
import { ExtensionIdentifierMap } from 'monaco-editor/esm/vs/platform/extensions/common/extensions.js';
|
|
7
7
|
import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
@@ -57,6 +57,7 @@ import '../vscode/src/vs/workbench/api/browser/mainThreadLocalization.js';
|
|
|
57
57
|
import '../vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js';
|
|
58
58
|
import '../vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js';
|
|
59
59
|
import '../vscode/src/vs/workbench/api/browser/mainThreadChatSlashCommands.js';
|
|
60
|
+
import '../vscode/src/vs/workbench/api/browser/mainThreadChatAgents.js';
|
|
60
61
|
import '../vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js';
|
|
61
62
|
import '../vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js';
|
|
62
63
|
import '../vscode/src/vs/workbench/api/browser/mainThreadClipboard.js';
|
|
@@ -76,7 +77,6 @@ import '../vscode/src/vs/workbench/api/browser/mainThreadErrors.js';
|
|
|
76
77
|
import '../vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js';
|
|
77
78
|
import '../vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js';
|
|
78
79
|
import '../vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js';
|
|
79
|
-
import '../vscode/src/vs/workbench/api/browser/mainThreadKeytar.js';
|
|
80
80
|
import '../vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js';
|
|
81
81
|
import '../vscode/src/vs/workbench/api/browser/mainThreadLanguages.js';
|
|
82
82
|
import '../vscode/src/vs/workbench/api/browser/mainThreadLogService.js';
|
|
@@ -197,7 +197,7 @@ let LocalExtensionHost = class LocalExtensionHost {
|
|
|
197
197
|
this._productService = _productService;
|
|
198
198
|
this._userDataProfilesService = _userDataProfilesService;
|
|
199
199
|
this.remoteAuthority = null;
|
|
200
|
-
this.extensions =
|
|
200
|
+
this.extensions = null;
|
|
201
201
|
this.onExit = Event.None;
|
|
202
202
|
this._protocolPromise = null;
|
|
203
203
|
this._extensionHostLogsLocation = joinPath(this._environmentService.extHostLogsPath, 'local');
|
|
@@ -217,8 +217,8 @@ let LocalExtensionHost = class LocalExtensionHost {
|
|
|
217
217
|
}
|
|
218
218
|
async _createExtHostInitData() {
|
|
219
219
|
const initData = await this._initDataProvider.getInitData();
|
|
220
|
+
this.extensions = initData.extensions;
|
|
220
221
|
const workspace = this._contextService.getWorkspace();
|
|
221
|
-
const deltaExtensions = this.extensions.set(initData.allExtensions, initData.myExtensions);
|
|
222
222
|
const nlsBaseUrl = this._productService.extensionsGallery?.nlsBaseUrl;
|
|
223
223
|
let nlsUrlWithDetails;
|
|
224
224
|
if (nlsBaseUrl != null && this._productService.commit != null && !platform.Language.isDefaultVariant()) {
|
|
@@ -255,9 +255,7 @@ let LocalExtensionHost = class LocalExtensionHost {
|
|
|
255
255
|
includeStack: false,
|
|
256
256
|
logNative: this._environmentService.debugRenderer
|
|
257
257
|
},
|
|
258
|
-
|
|
259
|
-
activationEvents: deltaExtensions.addActivationEvents,
|
|
260
|
-
myExtensions: deltaExtensions.myToAdd,
|
|
258
|
+
extensions: initData.extensions.toSnapshot(),
|
|
261
259
|
nlsBaseUrl: nlsUrlWithDetails,
|
|
262
260
|
telemetryInfo: {
|
|
263
261
|
sessionId: this._telemetryService.sessionId,
|
|
@@ -324,8 +322,8 @@ EsmWebWorkerExtensionHost = __decorate([
|
|
|
324
322
|
( __param(13, IStorageService))
|
|
325
323
|
], EsmWebWorkerExtensionHost);
|
|
326
324
|
let LocalBrowserExtensionHostFactory = class LocalBrowserExtensionHostFactory extends BrowserExtensionHostFactory {
|
|
327
|
-
constructor(workerConfig, _extensionsProposedApi, _scanWebExtensions,
|
|
328
|
-
super(_extensionsProposedApi, _scanWebExtensions,
|
|
325
|
+
constructor(workerConfig, _extensionsProposedApi, _scanWebExtensions, _getExtensionRegistrySnapshotWhenReady, _instantiationService, _remoteAgentService, _remoteAuthorityResolverService, _extensionEnablementService, _logService) {
|
|
326
|
+
super(_extensionsProposedApi, _scanWebExtensions, _getExtensionRegistrySnapshotWhenReady, _instantiationService, _remoteAgentService, _remoteAuthorityResolverService, _extensionEnablementService, _logService);
|
|
329
327
|
this.workerConfig = workerConfig;
|
|
330
328
|
}
|
|
331
329
|
createExtensionHost(runningLocations, runningLocation, isInitialStart) {
|
|
@@ -350,7 +348,8 @@ LocalBrowserExtensionHostFactory = __decorate([
|
|
|
350
348
|
( __param(4, IInstantiationService)),
|
|
351
349
|
( __param(5, IRemoteAgentService)),
|
|
352
350
|
( __param(6, IRemoteAuthorityResolverService)),
|
|
353
|
-
( __param(7, IWorkbenchExtensionEnablementService))
|
|
351
|
+
( __param(7, IWorkbenchExtensionEnablementService)),
|
|
352
|
+
( __param(8, ILogService))
|
|
354
353
|
], LocalBrowserExtensionHostFactory);
|
|
355
354
|
let LocalBrowserExtensionHostKindPicker = class LocalBrowserExtensionHostKindPicker extends BrowserExtensionHostKindPicker {
|
|
356
355
|
constructor(allowedExtHostKinds, _logService) {
|
|
@@ -382,7 +381,7 @@ LocalBrowserExtensionHostKindPicker = __decorate([
|
|
|
382
381
|
let SimpleExtensionService = class SimpleExtensionService extends AbstractExtensionService {
|
|
383
382
|
constructor(workerConfig, instantiationService, notificationService, browserEnvironmentService, telemetryService, extensionEnablementService, fileService, productService, extensionManagementService, contextService, configurationService, extensionManifestPropertiesService, logService, remoteAgentService, remoteExtensionsScannerService, lifecycleService, remoteAuthorityResolverService, userDataInitializationService, dialogService) {
|
|
384
383
|
const extensionsProposedApi = instantiationService.createInstance(ExtensionsProposedApi);
|
|
385
|
-
const extensionHostFactory = new LocalBrowserExtensionHostFactory(workerConfig, extensionsProposedApi, async () => [], () => this.
|
|
384
|
+
const extensionHostFactory = new LocalBrowserExtensionHostFactory(workerConfig, extensionsProposedApi, async () => [], () => this._getExtensionRegistrySnapshotWhenReady(), instantiationService, remoteAgentService, remoteAuthorityResolverService, extensionEnablementService, logService);
|
|
386
385
|
super(extensionsProposedApi, extensionHostFactory, new LocalBrowserExtensionHostKindPicker(workerConfig != null ? [2 , 1 , 3 ] : [1 , 3 ], logService), instantiationService, notificationService, browserEnvironmentService, telemetryService, extensionEnablementService, fileService, productService, extensionManagementService, contextService, configurationService, extensionManifestPropertiesService, logService, remoteAgentService, remoteExtensionsScannerService, lifecycleService, remoteAuthorityResolverService, dialogService);
|
|
387
386
|
void lifecycleService.when(2 ).then(async () => {
|
|
388
387
|
await userDataInitializationService.initializeInstalledExtensions(instantiationService);
|
package/services.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export { IQuickInputService } from './vscode/src/vs/platform/quickinput/common/q
|
|
|
28
28
|
export { ITelemetryService } from './vscode/src/vs/platform/telemetry/common/telemetry.js';
|
|
29
29
|
export { IUriIdentityService } from './vscode/src/vs/platform/uriIdentity/common/uriIdentity.js';
|
|
30
30
|
export { IBreadcrumbsService } from './vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js';
|
|
31
|
-
export { EditorGroupLayout, GroupDirection, GroupLayoutArgument, GroupLocation, GroupOrientation, GroupsArrangement, GroupsOrder,
|
|
31
|
+
export { EditorGroupLayout, GroupDirection, GroupLayoutArgument, GroupLocation, GroupOrientation, GroupsArrangement, GroupsOrder, ICloseAllEditorsOptions, ICloseEditorOptions, ICloseEditorsFilter, IEditorGroup, IEditorGroupsService, IEditorReplacement, IEditorSideGroup, IFindGroupScope, IMergeGroupOptions, MergeGroupMode } from './vscode/src/vs/workbench/services/editor/common/editorGroupsService.js';
|
|
32
32
|
export { CloseDirection, EditorInputWithOptions, EditorsOrder, GroupIdentifier, IActiveEditorChangeEvent, IEditorCloseEvent, IEditorControl, IEditorPane, IEditorPartOptions, IEditorPartOptionsChangeEvent, IEditorWillMoveEvent, IEditorWillOpenEvent, IFindEditorOptions, IMatchEditorOptions, IUntypedEditorInput, IVisibleEditorPane } from './vscode/src/vs/workbench/common/editor.js';
|
|
33
33
|
export { IDimension } from './vscode/src/vs/editor/common/core/dimension.js';
|
|
34
34
|
export { IEditorOptions, IResourceEditorInput, ITextEditorOptions } from './vscode/src/vs/platform/editor/common/editor.js';
|
|
@@ -379,7 +379,7 @@ class MenuBar extends Disposable {
|
|
|
379
379
|
menuBarMenu.buttonElement.style.visibility = 'hidden';
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
if (this.numMenusShown - 1 <= showableMenus.length /
|
|
382
|
+
if (this.numMenusShown - 1 <= showableMenus.length / 4) {
|
|
383
383
|
for (const menuBarMenu of showableMenus) {
|
|
384
384
|
menuBarMenu.buttonElement.style.visibility = 'hidden';
|
|
385
385
|
}
|
|
@@ -173,20 +173,7 @@ declare namespace Event {
|
|
|
173
173
|
* this.onInstallExtension = Event.buffer(service.onInstallExtension, true);
|
|
174
174
|
* ```
|
|
175
175
|
*/
|
|
176
|
-
function buffer<T>(event: Event<T>, flushAfterTimeout?: boolean, _buffer?: T[]): Event<T>;
|
|
177
|
-
interface IChainableEvent<T> extends IDisposable {
|
|
178
|
-
event: Event<T>;
|
|
179
|
-
map<O>(fn: (i: T) => O): IChainableEvent<O>;
|
|
180
|
-
forEach(fn: (i: T) => void): IChainableEvent<T>;
|
|
181
|
-
filter(fn: (e: T) => boolean): IChainableEvent<T>;
|
|
182
|
-
filter<R>(fn: (e: T | R) => e is R): IChainableEvent<R>;
|
|
183
|
-
reduce<R>(merge: (last: R | undefined, event: T) => R, initial?: R): IChainableEvent<R>;
|
|
184
|
-
latch(): IChainableEvent<T>;
|
|
185
|
-
debounce(merge: (last: T | undefined, event: T) => T, delay?: number, leading?: boolean, flushOnListenerRemove?: boolean, leakWarningThreshold?: number): IChainableEvent<T>;
|
|
186
|
-
debounce<R>(merge: (last: R | undefined, event: T) => R, delay?: number, leading?: boolean, flushOnListenerRemove?: boolean, leakWarningThreshold?: number): IChainableEvent<R>;
|
|
187
|
-
on(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[] | DisposableStore): IDisposable;
|
|
188
|
-
once(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[]): IDisposable;
|
|
189
|
-
}
|
|
176
|
+
function buffer<T>(event: Event<T>, flushAfterTimeout?: boolean, _buffer?: T[], disposable?: DisposableStore): Event<T>;
|
|
190
177
|
/**
|
|
191
178
|
* Wraps the event in an {@link IChainableEvent}, allowing a more functional programming style.
|
|
192
179
|
*
|
|
@@ -199,13 +186,22 @@ declare namespace Event {
|
|
|
199
186
|
* ).event;
|
|
200
187
|
*
|
|
201
188
|
* // Using chain
|
|
202
|
-
* const onEnterPressChain = Event.chain(onKeyPress.event
|
|
189
|
+
* const onEnterPressChain = Event.chain(onKeyPress.event, $ => $
|
|
203
190
|
* .map(e => new StandardKeyboardEvent(e))
|
|
204
191
|
* .filter(e => e.keyCode === KeyCode.Enter)
|
|
205
|
-
*
|
|
192
|
+
* );
|
|
206
193
|
* ```
|
|
207
194
|
*/
|
|
208
|
-
function chain<T>(event: Event<T>):
|
|
195
|
+
function chain<T, R>(event: Event<T>, sythensize: ($: IChainableSythensis<T>) => IChainableSythensis<R>): Event<R>;
|
|
196
|
+
interface IChainableSythensis<T> {
|
|
197
|
+
map<O>(fn: (i: T) => O): IChainableSythensis<O>;
|
|
198
|
+
forEach(fn: (i: T) => void): IChainableSythensis<T>;
|
|
199
|
+
filter(fn: (e: T) => boolean): IChainableSythensis<T>;
|
|
200
|
+
filter<R>(fn: (e: T | R) => e is R): IChainableSythensis<R>;
|
|
201
|
+
reduce<R>(merge: (last: R, event: T) => R, initial: R): IChainableSythensis<R>;
|
|
202
|
+
reduce<R>(merge: (last: R | undefined, event: T) => R): IChainableSythensis<R>;
|
|
203
|
+
latch(equals?: (a: T, b: T) => boolean): IChainableSythensis<T>;
|
|
204
|
+
}
|
|
209
205
|
interface NodeEventEmitter {
|
|
210
206
|
on(event: string | symbol, listener: Function): unknown;
|
|
211
207
|
removeListener(event: string | symbol, listener: Function): unknown;
|
|
@@ -156,28 +156,28 @@ declare const enum KeyCode {
|
|
|
156
156
|
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
|
157
157
|
*/
|
|
158
158
|
IntlBackslash = 97,
|
|
159
|
-
Numpad0 = 98,
|
|
160
|
-
Numpad1 = 99,
|
|
161
|
-
Numpad2 = 100,
|
|
162
|
-
Numpad3 = 101,
|
|
163
|
-
Numpad4 = 102,
|
|
164
|
-
Numpad5 = 103,
|
|
165
|
-
Numpad6 = 104,
|
|
166
|
-
Numpad7 = 105,
|
|
167
|
-
Numpad8 = 106,
|
|
168
|
-
Numpad9 = 107,
|
|
169
|
-
NumpadMultiply = 108,
|
|
170
|
-
NumpadAdd = 109,
|
|
171
|
-
NUMPAD_SEPARATOR = 110,
|
|
172
|
-
NumpadSubtract = 111,
|
|
173
|
-
NumpadDecimal = 112,
|
|
174
|
-
NumpadDivide = 113,
|
|
159
|
+
Numpad0 = 98,// VK_NUMPAD0, 0x60, Numeric keypad 0 key
|
|
160
|
+
Numpad1 = 99,// VK_NUMPAD1, 0x61, Numeric keypad 1 key
|
|
161
|
+
Numpad2 = 100,// VK_NUMPAD2, 0x62, Numeric keypad 2 key
|
|
162
|
+
Numpad3 = 101,// VK_NUMPAD3, 0x63, Numeric keypad 3 key
|
|
163
|
+
Numpad4 = 102,// VK_NUMPAD4, 0x64, Numeric keypad 4 key
|
|
164
|
+
Numpad5 = 103,// VK_NUMPAD5, 0x65, Numeric keypad 5 key
|
|
165
|
+
Numpad6 = 104,// VK_NUMPAD6, 0x66, Numeric keypad 6 key
|
|
166
|
+
Numpad7 = 105,// VK_NUMPAD7, 0x67, Numeric keypad 7 key
|
|
167
|
+
Numpad8 = 106,// VK_NUMPAD8, 0x68, Numeric keypad 8 key
|
|
168
|
+
Numpad9 = 107,// VK_NUMPAD9, 0x69, Numeric keypad 9 key
|
|
169
|
+
NumpadMultiply = 108,// VK_MULTIPLY, 0x6A, Multiply key
|
|
170
|
+
NumpadAdd = 109,// VK_ADD, 0x6B, Add key
|
|
171
|
+
NUMPAD_SEPARATOR = 110,// VK_SEPARATOR, 0x6C, Separator key
|
|
172
|
+
NumpadSubtract = 111,// VK_SUBTRACT, 0x6D, Subtract key
|
|
173
|
+
NumpadDecimal = 112,// VK_DECIMAL, 0x6E, Decimal key
|
|
174
|
+
NumpadDivide = 113,// VK_DIVIDE, 0x6F,
|
|
175
175
|
/**
|
|
176
176
|
* Cover all key codes when IME is processing input.
|
|
177
177
|
*/
|
|
178
178
|
KEY_IN_COMPOSITION = 114,
|
|
179
|
-
ABNT_C1 = 115
|
|
180
|
-
ABNT_C2 = 116
|
|
179
|
+
ABNT_C1 = 115,// Brazilian (ABNT) Keyboard
|
|
180
|
+
ABNT_C2 = 116,// Brazilian (ABNT) Keyboard
|
|
181
181
|
AudioVolumeMute = 117,
|
|
182
182
|
AudioVolumeUp = 118,
|
|
183
183
|
AudioVolumeDown = 119,
|
|
@@ -40,6 +40,15 @@ declare class DisposableStore implements IDisposable {
|
|
|
40
40
|
* Add a new {@link IDisposable disposable} to the collection.
|
|
41
41
|
*/
|
|
42
42
|
add<T extends IDisposable>(o: T): T;
|
|
43
|
+
/**
|
|
44
|
+
* Deletes a disposable from store and disposes of it. This will not throw or warn and proceed to dispose the
|
|
45
|
+
* disposable even when the disposable is not part in the store.
|
|
46
|
+
*/
|
|
47
|
+
delete<T extends IDisposable>(o: T): void;
|
|
48
|
+
/**
|
|
49
|
+
* Deletes the value from the store, but does not dispose it.
|
|
50
|
+
*/
|
|
51
|
+
deleteAndLeak<T extends IDisposable>(o: T): void;
|
|
43
52
|
}
|
|
44
53
|
/**
|
|
45
54
|
* Abstract base class for a {@link IDisposable disposable} object.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Represents an observable value.
|
|
3
|
+
*
|
|
3
4
|
* @template T The type of the value.
|
|
4
5
|
* @template TChange The type of delta information (usually `void` and only used in advanced scenarios).
|
|
5
6
|
*/
|
|
@@ -43,6 +44,7 @@ interface IObservable<T, TChange = unknown> {
|
|
|
43
44
|
* (see {@link ConvenientObservable.map}).
|
|
44
45
|
*/
|
|
45
46
|
map<TNew>(fn: (value: T, reader: IReader) => TNew): IObservable<TNew>;
|
|
47
|
+
map<TNew>(owner: object, fn: (value: T, reader: IReader) => TNew): IObservable<TNew>;
|
|
46
48
|
/**
|
|
47
49
|
* A human-readable name for debugging purposes.
|
|
48
50
|
*/
|
|
@@ -108,6 +108,7 @@ interface IProductConfiguration {
|
|
|
108
108
|
readonly languageExtensionTips?: readonly string[];
|
|
109
109
|
readonly trustedExtensionUrlPublicKeys?: IStringDictionary<string[]>;
|
|
110
110
|
readonly trustedExtensionAuthAccess?: readonly string[];
|
|
111
|
+
readonly trustedExtensionProtocolHandlers?: readonly string[];
|
|
111
112
|
readonly commandPaletteSuggestedCommandIds?: string[];
|
|
112
113
|
readonly crashReporter?: {
|
|
113
114
|
readonly companyName: string;
|
|
@@ -256,7 +256,6 @@ class ChannelServer {
|
|
|
256
256
|
const id = request.id;
|
|
257
257
|
promise.then(data => {
|
|
258
258
|
this.sendResponse({ id, data, type: 201 });
|
|
259
|
-
this.activeRequests.delete(request.id);
|
|
260
259
|
}, err => {
|
|
261
260
|
if (err instanceof Error) {
|
|
262
261
|
this.sendResponse({
|
|
@@ -270,6 +269,8 @@ class ChannelServer {
|
|
|
270
269
|
else {
|
|
271
270
|
this.sendResponse({ id, data: err, type: 203 });
|
|
272
271
|
}
|
|
272
|
+
}).finally(() => {
|
|
273
|
+
disposable.dispose();
|
|
273
274
|
this.activeRequests.delete(request.id);
|
|
274
275
|
});
|
|
275
276
|
const disposable = toDisposable(() => cancellationTokenSource.cancel());
|
|
@@ -428,7 +429,10 @@ class ChannelClient {
|
|
|
428
429
|
disposable = combinedDisposable(toDisposable(cancel), cancellationTokenListener);
|
|
429
430
|
this.activeRequests.add(disposable);
|
|
430
431
|
}));
|
|
431
|
-
return result.finally(() => {
|
|
432
|
+
return result.finally(() => {
|
|
433
|
+
disposable.dispose();
|
|
434
|
+
this.activeRequests.delete(disposable);
|
|
435
|
+
});
|
|
432
436
|
}
|
|
433
437
|
requestEvent(channelName, name, arg) {
|
|
434
438
|
const id = this.lastRequestId++;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IMarkdownString } from '../../../base/common/htmlContent.js';
|
|
2
|
-
import { IDocumentDiffProvider } from '../diff/documentDiffProvider.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Configuration options for auto closing quotes and brackets
|
|
@@ -436,6 +435,11 @@ interface IEditorOptions {
|
|
|
436
435
|
* Defaults to language defined behavior.
|
|
437
436
|
*/
|
|
438
437
|
autoClosingBrackets?: EditorAutoClosingStrategy;
|
|
438
|
+
/**
|
|
439
|
+
* Options for auto closing comments.
|
|
440
|
+
* Defaults to language defined behavior.
|
|
441
|
+
*/
|
|
442
|
+
autoClosingComments?: EditorAutoClosingStrategy;
|
|
439
443
|
/**
|
|
440
444
|
* Options for auto closing quotes.
|
|
441
445
|
* Defaults to language defined behavior.
|
|
@@ -698,7 +702,7 @@ interface IEditorOptions {
|
|
|
698
702
|
*/
|
|
699
703
|
pasteAs?: IPasteAsOptions;
|
|
700
704
|
/**
|
|
701
|
-
* Controls whether the editor receives tabs or defers them to the workbench for navigation.
|
|
705
|
+
* Controls whether the editor / terminal receives tabs or defers them to the workbench for navigation.
|
|
702
706
|
*/
|
|
703
707
|
tabFocusMode?: boolean;
|
|
704
708
|
/**
|
|
@@ -780,7 +784,7 @@ interface IDiffEditorBaseOptions {
|
|
|
780
784
|
/**
|
|
781
785
|
* Diff Algorithm
|
|
782
786
|
*/
|
|
783
|
-
diffAlgorithm?: 'legacy' | 'advanced'
|
|
787
|
+
diffAlgorithm?: 'legacy' | 'advanced';
|
|
784
788
|
/**
|
|
785
789
|
* Whether the diff editor aria label should be verbose.
|
|
786
790
|
*/
|
|
@@ -891,6 +895,11 @@ interface IEditorHoverOptions {
|
|
|
891
895
|
* Defaults to true.
|
|
892
896
|
*/
|
|
893
897
|
sticky?: boolean;
|
|
898
|
+
/**
|
|
899
|
+
* Controls how long the hover is visible after you hovered out of it.
|
|
900
|
+
* Require sticky setting to be true.
|
|
901
|
+
*/
|
|
902
|
+
hidingDelay?: number;
|
|
894
903
|
/**
|
|
895
904
|
* Should the hover be shown above the line if possible?
|
|
896
905
|
* Defaults to false.
|
|
@@ -11,11 +11,6 @@ declare class LineRange {
|
|
|
11
11
|
* @param lineRanges An array of sorted line ranges.
|
|
12
12
|
*/
|
|
13
13
|
static joinMany(lineRanges: readonly (readonly LineRange[])[]): readonly LineRange[];
|
|
14
|
-
/**
|
|
15
|
-
* @param lineRanges1 Must be sorted.
|
|
16
|
-
* @param lineRanges2 Must be sorted.
|
|
17
|
-
*/
|
|
18
|
-
static join(lineRanges1: readonly LineRange[], lineRanges2: readonly LineRange[]): readonly LineRange[];
|
|
19
14
|
static ofLength(startLineNumber: number, length: number): LineRange;
|
|
20
15
|
/**
|
|
21
16
|
* @internal
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
interface IOffsetRange {
|
|
2
|
+
readonly start: number;
|
|
3
|
+
readonly endExclusive: number;
|
|
4
|
+
}
|
|
1
5
|
/**
|
|
2
6
|
* A range of offsets (0-based).
|
|
3
7
|
*/
|
|
4
|
-
declare class OffsetRange {
|
|
8
|
+
declare class OffsetRange implements IOffsetRange {
|
|
5
9
|
readonly start: number;
|
|
6
10
|
readonly endExclusive: number;
|
|
7
11
|
static addRange(range: OffsetRange, sortedRanges: OffsetRange[]): void;
|
|
@@ -29,6 +33,7 @@ declare class OffsetRange {
|
|
|
29
33
|
* If the ranges don't even touch, the result is undefined.
|
|
30
34
|
*/
|
|
31
35
|
intersect(other: OffsetRange): OffsetRange | undefined;
|
|
36
|
+
intersectsOrTouches(other: OffsetRange): boolean;
|
|
32
37
|
slice<T>(arr: T[]): T[];
|
|
33
38
|
/**
|
|
34
39
|
* Returns the given value if it is contained in this instance, otherwise the closest value that is contained.
|
|
@@ -42,6 +47,8 @@ declare class OffsetRange {
|
|
|
42
47
|
* E.g. `[5, 10).clipCyclic(10) === 5`, `[5, 10).clipCyclic(11) === 6` and `[5, 10).clipCyclic(4) === 9`.
|
|
43
48
|
*/
|
|
44
49
|
clipCyclic(value: number): number;
|
|
50
|
+
map<T>(f: (offset: number) => T): T[];
|
|
51
|
+
forEach(f: (offset: number) => void): void;
|
|
45
52
|
}
|
|
46
53
|
|
|
47
|
-
export { OffsetRange };
|
|
54
|
+
export { type IOffsetRange, OffsetRange };
|
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { LineRangeMapping, MovedText } from './linesDiffComputer.js';
|
|
4
|
-
import { ITextModel } from '../model.js';
|
|
1
|
+
import { MovedText } from './linesDiffComputer.js';
|
|
2
|
+
import { DetailedLineRangeMapping } from './rangeMapping.js';
|
|
5
3
|
|
|
6
|
-
/**
|
|
7
|
-
* A document diff provider computes the diff between two text models.
|
|
8
|
-
*/
|
|
9
|
-
interface IDocumentDiffProvider {
|
|
10
|
-
/**
|
|
11
|
-
* Computes the diff between the text models `original` and `modified`.
|
|
12
|
-
*/
|
|
13
|
-
computeDiff(original: ITextModel, modified: ITextModel, options: IDocumentDiffProviderOptions, cancellationToken: CancellationToken): Promise<IDocumentDiff>;
|
|
14
|
-
/**
|
|
15
|
-
* Is fired when settings of the diff algorithm change that could alter the result of the diffing computation.
|
|
16
|
-
* Any user of this provider should recompute the diff when this event is fired.
|
|
17
|
-
*/
|
|
18
|
-
onDidChange: Event<void>;
|
|
19
|
-
}
|
|
20
4
|
/**
|
|
21
5
|
* Options for the diff computation.
|
|
6
|
+
* @internal
|
|
22
7
|
*/
|
|
23
8
|
interface IDocumentDiffProviderOptions {
|
|
24
9
|
/**
|
|
@@ -36,6 +21,7 @@ interface IDocumentDiffProviderOptions {
|
|
|
36
21
|
}
|
|
37
22
|
/**
|
|
38
23
|
* Represents a diff between two text models.
|
|
24
|
+
* @internal
|
|
39
25
|
*/
|
|
40
26
|
interface IDocumentDiff {
|
|
41
27
|
/**
|
|
@@ -49,7 +35,7 @@ interface IDocumentDiff {
|
|
|
49
35
|
/**
|
|
50
36
|
* Maps all modified line ranges in the original to the corresponding line ranges in the modified text model.
|
|
51
37
|
*/
|
|
52
|
-
readonly changes: readonly
|
|
38
|
+
readonly changes: readonly DetailedLineRangeMapping[];
|
|
53
39
|
/**
|
|
54
40
|
* Sorted by original line ranges.
|
|
55
41
|
* The original line ranges and the modified line ranges must be disjoint (but can be touching).
|
|
@@ -57,4 +43,4 @@ interface IDocumentDiff {
|
|
|
57
43
|
readonly moves: readonly MovedText[];
|
|
58
44
|
}
|
|
59
45
|
|
|
60
|
-
export type { IDocumentDiff,
|
|
46
|
+
export type { IDocumentDiff, IDocumentDiffProviderOptions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DetailedLineRangeMapping } from './rangeMapping.js';
|
|
2
2
|
|
|
3
3
|
interface IDiffComputationResult {
|
|
4
4
|
quitEarly: boolean;
|
|
@@ -11,7 +11,7 @@ interface IDiffComputationResult {
|
|
|
11
11
|
/**
|
|
12
12
|
* The changes as (modern) line range mapping array.
|
|
13
13
|
*/
|
|
14
|
-
changes2: readonly
|
|
14
|
+
changes2: readonly DetailedLineRangeMapping[];
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* A change
|
|
@@ -1,65 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Range } from '../core/range.js';
|
|
1
|
+
import { LineRangeMapping, DetailedLineRangeMapping } from './rangeMapping.js';
|
|
3
2
|
|
|
4
|
-
/**
|
|
5
|
-
* Maps a line range in the original text model to a line range in the modified text model.
|
|
6
|
-
*/
|
|
7
|
-
declare class LineRangeMapping {
|
|
8
|
-
static inverse(mapping: readonly LineRangeMapping[], originalLineCount: number, modifiedLineCount: number): LineRangeMapping[];
|
|
9
|
-
/**
|
|
10
|
-
* The line range in the original text model.
|
|
11
|
-
*/
|
|
12
|
-
readonly originalRange: LineRange;
|
|
13
|
-
/**
|
|
14
|
-
* The line range in the modified text model.
|
|
15
|
-
*/
|
|
16
|
-
readonly modifiedRange: LineRange;
|
|
17
|
-
/**
|
|
18
|
-
* If inner changes have not been computed, this is set to undefined.
|
|
19
|
-
* Otherwise, it represents the character-level diff in this line range.
|
|
20
|
-
* The original range of each range mapping should be contained in the original line range (same for modified), exceptions are new-lines.
|
|
21
|
-
* Must not be an empty array.
|
|
22
|
-
*/
|
|
23
|
-
readonly innerChanges: RangeMapping[] | undefined;
|
|
24
|
-
constructor(originalRange: LineRange, modifiedRange: LineRange, innerChanges: RangeMapping[] | undefined);
|
|
25
|
-
toString(): string;
|
|
26
|
-
get changedLineCount(): number;
|
|
27
|
-
flip(): LineRangeMapping;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Maps a range in the original text model to a range in the modified text model.
|
|
31
|
-
*/
|
|
32
|
-
declare class RangeMapping {
|
|
33
|
-
/**
|
|
34
|
-
* The original range.
|
|
35
|
-
*/
|
|
36
|
-
readonly originalRange: Range;
|
|
37
|
-
/**
|
|
38
|
-
* The modified range.
|
|
39
|
-
*/
|
|
40
|
-
readonly modifiedRange: Range;
|
|
41
|
-
constructor(originalRange: Range, modifiedRange: Range);
|
|
42
|
-
toString(): string;
|
|
43
|
-
flip(): RangeMapping;
|
|
44
|
-
}
|
|
45
|
-
declare class SimpleLineRangeMapping {
|
|
46
|
-
readonly original: LineRange;
|
|
47
|
-
readonly modified: LineRange;
|
|
48
|
-
constructor(original: LineRange, modified: LineRange);
|
|
49
|
-
toString(): string;
|
|
50
|
-
flip(): SimpleLineRangeMapping;
|
|
51
|
-
join(other: SimpleLineRangeMapping): SimpleLineRangeMapping;
|
|
52
|
-
}
|
|
53
3
|
declare class MovedText {
|
|
54
|
-
readonly lineRangeMapping:
|
|
4
|
+
readonly lineRangeMapping: LineRangeMapping;
|
|
55
5
|
/**
|
|
56
6
|
* The diff from the original text to the moved text.
|
|
57
7
|
* Must be contained in the original/modified line range.
|
|
58
8
|
* Can be empty if the text didn't change (only moved).
|
|
59
9
|
*/
|
|
60
|
-
readonly changes: readonly
|
|
61
|
-
constructor(lineRangeMapping:
|
|
10
|
+
readonly changes: readonly DetailedLineRangeMapping[];
|
|
11
|
+
constructor(lineRangeMapping: LineRangeMapping, changes: readonly DetailedLineRangeMapping[]);
|
|
62
12
|
flip(): MovedText;
|
|
63
13
|
}
|
|
64
14
|
|
|
65
|
-
export {
|
|
15
|
+
export { MovedText };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { LineRange } from '../core/lineRange.js';
|
|
2
|
+
import { Range } from '../core/range.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Maps a line range in the original text model to a line range in the modified text model.
|
|
6
|
+
*/
|
|
7
|
+
declare class LineRangeMapping {
|
|
8
|
+
static inverse(mapping: readonly DetailedLineRangeMapping[], originalLineCount: number, modifiedLineCount: number): DetailedLineRangeMapping[];
|
|
9
|
+
/**
|
|
10
|
+
* The line range in the original text model.
|
|
11
|
+
*/
|
|
12
|
+
readonly original: LineRange;
|
|
13
|
+
/**
|
|
14
|
+
* The line range in the modified text model.
|
|
15
|
+
*/
|
|
16
|
+
readonly modified: LineRange;
|
|
17
|
+
constructor(originalRange: LineRange, modifiedRange: LineRange);
|
|
18
|
+
toString(): string;
|
|
19
|
+
flip(): LineRangeMapping;
|
|
20
|
+
join(other: LineRangeMapping): LineRangeMapping;
|
|
21
|
+
get changedLineCount(): number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Maps a line range in the original text model to a line range in the modified text model.
|
|
25
|
+
* Also contains inner range mappings.
|
|
26
|
+
*/
|
|
27
|
+
declare class DetailedLineRangeMapping extends LineRangeMapping {
|
|
28
|
+
/**
|
|
29
|
+
* If inner changes have not been computed, this is set to undefined.
|
|
30
|
+
* Otherwise, it represents the character-level diff in this line range.
|
|
31
|
+
* The original range of each range mapping should be contained in the original line range (same for modified), exceptions are new-lines.
|
|
32
|
+
* Must not be an empty array.
|
|
33
|
+
*/
|
|
34
|
+
readonly innerChanges: RangeMapping[] | undefined;
|
|
35
|
+
constructor(originalRange: LineRange, modifiedRange: LineRange, innerChanges: RangeMapping[] | undefined);
|
|
36
|
+
flip(): DetailedLineRangeMapping;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Maps a range in the original text model to a range in the modified text model.
|
|
40
|
+
*/
|
|
41
|
+
declare class RangeMapping {
|
|
42
|
+
/**
|
|
43
|
+
* The original range.
|
|
44
|
+
*/
|
|
45
|
+
readonly originalRange: Range;
|
|
46
|
+
/**
|
|
47
|
+
* The modified range.
|
|
48
|
+
*/
|
|
49
|
+
readonly modifiedRange: Range;
|
|
50
|
+
constructor(originalRange: Range, modifiedRange: Range);
|
|
51
|
+
toString(): string;
|
|
52
|
+
flip(): RangeMapping;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { DetailedLineRangeMapping, LineRangeMapping, RangeMapping };
|