@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
|
@@ -208,6 +208,7 @@ let DirtyDiffWidget = class DirtyDiffWidget extends PeekViewWidget {
|
|
|
208
208
|
if (usePosition) {
|
|
209
209
|
this.show(position, height);
|
|
210
210
|
}
|
|
211
|
+
this.editor.setPosition(position);
|
|
211
212
|
this.editor.focus();
|
|
212
213
|
}
|
|
213
214
|
renderTitle(label) {
|
|
@@ -633,8 +634,7 @@ let DirtyDiffController = class DirtyDiffController extends Disposable {
|
|
|
633
634
|
this.enabled = false;
|
|
634
635
|
this.gutterActionDisposables = ( new DisposableStore());
|
|
635
636
|
this.enabled = !contextKeyService.getContextKeyValue('isInDiffEditor');
|
|
636
|
-
this.stylesheet = dom.createStyleSheet();
|
|
637
|
-
this._register(toDisposable(() => this.stylesheet.remove()));
|
|
637
|
+
this.stylesheet = dom.createStyleSheet(undefined, undefined, this._store);
|
|
638
638
|
if (this.enabled) {
|
|
639
639
|
this.isDirtyDiffVisible = isDirtyDiffVisible.bindTo(contextKeyService);
|
|
640
640
|
this._register(editor.onDidChangeModel(() => this.close()));
|
|
@@ -1352,8 +1352,7 @@ let DirtyDiffWorkbenchController = class DirtyDiffWorkbenchController extends Di
|
|
|
1352
1352
|
this.viewState = { width: 3, visibility: 'always' };
|
|
1353
1353
|
this.items = ( new ResourceMap());
|
|
1354
1354
|
this.transientDisposables = this._register(( new DisposableStore()));
|
|
1355
|
-
this.stylesheet = dom.createStyleSheet();
|
|
1356
|
-
this._register(toDisposable(() => this.stylesheet.parentElement.removeChild(this.stylesheet)));
|
|
1355
|
+
this.stylesheet = dom.createStyleSheet(undefined, undefined, this._store);
|
|
1357
1356
|
const onDidChangeConfiguration = Event.filter(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.diffDecorations'));
|
|
1358
1357
|
this._register(onDidChangeConfiguration(this.onDidChangeConfiguration, this));
|
|
1359
1358
|
this.onDidChangeConfiguration();
|
|
@@ -1454,8 +1453,14 @@ let DirtyDiffWorkbenchController = class DirtyDiffWorkbenchController extends Di
|
|
|
1454
1453
|
for (const [uri, item] of this.items) {
|
|
1455
1454
|
for (const editorId of ( item.keys())) {
|
|
1456
1455
|
if (!this.editorService.visibleTextEditorControls.find(editor => isCodeEditor(editor) && editor.getModel()?.uri.toString() === ( uri.toString()) && editor.getId() === editorId)) {
|
|
1457
|
-
|
|
1458
|
-
|
|
1456
|
+
if (( item.has(editorId))) {
|
|
1457
|
+
const dirtyDiffItem = item.get(editorId);
|
|
1458
|
+
dirtyDiffItem?.dispose();
|
|
1459
|
+
item.delete(editorId);
|
|
1460
|
+
if (item.size === 0) {
|
|
1461
|
+
this.items.delete(uri);
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1459
1464
|
}
|
|
1460
1465
|
}
|
|
1461
1466
|
}
|
|
@@ -2,7 +2,6 @@ import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/com
|
|
|
2
2
|
const VIEWLET_ID = 'workbench.view.scm';
|
|
3
3
|
const VIEW_PANE_ID = 'workbench.scm';
|
|
4
4
|
const REPOSITORIES_VIEW_PANE_ID = 'workbench.scm.repositories';
|
|
5
|
-
const SYNC_VIEW_PANE_ID = 'workbench.scm.sync';
|
|
6
5
|
const ISCMService = ( createDecorator('scm'));
|
|
7
6
|
var SCMInputChangeReason;
|
|
8
7
|
( (function(SCMInputChangeReason) {
|
|
@@ -10,4 +9,4 @@ var SCMInputChangeReason;
|
|
|
10
9
|
SCMInputChangeReason[SCMInputChangeReason["HistoryNext"] = 1] = "HistoryNext";
|
|
11
10
|
})(SCMInputChangeReason || (SCMInputChangeReason = {})));
|
|
12
11
|
const ISCMViewService = ( createDecorator('scmView'));
|
|
13
|
-
export { ISCMService, ISCMViewService, REPOSITORIES_VIEW_PANE_ID, SCMInputChangeReason,
|
|
12
|
+
export { ISCMService, ISCMViewService, REPOSITORIES_VIEW_PANE_ID, SCMInputChangeReason, VIEWLET_ID, VIEW_PANE_ID };
|
package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/searchNotebookHelpers.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TextSearchMatch } from '../../../../services/search/common/search.js';
|
|
2
|
+
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
3
|
+
import { genericCellMatchesToTextSearchMatches, rawCellPrefix } from '../../common/searchNotebookHelpers.js';
|
|
4
|
+
function getIDFromINotebookCellMatch(match) {
|
|
5
|
+
if (isINotebookCellMatchWithModel(match)) {
|
|
6
|
+
return match.cell.id;
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
return `${rawCellPrefix}${match.index}`;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function isINotebookFileMatchWithModel(object) {
|
|
13
|
+
return 'cellResults' in object && object.cellResults instanceof Array && object.cellResults.every(isINotebookCellMatchWithModel);
|
|
14
|
+
}
|
|
15
|
+
function isINotebookCellMatchWithModel(object) {
|
|
16
|
+
return 'cell' in object;
|
|
17
|
+
}
|
|
18
|
+
function contentMatchesToTextSearchMatches(contentMatches, cell) {
|
|
19
|
+
return genericCellMatchesToTextSearchMatches(contentMatches, cell.textBuffer);
|
|
20
|
+
}
|
|
21
|
+
function webviewMatchesToTextSearchMatches(webviewMatches) {
|
|
22
|
+
return ( webviewMatches
|
|
23
|
+
.map(rawMatch => (rawMatch.searchPreviewInfo) ?
|
|
24
|
+
( new TextSearchMatch(rawMatch.searchPreviewInfo.line, ( new Range(
|
|
25
|
+
0,
|
|
26
|
+
rawMatch.searchPreviewInfo.range.start,
|
|
27
|
+
0,
|
|
28
|
+
rawMatch.searchPreviewInfo.range.end
|
|
29
|
+
)), undefined, rawMatch.index)) : undefined)).filter((e) => !!e);
|
|
30
|
+
}
|
|
31
|
+
export { contentMatchesToTextSearchMatches, getIDFromINotebookCellMatch, isINotebookCellMatchWithModel, isINotebookFileMatchWithModel, webviewMatchesToTextSearchMatches };
|
|
@@ -29,11 +29,13 @@ import { NotebookEditorWidget } from '../../../../../../../override/vs/workbench
|
|
|
29
29
|
import { INotebookEditorService } from '../../notebook/browser/services/notebookEditorService.js';
|
|
30
30
|
import { NotebookCellsChangeType } from '../../notebook/common/notebookCommon.js';
|
|
31
31
|
import { IReplaceService } from './replace.js';
|
|
32
|
-
import {
|
|
32
|
+
import { isINotebookFileMatchWithModel, contentMatchesToTextSearchMatches, webviewMatchesToTextSearchMatches, isINotebookCellMatchWithModel, getIDFromINotebookCellMatch } from './notebookSearch/searchNotebookHelpers.js';
|
|
33
33
|
import { INotebookSearchService } from '../common/notebookSearch.js';
|
|
34
|
+
import { isINotebookFileMatchNoModel, rawCellPrefix } from '../common/searchNotebookHelpers.js';
|
|
34
35
|
import { ReplacePattern } from '../../../services/search/common/replace.js';
|
|
35
36
|
import { OneLineRange, resultIsMatch, ISearchService } from '../../../services/search/common/search.js';
|
|
36
|
-
import { editorMatchesToTextSearchResults,
|
|
37
|
+
import { editorMatchesToTextSearchResults, getTextSearchMatchWithModelContext } from '../../../services/search/common/searchHelpers.js';
|
|
38
|
+
import { CellSearchModel } from '../common/cellSearchModel.js';
|
|
37
39
|
var FileMatch_1, FolderMatch_1, RangeHighlightDecorations_1;
|
|
38
40
|
class Match {
|
|
39
41
|
static { this.MAX_PREVIEW_CHARS = 250; }
|
|
@@ -149,6 +151,9 @@ class CellMatch {
|
|
|
149
151
|
this._webviewMatches = ( new Map());
|
|
150
152
|
this._context = ( new Map());
|
|
151
153
|
}
|
|
154
|
+
hasCellViewModel() {
|
|
155
|
+
return !(this._cell instanceof CellSearchModel);
|
|
156
|
+
}
|
|
152
157
|
get context() {
|
|
153
158
|
return ( new Map(this._context));
|
|
154
159
|
}
|
|
@@ -182,11 +187,11 @@ class CellMatch {
|
|
|
182
187
|
this.addContext(textSearchMatches);
|
|
183
188
|
}
|
|
184
189
|
addContext(textSearchMatches) {
|
|
185
|
-
if (this.cell
|
|
190
|
+
if (!this.cell) {
|
|
186
191
|
return;
|
|
187
192
|
}
|
|
188
193
|
this.cell.resolveTextModel().then((textModel) => {
|
|
189
|
-
const textResultsWithContext =
|
|
194
|
+
const textResultsWithContext = getTextSearchMatchWithModelContext(textSearchMatches, textModel, this.parent.parent().query);
|
|
190
195
|
const contexts = textResultsWithContext.filter((result => !resultIsMatch(result)));
|
|
191
196
|
( contexts.map(context => ({ ...context, lineNumber: context.lineNumber + 1 })))
|
|
192
197
|
.forEach((context) => { this._context.set(context.lineNumber, context.text); });
|
|
@@ -205,7 +210,7 @@ class CellMatch {
|
|
|
205
210
|
return this._parent;
|
|
206
211
|
}
|
|
207
212
|
get id() {
|
|
208
|
-
return this._cell.
|
|
213
|
+
return this._cell?.id ?? `${rawCellPrefix}${this.cellIndex}`;
|
|
209
214
|
}
|
|
210
215
|
get cellIndex() {
|
|
211
216
|
return this._cellIndex;
|
|
@@ -233,6 +238,9 @@ class MatchInNotebook extends Match {
|
|
|
233
238
|
isWebviewMatch() {
|
|
234
239
|
return this._webviewIndex !== undefined;
|
|
235
240
|
}
|
|
241
|
+
isReadonly() {
|
|
242
|
+
return (!this._cellParent.hasCellViewModel()) || this.isWebviewMatch();
|
|
243
|
+
}
|
|
236
244
|
get cellIndex() {
|
|
237
245
|
return this._cellParent.cellIndex;
|
|
238
246
|
}
|
|
@@ -335,16 +343,20 @@ let FileMatch = class FileMatch extends Disposable {
|
|
|
335
343
|
return this._cellMatches.get(cellID);
|
|
336
344
|
}
|
|
337
345
|
addCellMatch(rawCell) {
|
|
338
|
-
const cellMatch = ( new CellMatch(
|
|
346
|
+
const cellMatch = ( new CellMatch(
|
|
347
|
+
this,
|
|
348
|
+
isINotebookCellMatchWithModel(rawCell) ? rawCell.cell : undefined,
|
|
349
|
+
rawCell.index
|
|
350
|
+
));
|
|
339
351
|
this._cellMatches.set(cellMatch.id, cellMatch);
|
|
340
|
-
this.addWebviewMatchesToCell(
|
|
341
|
-
this.addContentMatchesToCell(
|
|
352
|
+
this.addWebviewMatchesToCell(cellMatch.id, rawCell.webviewResults);
|
|
353
|
+
this.addContentMatchesToCell(cellMatch.id, rawCell.contentResults);
|
|
342
354
|
}
|
|
343
355
|
get closestRoot() {
|
|
344
356
|
return this._closestRoot;
|
|
345
357
|
}
|
|
346
|
-
|
|
347
|
-
return ( this.matches().some(m => m instanceof MatchInNotebook && m.
|
|
358
|
+
hasReadonlyMatches() {
|
|
359
|
+
return ( this.matches().some(m => m instanceof MatchInNotebook && m.isReadonly()));
|
|
348
360
|
}
|
|
349
361
|
createMatches() {
|
|
350
362
|
const model = this.modelService.getModel(this._resource);
|
|
@@ -365,7 +377,7 @@ let FileMatch = class FileMatch extends Disposable {
|
|
|
365
377
|
.forEach(m => this.add(m));
|
|
366
378
|
});
|
|
367
379
|
}
|
|
368
|
-
if (
|
|
380
|
+
if (isINotebookFileMatchWithModel(this.rawMatch) || isINotebookFileMatchNoModel(this.rawMatch)) {
|
|
369
381
|
this.rawMatch.cellResults?.forEach(cell => this.addCellMatch(cell));
|
|
370
382
|
this.setNotebookFindMatchDecorationsUsingCellMatches(this.cellMatches());
|
|
371
383
|
this._onChange.fire({ forceUpdateModel: true });
|
|
@@ -433,9 +445,7 @@ let FileMatch = class FileMatch extends Disposable {
|
|
|
433
445
|
}
|
|
434
446
|
});
|
|
435
447
|
});
|
|
436
|
-
this.addContext((
|
|
437
|
-
.filter((result => !resultIsMatch(result)))
|
|
438
|
-
.map(context => ({ ...context, lineNumber: context.lineNumber + 1 }))));
|
|
448
|
+
this.addContext(getTextSearchMatchWithModelContext(textSearchResults, model, this.parent().parent().query));
|
|
439
449
|
this._onChange.fire({ forceUpdateModel: modelChange });
|
|
440
450
|
this.updateHighlights();
|
|
441
451
|
}
|
|
@@ -568,7 +578,7 @@ let FileMatch = class FileMatch extends Disposable {
|
|
|
568
578
|
super.dispose();
|
|
569
579
|
}
|
|
570
580
|
hasOnlyReadOnlyMatches() {
|
|
571
|
-
return this.matches().every(match => (match instanceof MatchInNotebook && match.
|
|
581
|
+
return this.matches().every(match => (match instanceof MatchInNotebook && match.isReadonly()));
|
|
572
582
|
}
|
|
573
583
|
bindNotebookEditorWidget(widget) {
|
|
574
584
|
if (this._notebookEditorWidget === widget) {
|
|
@@ -643,6 +653,7 @@ let FileMatch = class FileMatch extends Disposable {
|
|
|
643
653
|
existingCell = existingRawCell;
|
|
644
654
|
}
|
|
645
655
|
}
|
|
656
|
+
existingCell?.clearAllMatches();
|
|
646
657
|
const cell = existingCell ?? ( new CellMatch(this, match.cell, match.index));
|
|
647
658
|
cell.addContentMatches(contentMatchesToTextSearchMatches(match.contentMatches, match.cell));
|
|
648
659
|
cell.addWebviewMatches(webviewMatchesToTextSearchMatches(match.webviewMatches));
|
|
@@ -705,7 +716,7 @@ let FileMatch = class FileMatch extends Disposable {
|
|
|
705
716
|
this.revealCellRange(match, offset);
|
|
706
717
|
}
|
|
707
718
|
async highlightCurrentFindMatchDecoration(match) {
|
|
708
|
-
if (!this._findMatchDecorationModel || match.cell
|
|
719
|
+
if (!this._findMatchDecorationModel || !match.cell) {
|
|
709
720
|
return null;
|
|
710
721
|
}
|
|
711
722
|
if (match.webviewIndex === undefined) {
|
|
@@ -716,13 +727,13 @@ let FileMatch = class FileMatch extends Disposable {
|
|
|
716
727
|
}
|
|
717
728
|
}
|
|
718
729
|
revealCellRange(match, outputOffset) {
|
|
719
|
-
if (!this._notebookEditorWidget || match.cell
|
|
730
|
+
if (!this._notebookEditorWidget || !match.cell) {
|
|
720
731
|
return;
|
|
721
732
|
}
|
|
722
733
|
if (match.webviewIndex !== undefined) {
|
|
723
734
|
const index = this._notebookEditorWidget.getCellIndex(match.cell);
|
|
724
735
|
if (index !== undefined) {
|
|
725
|
-
this._notebookEditorWidget.
|
|
736
|
+
this._notebookEditorWidget.revealCellOffsetInCenter(match.cell, outputOffset ?? 0);
|
|
726
737
|
}
|
|
727
738
|
}
|
|
728
739
|
else {
|
|
@@ -827,14 +838,14 @@ let FolderMatch = FolderMatch_1 = class FolderMatch extends Disposable {
|
|
|
827
838
|
}
|
|
828
839
|
}
|
|
829
840
|
createIntermediateFolderMatch(resource, id, index, query, baseWorkspaceFolder) {
|
|
830
|
-
const folderMatch = this.instantiationService.createInstance(FolderMatchWithResource, resource, id, index, query, this, this._searchResult, baseWorkspaceFolder);
|
|
841
|
+
const folderMatch = this._register(this.instantiationService.createInstance(FolderMatchWithResource, resource, id, index, query, this, this._searchResult, baseWorkspaceFolder));
|
|
831
842
|
this.configureIntermediateMatch(folderMatch);
|
|
832
843
|
this.doAddFolder(folderMatch);
|
|
833
844
|
return folderMatch;
|
|
834
845
|
}
|
|
835
846
|
configureIntermediateMatch(folderMatch) {
|
|
836
847
|
const disposable = folderMatch.onChange((event) => this.onFolderChange(folderMatch, event));
|
|
837
|
-
folderMatch.onDispose(() => disposable.dispose());
|
|
848
|
+
this._register(folderMatch.onDispose(() => disposable.dispose()));
|
|
838
849
|
}
|
|
839
850
|
clear(clearingAll = false) {
|
|
840
851
|
const changed = this.allDownstreamFileMatches();
|
|
@@ -922,9 +933,9 @@ let FolderMatch = FolderMatch_1 = class FolderMatch extends Disposable {
|
|
|
922
933
|
.forEach(m => existingFileMatch.add(m));
|
|
923
934
|
});
|
|
924
935
|
}
|
|
925
|
-
if (
|
|
936
|
+
if (isINotebookFileMatchWithModel(rawFileMatch) || isINotebookFileMatchNoModel(rawFileMatch)) {
|
|
926
937
|
rawFileMatch.cellResults?.forEach(rawCellMatch => {
|
|
927
|
-
const existingCellMatch = existingFileMatch.getCellMatch(rawCellMatch
|
|
938
|
+
const existingCellMatch = existingFileMatch.getCellMatch(getIDFromINotebookCellMatch(rawCellMatch));
|
|
928
939
|
if (existingCellMatch) {
|
|
929
940
|
existingCellMatch.addContentMatches(rawCellMatch.contentResults);
|
|
930
941
|
existingCellMatch.addWebviewMatches(rawCellMatch.webviewResults);
|
|
@@ -935,7 +946,9 @@ let FolderMatch = FolderMatch_1 = class FolderMatch extends Disposable {
|
|
|
935
946
|
});
|
|
936
947
|
}
|
|
937
948
|
updated.push(existingFileMatch);
|
|
938
|
-
|
|
949
|
+
if (rawFileMatch.results && rawFileMatch.results.length > 0) {
|
|
950
|
+
existingFileMatch.addContext(rawFileMatch.results);
|
|
951
|
+
}
|
|
939
952
|
}
|
|
940
953
|
else {
|
|
941
954
|
if (this instanceof FolderMatchWorkspaceRoot || this instanceof FolderMatchNoRoot) {
|
|
@@ -1022,7 +1035,7 @@ let FolderMatch = FolderMatch_1 = class FolderMatch extends Disposable {
|
|
|
1022
1035
|
const removed = [];
|
|
1023
1036
|
for (const match of fileMatches) {
|
|
1024
1037
|
if (this._fileMatches.get(match.resource)) {
|
|
1025
|
-
if (keepReadonly && match.
|
|
1038
|
+
if (keepReadonly && match.hasReadonlyMatches()) {
|
|
1026
1039
|
continue;
|
|
1027
1040
|
}
|
|
1028
1041
|
this._fileMatches.delete(match.resource);
|
|
@@ -1104,7 +1117,7 @@ let FolderMatchWorkspaceRoot = class FolderMatchWorkspaceRoot extends FolderMatc
|
|
|
1104
1117
|
const fileMatch = this.instantiationService.createInstance(FileMatch, query, previewOptions, maxResults, parent, rawFileMatch, closestRoot, searchInstanceID);
|
|
1105
1118
|
parent.doAddFile(fileMatch);
|
|
1106
1119
|
const disposable = fileMatch.onChange(({ didRemove }) => parent.onFileChange(fileMatch, didRemove));
|
|
1107
|
-
fileMatch.onDispose(() => disposable.dispose());
|
|
1120
|
+
this._register(fileMatch.onDispose(() => disposable.dispose()));
|
|
1108
1121
|
return fileMatch;
|
|
1109
1122
|
}
|
|
1110
1123
|
createAndConfigureFileMatch(rawFileMatch, searchInstanceID) {
|
|
@@ -1144,10 +1157,10 @@ let FolderMatchNoRoot = class FolderMatchNoRoot extends FolderMatch {
|
|
|
1144
1157
|
super(null, _id, _index, _query, _parent, _parent, null, replaceService, instantiationService, labelService, uriIdentityService);
|
|
1145
1158
|
}
|
|
1146
1159
|
createAndConfigureFileMatch(rawFileMatch, searchInstanceID) {
|
|
1147
|
-
const fileMatch = this.instantiationService.createInstance(FileMatch, this._query.contentPattern, this._query.previewOptions, this._query.maxResults, this, rawFileMatch, null, searchInstanceID);
|
|
1160
|
+
const fileMatch = this._register(this.instantiationService.createInstance(FileMatch, this._query.contentPattern, this._query.previewOptions, this._query.maxResults, this, rawFileMatch, null, searchInstanceID));
|
|
1148
1161
|
this.doAddFile(fileMatch);
|
|
1149
1162
|
const disposable = fileMatch.onChange(({ didRemove }) => this.onFileChange(fileMatch, didRemove));
|
|
1150
|
-
fileMatch.onDispose(() => disposable.dispose());
|
|
1163
|
+
this._register(fileMatch.onDispose(() => disposable.dispose()));
|
|
1151
1164
|
return fileMatch;
|
|
1152
1165
|
}
|
|
1153
1166
|
};
|
|
@@ -1290,7 +1303,7 @@ let SearchResult = class SearchResult extends Disposable {
|
|
|
1290
1303
|
this._folderMatchesMap = TernarySearchTree.forUris(key => this.uriIdentityService.extUri.ignorePathCasing(key));
|
|
1291
1304
|
this._showHighlights = false;
|
|
1292
1305
|
this._query = null;
|
|
1293
|
-
this.disposePastResults = () =>
|
|
1306
|
+
this.disposePastResults = () => Promise.resolve();
|
|
1294
1307
|
this._isDirty = false;
|
|
1295
1308
|
this._rangeHighlightDecorations = this.instantiationService.createInstance(RangeHighlightDecorations);
|
|
1296
1309
|
this.modelService.getModels().forEach(model => this.onModelAdded(model));
|
|
@@ -1352,10 +1365,11 @@ let SearchResult = class SearchResult extends Disposable {
|
|
|
1352
1365
|
}
|
|
1353
1366
|
set query(query) {
|
|
1354
1367
|
const oldFolderMatches = this.folderMatches();
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1368
|
+
this.disposePastResults = async () => {
|
|
1369
|
+
oldFolderMatches.forEach(match => match.clear());
|
|
1370
|
+
oldFolderMatches.forEach(match => match.dispose());
|
|
1371
|
+
this._isDirty = false;
|
|
1372
|
+
};
|
|
1359
1373
|
this._rangeHighlightDecorations.removeHighlightRange();
|
|
1360
1374
|
this._folderMatchesMap = TernarySearchTree.forUris(key => this.uriIdentityService.extUri.ignorePathCasing(key));
|
|
1361
1375
|
if (!query) {
|
|
@@ -1397,13 +1411,13 @@ let SearchResult = class SearchResult extends Disposable {
|
|
|
1397
1411
|
_createBaseFolderMatch(resource, id, index, query) {
|
|
1398
1412
|
let folderMatch;
|
|
1399
1413
|
if (resource) {
|
|
1400
|
-
folderMatch = this.instantiationService.createInstance(FolderMatchWorkspaceRoot, resource, id, index, query, this);
|
|
1414
|
+
folderMatch = this._register(this.instantiationService.createInstance(FolderMatchWorkspaceRoot, resource, id, index, query, this));
|
|
1401
1415
|
}
|
|
1402
1416
|
else {
|
|
1403
|
-
folderMatch = this.instantiationService.createInstance(FolderMatchNoRoot, id, index, query, this);
|
|
1417
|
+
folderMatch = this._register(this.instantiationService.createInstance(FolderMatchNoRoot, id, index, query, this));
|
|
1404
1418
|
}
|
|
1405
1419
|
const disposable = folderMatch.onChange((event) => this._onChange.fire(event));
|
|
1406
|
-
folderMatch.onDispose(() => disposable.dispose());
|
|
1420
|
+
this._register(folderMatch.onDispose(() => disposable.dispose()));
|
|
1407
1421
|
return folderMatch;
|
|
1408
1422
|
}
|
|
1409
1423
|
add(allRaw, searchInstanceID, silent = false) {
|
|
@@ -1547,13 +1561,13 @@ let SearchResult = class SearchResult extends Disposable {
|
|
|
1547
1561
|
this._folderMatchesMap = TernarySearchTree.forUris(key => this.uriIdentityService.extUri.ignorePathCasing(key));
|
|
1548
1562
|
this._rangeHighlightDecorations.removeHighlightRange();
|
|
1549
1563
|
}
|
|
1550
|
-
dispose() {
|
|
1564
|
+
async dispose() {
|
|
1551
1565
|
this._onWillChangeModelListener?.dispose();
|
|
1552
1566
|
this._onDidChangeModelListener?.dispose();
|
|
1553
|
-
this.disposePastResults();
|
|
1554
|
-
this.disposeMatches();
|
|
1555
1567
|
this._rangeHighlightDecorations.dispose();
|
|
1568
|
+
this.disposeMatches();
|
|
1556
1569
|
super.dispose();
|
|
1570
|
+
await this.disposePastResults();
|
|
1557
1571
|
}
|
|
1558
1572
|
};
|
|
1559
1573
|
SearchResult = ( __decorate([
|
|
@@ -1672,7 +1686,7 @@ let SearchModel = class SearchModel extends Disposable {
|
|
|
1672
1686
|
}
|
|
1673
1687
|
const searchInstanceID = ( Date.now().toString());
|
|
1674
1688
|
this._searchResult.query = this._searchQuery;
|
|
1675
|
-
const progressEmitter = ( new Emitter());
|
|
1689
|
+
const progressEmitter = this._register(( new Emitter()));
|
|
1676
1690
|
this._replacePattern = ( new ReplacePattern(this.replaceString, this._searchQuery.contentPattern));
|
|
1677
1691
|
this._startStreamDelay = ( new Promise(resolve => setTimeout(resolve, this.searchConfig.searchOnType ? 150 : 0)));
|
|
1678
1692
|
const req = this.doSearch(query, progressEmitter, this._searchQuery, searchInstanceID, onProgress, callerToken);
|
|
@@ -1686,7 +1700,13 @@ let SearchModel = class SearchModel extends Disposable {
|
|
|
1686
1700
|
});
|
|
1687
1701
|
}
|
|
1688
1702
|
const start = Date.now();
|
|
1689
|
-
|
|
1703
|
+
let event;
|
|
1704
|
+
const progressEmitterPromise = ( new Promise(resolve => {
|
|
1705
|
+
event = Event.once(progressEmitter.event)(resolve);
|
|
1706
|
+
return event;
|
|
1707
|
+
}));
|
|
1708
|
+
Promise.race([asyncResults, progressEmitterPromise]).finally(() => {
|
|
1709
|
+
event?.dispose();
|
|
1690
1710
|
this.telemetryService.publicLog('searchResultsFirstRender', { duration: Date.now() - start });
|
|
1691
1711
|
});
|
|
1692
1712
|
try {
|
|
@@ -1860,9 +1880,9 @@ let RangeHighlightDecorations = class RangeHighlightDecorations {
|
|
|
1860
1880
|
dispose() {
|
|
1861
1881
|
if (this._model) {
|
|
1862
1882
|
this.removeHighlightRange();
|
|
1863
|
-
this._modelDisposables.dispose();
|
|
1864
1883
|
this._model = null;
|
|
1865
1884
|
}
|
|
1885
|
+
this._modelDisposables.dispose();
|
|
1866
1886
|
}
|
|
1867
1887
|
static { this._RANGE_HIGHLIGHT_DECORATION = ModelDecorationOptions.register({
|
|
1868
1888
|
description: 'search-range-highlight',
|
|
@@ -1,74 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
2
2
|
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
3
3
|
import { PieceTreeTextBufferBuilder } from 'monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js';
|
|
4
4
|
import { SearchParams } from 'monaco-editor/esm/vs/editor/common/model/textModelSearch.js';
|
|
5
|
-
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
6
|
-
function isIFileMatchWithCells(object) {
|
|
7
|
-
return 'cellResults' in object;
|
|
8
|
-
}
|
|
9
|
-
function contentMatchesToTextSearchMatches(contentMatches, cell) {
|
|
10
|
-
return genericCellMatchesToTextSearchMatches(contentMatches, cell instanceof CellSearchModel ? cell.inputTextBuffer : cell.textBuffer);
|
|
11
|
-
}
|
|
12
|
-
function genericCellMatchesToTextSearchMatches(contentMatches, buffer, cell) {
|
|
13
|
-
let previousEndLine = -1;
|
|
14
|
-
const contextGroupings = [];
|
|
15
|
-
let currentContextGrouping = [];
|
|
16
|
-
contentMatches.forEach((match) => {
|
|
17
|
-
if (match.range.startLineNumber !== previousEndLine) {
|
|
18
|
-
if (currentContextGrouping.length > 0) {
|
|
19
|
-
contextGroupings.push([...currentContextGrouping]);
|
|
20
|
-
currentContextGrouping = [];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
currentContextGrouping.push(match);
|
|
24
|
-
previousEndLine = match.range.endLineNumber;
|
|
25
|
-
});
|
|
26
|
-
if (currentContextGrouping.length > 0) {
|
|
27
|
-
contextGroupings.push([...currentContextGrouping]);
|
|
28
|
-
}
|
|
29
|
-
const textSearchResults = ( contextGroupings.map((grouping) => {
|
|
30
|
-
const lineTexts = [];
|
|
31
|
-
const firstLine = grouping[0].range.startLineNumber;
|
|
32
|
-
const lastLine = grouping[grouping.length - 1].range.endLineNumber;
|
|
33
|
-
for (let i = firstLine; i <= lastLine; i++) {
|
|
34
|
-
lineTexts.push(buffer.getLineContent(i));
|
|
35
|
-
}
|
|
36
|
-
return ( new TextSearchMatch(lineTexts.join('\n') + '\n', ( grouping.map(m => ( new Range(
|
|
37
|
-
m.range.startLineNumber - 1,
|
|
38
|
-
m.range.startColumn - 1,
|
|
39
|
-
m.range.endLineNumber - 1,
|
|
40
|
-
m.range.endColumn - 1
|
|
41
|
-
))))));
|
|
42
|
-
}));
|
|
43
|
-
return textSearchResults;
|
|
44
|
-
}
|
|
45
|
-
function webviewMatchesToTextSearchMatches(webviewMatches) {
|
|
46
|
-
return ( webviewMatches
|
|
47
|
-
.map(rawMatch => (rawMatch.searchPreviewInfo) ?
|
|
48
|
-
( new TextSearchMatch(rawMatch.searchPreviewInfo.line, ( new Range(
|
|
49
|
-
0,
|
|
50
|
-
rawMatch.searchPreviewInfo.range.start,
|
|
51
|
-
0,
|
|
52
|
-
rawMatch.searchPreviewInfo.range.end
|
|
53
|
-
)), undefined, rawMatch.index)) : undefined)).filter((e) => !!e);
|
|
54
|
-
}
|
|
55
|
-
const rawCellPrefix = 'rawCell#';
|
|
56
5
|
class CellSearchModel extends Disposable {
|
|
57
|
-
constructor(_source, _inputTextBuffer, _outputs
|
|
6
|
+
constructor(_source, _inputTextBuffer, _outputs) {
|
|
58
7
|
super();
|
|
59
8
|
this._source = _source;
|
|
60
9
|
this._inputTextBuffer = _inputTextBuffer;
|
|
61
10
|
this._outputs = _outputs;
|
|
62
|
-
this._uri = _uri;
|
|
63
|
-
this._cellIndex = _cellIndex;
|
|
64
11
|
this._outputTextBuffers = undefined;
|
|
65
12
|
}
|
|
66
|
-
get id() {
|
|
67
|
-
return `${rawCellPrefix}${this._cellIndex}`;
|
|
68
|
-
}
|
|
69
|
-
get uri() {
|
|
70
|
-
return this._uri;
|
|
71
|
-
}
|
|
72
13
|
_getFullModelRange(buffer) {
|
|
73
14
|
const lineCount = buffer.getLineCount();
|
|
74
15
|
return ( new Range(1, 1, lineCount, this._getLineMaxColumn(buffer, lineCount)));
|
|
@@ -94,7 +35,7 @@ class CellSearchModel extends Disposable {
|
|
|
94
35
|
if (!this._outputTextBuffers) {
|
|
95
36
|
this._outputTextBuffers = ( this._outputs.map((output) => {
|
|
96
37
|
const builder = ( new PieceTreeTextBufferBuilder());
|
|
97
|
-
builder.acceptChunk(
|
|
38
|
+
builder.acceptChunk(output);
|
|
98
39
|
const bufferFactory = builder.finish(true);
|
|
99
40
|
const { textBuffer, disposable } = bufferFactory.create(1 );
|
|
100
41
|
this._register(disposable);
|
|
@@ -130,4 +71,4 @@ class CellSearchModel extends Disposable {
|
|
|
130
71
|
})).filter((item) => !!item);
|
|
131
72
|
}
|
|
132
73
|
}
|
|
133
|
-
export { CellSearchModel
|
|
74
|
+
export { CellSearchModel };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TextSearchMatch } from '../../../services/search/common/search.js';
|
|
2
|
+
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
3
|
+
function isINotebookFileMatchNoModel(object) {
|
|
4
|
+
return 'cellResults' in object;
|
|
5
|
+
}
|
|
6
|
+
const rawCellPrefix = 'rawCell#';
|
|
7
|
+
function genericCellMatchesToTextSearchMatches(contentMatches, buffer) {
|
|
8
|
+
let previousEndLine = -1;
|
|
9
|
+
const contextGroupings = [];
|
|
10
|
+
let currentContextGrouping = [];
|
|
11
|
+
contentMatches.forEach((match) => {
|
|
12
|
+
if (match.range.startLineNumber !== previousEndLine) {
|
|
13
|
+
if (currentContextGrouping.length > 0) {
|
|
14
|
+
contextGroupings.push([...currentContextGrouping]);
|
|
15
|
+
currentContextGrouping = [];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
currentContextGrouping.push(match);
|
|
19
|
+
previousEndLine = match.range.endLineNumber;
|
|
20
|
+
});
|
|
21
|
+
if (currentContextGrouping.length > 0) {
|
|
22
|
+
contextGroupings.push([...currentContextGrouping]);
|
|
23
|
+
}
|
|
24
|
+
const textSearchResults = ( contextGroupings.map((grouping) => {
|
|
25
|
+
const lineTexts = [];
|
|
26
|
+
const firstLine = grouping[0].range.startLineNumber;
|
|
27
|
+
const lastLine = grouping[grouping.length - 1].range.endLineNumber;
|
|
28
|
+
for (let i = firstLine; i <= lastLine; i++) {
|
|
29
|
+
lineTexts.push(buffer.getLineContent(i));
|
|
30
|
+
}
|
|
31
|
+
return ( new TextSearchMatch(lineTexts.join('\n') + '\n', ( grouping.map(m => ( new Range(
|
|
32
|
+
m.range.startLineNumber - 1,
|
|
33
|
+
m.range.startColumn - 1,
|
|
34
|
+
m.range.endLineNumber - 1,
|
|
35
|
+
m.range.endColumn - 1
|
|
36
|
+
))))));
|
|
37
|
+
}));
|
|
38
|
+
return textSearchResults;
|
|
39
|
+
}
|
|
40
|
+
export { genericCellMatchesToTextSearchMatches, isINotebookFileMatchNoModel, rawCellPrefix };
|
|
@@ -3,11 +3,11 @@ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
|
3
3
|
import { extname, basename } from 'monaco-editor/esm/vs/base/common/path.js';
|
|
4
4
|
import { SnippetParser, Placeholder, Variable, Text } from 'monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetParser.js';
|
|
5
5
|
import { KnownSnippetVariableNames } from 'monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetVariables.js';
|
|
6
|
-
import { IdleValue } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
7
6
|
import { relativePath } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
8
7
|
import { isObject } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
9
8
|
import { tail } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
10
9
|
import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.js';
|
|
10
|
+
import { WindowIdleValue, getActiveWindow } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
11
11
|
class SnippetBodyInsights {
|
|
12
12
|
constructor(body) {
|
|
13
13
|
this.isBogous = false;
|
|
@@ -71,7 +71,7 @@ class Snippet {
|
|
|
71
71
|
this.snippetIdentifier = snippetIdentifier;
|
|
72
72
|
this.extensionId = extensionId;
|
|
73
73
|
this.prefixLow = prefix.toLowerCase();
|
|
74
|
-
this._bodyInsights = ( new
|
|
74
|
+
this._bodyInsights = ( new WindowIdleValue(getActiveWindow(), () => ( new SnippetBodyInsights(this.body))));
|
|
75
75
|
}
|
|
76
76
|
get codeSnippet() {
|
|
77
77
|
return this._bodyInsights.value.codeSnippet;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
3
|
+
import { Delayer } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
4
|
+
import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
5
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
6
|
+
import { MicrotaskDelay } from 'monaco-editor/esm/vs/base/common/symbols.js';
|
|
7
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
8
|
+
import { TerminalCapabilityStore } from '../../../../platform/terminal/common/capabilities/terminalCapabilityStore.js';
|
|
9
|
+
import { TerminalExtensionsRegistry } from './terminalExtensions.js';
|
|
10
|
+
import { TerminalWidgetManager } from './widgets/widgetManager.js';
|
|
11
|
+
let DetachedTerminal = class DetachedTerminal extends Disposable {
|
|
12
|
+
get xterm() {
|
|
13
|
+
return this._xterm;
|
|
14
|
+
}
|
|
15
|
+
constructor(_xterm, options, instantiationService) {
|
|
16
|
+
super();
|
|
17
|
+
this._xterm = _xterm;
|
|
18
|
+
this._widgets = this._register(( new TerminalWidgetManager()));
|
|
19
|
+
this.capabilities = ( new TerminalCapabilityStore());
|
|
20
|
+
this._contributions = ( new Map());
|
|
21
|
+
this._register(_xterm);
|
|
22
|
+
const contributionDescs = TerminalExtensionsRegistry.getTerminalContributions();
|
|
23
|
+
for (const desc of contributionDescs) {
|
|
24
|
+
if (( this._contributions.has(desc.id))) {
|
|
25
|
+
onUnexpectedError(( new Error(`Cannot have two terminal contributions with the same id ${desc.id}`)));
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (desc.canRunInDetachedTerminals === false) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
let contribution;
|
|
32
|
+
try {
|
|
33
|
+
contribution = instantiationService.createInstance(desc.ctor, this, options.processInfo, this._widgets);
|
|
34
|
+
this._contributions.set(desc.id, contribution);
|
|
35
|
+
this._register(contribution);
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
onUnexpectedError(err);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
this._register(( new Delayer(MicrotaskDelay))).trigger(() => {
|
|
42
|
+
for (const contr of ( this._contributions.values())) {
|
|
43
|
+
contr.xtermReady?.(this._xterm);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
get selection() {
|
|
48
|
+
return this._xterm && this.hasSelection() ? this._xterm.raw.getSelection() : undefined;
|
|
49
|
+
}
|
|
50
|
+
hasSelection() {
|
|
51
|
+
return this._xterm.hasSelection();
|
|
52
|
+
}
|
|
53
|
+
clearSelection() {
|
|
54
|
+
this._xterm.clearSelection();
|
|
55
|
+
}
|
|
56
|
+
focus(force) {
|
|
57
|
+
if (force || !dom.getActiveWindow().getSelection()?.toString()) {
|
|
58
|
+
this.xterm.focus();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
attachToElement(container, options) {
|
|
62
|
+
this.domElement = container;
|
|
63
|
+
const screenElement = this._xterm.attachToElement(container, options);
|
|
64
|
+
this._widgets.attachToElement(screenElement);
|
|
65
|
+
}
|
|
66
|
+
forceScrollbarVisibility() {
|
|
67
|
+
this.domElement?.classList.add('force-scrollbar');
|
|
68
|
+
}
|
|
69
|
+
resetScrollbarVisibility() {
|
|
70
|
+
this.domElement?.classList.remove('force-scrollbar');
|
|
71
|
+
}
|
|
72
|
+
getContribution(id) {
|
|
73
|
+
return this._contributions.get(id);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
DetachedTerminal = ( __decorate([
|
|
77
|
+
( __param(2, IInstantiationService))
|
|
78
|
+
], DetachedTerminal));
|
|
79
|
+
class DetachedProcessInfo {
|
|
80
|
+
constructor(initialValues) {
|
|
81
|
+
this.processState = 3 ;
|
|
82
|
+
this.ptyProcessReady = Promise.resolve();
|
|
83
|
+
this.initialCwd = '';
|
|
84
|
+
this.shouldPersist = false;
|
|
85
|
+
this.hasWrittenData = false;
|
|
86
|
+
this.hasChildProcesses = false;
|
|
87
|
+
this.capabilities = ( new TerminalCapabilityStore());
|
|
88
|
+
this.shellIntegrationNonce = '';
|
|
89
|
+
Object.assign(this, initialValues);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export { DetachedProcessInfo, DetachedTerminal };
|