@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
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { quickSelect } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
2
|
+
import { FuzzyScoreOptions, FuzzyScore, fuzzyScore, fuzzyScoreGracefulAggressive } from 'monaco-editor/esm/vs/base/common/filters.js';
|
|
3
|
+
class LineContext {
|
|
4
|
+
constructor(leadingLineContent, characterCountDelta) {
|
|
5
|
+
this.leadingLineContent = leadingLineContent;
|
|
6
|
+
this.characterCountDelta = characterCountDelta;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
class SimpleCompletionModel {
|
|
10
|
+
constructor(_items, _lineContext, replacementIndex, replacementLength) {
|
|
11
|
+
this._items = _items;
|
|
12
|
+
this._lineContext = _lineContext;
|
|
13
|
+
this.replacementIndex = replacementIndex;
|
|
14
|
+
this.replacementLength = replacementLength;
|
|
15
|
+
this._refilterKind = 1 ;
|
|
16
|
+
this._fuzzyScoreOptions = FuzzyScoreOptions.default;
|
|
17
|
+
this._options = {};
|
|
18
|
+
}
|
|
19
|
+
get items() {
|
|
20
|
+
this._ensureCachedState();
|
|
21
|
+
return this._filteredItems;
|
|
22
|
+
}
|
|
23
|
+
get stats() {
|
|
24
|
+
this._ensureCachedState();
|
|
25
|
+
return this._stats;
|
|
26
|
+
}
|
|
27
|
+
get lineContext() {
|
|
28
|
+
return this._lineContext;
|
|
29
|
+
}
|
|
30
|
+
set lineContext(value) {
|
|
31
|
+
if (this._lineContext.leadingLineContent !== value.leadingLineContent
|
|
32
|
+
|| this._lineContext.characterCountDelta !== value.characterCountDelta) {
|
|
33
|
+
this._refilterKind = this._lineContext.characterCountDelta < value.characterCountDelta && this._filteredItems ? 2 : 1 ;
|
|
34
|
+
this._lineContext = value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
_ensureCachedState() {
|
|
38
|
+
if (this._refilterKind !== 0 ) {
|
|
39
|
+
this._createCachedState();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
_createCachedState() {
|
|
43
|
+
const labelLengths = [];
|
|
44
|
+
const { leadingLineContent, characterCountDelta } = this._lineContext;
|
|
45
|
+
let word = '';
|
|
46
|
+
let wordLow = '';
|
|
47
|
+
const source = this._refilterKind === 1 ? this._items : this._filteredItems;
|
|
48
|
+
const target = [];
|
|
49
|
+
const scoreFn = (!this._options.filterGraceful || source.length > 2000) ? fuzzyScore : fuzzyScoreGracefulAggressive;
|
|
50
|
+
for (let i = 0; i < source.length; i++) {
|
|
51
|
+
const item = source[i];
|
|
52
|
+
const overwriteBefore = this.replacementLength;
|
|
53
|
+
const wordLen = overwriteBefore + characterCountDelta;
|
|
54
|
+
if (word.length !== wordLen) {
|
|
55
|
+
word = wordLen === 0 ? '' : leadingLineContent.slice(-wordLen);
|
|
56
|
+
wordLow = word.toLowerCase();
|
|
57
|
+
}
|
|
58
|
+
item.word = word;
|
|
59
|
+
if (wordLen === 0) {
|
|
60
|
+
item.score = FuzzyScore.Default;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
let wordPos = 0;
|
|
64
|
+
while (wordPos < overwriteBefore) {
|
|
65
|
+
const ch = word.charCodeAt(wordPos);
|
|
66
|
+
if (ch === 32 || ch === 9 ) {
|
|
67
|
+
wordPos += 1;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (wordPos >= wordLen) {
|
|
74
|
+
item.score = FuzzyScore.Default;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
const match = scoreFn(word, wordLow, wordPos, item.completion.label, item.labelLow, 0, this._fuzzyScoreOptions);
|
|
78
|
+
if (!match) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
item.score = match;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
item.idx = i;
|
|
85
|
+
item.distance = 1;
|
|
86
|
+
target.push(item);
|
|
87
|
+
labelLengths.push(item.completion.label.length);
|
|
88
|
+
}
|
|
89
|
+
this._filteredItems = target;
|
|
90
|
+
this._refilterKind = 0 ;
|
|
91
|
+
this._stats = {
|
|
92
|
+
pLabelLen: labelLengths.length ?
|
|
93
|
+
quickSelect(labelLengths.length - .85, labelLengths, (a, b) => a - b)
|
|
94
|
+
: 0
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export { LineContext, SimpleCompletionModel };
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import './media/suggest.css.js';
|
|
3
|
+
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
4
|
+
import { List } from 'monaco-editor/esm/vs/base/browser/ui/list/listWidget.js';
|
|
5
|
+
import { ResizableHTMLElement } from 'monaco-editor/esm/vs/base/browser/ui/resizable/resizable.js';
|
|
6
|
+
import { SimpleSuggestWidgetItemRenderer } from './simpleSuggestWidgetRenderer.js';
|
|
7
|
+
import { TimeoutTimer } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
8
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
9
|
+
import { MutableDisposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
10
|
+
import { clamp } from 'monaco-editor/esm/vs/base/common/numbers.js';
|
|
11
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
12
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
13
|
+
import { SuggestWidgetStatus } from 'monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestWidgetStatus.js';
|
|
14
|
+
const $ = dom.$;
|
|
15
|
+
let SimpleSuggestWidget = class SimpleSuggestWidget {
|
|
16
|
+
get list() { return this._list; }
|
|
17
|
+
constructor(_container, _persistedSize, options, instantiationService) {
|
|
18
|
+
this._container = _container;
|
|
19
|
+
this._persistedSize = _persistedSize;
|
|
20
|
+
this._state = 0 ;
|
|
21
|
+
this._forceRenderingAbove = false;
|
|
22
|
+
this._pendingLayout = ( new MutableDisposable());
|
|
23
|
+
this._showTimeout = ( new TimeoutTimer());
|
|
24
|
+
this._disposables = ( new DisposableStore());
|
|
25
|
+
this._onDidSelect = ( new Emitter());
|
|
26
|
+
this.onDidSelect = this._onDidSelect.event;
|
|
27
|
+
this._onDidHide = ( new Emitter());
|
|
28
|
+
this.onDidHide = this._onDidHide.event;
|
|
29
|
+
this._onDidShow = ( new Emitter());
|
|
30
|
+
this.onDidShow = this._onDidShow.event;
|
|
31
|
+
this.element = ( new ResizableHTMLElement());
|
|
32
|
+
this.element.domNode.classList.add('workbench-suggest-widget');
|
|
33
|
+
this._container.appendChild(this.element.domNode);
|
|
34
|
+
class ResizeState {
|
|
35
|
+
constructor(persistedSize, currentSize, persistHeight = false, persistWidth = false) {
|
|
36
|
+
this.persistedSize = persistedSize;
|
|
37
|
+
this.currentSize = currentSize;
|
|
38
|
+
this.persistHeight = persistHeight;
|
|
39
|
+
this.persistWidth = persistWidth;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
let state;
|
|
43
|
+
this._disposables.add(this.element.onDidWillResize(() => {
|
|
44
|
+
state = ( new ResizeState(this._persistedSize.restore(), this.element.size));
|
|
45
|
+
}));
|
|
46
|
+
this._disposables.add(this.element.onDidResize(e => {
|
|
47
|
+
this._resize(e.dimension.width, e.dimension.height);
|
|
48
|
+
if (state) {
|
|
49
|
+
state.persistHeight = state.persistHeight || !!e.north || !!e.south;
|
|
50
|
+
state.persistWidth = state.persistWidth || !!e.east || !!e.west;
|
|
51
|
+
}
|
|
52
|
+
if (!e.done) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (state) {
|
|
56
|
+
const { itemHeight, defaultSize } = this._getLayoutInfo();
|
|
57
|
+
const threshold = Math.round(itemHeight / 2);
|
|
58
|
+
let { width, height } = this.element.size;
|
|
59
|
+
if (!state.persistHeight || Math.abs(state.currentSize.height - height) <= threshold) {
|
|
60
|
+
height = state.persistedSize?.height ?? defaultSize.height;
|
|
61
|
+
}
|
|
62
|
+
if (!state.persistWidth || Math.abs(state.currentSize.width - width) <= threshold) {
|
|
63
|
+
width = state.persistedSize?.width ?? defaultSize.width;
|
|
64
|
+
}
|
|
65
|
+
this._persistedSize.store(new dom.Dimension(width, height));
|
|
66
|
+
}
|
|
67
|
+
state = undefined;
|
|
68
|
+
}));
|
|
69
|
+
const renderer = ( new SimpleSuggestWidgetItemRenderer());
|
|
70
|
+
this._disposables.add(renderer);
|
|
71
|
+
this._listElement = dom.append(this.element.domNode, $('.tree'));
|
|
72
|
+
this._list = ( new List('SuggestWidget', this._listElement, {
|
|
73
|
+
getHeight: (_element) => this._getLayoutInfo().itemHeight,
|
|
74
|
+
getTemplateId: (_element) => 'suggestion'
|
|
75
|
+
}, [renderer], {
|
|
76
|
+
alwaysConsumeMouseWheel: true,
|
|
77
|
+
useShadows: false,
|
|
78
|
+
mouseSupport: false,
|
|
79
|
+
multipleSelectionSupport: false,
|
|
80
|
+
accessibilityProvider: {
|
|
81
|
+
getRole: () => 'option',
|
|
82
|
+
getWidgetAriaLabel: () => ( localizeWithPath(
|
|
83
|
+
'vs/workbench/services/suggest/browser/simpleSuggestWidget',
|
|
84
|
+
'suggest',
|
|
85
|
+
"Suggest"
|
|
86
|
+
)),
|
|
87
|
+
getWidgetRole: () => 'listbox',
|
|
88
|
+
getAriaLabel: (item) => {
|
|
89
|
+
let label = item.completion.label;
|
|
90
|
+
if (typeof item.completion.label !== 'string') {
|
|
91
|
+
const { detail, description } = item.completion.label;
|
|
92
|
+
if (detail && description) {
|
|
93
|
+
label = ( localizeWithPath(
|
|
94
|
+
'vs/workbench/services/suggest/browser/simpleSuggestWidget',
|
|
95
|
+
'label.full',
|
|
96
|
+
'{0}{1}, {2}',
|
|
97
|
+
label,
|
|
98
|
+
detail,
|
|
99
|
+
description
|
|
100
|
+
));
|
|
101
|
+
}
|
|
102
|
+
else if (detail) {
|
|
103
|
+
label = ( localizeWithPath(
|
|
104
|
+
'vs/workbench/services/suggest/browser/simpleSuggestWidget',
|
|
105
|
+
'label.detail',
|
|
106
|
+
'{0}{1}',
|
|
107
|
+
label,
|
|
108
|
+
detail
|
|
109
|
+
));
|
|
110
|
+
}
|
|
111
|
+
else if (description) {
|
|
112
|
+
label = ( localizeWithPath(
|
|
113
|
+
'vs/workbench/services/suggest/browser/simpleSuggestWidget',
|
|
114
|
+
'label.desc',
|
|
115
|
+
'{0}, {1}',
|
|
116
|
+
label,
|
|
117
|
+
description
|
|
118
|
+
));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
const { detail } = item.completion;
|
|
122
|
+
return ( localizeWithPath(
|
|
123
|
+
'vs/workbench/services/suggest/browser/simpleSuggestWidget',
|
|
124
|
+
'ariaCurrenttSuggestionReadDetails',
|
|
125
|
+
'{0}, docs: {1}',
|
|
126
|
+
label,
|
|
127
|
+
detail
|
|
128
|
+
));
|
|
129
|
+
},
|
|
130
|
+
}
|
|
131
|
+
}));
|
|
132
|
+
if (options.statusBarMenuId) {
|
|
133
|
+
this._status = instantiationService.createInstance(SuggestWidgetStatus, this.element.domNode, options.statusBarMenuId);
|
|
134
|
+
this.element.domNode.classList.toggle('with-status-bar', true);
|
|
135
|
+
}
|
|
136
|
+
this._disposables.add(this._list.onMouseDown(e => this._onListMouseDownOrTap(e)));
|
|
137
|
+
this._disposables.add(this._list.onTap(e => this._onListMouseDownOrTap(e)));
|
|
138
|
+
this._disposables.add(this._list.onDidChangeSelection(e => this._onListSelection(e)));
|
|
139
|
+
}
|
|
140
|
+
dispose() {
|
|
141
|
+
this._disposables.dispose();
|
|
142
|
+
this._status?.dispose();
|
|
143
|
+
this.element.dispose();
|
|
144
|
+
}
|
|
145
|
+
showSuggestions(completionModel, selectionIndex, isFrozen, isAuto, cursorPosition) {
|
|
146
|
+
this._cursorPosition = cursorPosition;
|
|
147
|
+
if (this._completionModel !== completionModel) {
|
|
148
|
+
this._completionModel = completionModel;
|
|
149
|
+
}
|
|
150
|
+
if (isFrozen && this._state !== 2 && this._state !== 0 ) {
|
|
151
|
+
this._setState(4 );
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const visibleCount = this._completionModel.items.length;
|
|
155
|
+
const isEmpty = visibleCount === 0;
|
|
156
|
+
if (isEmpty) {
|
|
157
|
+
this._setState(isAuto ? 0 : 2 );
|
|
158
|
+
this._completionModel = undefined;
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
try {
|
|
162
|
+
this._list.splice(0, this._list.length, this._completionModel.items);
|
|
163
|
+
this._setState(isFrozen ? 4 : 3 );
|
|
164
|
+
this._list.reveal(selectionIndex, 0);
|
|
165
|
+
this._list.setFocus([selectionIndex]);
|
|
166
|
+
}
|
|
167
|
+
finally {
|
|
168
|
+
}
|
|
169
|
+
this._pendingLayout.value = dom.runAtThisOrScheduleAtNextAnimationFrame(dom.getWindow(this.element.domNode), () => {
|
|
170
|
+
this._pendingLayout.clear();
|
|
171
|
+
this._layout(this.element.size);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
setLineContext(lineContext) {
|
|
175
|
+
if (this._completionModel) {
|
|
176
|
+
this._completionModel.lineContext = lineContext;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
_setState(state) {
|
|
180
|
+
if (this._state === state) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
this._state = state;
|
|
184
|
+
this.element.domNode.classList.toggle('frozen', state === 4 );
|
|
185
|
+
this.element.domNode.classList.remove('message');
|
|
186
|
+
switch (state) {
|
|
187
|
+
case 0 :
|
|
188
|
+
dom.hide(this._listElement);
|
|
189
|
+
if (this._status) {
|
|
190
|
+
dom.hide(this._status?.element);
|
|
191
|
+
}
|
|
192
|
+
this._status?.hide();
|
|
193
|
+
this._showTimeout.cancel();
|
|
194
|
+
this.element.domNode.classList.remove('visible');
|
|
195
|
+
this._list.splice(0, this._list.length);
|
|
196
|
+
this._cappedHeight = undefined;
|
|
197
|
+
break;
|
|
198
|
+
case 1 :
|
|
199
|
+
this.element.domNode.classList.add('message');
|
|
200
|
+
dom.hide(this._listElement);
|
|
201
|
+
if (this._status) {
|
|
202
|
+
dom.hide(this._status?.element);
|
|
203
|
+
}
|
|
204
|
+
this._show();
|
|
205
|
+
break;
|
|
206
|
+
case 2 :
|
|
207
|
+
this.element.domNode.classList.add('message');
|
|
208
|
+
dom.hide(this._listElement);
|
|
209
|
+
if (this._status) {
|
|
210
|
+
dom.hide(this._status?.element);
|
|
211
|
+
}
|
|
212
|
+
this._show();
|
|
213
|
+
break;
|
|
214
|
+
case 3 :
|
|
215
|
+
dom.show(this._listElement);
|
|
216
|
+
if (this._status) {
|
|
217
|
+
dom.show(this._status?.element);
|
|
218
|
+
}
|
|
219
|
+
this._show();
|
|
220
|
+
break;
|
|
221
|
+
case 4 :
|
|
222
|
+
dom.show(this._listElement);
|
|
223
|
+
if (this._status) {
|
|
224
|
+
dom.show(this._status?.element);
|
|
225
|
+
}
|
|
226
|
+
this._show();
|
|
227
|
+
break;
|
|
228
|
+
case 5 :
|
|
229
|
+
dom.show(this._listElement);
|
|
230
|
+
if (this._status) {
|
|
231
|
+
dom.show(this._status?.element);
|
|
232
|
+
}
|
|
233
|
+
this._show();
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
_show() {
|
|
238
|
+
this._status?.show();
|
|
239
|
+
dom.show(this.element.domNode);
|
|
240
|
+
this._layout(this._persistedSize.restore());
|
|
241
|
+
this._showTimeout.cancelAndSet(() => {
|
|
242
|
+
this.element.domNode.classList.add('visible');
|
|
243
|
+
this._onDidShow.fire(this);
|
|
244
|
+
}, 100);
|
|
245
|
+
}
|
|
246
|
+
hide() {
|
|
247
|
+
this._pendingLayout.clear();
|
|
248
|
+
this._setState(0 );
|
|
249
|
+
this._onDidHide.fire(this);
|
|
250
|
+
dom.hide(this.element.domNode);
|
|
251
|
+
this.element.clearSashHoverState();
|
|
252
|
+
const dim = this._persistedSize.restore();
|
|
253
|
+
const minPersistedHeight = Math.ceil(this._getLayoutInfo().itemHeight * 4.3);
|
|
254
|
+
if (dim && dim.height < minPersistedHeight) {
|
|
255
|
+
this._persistedSize.store(dim.with(undefined, minPersistedHeight));
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
_layout(size) {
|
|
259
|
+
if (!this._cursorPosition) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const bodyBox = dom.getClientArea(this._container.ownerDocument.body);
|
|
263
|
+
const info = this._getLayoutInfo();
|
|
264
|
+
if (!size) {
|
|
265
|
+
size = info.defaultSize;
|
|
266
|
+
}
|
|
267
|
+
let height = size.height;
|
|
268
|
+
let width = size.width;
|
|
269
|
+
if (this._status) {
|
|
270
|
+
this._status.element.style.lineHeight = `${info.itemHeight}px`;
|
|
271
|
+
}
|
|
272
|
+
const maxWidth = bodyBox.width - info.borderHeight - 2 * info.horizontalPadding;
|
|
273
|
+
if (width > maxWidth) {
|
|
274
|
+
width = maxWidth;
|
|
275
|
+
}
|
|
276
|
+
const preferredWidth = this._completionModel ? this._completionModel.stats.pLabelLen * info.typicalHalfwidthCharacterWidth : width;
|
|
277
|
+
const fullHeight = info.statusBarHeight + this._list.contentHeight + info.borderHeight;
|
|
278
|
+
const minHeight = info.itemHeight + info.statusBarHeight;
|
|
279
|
+
const editorBox = dom.getDomNodePagePosition(this._container);
|
|
280
|
+
const cursorBox = this._cursorPosition;
|
|
281
|
+
const cursorBottom = editorBox.top + cursorBox.top + cursorBox.height;
|
|
282
|
+
const maxHeightBelow = Math.min(bodyBox.height - cursorBottom - info.verticalPadding, fullHeight);
|
|
283
|
+
const availableSpaceAbove = editorBox.top + cursorBox.top - info.verticalPadding;
|
|
284
|
+
const maxHeightAbove = Math.min(availableSpaceAbove, fullHeight);
|
|
285
|
+
let maxHeight = Math.min(Math.max(maxHeightAbove, maxHeightBelow) + info.borderHeight, fullHeight);
|
|
286
|
+
if (height === this._cappedHeight?.capped) {
|
|
287
|
+
height = this._cappedHeight.wanted;
|
|
288
|
+
}
|
|
289
|
+
if (height < minHeight) {
|
|
290
|
+
height = minHeight;
|
|
291
|
+
}
|
|
292
|
+
if (height > maxHeight) {
|
|
293
|
+
height = maxHeight;
|
|
294
|
+
}
|
|
295
|
+
const forceRenderingAboveRequiredSpace = 150;
|
|
296
|
+
if (height > maxHeightBelow || (this._forceRenderingAbove && availableSpaceAbove > forceRenderingAboveRequiredSpace)) {
|
|
297
|
+
this._preference = 0 ;
|
|
298
|
+
this.element.enableSashes(true, true, false, false);
|
|
299
|
+
maxHeight = maxHeightAbove;
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
this._preference = 1 ;
|
|
303
|
+
this.element.enableSashes(false, true, true, false);
|
|
304
|
+
maxHeight = maxHeightBelow;
|
|
305
|
+
}
|
|
306
|
+
this.element.preferredSize = new dom.Dimension(preferredWidth, info.defaultSize.height);
|
|
307
|
+
this.element.maxSize = new dom.Dimension(maxWidth, maxHeight);
|
|
308
|
+
this.element.minSize = new dom.Dimension(220, minHeight);
|
|
309
|
+
this._cappedHeight = height === fullHeight
|
|
310
|
+
? { wanted: this._cappedHeight?.wanted ?? size.height, capped: height }
|
|
311
|
+
: undefined;
|
|
312
|
+
this.element.domNode.style.left = `${this._cursorPosition.left}px`;
|
|
313
|
+
if (this._preference === 0 ) {
|
|
314
|
+
this.element.domNode.style.top = `${this._cursorPosition.top - height - info.borderHeight}px`;
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
this.element.domNode.style.top = `${this._cursorPosition.top + this._cursorPosition.height}px`;
|
|
318
|
+
}
|
|
319
|
+
this._resize(width, height);
|
|
320
|
+
}
|
|
321
|
+
_resize(width, height) {
|
|
322
|
+
const { width: maxWidth, height: maxHeight } = this.element.maxSize;
|
|
323
|
+
width = Math.min(maxWidth, width);
|
|
324
|
+
if (maxHeight) {
|
|
325
|
+
height = Math.min(maxHeight, height);
|
|
326
|
+
}
|
|
327
|
+
const { statusBarHeight } = this._getLayoutInfo();
|
|
328
|
+
this._list.layout(height - statusBarHeight, width);
|
|
329
|
+
this._listElement.style.height = `${height - statusBarHeight}px`;
|
|
330
|
+
this._listElement.style.width = `${width}px`;
|
|
331
|
+
this._listElement.style.height = `${height}px`;
|
|
332
|
+
this.element.layout(height, width);
|
|
333
|
+
}
|
|
334
|
+
_getLayoutInfo() {
|
|
335
|
+
const fontInfo = {
|
|
336
|
+
lineHeight: 20,
|
|
337
|
+
typicalHalfwidthCharacterWidth: 10
|
|
338
|
+
};
|
|
339
|
+
const itemHeight = clamp(fontInfo.lineHeight, 8, 1000);
|
|
340
|
+
const statusBarHeight = 0;
|
|
341
|
+
const borderWidth = 1;
|
|
342
|
+
const borderHeight = 2 * borderWidth;
|
|
343
|
+
return {
|
|
344
|
+
itemHeight,
|
|
345
|
+
statusBarHeight,
|
|
346
|
+
borderWidth,
|
|
347
|
+
borderHeight,
|
|
348
|
+
typicalHalfwidthCharacterWidth: fontInfo.typicalHalfwidthCharacterWidth,
|
|
349
|
+
verticalPadding: 22,
|
|
350
|
+
horizontalPadding: 14,
|
|
351
|
+
defaultSize: new dom.Dimension(430, statusBarHeight + 12 * itemHeight + borderHeight)
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
_onListMouseDownOrTap(e) {
|
|
355
|
+
if (typeof e.element === 'undefined' || typeof e.index === 'undefined') {
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
e.browserEvent.preventDefault();
|
|
359
|
+
e.browserEvent.stopPropagation();
|
|
360
|
+
this._select(e.element, e.index);
|
|
361
|
+
}
|
|
362
|
+
_onListSelection(e) {
|
|
363
|
+
if (e.elements.length) {
|
|
364
|
+
this._select(e.elements[0], e.indexes[0]);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
_select(item, index) {
|
|
368
|
+
const completionModel = this._completionModel;
|
|
369
|
+
if (completionModel) {
|
|
370
|
+
this._onDidSelect.fire({ item, index, model: completionModel });
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
selectNext() {
|
|
374
|
+
this._list.focusNext(1, true);
|
|
375
|
+
const focus = this._list.getFocus();
|
|
376
|
+
if (focus.length > 0) {
|
|
377
|
+
this._list.reveal(focus[0]);
|
|
378
|
+
}
|
|
379
|
+
return true;
|
|
380
|
+
}
|
|
381
|
+
selectNextPage() {
|
|
382
|
+
this._list.focusNextPage();
|
|
383
|
+
const focus = this._list.getFocus();
|
|
384
|
+
if (focus.length > 0) {
|
|
385
|
+
this._list.reveal(focus[0]);
|
|
386
|
+
}
|
|
387
|
+
return true;
|
|
388
|
+
}
|
|
389
|
+
selectPrevious() {
|
|
390
|
+
this._list.focusPrevious(1, true);
|
|
391
|
+
const focus = this._list.getFocus();
|
|
392
|
+
if (focus.length > 0) {
|
|
393
|
+
this._list.reveal(focus[0]);
|
|
394
|
+
}
|
|
395
|
+
return true;
|
|
396
|
+
}
|
|
397
|
+
selectPreviousPage() {
|
|
398
|
+
this._list.focusPreviousPage();
|
|
399
|
+
const focus = this._list.getFocus();
|
|
400
|
+
if (focus.length > 0) {
|
|
401
|
+
this._list.reveal(focus[0]);
|
|
402
|
+
}
|
|
403
|
+
return true;
|
|
404
|
+
}
|
|
405
|
+
getFocusedItem() {
|
|
406
|
+
if (this._completionModel) {
|
|
407
|
+
return {
|
|
408
|
+
item: this._list.getFocusedElements()[0],
|
|
409
|
+
index: this._list.getFocus()[0],
|
|
410
|
+
model: this._completionModel
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
return undefined;
|
|
414
|
+
}
|
|
415
|
+
forceRenderingAbove() {
|
|
416
|
+
if (!this._forceRenderingAbove) {
|
|
417
|
+
this._forceRenderingAbove = true;
|
|
418
|
+
this._layout(this._persistedSize.restore());
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
stopForceRenderingAbove() {
|
|
422
|
+
this._forceRenderingAbove = false;
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
SimpleSuggestWidget = ( __decorate([
|
|
426
|
+
( __param(3, IInstantiationService))
|
|
427
|
+
], SimpleSuggestWidget));
|
|
428
|
+
export { SimpleSuggestWidget };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { append, $, show } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
2
|
+
import { IconLabel } from 'monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js';
|
|
3
|
+
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
4
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
5
|
+
import { createMatches } from 'monaco-editor/esm/vs/base/common/filters.js';
|
|
6
|
+
import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
7
|
+
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
8
|
+
function getAriaId(index) {
|
|
9
|
+
return `simple-suggest-aria-id:${index}`;
|
|
10
|
+
}
|
|
11
|
+
class SimpleSuggestWidgetItemRenderer {
|
|
12
|
+
constructor() {
|
|
13
|
+
this._onDidToggleDetails = ( new Emitter());
|
|
14
|
+
this.onDidToggleDetails = this._onDidToggleDetails.event;
|
|
15
|
+
this.templateId = 'suggestion';
|
|
16
|
+
}
|
|
17
|
+
dispose() {
|
|
18
|
+
this._onDidToggleDetails.dispose();
|
|
19
|
+
}
|
|
20
|
+
renderTemplate(container) {
|
|
21
|
+
const disposables = ( new DisposableStore());
|
|
22
|
+
const root = container;
|
|
23
|
+
root.classList.add('show-file-icons');
|
|
24
|
+
const icon = append(container, $('.icon'));
|
|
25
|
+
const colorspan = append(icon, $('span.colorspan'));
|
|
26
|
+
const text = append(container, $('.contents'));
|
|
27
|
+
const main = append(text, $('.main'));
|
|
28
|
+
const iconContainer = append(main, $('.icon-label.codicon'));
|
|
29
|
+
const left = append(main, $('span.left'));
|
|
30
|
+
const right = append(main, $('span.right'));
|
|
31
|
+
const iconLabel = ( new IconLabel(left, { supportHighlights: true, supportIcons: true }));
|
|
32
|
+
disposables.add(iconLabel);
|
|
33
|
+
const parametersLabel = append(left, $('span.signature-label'));
|
|
34
|
+
const qualifierLabel = append(left, $('span.qualifier-label'));
|
|
35
|
+
const detailsLabel = append(right, $('span.details-label'));
|
|
36
|
+
const configureFont = () => {
|
|
37
|
+
const fontFamily = 'Hack';
|
|
38
|
+
const fontFeatureSettings = '';
|
|
39
|
+
const fontSize = '12';
|
|
40
|
+
const lineHeight = '20';
|
|
41
|
+
const fontWeight = 'normal';
|
|
42
|
+
const letterSpacing = '0';
|
|
43
|
+
const fontSizePx = `${fontSize}px`;
|
|
44
|
+
const lineHeightPx = `${lineHeight}px`;
|
|
45
|
+
const letterSpacingPx = `${letterSpacing}px`;
|
|
46
|
+
root.style.fontSize = fontSizePx;
|
|
47
|
+
root.style.fontWeight = fontWeight;
|
|
48
|
+
root.style.letterSpacing = letterSpacingPx;
|
|
49
|
+
main.style.fontFamily = fontFamily;
|
|
50
|
+
main.style.fontFeatureSettings = fontFeatureSettings;
|
|
51
|
+
main.style.lineHeight = lineHeightPx;
|
|
52
|
+
icon.style.height = lineHeightPx;
|
|
53
|
+
icon.style.width = lineHeightPx;
|
|
54
|
+
};
|
|
55
|
+
configureFont();
|
|
56
|
+
return { root, left, right, icon, colorspan, iconLabel, iconContainer, parametersLabel, qualifierLabel, detailsLabel, disposables };
|
|
57
|
+
}
|
|
58
|
+
renderElement(element, index, data) {
|
|
59
|
+
const { completion } = element;
|
|
60
|
+
data.root.id = getAriaId(index);
|
|
61
|
+
data.colorspan.style.backgroundColor = '';
|
|
62
|
+
const labelOptions = {
|
|
63
|
+
labelEscapeNewLines: true,
|
|
64
|
+
matches: createMatches(element.score)
|
|
65
|
+
};
|
|
66
|
+
data.icon.className = 'icon hide';
|
|
67
|
+
data.iconContainer.className = '';
|
|
68
|
+
data.iconContainer.classList.add('suggest-icon', ...ThemeIcon.asClassNameArray(completion.icon || Codicon.symbolText));
|
|
69
|
+
data.iconLabel.setLabel(completion.label, undefined, labelOptions);
|
|
70
|
+
data.parametersLabel.textContent = '';
|
|
71
|
+
data.detailsLabel.textContent = stripNewLines(completion.detail || '');
|
|
72
|
+
data.root.classList.add('string-label');
|
|
73
|
+
show(data.detailsLabel);
|
|
74
|
+
data.right.classList.remove('can-expand-details');
|
|
75
|
+
}
|
|
76
|
+
disposeTemplate(templateData) {
|
|
77
|
+
templateData.disposables.dispose();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function stripNewLines(str) {
|
|
81
|
+
return str.replace(/\r\n|\r|\n/g, '');
|
|
82
|
+
}
|
|
83
|
+
export { SimpleSuggestWidgetItemRenderer, getAriaId };
|
|
@@ -269,6 +269,15 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
269
269
|
if (!target) {
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
|
+
if (this.filesConfigurationService.isReadonly(target)) {
|
|
273
|
+
const confirmed = await this.confirmMakeWriteable(target);
|
|
274
|
+
if (!confirmed) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
this.filesConfigurationService.updateReadonly(target, false);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
272
281
|
if (isEqual(source, target)) {
|
|
273
282
|
return this.save(source, { ...options, force: true });
|
|
274
283
|
}
|
|
@@ -396,7 +405,7 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
396
405
|
)),
|
|
397
406
|
detail: ( localizeWithPath(
|
|
398
407
|
'vs/workbench/services/textfile/browser/textFileService',
|
|
399
|
-
'
|
|
408
|
+
'overwriteIrreversible',
|
|
400
409
|
"A file or folder with the name '{0}' already exists in the folder '{1}'. Replacing it will overwrite its current contents.",
|
|
401
410
|
basename(resource),
|
|
402
411
|
basename(dirname(resource))
|
|
@@ -409,6 +418,28 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
409
418
|
});
|
|
410
419
|
return confirmed;
|
|
411
420
|
}
|
|
421
|
+
async confirmMakeWriteable(resource) {
|
|
422
|
+
const { confirmed } = await this.dialogService.confirm({
|
|
423
|
+
type: 'warning',
|
|
424
|
+
message: ( localizeWithPath(
|
|
425
|
+
'vs/workbench/services/textfile/browser/textFileService',
|
|
426
|
+
'confirmMakeWriteable',
|
|
427
|
+
"'{0}' is marked as read-only. Do you want to save anyway?",
|
|
428
|
+
basename(resource)
|
|
429
|
+
)),
|
|
430
|
+
detail: ( localizeWithPath(
|
|
431
|
+
'vs/workbench/services/textfile/browser/textFileService',
|
|
432
|
+
'confirmMakeWriteableDetail',
|
|
433
|
+
"Paths can be configured as read-only via settings."
|
|
434
|
+
)),
|
|
435
|
+
primaryButton: ( localizeWithPath(
|
|
436
|
+
'vs/workbench/services/textfile/browser/textFileService',
|
|
437
|
+
{ key: 'makeWriteableButtonLabel', comment: ['&& denotes a mnemonic'] },
|
|
438
|
+
"&&Save Anyway"
|
|
439
|
+
))
|
|
440
|
+
});
|
|
441
|
+
return confirmed;
|
|
442
|
+
}
|
|
412
443
|
async suggestSavePath(resource) {
|
|
413
444
|
if (this.fileService.hasProvider(resource)) {
|
|
414
445
|
return resource;
|
|
@@ -72,11 +72,7 @@ let TextEditorService = class TextEditorService extends Disposable {
|
|
|
72
72
|
else {
|
|
73
73
|
untitledModel = this.untitledTextEditorService.create({ associatedResource: untitledInput.resource, ...untitledOptions });
|
|
74
74
|
}
|
|
75
|
-
return this.createOrGetCached(untitledModel.resource, () =>
|
|
76
|
-
const input = this.instantiationService.createInstance(UntitledTextEditorInput, untitledModel);
|
|
77
|
-
Event.once(input.onWillDispose)(() => untitledModel.dispose());
|
|
78
|
-
return input;
|
|
79
|
-
});
|
|
75
|
+
return this.createOrGetCached(untitledModel.resource, () => this.instantiationService.createInstance(UntitledTextEditorInput, untitledModel));
|
|
80
76
|
}
|
|
81
77
|
const textResourceEditorInput = input;
|
|
82
78
|
if (textResourceEditorInput.resource instanceof URI) {
|