@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,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { Disposable, toDisposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
3
3
|
import { IViewDescriptorService, IViewsService } from '../../../common/views.js';
|
|
4
|
-
import { FocusedViewContext,
|
|
4
|
+
import { FocusedViewContext, getVisbileViewContextKey } from '../../../common/contextkeys.js';
|
|
5
5
|
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
6
6
|
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
7
7
|
import { RawContextKey, ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
@@ -22,13 +22,15 @@ import { Categories } from 'monaco-editor/esm/vs/platform/action/common/actionCo
|
|
|
22
22
|
import { IEditorGroupsService } from '../../../services/editor/common/editorGroupsService.js';
|
|
23
23
|
import { FilterViewPaneContainer } from './viewsViewlet.js';
|
|
24
24
|
import { IPaneCompositePartService } from '../../../services/panecomposite/browser/panecomposite.js';
|
|
25
|
+
import { IEditorService } from '../../../services/editor/common/editorService.js';
|
|
25
26
|
let ViewsService = class ViewsService extends Disposable {
|
|
26
|
-
constructor(viewDescriptorService, paneCompositeService, contextKeyService, layoutService) {
|
|
27
|
+
constructor(viewDescriptorService, paneCompositeService, contextKeyService, layoutService, editorService) {
|
|
27
28
|
super();
|
|
28
29
|
this.viewDescriptorService = viewDescriptorService;
|
|
29
30
|
this.paneCompositeService = paneCompositeService;
|
|
30
31
|
this.contextKeyService = contextKeyService;
|
|
31
32
|
this.layoutService = layoutService;
|
|
33
|
+
this.editorService = editorService;
|
|
32
34
|
this._onDidChangeViewVisibility = this._register(( new Emitter()));
|
|
33
35
|
this.onDidChangeViewVisibility = this._onDidChangeViewVisibility.event;
|
|
34
36
|
this._onDidChangeViewContainerVisibility = this._register(( new Emitter()));
|
|
@@ -36,6 +38,7 @@ let ViewsService = class ViewsService extends Disposable {
|
|
|
36
38
|
this._onDidChangeFocusedView = this._register(( new Emitter()));
|
|
37
39
|
this.onDidChangeFocusedView = this._onDidChangeFocusedView.event;
|
|
38
40
|
this.viewDisposable = ( new Map());
|
|
41
|
+
this.enabledViewContainersContextKeys = ( new Map());
|
|
39
42
|
this.visibleViewContextKeys = ( new Map());
|
|
40
43
|
this.viewPaneContainers = ( new Map());
|
|
41
44
|
this._register(toDisposable(() => {
|
|
@@ -88,6 +91,8 @@ let ViewsService = class ViewsService extends Disposable {
|
|
|
88
91
|
this.onViewDescriptorsAdded(added, viewContainer);
|
|
89
92
|
this.onViewDescriptorsRemoved(removed);
|
|
90
93
|
}));
|
|
94
|
+
this.updateViewContainerEnablementContextKey(viewContainer);
|
|
95
|
+
this._register(viewContainerModel.onDidChangeActiveViewDescriptors(() => this.updateViewContainerEnablementContextKey(viewContainer)));
|
|
91
96
|
this._register(this.registerOpenViewContainerAction(viewContainer));
|
|
92
97
|
}
|
|
93
98
|
onDidChangeContainerLocation(viewContainer, from, to) {
|
|
@@ -99,11 +104,10 @@ let ViewsService = class ViewsService extends Disposable {
|
|
|
99
104
|
if (location === null) {
|
|
100
105
|
return;
|
|
101
106
|
}
|
|
102
|
-
const composite = this.getComposite(container.id, location);
|
|
103
107
|
for (const viewDescriptor of views) {
|
|
104
108
|
const disposables = ( new DisposableStore());
|
|
105
109
|
disposables.add(this.registerOpenViewAction(viewDescriptor));
|
|
106
|
-
disposables.add(this.registerFocusViewAction(viewDescriptor,
|
|
110
|
+
disposables.add(this.registerFocusViewAction(viewDescriptor, container.title));
|
|
107
111
|
disposables.add(this.registerResetViewLocationAction(viewDescriptor));
|
|
108
112
|
this.viewDisposable.set(viewDescriptor, disposables);
|
|
109
113
|
}
|
|
@@ -117,6 +121,14 @@ let ViewsService = class ViewsService extends Disposable {
|
|
|
117
121
|
}
|
|
118
122
|
}
|
|
119
123
|
}
|
|
124
|
+
updateViewContainerEnablementContextKey(viewContainer) {
|
|
125
|
+
let contextKey = this.enabledViewContainersContextKeys.get(viewContainer.id);
|
|
126
|
+
if (!contextKey) {
|
|
127
|
+
contextKey = this.contextKeyService.createKey(getEnabledViewContainerContextKey(viewContainer.id), false);
|
|
128
|
+
this.enabledViewContainersContextKeys.set(viewContainer.id, contextKey);
|
|
129
|
+
}
|
|
130
|
+
contextKey.set(!(viewContainer.hideIfEmpty && this.viewDescriptorService.getViewContainerModel(viewContainer).activeViewDescriptors.length === 0));
|
|
131
|
+
}
|
|
120
132
|
async openComposite(compositeId, location, focus) {
|
|
121
133
|
return this.paneCompositeService.openPaneComposite(compositeId, location, focus);
|
|
122
134
|
}
|
|
@@ -188,7 +200,8 @@ let ViewsService = class ViewsService extends Disposable {
|
|
|
188
200
|
}
|
|
189
201
|
getFocusedViewName() {
|
|
190
202
|
const viewId = this.contextKeyService.getContextKeyValue(FocusedViewContext.key) ?? '';
|
|
191
|
-
|
|
203
|
+
const textEditorFocused = this.editorService.activeTextEditorControl?.hasTextFocus() ? ( localizeWithPath('vs/workbench/browser/parts/views/viewsService', 'editor', "Text Editor")) : undefined;
|
|
204
|
+
return this.viewDescriptorService.getViewDescriptorById(( viewId.toString()))?.name?.value ?? textEditorFocused ?? '';
|
|
192
205
|
}
|
|
193
206
|
async openView(id, focus) {
|
|
194
207
|
const viewContainer = this.viewDescriptorService.getViewContainerByViewId(id);
|
|
@@ -437,11 +450,11 @@ let ViewsService = class ViewsService extends Disposable {
|
|
|
437
450
|
'vs/workbench/browser/parts/views/viewsService',
|
|
438
451
|
{ key: 'focus view', comment: ['{0} indicates the name of the view to be focused.'] },
|
|
439
452
|
"Focus on {0} View",
|
|
440
|
-
viewDescriptor.name
|
|
453
|
+
viewDescriptor.name.value
|
|
441
454
|
));
|
|
442
455
|
super({
|
|
443
456
|
id: viewDescriptor.focusCommand ? viewDescriptor.focusCommand.id : `${viewDescriptor.id}.focus`,
|
|
444
|
-
title: { original: `Focus on ${viewDescriptor.name} View`, value: title },
|
|
457
|
+
title: { original: `Focus on ${viewDescriptor.name.original} View`, value: title },
|
|
445
458
|
category,
|
|
446
459
|
menu: [{
|
|
447
460
|
id: MenuId.CommandPalette,
|
|
@@ -456,7 +469,7 @@ let ViewsService = class ViewsService extends Disposable {
|
|
|
456
469
|
mac: viewDescriptor.focusCommand?.keybindings?.mac,
|
|
457
470
|
win: viewDescriptor.focusCommand?.keybindings?.win
|
|
458
471
|
},
|
|
459
|
-
|
|
472
|
+
metadata: {
|
|
460
473
|
description: title,
|
|
461
474
|
args: [
|
|
462
475
|
{
|
|
@@ -508,9 +521,9 @@ let ViewsService = class ViewsService extends Disposable {
|
|
|
508
521
|
const containerModel = viewDescriptorService.getViewContainerModel(defaultContainer);
|
|
509
522
|
if (defaultContainer.hideIfEmpty && containerModel.visibleViewDescriptors.length === 0) {
|
|
510
523
|
const defaultLocation = viewDescriptorService.getDefaultViewContainerLocation(defaultContainer);
|
|
511
|
-
viewDescriptorService.moveViewContainerToLocation(defaultContainer, defaultLocation);
|
|
524
|
+
viewDescriptorService.moveViewContainerToLocation(defaultContainer, defaultLocation, undefined, this.desc.id);
|
|
512
525
|
}
|
|
513
|
-
viewDescriptorService.moveViewsToContainer([viewDescriptor], viewDescriptorService.getDefaultContainerById(viewDescriptor.id));
|
|
526
|
+
viewDescriptorService.moveViewsToContainer([viewDescriptor], viewDescriptorService.getDefaultContainerById(viewDescriptor.id), undefined, this.desc.id);
|
|
514
527
|
accessor.get(IViewsService).openView(viewDescriptor.id, true);
|
|
515
528
|
}
|
|
516
529
|
});
|
|
@@ -572,8 +585,10 @@ ViewsService = ( __decorate([
|
|
|
572
585
|
( __param(0, IViewDescriptorService)),
|
|
573
586
|
( __param(1, IPaneCompositePartService)),
|
|
574
587
|
( __param(2, IContextKeyService)),
|
|
575
|
-
( __param(3, IWorkbenchLayoutService))
|
|
588
|
+
( __param(3, IWorkbenchLayoutService)),
|
|
589
|
+
( __param(4, IEditorService))
|
|
576
590
|
], ViewsService));
|
|
591
|
+
function getEnabledViewContainerContextKey(viewContainerId) { return `viewContainer.${viewContainerId}.enabled`; }
|
|
577
592
|
function getPaneCompositeExtension(viewContainerLocation) {
|
|
578
593
|
switch (viewContainerLocation) {
|
|
579
594
|
case 2 :
|
|
@@ -19,12 +19,6 @@ let FilterViewPaneContainer = class FilterViewPaneContainer extends ViewPaneCont
|
|
|
19
19
|
this.filterValue = newFilterValue;
|
|
20
20
|
this.onFilterChanged(newFilterValue);
|
|
21
21
|
}));
|
|
22
|
-
this._register(this.onDidChangeViewVisibility(view => {
|
|
23
|
-
const descriptorMap = Array.from(this.allViews.entries()).find(entry => ( entry[1].has(view.id)));
|
|
24
|
-
if (descriptorMap && !this.filterValue?.includes(descriptorMap[0])) {
|
|
25
|
-
this.setFilter(descriptorMap[1].get(view.id));
|
|
26
|
-
}
|
|
27
|
-
}));
|
|
28
22
|
this._register(this.viewContainerModel.onDidChangeActiveViewDescriptors(() => {
|
|
29
23
|
this.updateAllViews(this.viewContainerModel.activeViewDescriptors);
|
|
30
24
|
}));
|
|
@@ -93,6 +87,16 @@ let FilterViewPaneContainer = class FilterViewPaneContainer extends ViewPaneCont
|
|
|
93
87
|
}
|
|
94
88
|
return panes;
|
|
95
89
|
}
|
|
90
|
+
openView(id, focus) {
|
|
91
|
+
const result = super.openView(id, focus);
|
|
92
|
+
if (result) {
|
|
93
|
+
const descriptorMap = Array.from(this.allViews.entries()).find(entry => ( entry[1].has(id)));
|
|
94
|
+
if (descriptorMap && !this.filterValue?.includes(descriptorMap[0])) {
|
|
95
|
+
this.setFilter(descriptorMap[1].get(id));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
96
100
|
};
|
|
97
101
|
FilterViewPaneContainer = ( __decorate([
|
|
98
102
|
( __param(2, IConfigurationService)),
|
|
@@ -4,6 +4,7 @@ import { isWeb, isIOS, isWindows, isMacintosh } from 'monaco-editor/esm/vs/base/
|
|
|
4
4
|
import { createMetaElement } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
5
5
|
import { isSafari, isStandalone } from 'monaco-editor/esm/vs/base/browser/browser.js';
|
|
6
6
|
import { selectionBackground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
7
|
+
import { mainWindow } from 'monaco-editor/esm/vs/base/browser/window.js';
|
|
7
8
|
registerThemingParticipant((theme, collector) => {
|
|
8
9
|
const workbenchBackground = WORKBENCH_BACKGROUND(theme);
|
|
9
10
|
collector.addRule(`.monaco-workbench { background-color: ${workbenchBackground}; }`);
|
|
@@ -15,7 +16,7 @@ registerThemingParticipant((theme, collector) => {
|
|
|
15
16
|
const titleBackground = theme.getColor(TITLE_BAR_ACTIVE_BACKGROUND);
|
|
16
17
|
if (titleBackground) {
|
|
17
18
|
const metaElementId = 'monaco-workbench-meta-theme-color';
|
|
18
|
-
let metaElement = document.getElementById(metaElementId);
|
|
19
|
+
let metaElement = mainWindow.document.getElementById(metaElementId);
|
|
19
20
|
if (!metaElement) {
|
|
20
21
|
metaElement = createMetaElement();
|
|
21
22
|
metaElement.name = 'theme-color';
|
|
@@ -4,11 +4,11 @@ import { IURLCallbackProvider } from '../services/url/browser/urlService.js';
|
|
|
4
4
|
import { LogLevel } from '../../platform/log/common/log.js';
|
|
5
5
|
import { IUpdateProvider } from '../services/update/browser/updateService.js';
|
|
6
6
|
import { Event } from '../../base/common/event.js';
|
|
7
|
-
import { IWorkspaceProvider } from '../services/host/browser/browserHostService.js';
|
|
8
7
|
import { IProductConfiguration } from '../../base/common/product.js';
|
|
9
8
|
import { ISecretStorageProvider } from '../../platform/secrets/common/secrets.js';
|
|
10
9
|
import { TunnelProviderFeatures } from '../../platform/tunnel/common/tunnel.js';
|
|
11
10
|
import { ITextEditorOptions } from '../../platform/editor/common/editor.js';
|
|
11
|
+
import { IWorkspaceToOpen, IFolderToOpen } from '../../platform/window/common/window.js';
|
|
12
12
|
import { EditorGroupLayout } from '../services/editor/common/editorGroupsService.js';
|
|
13
13
|
|
|
14
14
|
interface IWorkbenchConstructionOptions {
|
|
@@ -178,6 +178,43 @@ interface IWorkbenchConstructionOptions {
|
|
|
178
178
|
readonly messagePorts?: ReadonlyMap<ExtensionId, MessagePort>;
|
|
179
179
|
readonly developmentOptions?: IDevelopmentOptions;
|
|
180
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* A workspace to open in the workbench can either be:
|
|
183
|
+
* - a workspace file with 0-N folders (via `workspaceUri`)
|
|
184
|
+
* - a single folder (via `folderUri`)
|
|
185
|
+
* - empty (via `undefined`)
|
|
186
|
+
*/
|
|
187
|
+
type IWorkspace = IWorkspaceToOpen | IFolderToOpen | undefined;
|
|
188
|
+
interface IWorkspaceProvider {
|
|
189
|
+
/**
|
|
190
|
+
* The initial workspace to open.
|
|
191
|
+
*/
|
|
192
|
+
readonly workspace: IWorkspace;
|
|
193
|
+
/**
|
|
194
|
+
* Arbitrary payload from the `IWorkspaceProvider.open` call.
|
|
195
|
+
*/
|
|
196
|
+
readonly payload?: object;
|
|
197
|
+
/**
|
|
198
|
+
* Return `true` if the provided [workspace](#IWorkspaceProvider.workspace) is trusted, `false` if not trusted, `undefined` if unknown.
|
|
199
|
+
*/
|
|
200
|
+
readonly trusted: boolean | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* Asks to open a workspace in the current or a new window.
|
|
203
|
+
*
|
|
204
|
+
* @param workspace the workspace to open.
|
|
205
|
+
* @param options optional options for the workspace to open.
|
|
206
|
+
* - `reuse`: whether to open inside the current window or a new window
|
|
207
|
+
* - `payload`: arbitrary payload that should be made available
|
|
208
|
+
* to the opening window via the `IWorkspaceProvider.payload` property.
|
|
209
|
+
* @param payload optional payload to send to the workspace to open.
|
|
210
|
+
*
|
|
211
|
+
* @returns true if successfully opened, false otherwise.
|
|
212
|
+
*/
|
|
213
|
+
open(workspace: IWorkspace, options?: {
|
|
214
|
+
reuse?: boolean;
|
|
215
|
+
payload?: object;
|
|
216
|
+
}): Promise<boolean>;
|
|
217
|
+
}
|
|
181
218
|
interface IResourceUriProvider {
|
|
182
219
|
(uri: URI): URI;
|
|
183
220
|
}
|
|
@@ -552,4 +589,4 @@ interface IRemoteResourceRequest {
|
|
|
552
589
|
respondWith(statusCode: number, body: Uint8Array, headers: Record<string, string>): void;
|
|
553
590
|
}
|
|
554
591
|
|
|
555
|
-
export { ColorScheme, type ExtensionId, type ICommand, type ICommonTelemetryPropertiesResolver, type IDefaultEditor, type IDefaultLayout, type IDefaultView, type IDevelopmentOptions, type IExternalUriResolver, type IHomeIndicator, type IInitialColorTheme, type IProductQualityChangeHandler, type IRemoteResourceProvider, type IRemoteResourceRequest, type IResourceUriProvider, type ISettingsSyncOptions, type IShowPortCandidate, type ITunnel, type ITunnelFactory, type ITunnelOptions, type ITunnelProvider, type IWelcomeBanner, type IWelcomeDialog, type IWelcomeLinkAction, type IWindowIndicator, type IWorkbenchConstructionOptions, type MarketplaceExtension, Menu, type TunnelCreationOptions };
|
|
592
|
+
export { ColorScheme, type ExtensionId, type ICommand, type ICommonTelemetryPropertiesResolver, type IDefaultEditor, type IDefaultLayout, type IDefaultView, type IDevelopmentOptions, type IExternalUriResolver, type IHomeIndicator, type IInitialColorTheme, type IProductQualityChangeHandler, type IRemoteResourceProvider, type IRemoteResourceRequest, type IResourceUriProvider, type ISettingsSyncOptions, type IShowPortCandidate, type ITunnel, type ITunnelFactory, type ITunnelOptions, type ITunnelProvider, type IWelcomeBanner, type IWelcomeDialog, type IWelcomeLinkAction, type IWindowIndicator, type IWorkbenchConstructionOptions, type IWorkspace, type IWorkspaceProvider, type MarketplaceExtension, Menu, type TunnelCreationOptions };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { getWindowsCount, getWindows } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
2
|
+
import { Disposable, dispose, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
3
|
+
import '../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
4
|
+
import { isAuxiliaryWindow } from 'monaco-editor/esm/vs/base/browser/window.js';
|
|
5
|
+
import { createSingleCallFunction } from 'monaco-editor/esm/vs/base/common/functional.js';
|
|
6
|
+
class BaseWindow extends Disposable {
|
|
7
|
+
static { this.TIMEOUT_HANDLES = Number.MIN_SAFE_INTEGER; }
|
|
8
|
+
static { this.TIMEOUT_DISPOSABLES = ( new Map()); }
|
|
9
|
+
constructor(targetWindow, dom = { getWindowsCount, getWindows } ) {
|
|
10
|
+
super();
|
|
11
|
+
this.enableMultiWindowAwareTimeout(targetWindow, dom);
|
|
12
|
+
}
|
|
13
|
+
enableMultiWindowAwareTimeout(targetWindow, dom = { getWindowsCount, getWindows }) {
|
|
14
|
+
const originalSetTimeout = targetWindow.setTimeout;
|
|
15
|
+
Object.defineProperty(targetWindow, 'vscodeOriginalSetTimeout', { get: () => originalSetTimeout });
|
|
16
|
+
const originalClearTimeout = targetWindow.clearTimeout;
|
|
17
|
+
Object.defineProperty(targetWindow, 'vscodeOriginalClearTimeout', { get: () => originalClearTimeout });
|
|
18
|
+
targetWindow.setTimeout = function (handler, timeout = 0, ...args) {
|
|
19
|
+
if (dom.getWindowsCount() === 1 || typeof handler === 'string' || timeout === 0 ) {
|
|
20
|
+
return originalSetTimeout.apply(this, [handler, timeout, ...args]);
|
|
21
|
+
}
|
|
22
|
+
const timeoutDisposables = ( new Set());
|
|
23
|
+
const timeoutHandle = BaseWindow.TIMEOUT_HANDLES++;
|
|
24
|
+
BaseWindow.TIMEOUT_DISPOSABLES.set(timeoutHandle, timeoutDisposables);
|
|
25
|
+
const handlerFn = createSingleCallFunction(handler, () => {
|
|
26
|
+
dispose(timeoutDisposables);
|
|
27
|
+
BaseWindow.TIMEOUT_DISPOSABLES.delete(timeoutHandle);
|
|
28
|
+
});
|
|
29
|
+
for (const { window, disposables } of dom.getWindows()) {
|
|
30
|
+
if (isAuxiliaryWindow(window) && window.document.visibilityState === 'hidden') {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const handle = window.vscodeOriginalSetTimeout.apply(this, [handlerFn, timeout, ...args]);
|
|
34
|
+
const timeoutDisposable = toDisposable(() => {
|
|
35
|
+
window.vscodeOriginalClearTimeout(handle);
|
|
36
|
+
timeoutDisposables.delete(timeoutDisposable);
|
|
37
|
+
});
|
|
38
|
+
disposables.add(timeoutDisposable);
|
|
39
|
+
timeoutDisposables.add(timeoutDisposable);
|
|
40
|
+
}
|
|
41
|
+
return timeoutHandle;
|
|
42
|
+
};
|
|
43
|
+
targetWindow.clearTimeout = function (timeoutHandle) {
|
|
44
|
+
const timeoutDisposables = typeof timeoutHandle === 'number' ? BaseWindow.TIMEOUT_DISPOSABLES.get(timeoutHandle) : undefined;
|
|
45
|
+
if (timeoutDisposables) {
|
|
46
|
+
dispose(timeoutDisposables);
|
|
47
|
+
BaseWindow.TIMEOUT_DISPOSABLES.delete(timeoutHandle);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
originalClearTimeout.apply(this, [timeoutHandle]);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export { BaseWindow };
|