@codingame/monaco-vscode-api 1.83.15 → 1.85.0-next.0
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/README.md +430 -0
- package/api.js +13 -7
- package/assets/clear.mp3 +0 -0
- package/assets/format.mp3 +0 -0
- package/assets/save.mp3 +0 -0
- package/contributions.js +3 -0
- package/extensions.d.ts +13 -3
- package/external/{xterm-addon-image/typings/xterm-addon-image.d.ts → @xterm/addon-image/typings/addon-image.d.ts} +1 -1
- package/external/{xterm → @xterm/xterm}/typings/xterm.d.ts +13 -1
- package/lifecycle.js +2 -2
- package/localExtensionHost.js +6 -3
- package/missing-services.js +170 -22
- package/monaco-editor-treemending.patch +6884 -18018
- package/monaco-treemending.js +2 -2
- package/package.json +7 -7
- package/service-override/tools/editor.d.ts +8 -8
- package/service-override/tools/editor.js +44 -19
- package/services.d.ts +2 -2
- package/services.js +3 -3
- package/vscode/src/vs/base/browser/broadcast.js +6 -5
- package/vscode/src/vs/base/browser/dnd.d.ts +6 -0
- package/vscode/src/vs/base/browser/mouseEvent.d.ts +1 -1
- package/vscode/src/vs/base/browser/touch.d.ts +10 -0
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconHoverDelegate.d.ts +22 -15
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +4 -3
- package/vscode/src/vs/base/browser/ui/splitview/paneview.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/splitview/paneview.d.ts +3 -0
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +34 -11
- package/vscode/src/vs/base/common/actions.d.ts +1 -15
- package/vscode/src/vs/base/common/async.d.ts +1 -31
- package/vscode/src/vs/base/common/event.d.ts +2 -1
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +23 -10
- package/vscode/src/vs/base/common/prefixTree.js +140 -0
- package/vscode/src/vs/base/common/product.d.ts +16 -2
- package/vscode/src/vs/base/common/resourceTree.js +135 -0
- package/vscode/src/vs/base/common/skipList.js +1 -0
- package/vscode/src/vs/base/common/tfIdf.js +137 -0
- package/vscode/src/vs/base/common/types.d.ts +13 -1
- package/vscode/src/vs/base/common/verifier.js +62 -0
- package/vscode/src/vs/editor/browser/editorBrowser.d.ts +4 -2
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +23 -4
- package/vscode/src/vs/editor/common/core/lineRange.d.ts +1 -0
- package/vscode/src/vs/editor/common/core/offsetRange.d.ts +3 -0
- package/vscode/src/vs/editor/common/core/position.d.ts +1 -0
- package/vscode/src/vs/editor/common/editorCommon.d.ts +2 -1
- package/vscode/src/vs/editor/common/languages.d.ts +23 -1
- package/vscode/src/vs/editor/common/services/languageFeatures.d.ts +2 -1
- package/vscode/src/vs/editor/common/services/resolverService.d.ts +11 -2
- package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +16 -1
- package/vscode/src/vs/platform/action/common/action.d.ts +8 -0
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +4 -0
- package/vscode/src/vs/platform/actions/browser/floatingMenu.js +26 -2
- package/vscode/src/vs/platform/actions/common/actions.d.ts +8 -0
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.d.ts +6 -0
- package/vscode/src/vs/platform/commands/common/commands.d.ts +13 -5
- package/vscode/src/vs/platform/dialogs/common/dialogs.d.ts +9 -3
- package/vscode/src/vs/platform/dialogs/common/dialogs.js +5 -2
- package/vscode/src/vs/platform/editor/common/editor.d.ts +3 -15
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +1 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +3 -15
- package/vscode/src/vs/platform/extensionManagement/common/implicitActivationEvents.js +5 -0
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +0 -1
- package/vscode/src/vs/platform/files/common/files.d.ts +72 -8
- package/vscode/src/vs/platform/files/common/watcher.js +77 -0
- package/vscode/src/vs/platform/keybinding/common/keybindingsRegistry.d.ts +2 -2
- package/vscode/src/vs/platform/layout/browser/layoutService.d.ts +52 -21
- package/vscode/src/vs/platform/request/browser/requestService.js +3 -0
- package/vscode/src/vs/platform/request/common/requestIpc.js +17 -0
- package/vscode/src/vs/platform/storage/common/storage.js +2 -2
- package/vscode/src/vs/platform/telemetry/common/telemetry.d.ts +1 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +41 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +12 -7
- package/vscode/src/vs/platform/terminal/common/capabilities/{commandDetectionCapability.d.ts → commandDetection/terminalCommand.d.ts} +3 -2
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/terminalCommand.js +257 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +651 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +29 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +48 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +94 -0
- package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +37 -0
- package/vscode/src/vs/platform/terminal/common/terminalStrings.js +16 -0
- package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +319 -0
- package/vscode/src/vs/platform/window/common/window.d.ts +9 -2
- package/vscode/src/vs/platform/window/common/window.js +6 -1
- package/vscode/src/vs/platform/workspaces/common/workspaces.d.ts +2 -43
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +113 -81
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +5 -4
- package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +25 -3
- package/vscode/src/vs/workbench/api/common/extHostChat.js +13 -163
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +412 -0
- package/vscode/src/vs/workbench/api/common/extHostChatProvider.js +79 -11
- package/vscode/src/vs/workbench/api/common/extHostCommands.js +13 -12
- package/vscode/src/vs/workbench/api/common/extHostComments.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +8 -6
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +36 -19
- package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +52 -31
- package/vscode/src/vs/workbench/api/common/extHostIssueReporter.js +38 -0
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +28 -3
- package/vscode/src/vs/workbench/api/common/extHostLanguages.js +10 -0
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +117 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +32 -4
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +85 -23
- package/vscode/src/vs/workbench/api/common/extHostSearch.js +3 -0
- package/vscode/src/vs/workbench/api/common/extHostSpeech.js +42 -0
- package/vscode/src/vs/workbench/api/common/extHostTask.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +97 -47
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +115 -16
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +66 -36
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +6 -1
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +182 -75
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +176 -4
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +143 -2
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +237 -0
- package/vscode/src/vs/workbench/browser/composite.d.ts +0 -4
- package/vscode/src/vs/workbench/browser/composite.js +5 -4
- package/vscode/src/vs/workbench/browser/dnd.js +72 -23
- package/vscode/src/vs/workbench/browser/labels.js +7 -3
- package/vscode/src/vs/workbench/browser/media/part.css.js +1 -1
- package/vscode/src/vs/workbench/browser/panecomposite.d.ts +2 -2
- package/vscode/src/vs/workbench/browser/panecomposite.js +2 -0
- package/vscode/src/vs/workbench/browser/part.js +33 -2
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +99 -117
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +173 -33
- package/vscode/src/vs/workbench/browser/parts/editor/editor.js +102 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +256 -17
- package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +68 -35
- package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +5 -5
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +35 -16
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +348 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorsObserver.js +43 -31
- package/vscode/src/vs/workbench/browser/parts/editor/media/editortabscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +14 -2
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +277 -0
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +5 -2
- package/vscode/src/vs/workbench/browser/parts/panel/media/panelpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +3 -38
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.d.ts +54 -52
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +2 -1
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +25 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +258 -0
- package/vscode/src/vs/workbench/browser/parts/views/media/paneviewlet.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +2 -5
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +157 -117
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +50 -23
- package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +26 -11
- package/vscode/src/vs/workbench/browser/parts/views/viewsViewlet.js +10 -6
- package/vscode/src/vs/workbench/browser/style.js +2 -1
- package/vscode/src/vs/workbench/browser/web.api.d.ts +39 -2
- package/vscode/src/vs/workbench/browser/window.js +55 -0
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +220 -40
- package/vscode/src/vs/workbench/common/activity.js +3 -0
- package/vscode/src/vs/workbench/common/contextkeys.js +35 -5
- package/vscode/src/vs/workbench/common/contributions.js +4 -3
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +14 -4
- package/vscode/src/vs/workbench/common/editor/diffEditorModel.js +1 -1
- package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +22 -19
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +4 -3
- package/vscode/src/vs/workbench/common/editor/editorModel.d.ts +1 -2
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +22 -4
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +3 -3
- package/vscode/src/vs/workbench/common/editor.d.ts +60 -30
- package/vscode/src/vs/workbench/common/editor.js +11 -3
- package/vscode/src/vs/workbench/common/theme.js +2 -2
- package/vscode/src/vs/workbench/common/views.d.ts +4 -4
- package/vscode/src/vs/workbench/common/views.js +3 -1
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +97 -8
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +17 -99
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +103 -37
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +2 -3
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +33 -110
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +64 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +94 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +1 -88
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +3 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +15 -16
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +91 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +9 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +3 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +2 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +10 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +114 -22
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +4 -1
- package/vscode/src/vs/workbench/contrib/files/browser/explorerFileContrib.js +19 -0
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +10 -8
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +62 -10
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +2 -1
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +9 -8
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +10 -1
- package/vscode/src/vs/workbench/contrib/files/browser/files.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/files/browser/files.js +7 -3
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +64 -36
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +42 -17
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +145 -25
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +423 -0
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +82 -0
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +36 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +3 -1
- package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +24 -3
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +11 -6
- package/vscode/src/vs/workbench/contrib/scm/common/scm.js +1 -2
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/searchNotebookHelpers.js +31 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +61 -41
- package/vscode/src/vs/workbench/contrib/search/{browser/searchNotebookHelpers.js → common/cellSearchModel.js} +4 -63
- package/vscode/src/vs/workbench/contrib/search/common/searchNotebookHelpers.js +40 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +2 -2
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +3 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/detachedTerminal.js +92 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +100 -79
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalExtensions.js +25 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcon.js +7 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +64 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +540 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +104 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +518 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +17 -11
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +814 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +2 -8
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -0
- package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +101 -0
- package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +30 -0
- package/vscode/src/vs/workbench/contrib/testing/common/storedValue.js +36 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +115 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +74 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.js +116 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testProfileService.js +172 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +384 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResultService.js +156 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.js +156 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testService.js +75 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +72 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +188 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.js +102 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingDecorations.js +29 -0
- package/vscode/src/vs/workbench/{services/editor/browser/editorDropService.js → contrib/testing/common/testingPeekOpener.js} +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +47 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +4 -3
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +8 -9
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +5 -2
- package/vscode/src/vs/workbench/services/activity/browser/activityService.d.ts +16 -10
- package/vscode/src/vs/workbench/services/activity/common/activity.d.ts +14 -1
- package/vscode/src/vs/workbench/services/activity/common/activity.js +1 -7
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +9 -28
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +273 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +2 -0
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +2 -3
- package/vscode/src/vs/workbench/services/editor/browser/editorService.d.ts +7 -5
- package/vscode/src/vs/workbench/services/editor/browser/editorService.js +59 -37
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +193 -94
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.js +2 -2
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.d.ts +8 -2
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +8 -1
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +62 -16
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +5 -3
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +3 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +4 -9
- package/vscode/src/vs/workbench/services/extensions/common/{extensionHostManager.d.ts → extensionHostManagers.d.ts} +2 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +9 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +22 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +14 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +9 -0
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +3 -3
- package/vscode/src/vs/workbench/services/history/common/history.d.ts +2 -2
- package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +49 -18
- package/vscode/src/vs/workbench/services/host/browser/host.d.ts +29 -7
- package/vscode/src/vs/workbench/services/hover/browser/hover.d.ts +51 -28
- package/vscode/src/vs/workbench/services/hover/browser/hoverService.d.ts +5 -2
- package/vscode/src/vs/workbench/services/keybinding/browser/unboundCommands.js +2 -2
- package/vscode/src/vs/workbench/services/languageStatus/common/languageStatusService.d.ts +4 -1
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +40 -36
- package/vscode/src/vs/workbench/services/panecomposite/browser/panecomposite.d.ts +0 -6
- package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +3 -0
- package/vscode/src/vs/workbench/services/progress/browser/progressIndicator.js +2 -2
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +16 -1
- package/vscode/src/vs/workbench/services/request/browser/requestService.js +48 -0
- package/vscode/src/vs/workbench/services/search/common/searchHelpers.js +4 -4
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +10 -51
- package/vscode/src/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +428 -0
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
- package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +32 -1
- package/vscode/src/vs/workbench/services/textfile/common/textEditorService.js +1 -5
- package/vscode/src/vs/workbench/services/themes/browser/browserHostColorSchemeService.js +4 -3
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +9 -3
- package/vscode/src/vs/workbench/services/title/browser/titleService.d.ts +18 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +18 -3
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorModel.js +16 -7
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +6 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +13 -0
- package/vscode/src/vs/workbench/services/url/browser/urlService.js +2 -1
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +9 -0
- package/vscode-dts/vscode.proposed.chatAgents2.d.ts +375 -0
- package/vscode-dts/vscode.proposed.chatAgents2Additions.d.ts +80 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +5 -1
- package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +68 -10
- package/vscode-dts/vscode.proposed.chatTab.d.ts +21 -0
- package/vscode-dts/vscode.proposed.chatVariables.d.ts +5 -1
- package/vscode-dts/vscode.proposed.codeActionAI.d.ts +16 -0
- package/vscode-dts/vscode.proposed.contribSourceControlInputBoxMenu.d.ts +7 -0
- package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +51 -0
- package/vscode-dts/vscode.proposed.defaultChatAgent.d.ts +30 -0
- package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +26 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +26 -100
- package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +14 -7
- package/vscode-dts/vscode.proposed.languageStatusText.d.ts +12 -0
- package/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts +63 -0
- package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +43 -0
- package/vscode-dts/vscode.proposed.resolvers.d.ts +100 -1
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +9 -1
- package/vscode-dts/vscode.proposed.scmInputBoxActionButton.d.ts +19 -0
- package/vscode-dts/vscode.proposed.scmInputBoxValueProvider.d.ts +25 -0
- package/vscode-dts/vscode.proposed.speech.d.ts +35 -0
- package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +11 -7
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +6 -1
- package/vscode-dts/vscode.proposed.testingActiveProfile.d.ts +21 -0
- package/external/xterm-headless/typings/xterm-headless.d.ts +0 -49
- package/vscode/src/vs/platform/backup/common/backup.d.ts +0 -14
- package/vscode/src/vs/platform/update/common/update.d.ts +0 -112
- package/vscode/src/vs/workbench/api/common/extHostChatAgents.js +0 -62
- package/vscode/src/vs/workbench/api/common/extHostChatSlashCommand.js +0 -62
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +0 -56
- package/vscode/src/vs/workbench/services/files/common/files.js +0 -4
- package/vscode/src/vs/workbench/services/host/browser/browserHostService.d.ts +0 -41
- package/vscode/src/vs/workbench/services/title/common/titleService.d.ts +0 -31
- package/vscode-dts/vscode.proposed.chatAgents.d.ts +0 -39
- package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +0 -47
- package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +0 -45
- /package/external/{xterm-addon-canvas/typings/xterm-addon-canvas.d.ts → @xterm/addon-canvas/typings/addon-canvas.d.ts} +0 -0
- /package/external/{xterm-addon-search/typings/xterm-addon-search.d.ts → @xterm/addon-search/typings/addon-search.d.ts} +0 -0
- /package/external/{xterm-addon-serialize/typings/xterm-addon-serialize.d.ts → @xterm/addon-serialize/typings/addon-serialize.d.ts} +0 -0
- /package/external/{xterm-addon-unicode11/typings/xterm-addon-unicode11.d.ts → @xterm/addon-unicode11/typings/addon-unicode11.d.ts} +0 -0
- /package/external/{xterm-addon-webgl/typings/xterm-addon-webgl.d.ts → @xterm/addon-webgl/typings/addon-webgl.d.ts} +0 -0
- /package/vscode/src/vs/workbench/services/title/{common → browser}/titleService.js +0 -0
|
@@ -1,3 +1,174 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
3
|
+
import { isDefined } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
4
|
+
import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
1
5
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
6
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
7
|
+
import { StoredValue } from './storedValue.js';
|
|
8
|
+
import { testRunProfileBitsetList } from './testTypes.js';
|
|
9
|
+
import { TestId } from './testId.js';
|
|
10
|
+
import { TestingContextKeys } from './testingContextKeys.js';
|
|
11
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
2
12
|
const ITestProfileService = ( createDecorator('testProfileService'));
|
|
3
|
-
|
|
13
|
+
const canUseProfileWithTest = (profile, test) => profile.controllerId === test.controllerId && (TestId.isRoot(test.item.extId) || !profile.tag || test.item.tags.includes(profile.tag));
|
|
14
|
+
const sorter = (a, b) => {
|
|
15
|
+
if (a.isDefault !== b.isDefault) {
|
|
16
|
+
return a.isDefault ? -1 : 1;
|
|
17
|
+
}
|
|
18
|
+
return a.label.localeCompare(b.label);
|
|
19
|
+
};
|
|
20
|
+
const capabilityContextKeys = (capabilities) => [
|
|
21
|
+
[TestingContextKeys.hasRunnableTests.key, ((capabilities & 2) ) !== 0],
|
|
22
|
+
[TestingContextKeys.hasDebuggableTests.key, ((capabilities & 4) ) !== 0],
|
|
23
|
+
[TestingContextKeys.hasCoverableTests.key, ((capabilities & 8) ) !== 0],
|
|
24
|
+
];
|
|
25
|
+
let TestProfileService = class TestProfileService extends Disposable {
|
|
26
|
+
constructor(contextKeyService, storageService) {
|
|
27
|
+
super();
|
|
28
|
+
this.changeEmitter = this._register(( new Emitter()));
|
|
29
|
+
this.controllerProfiles = ( new Map());
|
|
30
|
+
this.onDidChange = this.changeEmitter.event;
|
|
31
|
+
this.preferredDefaults = this._register(( new StoredValue({
|
|
32
|
+
key: 'testingPreferredProfiles',
|
|
33
|
+
scope: 1 ,
|
|
34
|
+
target: 1 ,
|
|
35
|
+
}, storageService)));
|
|
36
|
+
this.capabilitiesContexts = {
|
|
37
|
+
[2 ]: TestingContextKeys.hasRunnableTests.bindTo(contextKeyService),
|
|
38
|
+
[4 ]: TestingContextKeys.hasDebuggableTests.bindTo(contextKeyService),
|
|
39
|
+
[8 ]: TestingContextKeys.hasCoverableTests.bindTo(contextKeyService),
|
|
40
|
+
[16 ]: TestingContextKeys.hasNonDefaultProfile.bindTo(contextKeyService),
|
|
41
|
+
[32 ]: TestingContextKeys.hasConfigurableProfile.bindTo(contextKeyService),
|
|
42
|
+
[64 ]: TestingContextKeys.supportsContinuousRun.bindTo(contextKeyService),
|
|
43
|
+
};
|
|
44
|
+
this.refreshContextKeys();
|
|
45
|
+
}
|
|
46
|
+
addProfile(controller, profile) {
|
|
47
|
+
let record = this.controllerProfiles.get(profile.controllerId);
|
|
48
|
+
if (record) {
|
|
49
|
+
record.profiles.push(profile);
|
|
50
|
+
record.profiles.sort(sorter);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
record = {
|
|
54
|
+
profiles: [profile],
|
|
55
|
+
controller,
|
|
56
|
+
};
|
|
57
|
+
this.controllerProfiles.set(profile.controllerId, record);
|
|
58
|
+
}
|
|
59
|
+
this.refreshContextKeys();
|
|
60
|
+
this.changeEmitter.fire();
|
|
61
|
+
}
|
|
62
|
+
updateProfile(controllerId, profileId, update) {
|
|
63
|
+
const ctrl = this.controllerProfiles.get(controllerId);
|
|
64
|
+
if (!ctrl) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const profile = ctrl.profiles.find(c => c.controllerId === controllerId && c.profileId === profileId);
|
|
68
|
+
if (!profile) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
Object.assign(profile, update);
|
|
72
|
+
ctrl.profiles.sort(sorter);
|
|
73
|
+
this.changeEmitter.fire();
|
|
74
|
+
}
|
|
75
|
+
configure(controllerId, profileId) {
|
|
76
|
+
this.controllerProfiles.get(controllerId)?.controller.configureRunProfile(profileId);
|
|
77
|
+
}
|
|
78
|
+
removeProfile(controllerId, profileId) {
|
|
79
|
+
const ctrl = this.controllerProfiles.get(controllerId);
|
|
80
|
+
if (!ctrl) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (!profileId) {
|
|
84
|
+
this.controllerProfiles.delete(controllerId);
|
|
85
|
+
this.changeEmitter.fire();
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const index = ctrl.profiles.findIndex(c => c.profileId === profileId);
|
|
89
|
+
if (index === -1) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
ctrl.profiles.splice(index, 1);
|
|
93
|
+
this.refreshContextKeys();
|
|
94
|
+
this.changeEmitter.fire();
|
|
95
|
+
}
|
|
96
|
+
capabilitiesForTest(test) {
|
|
97
|
+
const ctrl = this.controllerProfiles.get(test.controllerId);
|
|
98
|
+
if (!ctrl) {
|
|
99
|
+
return 0;
|
|
100
|
+
}
|
|
101
|
+
let capabilities = 0;
|
|
102
|
+
for (const profile of ctrl.profiles) {
|
|
103
|
+
if (!profile.tag || test.item.tags.includes(profile.tag)) {
|
|
104
|
+
capabilities |= capabilities & profile.group ? 16 : profile.group;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return capabilities;
|
|
108
|
+
}
|
|
109
|
+
all() {
|
|
110
|
+
return ( this.controllerProfiles.values());
|
|
111
|
+
}
|
|
112
|
+
getControllerProfiles(profileId) {
|
|
113
|
+
return this.controllerProfiles.get(profileId)?.profiles ?? [];
|
|
114
|
+
}
|
|
115
|
+
getGroupDefaultProfiles(group) {
|
|
116
|
+
const preferred = this.preferredDefaults.get();
|
|
117
|
+
if (!preferred) {
|
|
118
|
+
return this.getBaseDefaults(group);
|
|
119
|
+
}
|
|
120
|
+
const profiles = preferred[group]
|
|
121
|
+
?.map(p => this.controllerProfiles.get(p.controllerId)?.profiles.find(c => c.profileId === p.profileId && c.group === group))
|
|
122
|
+
.filter(isDefined);
|
|
123
|
+
return profiles?.length ? profiles : this.getBaseDefaults(group);
|
|
124
|
+
}
|
|
125
|
+
setGroupDefaultProfiles(group, profiles) {
|
|
126
|
+
const next = {
|
|
127
|
+
...this.preferredDefaults.get(),
|
|
128
|
+
[group]: ( profiles.map(c => ({ profileId: c.profileId, controllerId: c.controllerId }))),
|
|
129
|
+
};
|
|
130
|
+
if (group === 2 || group === 4 ) {
|
|
131
|
+
const otherGroup = group === 2 ? 4 : 2 ;
|
|
132
|
+
const previousDefaults = next[otherGroup] || [];
|
|
133
|
+
let newDefaults = previousDefaults.slice();
|
|
134
|
+
for (const [ctrlId, { profiles: ctrlProfiles }] of this.controllerProfiles) {
|
|
135
|
+
const labels = ( new Set(( profiles.filter(p => p.controllerId === ctrlId).map(p => p.label))));
|
|
136
|
+
const nextByLabels = ctrlProfiles.filter(p => ( labels.has(p.label)) && p.group === otherGroup);
|
|
137
|
+
if (nextByLabels.length) {
|
|
138
|
+
newDefaults = newDefaults.filter(p => p.controllerId !== ctrlId);
|
|
139
|
+
newDefaults.push(...( nextByLabels.map(p => ({ profileId: p.profileId, controllerId: p.controllerId }))));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
next[otherGroup] = newDefaults;
|
|
143
|
+
}
|
|
144
|
+
this.preferredDefaults.store(next);
|
|
145
|
+
this.changeEmitter.fire();
|
|
146
|
+
}
|
|
147
|
+
getBaseDefaults(group) {
|
|
148
|
+
const defaults = [];
|
|
149
|
+
for (const { profiles } of ( this.controllerProfiles.values())) {
|
|
150
|
+
const profile = profiles.find(c => c.group === group);
|
|
151
|
+
if (profile) {
|
|
152
|
+
defaults.push(profile);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return defaults;
|
|
156
|
+
}
|
|
157
|
+
refreshContextKeys() {
|
|
158
|
+
let allCapabilities = 0;
|
|
159
|
+
for (const { profiles } of ( this.controllerProfiles.values())) {
|
|
160
|
+
for (const profile of profiles) {
|
|
161
|
+
allCapabilities |= allCapabilities & profile.group ? 16 : profile.group;
|
|
162
|
+
allCapabilities |= profile.supportsContinuousRun ? 64 : 0;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
for (const group of testRunProfileBitsetList) {
|
|
166
|
+
this.capabilitiesContexts[group].set((allCapabilities & group) !== 0);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
TestProfileService = ( __decorate([
|
|
171
|
+
( __param(0, IContextKeyService)),
|
|
172
|
+
( __param(1, IStorageService))
|
|
173
|
+
], TestProfileService));
|
|
174
|
+
export { ITestProfileService, TestProfileService, canUseProfileWithTest, capabilityContextKeys };
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { DeferredPromise } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
2
|
+
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
3
|
+
import { Event, Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
4
|
+
import { Lazy } from 'monaco-editor/esm/vs/base/common/lazy.js';
|
|
5
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
6
|
+
import { observableValue } from 'monaco-editor/esm/vs/base/common/observable.js';
|
|
7
|
+
import { language } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
8
|
+
import { removeAnsiEscapeCodes } from 'monaco-editor/esm/vs/base/common/strings.js';
|
|
9
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
10
|
+
import { refreshComputedState } from './getComputedState.js';
|
|
11
|
+
import { TestId } from './testId.js';
|
|
12
|
+
import { makeEmptyCounts, terminalStatePriorities, maxPriority, statesInOrder } from './testingStates.js';
|
|
13
|
+
import { TestResultItem, getMarkId } from './testTypes.js';
|
|
14
|
+
const emptyRawOutput = {
|
|
15
|
+
buffers: [],
|
|
16
|
+
length: 0,
|
|
17
|
+
onDidWriteData: Event.None,
|
|
18
|
+
endPromise: Promise.resolve(),
|
|
19
|
+
getRange: () => VSBuffer.alloc(0),
|
|
20
|
+
getRangeIter: () => [],
|
|
21
|
+
};
|
|
22
|
+
class TaskRawOutput {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.writeDataEmitter = ( new Emitter());
|
|
25
|
+
this.endDeferred = ( new DeferredPromise());
|
|
26
|
+
this.offset = 0;
|
|
27
|
+
this.onDidWriteData = this.writeDataEmitter.event;
|
|
28
|
+
this.endPromise = this.endDeferred.p;
|
|
29
|
+
this.buffers = [];
|
|
30
|
+
}
|
|
31
|
+
get length() {
|
|
32
|
+
return this.offset;
|
|
33
|
+
}
|
|
34
|
+
getRange(start, length) {
|
|
35
|
+
const buf = VSBuffer.alloc(length);
|
|
36
|
+
let bufLastWrite = 0;
|
|
37
|
+
for (const chunk of this.getRangeIter(start, length)) {
|
|
38
|
+
buf.buffer.set(chunk.buffer, bufLastWrite);
|
|
39
|
+
bufLastWrite += chunk.byteLength;
|
|
40
|
+
}
|
|
41
|
+
return bufLastWrite < length ? buf.slice(0, bufLastWrite) : buf;
|
|
42
|
+
}
|
|
43
|
+
*getRangeIter(start, length) {
|
|
44
|
+
let soFar = 0;
|
|
45
|
+
let internalLastRead = 0;
|
|
46
|
+
for (const b of this.buffers) {
|
|
47
|
+
if (internalLastRead + b.byteLength <= start) {
|
|
48
|
+
internalLastRead += b.byteLength;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const bstart = Math.max(0, start - internalLastRead);
|
|
52
|
+
const bend = Math.min(b.byteLength, bstart + length - soFar);
|
|
53
|
+
yield b.slice(bstart, bend);
|
|
54
|
+
soFar += bend - bstart;
|
|
55
|
+
internalLastRead += b.byteLength;
|
|
56
|
+
if (soFar === length) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
append(data, marker) {
|
|
62
|
+
const offset = this.offset;
|
|
63
|
+
let length = data.byteLength;
|
|
64
|
+
if (marker === undefined) {
|
|
65
|
+
this.push(data);
|
|
66
|
+
return { offset, length };
|
|
67
|
+
}
|
|
68
|
+
const start = VSBuffer.fromString(getMarkCode(marker, true));
|
|
69
|
+
const end = VSBuffer.fromString(getMarkCode(marker, false));
|
|
70
|
+
length += start.byteLength + end.byteLength;
|
|
71
|
+
this.push(start);
|
|
72
|
+
let trimLen = data.byteLength;
|
|
73
|
+
for (; trimLen > 0; trimLen--) {
|
|
74
|
+
const last = data.buffer[trimLen - 1];
|
|
75
|
+
if (last !== 13 && last !== 10 ) {
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
this.push(data.slice(0, trimLen));
|
|
80
|
+
this.push(end);
|
|
81
|
+
this.push(data.slice(trimLen));
|
|
82
|
+
return { offset, length };
|
|
83
|
+
}
|
|
84
|
+
push(data) {
|
|
85
|
+
if (data.byteLength === 0) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this.buffers.push(data);
|
|
89
|
+
this.writeDataEmitter.fire(data);
|
|
90
|
+
this.offset += data.byteLength;
|
|
91
|
+
}
|
|
92
|
+
end() {
|
|
93
|
+
this.endDeferred.complete();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const resultItemParents = function* (results, item) {
|
|
97
|
+
for (const id of TestId.fromString(item.item.extId).idsToRoot()) {
|
|
98
|
+
yield results.getStateById(( id.toString()));
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const maxCountPriority = (counts) => {
|
|
102
|
+
for (const state of statesInOrder) {
|
|
103
|
+
if (counts[state] > 0) {
|
|
104
|
+
return state;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return 0 ;
|
|
108
|
+
};
|
|
109
|
+
const getMarkCode = (marker, start) => `\x1b]633;SetMark;Id=${getMarkId(marker, start)};Hidden\x07`;
|
|
110
|
+
const itemToNode = (controllerId, item, parent) => ({
|
|
111
|
+
controllerId,
|
|
112
|
+
expand: 0 ,
|
|
113
|
+
item: { ...item },
|
|
114
|
+
children: [],
|
|
115
|
+
tasks: [],
|
|
116
|
+
ownComputedState: 0 ,
|
|
117
|
+
computedState: 0 ,
|
|
118
|
+
});
|
|
119
|
+
class LiveTestResult extends Disposable {
|
|
120
|
+
get completedAt() {
|
|
121
|
+
return this._completedAt;
|
|
122
|
+
}
|
|
123
|
+
get tests() {
|
|
124
|
+
return ( this.testById.values());
|
|
125
|
+
}
|
|
126
|
+
constructor(id, persist, request) {
|
|
127
|
+
super();
|
|
128
|
+
this.id = id;
|
|
129
|
+
this.persist = persist;
|
|
130
|
+
this.request = request;
|
|
131
|
+
this.completeEmitter = this._register(( new Emitter()));
|
|
132
|
+
this.newTaskEmitter = this._register(( new Emitter()));
|
|
133
|
+
this.endTaskEmitter = this._register(( new Emitter()));
|
|
134
|
+
this.changeEmitter = this._register(( new Emitter()));
|
|
135
|
+
this.testById = ( new Map());
|
|
136
|
+
this.testMarkerCounter = 0;
|
|
137
|
+
this.startedAt = Date.now();
|
|
138
|
+
this.onChange = this.changeEmitter.event;
|
|
139
|
+
this.onComplete = this.completeEmitter.event;
|
|
140
|
+
this.onNewTask = this.newTaskEmitter.event;
|
|
141
|
+
this.onEndTask = this.endTaskEmitter.event;
|
|
142
|
+
this.tasks = [];
|
|
143
|
+
this.name = ( localizeWithPath(
|
|
144
|
+
'vs/workbench/contrib/testing/common/testResult',
|
|
145
|
+
'runFinished',
|
|
146
|
+
'Test run at {0}',
|
|
147
|
+
( new Date()).toLocaleString(language)
|
|
148
|
+
));
|
|
149
|
+
this.counts = makeEmptyCounts();
|
|
150
|
+
this.computedStateAccessor = {
|
|
151
|
+
getOwnState: i => i.ownComputedState,
|
|
152
|
+
getCurrentComputedState: i => i.computedState,
|
|
153
|
+
setComputedState: (i, s) => i.computedState = s,
|
|
154
|
+
getChildren: i => i.children,
|
|
155
|
+
getParents: i => {
|
|
156
|
+
const { testById: testByExtId } = this;
|
|
157
|
+
return (function* () {
|
|
158
|
+
const parentId = TestId.fromString(i.item.extId).parentId;
|
|
159
|
+
if (parentId) {
|
|
160
|
+
for (const id of parentId.idsToRoot()) {
|
|
161
|
+
yield testByExtId.get(( id.toString()));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
})();
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
this.doSerialize = ( new Lazy(() => ({
|
|
168
|
+
id: this.id,
|
|
169
|
+
completedAt: this.completedAt,
|
|
170
|
+
tasks: ( this.tasks.map(t => ({ id: t.id, name: t.name }))),
|
|
171
|
+
name: this.name,
|
|
172
|
+
request: this.request,
|
|
173
|
+
items: ( [...( this.testById.values())].map(TestResultItem.serializeWithoutMessages)),
|
|
174
|
+
})));
|
|
175
|
+
this.doSerializeWithMessages = ( new Lazy(() => ({
|
|
176
|
+
id: this.id,
|
|
177
|
+
completedAt: this.completedAt,
|
|
178
|
+
tasks: ( this.tasks.map(t => ({ id: t.id, name: t.name }))),
|
|
179
|
+
name: this.name,
|
|
180
|
+
request: this.request,
|
|
181
|
+
items: ( [...( this.testById.values())].map(TestResultItem.serialize)),
|
|
182
|
+
})));
|
|
183
|
+
}
|
|
184
|
+
getStateById(extTestId) {
|
|
185
|
+
return this.testById.get(extTestId);
|
|
186
|
+
}
|
|
187
|
+
appendOutput(output, taskId, location, testId) {
|
|
188
|
+
const preview = output.byteLength > 100 ? ( output.slice(0, 100).toString()) + '…' : ( output.toString());
|
|
189
|
+
let marker;
|
|
190
|
+
if (testId || location) {
|
|
191
|
+
marker = this.testMarkerCounter++;
|
|
192
|
+
}
|
|
193
|
+
const index = this.mustGetTaskIndex(taskId);
|
|
194
|
+
const task = this.tasks[index];
|
|
195
|
+
const { offset, length } = task.output.append(output, marker);
|
|
196
|
+
const message = {
|
|
197
|
+
location,
|
|
198
|
+
message: removeAnsiEscapeCodes(preview),
|
|
199
|
+
offset,
|
|
200
|
+
length,
|
|
201
|
+
marker,
|
|
202
|
+
type: 1 ,
|
|
203
|
+
};
|
|
204
|
+
const test = testId && this.testById.get(testId);
|
|
205
|
+
if (test) {
|
|
206
|
+
test.tasks[index].messages.push(message);
|
|
207
|
+
this.changeEmitter.fire({ item: test, result: this, reason: 2 , message });
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
task.otherMessages.push(message);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
addTask(task) {
|
|
214
|
+
this.tasks.push({ ...task, coverage: observableValue(this, undefined), otherMessages: [], output: ( new TaskRawOutput()) });
|
|
215
|
+
for (const test of this.tests) {
|
|
216
|
+
test.tasks.push({ duration: undefined, messages: [], state: 0 });
|
|
217
|
+
}
|
|
218
|
+
this.newTaskEmitter.fire(this.tasks.length - 1);
|
|
219
|
+
}
|
|
220
|
+
addTestChainToRun(controllerId, chain) {
|
|
221
|
+
let parent = this.testById.get(chain[0].extId);
|
|
222
|
+
if (!parent) {
|
|
223
|
+
parent = this.addTestToRun(controllerId, chain[0], null);
|
|
224
|
+
}
|
|
225
|
+
for (let i = 1; i < chain.length; i++) {
|
|
226
|
+
parent = this.addTestToRun(controllerId, chain[i], parent.item.extId);
|
|
227
|
+
}
|
|
228
|
+
return undefined;
|
|
229
|
+
}
|
|
230
|
+
updateState(testId, taskId, state, duration) {
|
|
231
|
+
const entry = this.testById.get(testId);
|
|
232
|
+
if (!entry) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
const index = this.mustGetTaskIndex(taskId);
|
|
236
|
+
const oldTerminalStatePrio = terminalStatePriorities[entry.tasks[index].state];
|
|
237
|
+
const newTerminalStatePrio = terminalStatePriorities[state];
|
|
238
|
+
if (oldTerminalStatePrio !== undefined &&
|
|
239
|
+
(newTerminalStatePrio === undefined || newTerminalStatePrio < oldTerminalStatePrio)) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
this.fireUpdateAndRefresh(entry, index, state, duration);
|
|
243
|
+
}
|
|
244
|
+
appendMessage(testId, taskId, message) {
|
|
245
|
+
const entry = this.testById.get(testId);
|
|
246
|
+
if (!entry) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
entry.tasks[this.mustGetTaskIndex(taskId)].messages.push(message);
|
|
250
|
+
this.changeEmitter.fire({ item: entry, result: this, reason: 2 , message });
|
|
251
|
+
}
|
|
252
|
+
markTaskComplete(taskId) {
|
|
253
|
+
const index = this.mustGetTaskIndex(taskId);
|
|
254
|
+
const task = this.tasks[index];
|
|
255
|
+
task.running = false;
|
|
256
|
+
task.output.end();
|
|
257
|
+
this.setAllToState(0 , taskId, t => t.state === 1 || t.state === 2 );
|
|
258
|
+
this.endTaskEmitter.fire(index);
|
|
259
|
+
}
|
|
260
|
+
markComplete() {
|
|
261
|
+
if (this._completedAt !== undefined) {
|
|
262
|
+
throw new Error('cannot complete a test result multiple times');
|
|
263
|
+
}
|
|
264
|
+
for (const task of this.tasks) {
|
|
265
|
+
if (task.running) {
|
|
266
|
+
this.markTaskComplete(task.id);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
this._completedAt = Date.now();
|
|
270
|
+
this.completeEmitter.fire();
|
|
271
|
+
}
|
|
272
|
+
markRetired(testIds) {
|
|
273
|
+
for (const [id, test] of this.testById) {
|
|
274
|
+
if (!test.retired && (!testIds || testIds.hasKeyOrParent(TestId.fromString(id).path))) {
|
|
275
|
+
test.retired = true;
|
|
276
|
+
this.changeEmitter.fire({ reason: 0 , item: test, result: this });
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
toJSON() {
|
|
281
|
+
return this.completedAt && this.persist ? this.doSerialize.value : undefined;
|
|
282
|
+
}
|
|
283
|
+
toJSONWithMessages() {
|
|
284
|
+
return this.completedAt && this.persist ? this.doSerializeWithMessages.value : undefined;
|
|
285
|
+
}
|
|
286
|
+
setAllToState(state, taskId, when) {
|
|
287
|
+
const index = this.mustGetTaskIndex(taskId);
|
|
288
|
+
for (const test of ( this.testById.values())) {
|
|
289
|
+
if (when(test.tasks[index], test)) {
|
|
290
|
+
this.fireUpdateAndRefresh(test, index, state);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
fireUpdateAndRefresh(entry, taskIndex, newState, newOwnDuration) {
|
|
295
|
+
const previousOwnComputed = entry.ownComputedState;
|
|
296
|
+
const previousOwnDuration = entry.ownDuration;
|
|
297
|
+
const changeEvent = {
|
|
298
|
+
item: entry,
|
|
299
|
+
result: this,
|
|
300
|
+
reason: 1 ,
|
|
301
|
+
previousState: previousOwnComputed,
|
|
302
|
+
previousOwnDuration: previousOwnDuration,
|
|
303
|
+
};
|
|
304
|
+
entry.tasks[taskIndex].state = newState;
|
|
305
|
+
if (newOwnDuration !== undefined) {
|
|
306
|
+
entry.tasks[taskIndex].duration = newOwnDuration;
|
|
307
|
+
entry.ownDuration = Math.max(entry.ownDuration || 0, newOwnDuration);
|
|
308
|
+
}
|
|
309
|
+
const newOwnComputed = maxPriority(...( entry.tasks.map(t => t.state)));
|
|
310
|
+
if (newOwnComputed === previousOwnComputed) {
|
|
311
|
+
if (newOwnDuration !== previousOwnDuration) {
|
|
312
|
+
this.changeEmitter.fire(changeEvent);
|
|
313
|
+
}
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
entry.ownComputedState = newOwnComputed;
|
|
317
|
+
this.counts[previousOwnComputed]--;
|
|
318
|
+
this.counts[newOwnComputed]++;
|
|
319
|
+
refreshComputedState(this.computedStateAccessor, entry).forEach(t => this.changeEmitter.fire(t === entry ? changeEvent : {
|
|
320
|
+
item: t,
|
|
321
|
+
result: this,
|
|
322
|
+
reason: 0 ,
|
|
323
|
+
}));
|
|
324
|
+
}
|
|
325
|
+
addTestToRun(controllerId, item, parent) {
|
|
326
|
+
const node = itemToNode(controllerId, item);
|
|
327
|
+
this.testById.set(item.extId, node);
|
|
328
|
+
this.counts[0 ]++;
|
|
329
|
+
if (parent) {
|
|
330
|
+
this.testById.get(parent)?.children.push(node);
|
|
331
|
+
}
|
|
332
|
+
if (this.tasks.length) {
|
|
333
|
+
for (let i = 0; i < this.tasks.length; i++) {
|
|
334
|
+
node.tasks.push({ duration: undefined, messages: [], state: 0 });
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
return node;
|
|
338
|
+
}
|
|
339
|
+
mustGetTaskIndex(taskId) {
|
|
340
|
+
const index = this.tasks.findIndex(t => t.id === taskId);
|
|
341
|
+
if (index === -1) {
|
|
342
|
+
throw new Error(`Unknown task ${taskId} in updateState`);
|
|
343
|
+
}
|
|
344
|
+
return index;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
class HydratedTestResult {
|
|
348
|
+
get tests() {
|
|
349
|
+
return ( this.testById.values());
|
|
350
|
+
}
|
|
351
|
+
constructor(serialized, persist = true) {
|
|
352
|
+
this.serialized = serialized;
|
|
353
|
+
this.persist = persist;
|
|
354
|
+
this.counts = makeEmptyCounts();
|
|
355
|
+
this.testById = ( new Map());
|
|
356
|
+
this.id = serialized.id;
|
|
357
|
+
this.completedAt = serialized.completedAt;
|
|
358
|
+
this.tasks = ( serialized.tasks.map((task, i) => ({
|
|
359
|
+
id: task.id,
|
|
360
|
+
name: task.name,
|
|
361
|
+
running: false,
|
|
362
|
+
coverage: observableValue(this, undefined),
|
|
363
|
+
output: emptyRawOutput,
|
|
364
|
+
otherMessages: []
|
|
365
|
+
})));
|
|
366
|
+
this.name = serialized.name;
|
|
367
|
+
this.request = serialized.request;
|
|
368
|
+
for (const item of serialized.items) {
|
|
369
|
+
const de = TestResultItem.deserialize(item);
|
|
370
|
+
this.counts[de.ownComputedState]++;
|
|
371
|
+
this.testById.set(item.item.extId, de);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
getStateById(extTestId) {
|
|
375
|
+
return this.testById.get(extTestId);
|
|
376
|
+
}
|
|
377
|
+
toJSON() {
|
|
378
|
+
return this.persist ? this.serialized : undefined;
|
|
379
|
+
}
|
|
380
|
+
toJSONWithMessages() {
|
|
381
|
+
return this.toJSON();
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
export { HydratedTestResult, LiveTestResult, TaskRawOutput, maxCountPriority, resultItemParents };
|