@codingame/monaco-vscode-api 1.79.1 → 1.79.2-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/api.js +10 -8
- package/dist/composite.d.ts +65 -0
- package/dist/configurationRegistry.d.ts +212 -0
- package/dist/contextkey.d.ts +1 -1
- package/dist/default-extensions/json.js +1 -0
- package/dist/default-extensions/theme-defaults.js +2 -2
- package/dist/editorBrowser.d.ts +272 -3
- package/dist/event.d.ts +6 -1
- package/dist/{extension-tools-0c4c1ad7.js → extension-tools-3c2bf0a4.js} +698 -507
- package/dist/extensions.d.ts +3 -2
- package/dist/extensions.d2.ts +6 -17
- package/dist/extensionsRegistry.d.ts +15 -9
- package/dist/files.d.ts +71 -7
- package/dist/jsonSchema.d.ts +1 -1
- package/dist/keybinding.d.ts +2 -2
- package/dist/languageFeatures.d.ts +703 -61
- package/dist/monaco.d.ts +5 -4
- package/dist/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditor.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -1
- package/dist/platform.d.ts +11 -0
- package/dist/rollup-extension-directory-plugin.js +1 -1
- package/dist/rollup-vsix-plugin.js +2 -2
- package/dist/service-override/configuration.d.ts +5 -206
- package/dist/service-override/dialogs.js +16 -1
- package/dist/service-override/files.d.ts +2 -2
- package/dist/service-override/files.js +1 -1
- package/dist/service-override/markers.d.ts +7 -0
- package/dist/service-override/markers.js +6 -0
- package/dist/service-override/output.d.ts +7 -0
- package/dist/service-override/output.js +22 -0
- package/dist/service-override/preferences.js +7 -1
- package/dist/service-override/quickaccess.js +0 -9
- package/dist/service-override/search.d.ts +7 -0
- package/dist/service-override/search.js +19 -0
- package/dist/service-override/terminal.d.ts +607 -0
- package/dist/service-override/terminal.js +98 -0
- package/dist/service-override/tools/editor.js +1 -1
- package/dist/service-override/views.d.ts +561 -335
- package/dist/service-override/views.js +51 -11
- package/dist/services.d.ts +2627 -108
- package/dist/services.js +3 -0
- package/dist/severity.d.ts +16 -0
- package/dist/uri.d.ts +22 -11
- package/dist/views.d.ts +270 -0
- package/dist/vscode/vs/base/common/processes.js +24 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/decorations.js +20 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl.js +106 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorSash.js +59 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution.js +41 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.js +369 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffModel.js +247 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/lineAlignment.js +179 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/overviewRulerPart.js +121 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/style.css.js +4 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/unchangedRanges.js +184 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/utils.js +88 -0
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +38 -1
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagementUtil.js +5 -1
- package/dist/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +13 -5
- package/dist/vscode/vs/platform/files/common/fileService.js +43 -5
- package/dist/vscode/vs/platform/files/common/files.js +3 -1
- package/dist/vscode/vs/platform/languagePacks/common/languagePacks.js +4 -1
- package/dist/vscode/vs/platform/log/common/bufferLog.js +34 -0
- package/dist/vscode/vs/platform/log/common/fileLog.js +105 -0
- package/dist/vscode/vs/platform/quickinput/browser/quickPickPin.js +1 -1
- package/dist/vscode/vs/platform/remote/common/remoteAuthorityResolver.js +20 -1
- package/dist/vscode/vs/platform/request/browser/requestService.js +1 -1
- package/dist/vscode/vs/platform/request/common/request.js +3 -3
- package/dist/vscode/vs/platform/storage/common/storage.js +3 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +39 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +565 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +27 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +22 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +46 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +80 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariable.js +7 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariableCollection.js +196 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariableShared.js +23 -0
- package/dist/vscode/vs/platform/terminal/common/terminal.js +21 -1
- package/dist/vscode/vs/platform/terminal/common/terminalDataBuffering.js +45 -0
- package/dist/vscode/vs/platform/terminal/common/terminalEnvironment.js +37 -0
- package/dist/vscode/vs/platform/terminal/common/terminalPlatformConfiguration.js +622 -0
- package/dist/vscode/vs/platform/terminal/common/terminalProfiles.js +107 -0
- package/dist/vscode/vs/platform/terminal/common/terminalRecorder.js +66 -0
- package/dist/vscode/vs/platform/terminal/common/terminalStrings.js +16 -0
- package/dist/vscode/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +321 -0
- package/dist/vscode/vs/platform/userDataSync/common/settingsMerge.js +39 -1
- package/dist/vscode/vs/platform/userDataSync/common/userDataSync.js +19 -0
- package/dist/vscode/vs/platform/window/common/window.js +7 -1
- package/dist/vscode/vs/platform/workspace/common/canonicalUri.js +3 -0
- package/dist/vscode/vs/platform/workspace/common/virtualWorkspace.js +4 -1
- package/dist/vscode/vs/platform/workspaces/common/workspaces.js +2 -2
- package/dist/vscode/vs/workbench/api/browser/mainThreadCommands.js +2 -3
- package/dist/vscode/vs/workbench/api/browser/mainThreadEditorTabs.js +473 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadLanguageFeatures.js +45 -38
- package/dist/vscode/vs/workbench/api/browser/mainThreadSearch.js +146 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadStatusBar.js +33 -52
- package/dist/vscode/vs/workbench/api/browser/mainThreadTerminalService.js +395 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadTheming.js +22 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadTreeViews.js +10 -5
- package/dist/vscode/vs/workbench/api/browser/mainThreadWindow.js +11 -4
- package/dist/vscode/vs/workbench/api/browser/mainThreadWorkspace.js +34 -11
- package/dist/vscode/vs/workbench/api/browser/statusBarExtensionPoint.js +81 -0
- package/dist/vscode/vs/workbench/api/common/extHost.protocol.js +7 -2
- package/dist/vscode/vs/workbench/api/common/extHostDebugService.js +4 -13
- package/dist/vscode/vs/workbench/api/common/extHostExtensionService.js +30 -15
- package/dist/vscode/vs/workbench/api/common/extHostFileSystemConsumer.js +20 -6
- package/dist/vscode/vs/workbench/api/common/extHostLanguageFeatures.js +41 -8
- package/dist/vscode/vs/workbench/api/common/extHostManagedSockets.js +3 -0
- package/dist/vscode/vs/workbench/api/common/extHostSearch.js +109 -0
- package/dist/vscode/vs/workbench/api/common/extHostStatusBar.js +33 -6
- package/dist/vscode/vs/workbench/api/common/extHostTerminalService.js +879 -1
- package/dist/vscode/vs/workbench/api/common/extHostTheming.js +38 -0
- package/dist/vscode/vs/workbench/api/common/extHostTreeViews.js +8 -5
- package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +15 -17
- package/dist/vscode/vs/workbench/api/common/extHostTypes.js +117 -4
- package/dist/vscode/vs/workbench/api/common/extHostWindow.js +28 -6
- package/dist/vscode/vs/workbench/api/common/extHostWorkspace.js +28 -0
- package/dist/vscode/vs/workbench/api/common/shared/dataTransferCache.js +11 -14
- package/dist/vscode/vs/workbench/api/node/extHostTerminalService.js +22 -0
- package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +2 -1
- package/dist/vscode/vs/workbench/browser/actions/windowActions.js +2 -2
- package/dist/vscode/vs/workbench/browser/dnd.js +56 -2
- package/dist/vscode/vs/workbench/browser/parts/compositePart.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/dialogs/dialogHandler.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +1 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +1 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +9 -10
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupView.js +15 -9
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupWatermark.js +13 -17
- package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editorsObserver.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/noTabsTitleControl.js +3 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/tabsTitleControl.js +60 -11
- package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +16 -10
- package/dist/vscode/vs/workbench/browser/parts/editor/textResourceEditor.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/views/checkbox.js +10 -0
- package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +78 -14
- package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
- package/dist/vscode/vs/workbench/browser/workbench.contribution.js +65 -6
- package/dist/vscode/vs/workbench/common/configuration.js +8 -1
- package/dist/vscode/vs/workbench/common/contextkeys.js +9 -1
- package/dist/vscode/vs/workbench/common/editor/editorGroupModel.js +5 -1
- package/dist/vscode/vs/workbench/common/editor/resourceEditorInput.js +6 -3
- package/dist/vscode/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
- package/dist/vscode/vs/workbench/common/editor.js +1 -5
- package/dist/vscode/vs/workbench/common/resources.js +111 -34
- package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +1 -1
- package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +1 -1
- package/dist/vscode/vs/workbench/contrib/chat/browser/chat.js +3 -0
- package/dist/vscode/vs/workbench/contrib/chat/common/chatService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +6 -4
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +250 -0
- package/dist/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput.js +290 -0
- package/dist/vscode/vs/workbench/contrib/customEditor/common/customEditor.js +3 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugActionViewItems.js +1 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +2 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +20 -20
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorActions.js +5 -3
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorContribution.js +5 -2
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugHover.js +33 -6
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugSession.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugTaskRunner.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +3 -3
- package/dist/vscode/vs/workbench/contrib/debug/common/debugModel.js +29 -17
- package/dist/vscode/vs/workbench/contrib/debug/common/debugStorage.js +11 -10
- package/dist/vscode/vs/workbench/contrib/debug/common/debugger.js +10 -6
- package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsActions.js +2514 -0
- package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons.js +82 -0
- package/dist/vscode/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/extensions/common/extensions.js +6 -1
- package/dist/vscode/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +16 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +2 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +2 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerService.js +10 -6
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +3 -18
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +37 -2
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +65 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +3 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +3 -1
- package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +41 -6
- package/dist/vscode/vs/workbench/contrib/files/browser/files.js +1 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerView.js +3 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerViewer.js +6 -2
- package/dist/vscode/vs/workbench/contrib/files/common/explorerModel.js +16 -9
- package/dist/vscode/vs/workbench/contrib/files/common/files.js +1 -6
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveDocumentService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +200 -0
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markers.contribution.js +586 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersFilterOptions.js +75 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersModel.js +201 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersTable.js +451 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersTreeViewer.js +670 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersView.js +857 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.js +132 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/media/markers.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/messages.js +171 -0
- package/dist/vscode/vs/workbench/contrib/markers/common/markers.js +15 -1
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +135 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +421 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +55 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +334 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +606 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +36 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/utils.js +68 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +2 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +158 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +6 -1
- package/dist/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -1
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/logViewer.js +64 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/output.contribution.js +378 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/outputServices.js +39 -3
- package/dist/vscode/vs/workbench/contrib/output/browser/outputView.js +220 -0
- package/dist/vscode/vs/workbench/contrib/output/common/outputChannelModel.js +12 -3
- package/dist/vscode/vs/workbench/contrib/output/common/outputLinkComputer.js +129 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +270 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingsEditor.js +1080 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindings.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/preferences.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferences.contribution.js +1154 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesActions.js +94 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesEditor.js +47 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesIcons.js +37 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesRenderers.js +731 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesSearch.js +271 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +479 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditor2.js +1465 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.js +506 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsLayout.js +296 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsSearchMenu.js +79 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTree.js +1984 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +759 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsWidgets.js +1008 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/tocTree.js +196 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/preferences.js +68 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/preferencesContribution.js +157 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +67 -0
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +16 -16
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +1 -2
- package/dist/vscode/vs/workbench/contrib/remote/browser/remoteExplorer.js +23 -2
- package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +5 -5
- package/dist/vscode/vs/workbench/contrib/search/browser/media/searchview.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/patternInputWidget.js +217 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replace.js +3 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replaceContributions.js +7 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replaceService.js +222 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +54 -15
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsBase.js +17 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchFindInput.js +41 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchIcons.js +35 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchMessage.js +58 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchModel.js +1842 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchNotebookHelpers.js +49 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchResultsView.js +379 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchView.js +1867 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchWidget.js +628 -0
- package/dist/vscode/vs/workbench/contrib/search/common/constants.js +30 -1
- package/dist/vscode/vs/workbench/contrib/search/common/search.js +9 -1
- package/dist/vscode/vs/workbench/contrib/search/common/searchHistoryService.js +42 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +477 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.js +697 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +188 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +295 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +135 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +268 -0
- package/dist/vscode/vs/workbench/contrib/snippets/browser/tabCompletion.js +2 -2
- package/dist/vscode/vs/workbench/contrib/tasks/common/taskService.js +16 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +119 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/scrollbar.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/terminal.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/widgets.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/xterm.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.contribution.js +238 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalActions.js +1930 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalCommands.js +22 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalConfigHelper.js +213 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +17 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditor.js +186 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +199 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorService.js +239 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalExtensions.js +22 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroup.js +482 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroupService.js +372 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcon.js +60 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcons.js +37 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstance.js +2123 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstanceService.js +79 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMainContribution.js +82 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMenus.js +850 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +142 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +618 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.js +278 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.js +417 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileService.js +213 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +144 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +267 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalService.js +1063 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalStatusList.js +108 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabbedView.js +417 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabsList.js +680 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTooltip.js +72 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalUri.js +39 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalView.js +535 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +469 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +97 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +56 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +416 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +587 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariable.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariableService.js +94 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/history.js +356 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminal.js +266 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -16
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalConfiguration.js +965 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalContextKey.js +157 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment.js +272 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalExtensionPoints.js +27 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalStrings.js +86 -0
- package/dist/vscode/vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService.js +46 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/links.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService.js +26 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService.js +143 -0
- package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +85 -0
- package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.js +52 -0
- package/dist/vscode/vs/workbench/services/actions/common/menusExtensionPoint.js +14 -6
- package/dist/vscode/vs/workbench/services/assignment/common/assignmentService.js +3 -0
- package/dist/vscode/vs/workbench/services/configuration/browser/configurationService.js +13 -13
- package/dist/vscode/vs/workbench/services/configuration/common/configuration.js +2 -1
- package/dist/vscode/vs/workbench/services/configuration/common/configurationEditing.js +2 -2
- package/dist/vscode/vs/workbench/services/configuration/common/jsonEditingService.js +2 -2
- package/dist/vscode/vs/workbench/services/dialogs/browser/abstractFileDialogService.js +302 -0
- package/dist/vscode/vs/workbench/services/dialogs/browser/simpleFileDialog.js +971 -0
- package/dist/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.js +3 -2
- package/dist/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +4 -0
- package/dist/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +2 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.js +3 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensions.js +14 -2
- package/dist/vscode/vs/workbench/services/extensions/common/extensionsApiProposals.js +10 -1
- package/dist/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +70 -3
- package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +1 -1
- package/dist/vscode/vs/workbench/services/hover/browser/hoverWidget.js +2 -1
- package/dist/vscode/vs/workbench/services/hover/browser/media/hover.css.js +1 -1
- package/dist/vscode/vs/workbench/services/keybinding/common/keybindingEditing.js +275 -0
- package/dist/vscode/vs/workbench/services/localization/common/locale.js +3 -0
- package/dist/vscode/vs/workbench/services/log/common/logConstants.js +2 -0
- package/dist/vscode/vs/workbench/services/output/common/output.js +4 -1
- package/dist/vscode/vs/workbench/services/preferences/common/preferences.js +22 -1
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesModels.js +6 -0
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesValidation.js +37 -1
- package/dist/vscode/vs/workbench/services/remote/common/remoteAgentService.js +69 -0
- package/dist/vscode/vs/workbench/services/remote/common/remoteExplorerService.js +66 -27
- package/dist/vscode/vs/workbench/services/search/common/fileSearchManager.js +265 -0
- package/dist/vscode/vs/workbench/services/search/common/queryBuilder.js +6 -0
- package/dist/vscode/vs/workbench/services/search/common/replace.js +203 -0
- package/dist/vscode/vs/workbench/services/search/common/search.js +227 -1
- package/dist/vscode/vs/workbench/services/search/common/searchExtTypes.js +6 -0
- package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +72 -0
- package/dist/vscode/vs/workbench/services/search/common/searchService.js +355 -0
- package/dist/vscode/vs/workbench/services/search/common/textSearchManager.js +309 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +399 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
- package/dist/vscode/vs/workbench/services/terminal/common/embedderTerminalService.js +3 -0
- package/dist/vscode/vs/workbench/services/textfile/browser/textFileService.js +1 -1
- package/dist/vscode/vs/workbench/services/textfile/common/textFileEditorModel.js +10 -3
- package/dist/vscode/vs/workbench/services/themes/browser/fileIconThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/themes/browser/productIconThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/themes/common/colorThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput.js +6 -4
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorModel.js +3 -0
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -0
- package/dist/vscode/vs/workbench/services/userActivity/common/userActivityRegistry.js +15 -0
- package/dist/vscode/vs/workbench/services/userActivity/common/userActivityService.js +37 -0
- package/dist/vscode/vs/workbench/services/userDataSync/common/userDataSync.js +7 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.js +40 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyService.js +12 -0
- package/dist/vscode/vs/workbench/services/workspaces/common/canonicalUriService.js +19 -0
- package/dist/vscode-default-extensions/css/syntaxes/css.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/json/package.json.js +1 -1
- package/dist/vscode-default-extensions/json/syntaxes/JSONC.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/json/syntaxes/JSONL.tmLanguage.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/latex/syntaxes/Bibtex.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/LaTeX.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/TeX.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/lua/syntaxes/lua.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/perl/package.json.js +1 -1
- package/dist/vscode-default-extensions/php/snippets/php.code-snippets.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/sql/language-configuration.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-abyss/themes/abyss-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/package.json.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_modern.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_vs.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/hc_black.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/hc_light.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/light_modern.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/theme-defaults/themes/light_vs.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-monokai/themes/monokai-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-quietlight/themes/quietlight-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-red/themes/Red-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-seti/icons/vs-seti-icon-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-solarized-light/themes/solarized-light-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/vb/language-configuration.json.extensionResource.js +1 -1
- package/dist/vscode-services/env.js +4 -2
- package/dist/vscode-services/extHost.js +32 -48
- package/dist/vscode-services/missing-services.js +407 -29
- package/dist/vscode-services/window.js +59 -65
- package/dist/vscode-services/workspace.js +19 -5
- package/dist/workers/outputLinkComputer.worker.d.ts +2 -0
- package/dist/workers/outputLinkComputer.worker.js +3 -0
- package/dist/workspace.d.ts +1 -1
- package/monaco-editor-treemending.patch +1305 -1184
- package/package.json +65 -19
- package/dist/activity.d.ts +0 -2802
- package/dist/collections.d.ts +0 -7
- package/dist/colorRegistry.d.ts +0 -710
- package/dist/vscode/vs/platform/product/common/product.js +0 -48
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionFollowups.js +0 -30
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +0 -196
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionListRenderer.js +0 -622
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionOptions.js +0 -77
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +0 -311
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css.js +0 -4
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +0 -56
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionModel.js +0 -305
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +0 -13
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionServiceImpl.js +0 -379
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionViewModel.js +0 -207
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWidgetHistoryService.js +0 -3
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWordCounter.js +0 -25
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus_experimental.json.extensionResource.js +0 -2
- package/dist/vscode-default-extensions/theme-defaults/themes/light_plus_experimental.json.extensionResource.js +0 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FuzzyScore } from 'monaco-editor/esm/vs/base/common/filters.js';
|
|
2
|
+
class SimpleCompletionItem {
|
|
3
|
+
constructor(completion) {
|
|
4
|
+
this.completion = completion;
|
|
5
|
+
this.score = FuzzyScore.Default;
|
|
6
|
+
this.distance = 0;
|
|
7
|
+
this.labelLow = this.completion.label.toLowerCase();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { SimpleCompletionItem };
|
|
@@ -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,399 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../node_modules/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 { localize } 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: () => ( localize('suggest', "Suggest")),
|
|
83
|
+
getWidgetRole: () => 'listbox',
|
|
84
|
+
getAriaLabel: (item) => {
|
|
85
|
+
let label = item.completion.label;
|
|
86
|
+
if (typeof item.completion.label !== 'string') {
|
|
87
|
+
const { detail, description } = item.completion.label;
|
|
88
|
+
if (detail && description) {
|
|
89
|
+
label = ( localize('label.full', '{0}{1}, {2}', label, detail, description));
|
|
90
|
+
}
|
|
91
|
+
else if (detail) {
|
|
92
|
+
label = ( localize('label.detail', '{0}{1}', label, detail));
|
|
93
|
+
}
|
|
94
|
+
else if (description) {
|
|
95
|
+
label = ( localize('label.desc', '{0}, {1}', label, description));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const { detail } = item.completion;
|
|
99
|
+
return ( localize('ariaCurrenttSuggestionReadDetails', '{0}, docs: {1}', label, detail));
|
|
100
|
+
},
|
|
101
|
+
}
|
|
102
|
+
}));
|
|
103
|
+
if (options.statusBarMenuId) {
|
|
104
|
+
this._status = instantiationService.createInstance(SuggestWidgetStatus, this.element.domNode, options.statusBarMenuId);
|
|
105
|
+
this.element.domNode.classList.toggle('with-status-bar', true);
|
|
106
|
+
}
|
|
107
|
+
this._disposables.add(this._list.onMouseDown(e => this._onListMouseDownOrTap(e)));
|
|
108
|
+
this._disposables.add(this._list.onTap(e => this._onListMouseDownOrTap(e)));
|
|
109
|
+
this._disposables.add(this._list.onDidChangeSelection(e => this._onListSelection(e)));
|
|
110
|
+
}
|
|
111
|
+
dispose() {
|
|
112
|
+
this._disposables.dispose();
|
|
113
|
+
this._status?.dispose();
|
|
114
|
+
this.element.dispose();
|
|
115
|
+
}
|
|
116
|
+
showSuggestions(completionModel, selectionIndex, isFrozen, isAuto, cursorPosition) {
|
|
117
|
+
this._cursorPosition = cursorPosition;
|
|
118
|
+
if (this._completionModel !== completionModel) {
|
|
119
|
+
this._completionModel = completionModel;
|
|
120
|
+
}
|
|
121
|
+
if (isFrozen && this._state !== 2 && this._state !== 0 ) {
|
|
122
|
+
this._setState(4 );
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const visibleCount = this._completionModel.items.length;
|
|
126
|
+
const isEmpty = visibleCount === 0;
|
|
127
|
+
if (isEmpty) {
|
|
128
|
+
this._setState(isAuto ? 0 : 2 );
|
|
129
|
+
this._completionModel = undefined;
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
try {
|
|
133
|
+
this._list.splice(0, this._list.length, this._completionModel.items);
|
|
134
|
+
this._setState(isFrozen ? 4 : 3 );
|
|
135
|
+
this._list.reveal(selectionIndex, 0);
|
|
136
|
+
this._list.setFocus([selectionIndex]);
|
|
137
|
+
}
|
|
138
|
+
finally {
|
|
139
|
+
}
|
|
140
|
+
this._pendingLayout.value = dom.runAtThisOrScheduleAtNextAnimationFrame(() => {
|
|
141
|
+
this._pendingLayout.clear();
|
|
142
|
+
this._layout(this.element.size);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
setLineContext(lineContext) {
|
|
146
|
+
if (this._completionModel) {
|
|
147
|
+
this._completionModel.lineContext = lineContext;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
_setState(state) {
|
|
151
|
+
if (this._state === state) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
this._state = state;
|
|
155
|
+
this.element.domNode.classList.toggle('frozen', state === 4 );
|
|
156
|
+
this.element.domNode.classList.remove('message');
|
|
157
|
+
switch (state) {
|
|
158
|
+
case 0 :
|
|
159
|
+
dom.hide(this._listElement);
|
|
160
|
+
if (this._status) {
|
|
161
|
+
dom.hide(this._status?.element);
|
|
162
|
+
}
|
|
163
|
+
this._status?.hide();
|
|
164
|
+
this._showTimeout.cancel();
|
|
165
|
+
this.element.domNode.classList.remove('visible');
|
|
166
|
+
this._list.splice(0, this._list.length);
|
|
167
|
+
this._cappedHeight = undefined;
|
|
168
|
+
break;
|
|
169
|
+
case 1 :
|
|
170
|
+
this.element.domNode.classList.add('message');
|
|
171
|
+
dom.hide(this._listElement);
|
|
172
|
+
if (this._status) {
|
|
173
|
+
dom.hide(this._status?.element);
|
|
174
|
+
}
|
|
175
|
+
this._show();
|
|
176
|
+
break;
|
|
177
|
+
case 2 :
|
|
178
|
+
this.element.domNode.classList.add('message');
|
|
179
|
+
dom.hide(this._listElement);
|
|
180
|
+
if (this._status) {
|
|
181
|
+
dom.hide(this._status?.element);
|
|
182
|
+
}
|
|
183
|
+
this._show();
|
|
184
|
+
break;
|
|
185
|
+
case 3 :
|
|
186
|
+
dom.show(this._listElement);
|
|
187
|
+
if (this._status) {
|
|
188
|
+
dom.show(this._status?.element);
|
|
189
|
+
}
|
|
190
|
+
this._show();
|
|
191
|
+
break;
|
|
192
|
+
case 4 :
|
|
193
|
+
dom.show(this._listElement);
|
|
194
|
+
if (this._status) {
|
|
195
|
+
dom.show(this._status?.element);
|
|
196
|
+
}
|
|
197
|
+
this._show();
|
|
198
|
+
break;
|
|
199
|
+
case 5 :
|
|
200
|
+
dom.show(this._listElement);
|
|
201
|
+
if (this._status) {
|
|
202
|
+
dom.show(this._status?.element);
|
|
203
|
+
}
|
|
204
|
+
this._show();
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
_show() {
|
|
209
|
+
this._status?.show();
|
|
210
|
+
dom.show(this.element.domNode);
|
|
211
|
+
this._layout(this._persistedSize.restore());
|
|
212
|
+
this._showTimeout.cancelAndSet(() => {
|
|
213
|
+
this.element.domNode.classList.add('visible');
|
|
214
|
+
this._onDidShow.fire(this);
|
|
215
|
+
}, 100);
|
|
216
|
+
}
|
|
217
|
+
hide() {
|
|
218
|
+
this._pendingLayout.clear();
|
|
219
|
+
this._setState(0 );
|
|
220
|
+
this._onDidHide.fire(this);
|
|
221
|
+
dom.hide(this.element.domNode);
|
|
222
|
+
this.element.clearSashHoverState();
|
|
223
|
+
const dim = this._persistedSize.restore();
|
|
224
|
+
const minPersistedHeight = Math.ceil(this._getLayoutInfo().itemHeight * 4.3);
|
|
225
|
+
if (dim && dim.height < minPersistedHeight) {
|
|
226
|
+
this._persistedSize.store(dim.with(undefined, minPersistedHeight));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
_layout(size) {
|
|
230
|
+
if (!this._cursorPosition) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
const bodyBox = dom.getClientArea(document.body);
|
|
234
|
+
const info = this._getLayoutInfo();
|
|
235
|
+
if (!size) {
|
|
236
|
+
size = info.defaultSize;
|
|
237
|
+
}
|
|
238
|
+
let height = size.height;
|
|
239
|
+
let width = size.width;
|
|
240
|
+
if (this._status) {
|
|
241
|
+
this._status.element.style.lineHeight = `${info.itemHeight}px`;
|
|
242
|
+
}
|
|
243
|
+
const maxWidth = bodyBox.width - info.borderHeight - 2 * info.horizontalPadding;
|
|
244
|
+
if (width > maxWidth) {
|
|
245
|
+
width = maxWidth;
|
|
246
|
+
}
|
|
247
|
+
const preferredWidth = this._completionModel ? this._completionModel.stats.pLabelLen * info.typicalHalfwidthCharacterWidth : width;
|
|
248
|
+
const fullHeight = info.statusBarHeight + this._list.contentHeight + info.borderHeight;
|
|
249
|
+
const minHeight = info.itemHeight + info.statusBarHeight;
|
|
250
|
+
const editorBox = dom.getDomNodePagePosition(this._container);
|
|
251
|
+
const cursorBox = this._cursorPosition;
|
|
252
|
+
const cursorBottom = editorBox.top + cursorBox.top + cursorBox.height;
|
|
253
|
+
const maxHeightBelow = Math.min(bodyBox.height - cursorBottom - info.verticalPadding, fullHeight);
|
|
254
|
+
const availableSpaceAbove = editorBox.top + cursorBox.top - info.verticalPadding;
|
|
255
|
+
const maxHeightAbove = Math.min(availableSpaceAbove, fullHeight);
|
|
256
|
+
let maxHeight = Math.min(Math.max(maxHeightAbove, maxHeightBelow) + info.borderHeight, fullHeight);
|
|
257
|
+
if (height === this._cappedHeight?.capped) {
|
|
258
|
+
height = this._cappedHeight.wanted;
|
|
259
|
+
}
|
|
260
|
+
if (height < minHeight) {
|
|
261
|
+
height = minHeight;
|
|
262
|
+
}
|
|
263
|
+
if (height > maxHeight) {
|
|
264
|
+
height = maxHeight;
|
|
265
|
+
}
|
|
266
|
+
const forceRenderingAboveRequiredSpace = 150;
|
|
267
|
+
if (height > maxHeightBelow || (this._forceRenderingAbove && availableSpaceAbove > forceRenderingAboveRequiredSpace)) {
|
|
268
|
+
this._preference = 0 ;
|
|
269
|
+
this.element.enableSashes(true, true, false, false);
|
|
270
|
+
maxHeight = maxHeightAbove;
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
this._preference = 1 ;
|
|
274
|
+
this.element.enableSashes(false, true, true, false);
|
|
275
|
+
maxHeight = maxHeightBelow;
|
|
276
|
+
}
|
|
277
|
+
this.element.preferredSize = new dom.Dimension(preferredWidth, info.defaultSize.height);
|
|
278
|
+
this.element.maxSize = new dom.Dimension(maxWidth, maxHeight);
|
|
279
|
+
this.element.minSize = new dom.Dimension(220, minHeight);
|
|
280
|
+
this._cappedHeight = height === fullHeight
|
|
281
|
+
? { wanted: this._cappedHeight?.wanted ?? size.height, capped: height }
|
|
282
|
+
: undefined;
|
|
283
|
+
this.element.domNode.style.left = `${this._cursorPosition.left}px`;
|
|
284
|
+
if (this._preference === 0 ) {
|
|
285
|
+
this.element.domNode.style.top = `${this._cursorPosition.top - height - info.borderHeight}px`;
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
this.element.domNode.style.top = `${this._cursorPosition.top + this._cursorPosition.height}px`;
|
|
289
|
+
}
|
|
290
|
+
this._resize(width, height);
|
|
291
|
+
}
|
|
292
|
+
_resize(width, height) {
|
|
293
|
+
const { width: maxWidth, height: maxHeight } = this.element.maxSize;
|
|
294
|
+
width = Math.min(maxWidth, width);
|
|
295
|
+
if (maxHeight) {
|
|
296
|
+
height = Math.min(maxHeight, height);
|
|
297
|
+
}
|
|
298
|
+
const { statusBarHeight } = this._getLayoutInfo();
|
|
299
|
+
this._list.layout(height - statusBarHeight, width);
|
|
300
|
+
this._listElement.style.height = `${height - statusBarHeight}px`;
|
|
301
|
+
this._listElement.style.width = `${width}px`;
|
|
302
|
+
this._listElement.style.height = `${height}px`;
|
|
303
|
+
this.element.layout(height, width);
|
|
304
|
+
}
|
|
305
|
+
_getLayoutInfo() {
|
|
306
|
+
const fontInfo = {
|
|
307
|
+
lineHeight: 20,
|
|
308
|
+
typicalHalfwidthCharacterWidth: 10
|
|
309
|
+
};
|
|
310
|
+
const itemHeight = clamp(fontInfo.lineHeight, 8, 1000);
|
|
311
|
+
const statusBarHeight = 0;
|
|
312
|
+
const borderWidth = 1;
|
|
313
|
+
const borderHeight = 2 * borderWidth;
|
|
314
|
+
return {
|
|
315
|
+
itemHeight,
|
|
316
|
+
statusBarHeight,
|
|
317
|
+
borderWidth,
|
|
318
|
+
borderHeight,
|
|
319
|
+
typicalHalfwidthCharacterWidth: fontInfo.typicalHalfwidthCharacterWidth,
|
|
320
|
+
verticalPadding: 22,
|
|
321
|
+
horizontalPadding: 14,
|
|
322
|
+
defaultSize: new dom.Dimension(430, statusBarHeight + 12 * itemHeight + borderHeight)
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
_onListMouseDownOrTap(e) {
|
|
326
|
+
if (typeof e.element === 'undefined' || typeof e.index === 'undefined') {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
e.browserEvent.preventDefault();
|
|
330
|
+
e.browserEvent.stopPropagation();
|
|
331
|
+
this._select(e.element, e.index);
|
|
332
|
+
}
|
|
333
|
+
_onListSelection(e) {
|
|
334
|
+
if (e.elements.length) {
|
|
335
|
+
this._select(e.elements[0], e.indexes[0]);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
_select(item, index) {
|
|
339
|
+
const completionModel = this._completionModel;
|
|
340
|
+
if (completionModel) {
|
|
341
|
+
this._onDidSelect.fire({ item, index, model: completionModel });
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
selectNext() {
|
|
345
|
+
this._list.focusNext(1, true);
|
|
346
|
+
const focus = this._list.getFocus();
|
|
347
|
+
if (focus.length > 0) {
|
|
348
|
+
this._list.reveal(focus[0]);
|
|
349
|
+
}
|
|
350
|
+
return true;
|
|
351
|
+
}
|
|
352
|
+
selectNextPage() {
|
|
353
|
+
this._list.focusNextPage();
|
|
354
|
+
const focus = this._list.getFocus();
|
|
355
|
+
if (focus.length > 0) {
|
|
356
|
+
this._list.reveal(focus[0]);
|
|
357
|
+
}
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
selectPrevious() {
|
|
361
|
+
this._list.focusPrevious(1, true);
|
|
362
|
+
const focus = this._list.getFocus();
|
|
363
|
+
if (focus.length > 0) {
|
|
364
|
+
this._list.reveal(focus[0]);
|
|
365
|
+
}
|
|
366
|
+
return true;
|
|
367
|
+
}
|
|
368
|
+
selectPreviousPage() {
|
|
369
|
+
this._list.focusPreviousPage();
|
|
370
|
+
const focus = this._list.getFocus();
|
|
371
|
+
if (focus.length > 0) {
|
|
372
|
+
this._list.reveal(focus[0]);
|
|
373
|
+
}
|
|
374
|
+
return true;
|
|
375
|
+
}
|
|
376
|
+
getFocusedItem() {
|
|
377
|
+
if (this._completionModel) {
|
|
378
|
+
return {
|
|
379
|
+
item: this._list.getFocusedElements()[0],
|
|
380
|
+
index: this._list.getFocus()[0],
|
|
381
|
+
model: this._completionModel
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
return undefined;
|
|
385
|
+
}
|
|
386
|
+
forceRenderingAbove() {
|
|
387
|
+
if (!this._forceRenderingAbove) {
|
|
388
|
+
this._forceRenderingAbove = true;
|
|
389
|
+
this._layout(this._persistedSize.restore());
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
stopForceRenderingAbove() {
|
|
393
|
+
this._forceRenderingAbove = false;
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
SimpleSuggestWidget = ( __decorate([
|
|
397
|
+
( __param(3, IInstantiationService))
|
|
398
|
+
], SimpleSuggestWidget));
|
|
399
|
+
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 };
|
|
@@ -323,7 +323,7 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
323
323
|
let sourceTextModel = undefined;
|
|
324
324
|
if (sourceModel instanceof BaseTextEditorModel) {
|
|
325
325
|
if (sourceModel.isResolved()) {
|
|
326
|
-
sourceTextModel = sourceModel.textEditorModel;
|
|
326
|
+
sourceTextModel = withNullAsUndefined(sourceModel.textEditorModel);
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
else {
|
|
@@ -80,6 +80,7 @@ let TextFileEditorModel = class TextFileEditorModel extends BaseTextEditorModel
|
|
|
80
80
|
registerListeners() {
|
|
81
81
|
this._register(this.fileService.onDidFilesChange(e => this.onDidFilesChange(e)));
|
|
82
82
|
this._register(this.filesConfigurationService.onFilesAssociationChange(() => this.onFilesAssociationChange()));
|
|
83
|
+
this._register(this.filesConfigurationService.onReadonlyChange(() => this._onDidChangeReadonly.fire()));
|
|
83
84
|
}
|
|
84
85
|
async onDidFilesChange(e) {
|
|
85
86
|
let fileEventImpactsModel = false;
|
|
@@ -228,7 +229,8 @@ let TextFileEditorModel = class TextFileEditorModel extends BaseTextEditorModel
|
|
|
228
229
|
etag,
|
|
229
230
|
value: buffer,
|
|
230
231
|
encoding: preferredEncoding.encoding,
|
|
231
|
-
readonly: false
|
|
232
|
+
readonly: false,
|
|
233
|
+
locked: false
|
|
232
234
|
}, true , options);
|
|
233
235
|
}
|
|
234
236
|
async resolveFromBackup(options) {
|
|
@@ -259,7 +261,8 @@ let TextFileEditorModel = class TextFileEditorModel extends BaseTextEditorModel
|
|
|
259
261
|
etag: backup.meta ? backup.meta.etag : ETAG_DISABLED,
|
|
260
262
|
value: await createTextBufferFactoryFromStream(await this.textFileService.getDecodedStream(this.resource, backup.value, { encoding: UTF8 })),
|
|
261
263
|
encoding,
|
|
262
|
-
readonly: false
|
|
264
|
+
readonly: false,
|
|
265
|
+
locked: false
|
|
263
266
|
}, true , options);
|
|
264
267
|
if (backup.meta?.orphaned) {
|
|
265
268
|
this.setOrphaned(true);
|
|
@@ -319,6 +322,7 @@ let TextFileEditorModel = class TextFileEditorModel extends BaseTextEditorModel
|
|
|
319
322
|
size: content.size,
|
|
320
323
|
etag: content.etag,
|
|
321
324
|
readonly: content.readonly,
|
|
325
|
+
locked: content.locked,
|
|
322
326
|
isFile: true,
|
|
323
327
|
isDirectory: false,
|
|
324
328
|
isSymbolicLink: false,
|
|
@@ -408,6 +412,9 @@ let TextFileEditorModel = class TextFileEditorModel extends BaseTextEditorModel
|
|
|
408
412
|
isDirty() {
|
|
409
413
|
return this.dirty;
|
|
410
414
|
}
|
|
415
|
+
isModified() {
|
|
416
|
+
return this.isDirty();
|
|
417
|
+
}
|
|
411
418
|
setDirty(dirty) {
|
|
412
419
|
if (!this.isResolved()) {
|
|
413
420
|
return;
|
|
@@ -681,7 +688,7 @@ let TextFileEditorModel = class TextFileEditorModel extends BaseTextEditorModel
|
|
|
681
688
|
return !!this.textEditorModel;
|
|
682
689
|
}
|
|
683
690
|
isReadonly() {
|
|
684
|
-
return this.
|
|
691
|
+
return this.filesConfigurationService.isReadonly(this.resource, this.lastResolvedFileStat);
|
|
685
692
|
}
|
|
686
693
|
dispose() {
|
|
687
694
|
this.trace('dispose()');
|