@codingame/monaco-vscode-api 37.1.0 → 37.2.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/missing-services.js +6 -26
- package/package.json +8 -8
- package/services.d.ts +1 -1
- package/services.js +3 -3
- package/tools.d.ts +4 -0
- package/tools.js +24 -1
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/platform/webWorker/browser/webWorkerServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +63 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +305 -0
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +1 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +1 -1
- package/vscode/src/vs/workbench/browser/media/code-icon.svg +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginSource.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatParserTypes.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.js +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/AISearch/aiSearchModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModelBase.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/folderMatch.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +4 -3
- package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.js +72 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +96 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css +1148 -0
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.d.ts +81 -0
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.js +97 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +45 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.d.ts +0 -7
- package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.js +0 -92
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.d.ts +0 -12
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +0 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.d.ts +0 -262
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +0 -865
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +0 -311
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +0 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -231
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1850
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +0 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +0 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +0 -140
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +0 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.js +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.js +0 -17
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -253
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +0 -194
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -87
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -69
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +0 -300
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +0 -272
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -178
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -78
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -51
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -294
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -212
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -955
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +0 -697
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.d.ts +0 -150
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.js +0 -142
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +0 -92
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +0 -335
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -235
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1673
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -202
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -872
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.js +0 -289
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +0 -600
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +0 -239
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +0 -143
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +0 -298
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +0 -177
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +0 -73
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +0 -577
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +0 -90
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +0 -130
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +0 -53
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +0 -92
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -518
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -231
- package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.js +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +0 -283
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.d.ts +0 -91
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +0 -340
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +0 -272
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css +0 -686
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css +0 -348
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css +0 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css +0 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditController.css +0 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditorOverlay.css +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css +0 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css +0 -102
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +0 -131
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.js +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.d.ts +0 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +0 -673
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +0 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.d.ts +0 -354
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2926
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +0 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.d.ts +0 -200
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +0 -591
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.d.ts +0 -99
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +0 -131
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +0 -115
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +0 -158
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +0 -183
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +0 -66
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +0 -429
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +0 -108
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +0 -221
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +0 -142
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +0 -104
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.d.ts +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +0 -762
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +0 -357
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +0 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.d.ts +0 -47
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +0 -260
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.js +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.d.ts +0 -182
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +0 -796
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +0 -126
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +0 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +0 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +0 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +0 -443
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +0 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.js +0 -121
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.d.ts +0 -152
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +0 -1288
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.d.ts +0 -59
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +0 -287
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.d.ts +0 -117
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.js +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.d.ts +0 -222
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +0 -1840
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.d.ts +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +0 -449
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.d.ts +0 -432
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +0 -2546
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +0 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.d.ts +0 -137
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +0 -646
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +0 -101
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.js +0 -111
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +0 -65
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +0 -49
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.d.ts +0 -89
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +0 -472
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +0 -34
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +0 -275
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.d.ts +0 -69
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +0 -269
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.d.ts +0 -125
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +0 -958
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.js +0 -101
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +0 -458
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.d.ts +0 -80
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +0 -708
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.d.ts +0 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +0 -193
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.js +0 -62
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.d.ts +0 -108
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +0 -717
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +0 -183
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +0 -134
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +0 -135
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +0 -213
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +0 -104
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.d.ts +0 -115
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +0 -480
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.d.ts +0 -87
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -352
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.d.ts +0 -81
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.js +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +0 -19
|
@@ -1,646 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Emitter } from '../../../../../base/common/event.js';
|
|
3
|
-
import { Disposable, MutableDisposable, dispose } from '../../../../../base/common/lifecycle.js';
|
|
4
|
-
import { Mimes } from '../../../../../base/common/mime.js';
|
|
5
|
-
import { Range } from '../../../../../editor/common/core/range.js';
|
|
6
|
-
import { Selection } from '../../../../../editor/common/core/selection.js';
|
|
7
|
-
import { ScrollType } from '../../../../../editor/common/editorCommon.js';
|
|
8
|
-
import { SearchParams } from '../../../../../editor/common/model/textModelSearch.js';
|
|
9
|
-
import { writeTransientState, readTransientState } from '../../../codeEditor/browser/toggleWordWrap.js';
|
|
10
|
-
import { CellEditState, CellFocusMode, CursorAtLineBoundary, CursorAtBoundary } from '../notebookBrowser.js';
|
|
11
|
-
|
|
12
|
-
class BaseCellViewModel extends Disposable {
|
|
13
|
-
get handle() {
|
|
14
|
-
return this.model.handle;
|
|
15
|
-
}
|
|
16
|
-
get uri() {
|
|
17
|
-
return this.model.uri;
|
|
18
|
-
}
|
|
19
|
-
get lineCount() {
|
|
20
|
-
return this.model.textBuffer.getLineCount();
|
|
21
|
-
}
|
|
22
|
-
get metadata() {
|
|
23
|
-
return this.model.metadata;
|
|
24
|
-
}
|
|
25
|
-
get internalMetadata() {
|
|
26
|
-
return this.model.internalMetadata;
|
|
27
|
-
}
|
|
28
|
-
get language() {
|
|
29
|
-
return this.model.language;
|
|
30
|
-
}
|
|
31
|
-
get mime() {
|
|
32
|
-
if (typeof this.model.mime === "string") {
|
|
33
|
-
return this.model.mime;
|
|
34
|
-
}
|
|
35
|
-
switch (this.language) {
|
|
36
|
-
case "markdown":
|
|
37
|
-
return Mimes.markdown;
|
|
38
|
-
default:
|
|
39
|
-
return Mimes.text;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
get lineNumbers() {
|
|
43
|
-
return this._lineNumbers;
|
|
44
|
-
}
|
|
45
|
-
set lineNumbers(lineNumbers) {
|
|
46
|
-
if (lineNumbers === this._lineNumbers) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
this._lineNumbers = lineNumbers;
|
|
50
|
-
this._onDidChangeState.fire({
|
|
51
|
-
cellLineNumberChanged: true
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
get commentOptions() {
|
|
55
|
-
return this._commentOptions;
|
|
56
|
-
}
|
|
57
|
-
set commentOptions(newOptions) {
|
|
58
|
-
this._commentOptions = newOptions;
|
|
59
|
-
}
|
|
60
|
-
get focusMode() {
|
|
61
|
-
return this._focusMode;
|
|
62
|
-
}
|
|
63
|
-
set focusMode(newMode) {
|
|
64
|
-
if (this._focusMode !== newMode) {
|
|
65
|
-
this._focusMode = newMode;
|
|
66
|
-
this._onDidChangeState.fire({
|
|
67
|
-
focusModeChanged: true
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
get editorAttached() {
|
|
72
|
-
return !!this._textEditor;
|
|
73
|
-
}
|
|
74
|
-
get textModel() {
|
|
75
|
-
return this.model.textModel;
|
|
76
|
-
}
|
|
77
|
-
hasModel() {
|
|
78
|
-
return !!this.textModel;
|
|
79
|
-
}
|
|
80
|
-
get dragging() {
|
|
81
|
-
return this._dragging;
|
|
82
|
-
}
|
|
83
|
-
set dragging(v) {
|
|
84
|
-
this._dragging = v;
|
|
85
|
-
this._onDidChangeState.fire({
|
|
86
|
-
dragStateChanged: true
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
get isInputCollapsed() {
|
|
90
|
-
return this._inputCollapsed;
|
|
91
|
-
}
|
|
92
|
-
set isInputCollapsed(v) {
|
|
93
|
-
this._inputCollapsed = v;
|
|
94
|
-
this._onDidChangeState.fire({
|
|
95
|
-
inputCollapsedChanged: true
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
get isOutputCollapsed() {
|
|
99
|
-
return this._outputCollapsed;
|
|
100
|
-
}
|
|
101
|
-
set isOutputCollapsed(v) {
|
|
102
|
-
this._outputCollapsed = v;
|
|
103
|
-
this._onDidChangeState.fire({
|
|
104
|
-
outputCollapsedChanged: true
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
set commentHeight(height) {
|
|
108
|
-
if (this._commentHeight === height) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
this._commentHeight = height;
|
|
112
|
-
this.layoutChange({
|
|
113
|
-
commentHeight: true
|
|
114
|
-
}, "BaseCellViewModel#commentHeight");
|
|
115
|
-
}
|
|
116
|
-
constructor(
|
|
117
|
-
viewType,
|
|
118
|
-
model,
|
|
119
|
-
id,
|
|
120
|
-
_viewContext,
|
|
121
|
-
_configurationService,
|
|
122
|
-
_modelService,
|
|
123
|
-
_undoRedoService,
|
|
124
|
-
_codeEditorService,
|
|
125
|
-
_inlineChatSessionService
|
|
126
|
-
) {
|
|
127
|
-
super();
|
|
128
|
-
this.viewType = viewType;
|
|
129
|
-
this.model = model;
|
|
130
|
-
this.id = id;
|
|
131
|
-
this._viewContext = _viewContext;
|
|
132
|
-
this._configurationService = _configurationService;
|
|
133
|
-
this._modelService = _modelService;
|
|
134
|
-
this._undoRedoService = _undoRedoService;
|
|
135
|
-
this._codeEditorService = _codeEditorService;
|
|
136
|
-
this._inlineChatSessionService = _inlineChatSessionService;
|
|
137
|
-
this._onDidChangeEditorAttachState = this._register(( new Emitter()));
|
|
138
|
-
this.onDidChangeEditorAttachState = this._onDidChangeEditorAttachState.event;
|
|
139
|
-
this._onDidChangeState = this._register(( new Emitter()));
|
|
140
|
-
this.onDidChangeState = this._onDidChangeState.event;
|
|
141
|
-
this._editState = CellEditState.Preview;
|
|
142
|
-
this._lineNumbers = "inherit";
|
|
143
|
-
this._focusMode = CellFocusMode.Container;
|
|
144
|
-
this._editorListeners = [];
|
|
145
|
-
this._editorViewStates = null;
|
|
146
|
-
this._editorTransientState = null;
|
|
147
|
-
this._resolvedCellDecorations = ( new Map());
|
|
148
|
-
this._textModelRefChangeDisposable = this._register(( new MutableDisposable()));
|
|
149
|
-
this._cellDecorationsChanged = this._register(( new Emitter()));
|
|
150
|
-
this.onCellDecorationsChanged = this._cellDecorationsChanged.event;
|
|
151
|
-
this._resolvedDecorations = ( new Map());
|
|
152
|
-
this._lastDecorationId = 0;
|
|
153
|
-
this._cellStatusBarItems = ( new Map());
|
|
154
|
-
this._onDidChangeCellStatusBarItems = this._register(( new Emitter()));
|
|
155
|
-
this.onDidChangeCellStatusBarItems = this._onDidChangeCellStatusBarItems.event;
|
|
156
|
-
this._lastStatusBarId = 0;
|
|
157
|
-
this._dragging = false;
|
|
158
|
-
this._inputCollapsed = false;
|
|
159
|
-
this._outputCollapsed = false;
|
|
160
|
-
this._commentHeight = 0;
|
|
161
|
-
this._isDisposed = false;
|
|
162
|
-
this._isReadonly = false;
|
|
163
|
-
this._editStateSource = "";
|
|
164
|
-
this._register(model.onDidChangeMetadata(() => {
|
|
165
|
-
this._onDidChangeState.fire({
|
|
166
|
-
metadataChanged: true
|
|
167
|
-
});
|
|
168
|
-
}));
|
|
169
|
-
this._register(model.onDidChangeInternalMetadata(e => {
|
|
170
|
-
this._onDidChangeState.fire({
|
|
171
|
-
internalMetadataChanged: true
|
|
172
|
-
});
|
|
173
|
-
if (e.lastRunSuccessChanged) {
|
|
174
|
-
this.layoutChange({});
|
|
175
|
-
}
|
|
176
|
-
}));
|
|
177
|
-
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
|
178
|
-
if (e.affectsConfiguration("notebook.lineNumbers")) {
|
|
179
|
-
this.lineNumbers = "inherit";
|
|
180
|
-
}
|
|
181
|
-
}));
|
|
182
|
-
if (this.model.collapseState?.inputCollapsed) {
|
|
183
|
-
this._inputCollapsed = true;
|
|
184
|
-
}
|
|
185
|
-
if (this.model.collapseState?.outputCollapsed) {
|
|
186
|
-
this._outputCollapsed = true;
|
|
187
|
-
}
|
|
188
|
-
this._commentOptions = this._configurationService.getValue("editor.comments", {
|
|
189
|
-
overrideIdentifier: this.language
|
|
190
|
-
});
|
|
191
|
-
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
|
192
|
-
if (e.affectsConfiguration("editor.comments")) {
|
|
193
|
-
this._commentOptions = this._configurationService.getValue("editor.comments", {
|
|
194
|
-
overrideIdentifier: this.language
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
}));
|
|
198
|
-
}
|
|
199
|
-
updateOptions(e) {
|
|
200
|
-
if (this._textEditor && typeof e.readonly === "boolean") {
|
|
201
|
-
this._textEditor.updateOptions({
|
|
202
|
-
readOnly: e.readonly
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
if (typeof e.readonly === "boolean") {
|
|
206
|
-
this._isReadonly = e.readonly;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
assertTextModelAttached() {
|
|
210
|
-
if (this.textModel && this._textEditor && this._textEditor.getModel() === this.textModel) {
|
|
211
|
-
return true;
|
|
212
|
-
}
|
|
213
|
-
return false;
|
|
214
|
-
}
|
|
215
|
-
attachTextEditor(editor, estimatedHasHorizontalScrolling) {
|
|
216
|
-
if (!editor.hasModel()) {
|
|
217
|
-
throw ( new Error("Invalid editor: model is missing"));
|
|
218
|
-
}
|
|
219
|
-
if (this._textEditor === editor) {
|
|
220
|
-
if (this._editorListeners.length === 0) {
|
|
221
|
-
this._editorListeners.push(this._textEditor.onDidChangeCursorSelection(() => {
|
|
222
|
-
this._onDidChangeState.fire({
|
|
223
|
-
selectionChanged: true
|
|
224
|
-
});
|
|
225
|
-
}));
|
|
226
|
-
this._onDidChangeState.fire({
|
|
227
|
-
selectionChanged: true
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
this._textEditor = editor;
|
|
233
|
-
if (this._isReadonly) {
|
|
234
|
-
editor.updateOptions({
|
|
235
|
-
readOnly: this._isReadonly
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
if (this._editorViewStates) {
|
|
239
|
-
this._restoreViewState(this._editorViewStates);
|
|
240
|
-
} else {
|
|
241
|
-
if (estimatedHasHorizontalScrolling) {
|
|
242
|
-
this._restoreViewState({
|
|
243
|
-
contributionsState: {},
|
|
244
|
-
cursorState: [],
|
|
245
|
-
viewState: {
|
|
246
|
-
scrollLeft: 0,
|
|
247
|
-
firstPosition: {
|
|
248
|
-
lineNumber: 1,
|
|
249
|
-
column: 1
|
|
250
|
-
},
|
|
251
|
-
firstPositionDeltaTop: this._viewContext.notebookOptions.getLayoutConfiguration().editorTopPadding
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
if (this._editorTransientState) {
|
|
257
|
-
writeTransientState(editor.getModel(), this._editorTransientState, this._codeEditorService);
|
|
258
|
-
}
|
|
259
|
-
if (this._isDisposed) {
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
editor.changeDecorations(accessor => {
|
|
263
|
-
this._resolvedDecorations.forEach((value, key) => {
|
|
264
|
-
if (key.startsWith("_lazy_")) {
|
|
265
|
-
const ret = accessor.addDecoration(value.options.range, value.options.options);
|
|
266
|
-
this._resolvedDecorations.get(key).id = ret;
|
|
267
|
-
} else {
|
|
268
|
-
const ret = accessor.addDecoration(value.options.range, value.options.options);
|
|
269
|
-
this._resolvedDecorations.get(key).id = ret;
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
});
|
|
273
|
-
this._editorListeners.push(editor.onDidChangeCursorSelection(() => {
|
|
274
|
-
this._onDidChangeState.fire({
|
|
275
|
-
selectionChanged: true
|
|
276
|
-
});
|
|
277
|
-
}));
|
|
278
|
-
this._editorListeners.push(this._inlineChatSessionService.onWillStartSession(e => {
|
|
279
|
-
if (e === this._textEditor && this.textBuffer.getLength() === 0) {
|
|
280
|
-
this.enableAutoLanguageDetection();
|
|
281
|
-
}
|
|
282
|
-
}));
|
|
283
|
-
this._onDidChangeState.fire({
|
|
284
|
-
selectionChanged: true
|
|
285
|
-
});
|
|
286
|
-
this._onDidChangeEditorAttachState.fire();
|
|
287
|
-
}
|
|
288
|
-
detachTextEditor() {
|
|
289
|
-
this.saveViewState();
|
|
290
|
-
this.saveTransientState();
|
|
291
|
-
this._textEditor?.changeDecorations(accessor => {
|
|
292
|
-
this._resolvedDecorations.forEach(value => {
|
|
293
|
-
const resolvedid = value.id;
|
|
294
|
-
if (resolvedid) {
|
|
295
|
-
accessor.removeDecoration(resolvedid);
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
|
-
this._textEditor = undefined;
|
|
300
|
-
dispose(this._editorListeners);
|
|
301
|
-
this._editorListeners = [];
|
|
302
|
-
this._onDidChangeEditorAttachState.fire();
|
|
303
|
-
if (this._textModelRef) {
|
|
304
|
-
this._textModelRef.dispose();
|
|
305
|
-
this._textModelRef = undefined;
|
|
306
|
-
}
|
|
307
|
-
this._textModelRefChangeDisposable.clear();
|
|
308
|
-
}
|
|
309
|
-
getText() {
|
|
310
|
-
return this.model.getValue();
|
|
311
|
-
}
|
|
312
|
-
getAlternativeId() {
|
|
313
|
-
return this.model.alternativeId;
|
|
314
|
-
}
|
|
315
|
-
getTextLength() {
|
|
316
|
-
return this.model.getTextLength();
|
|
317
|
-
}
|
|
318
|
-
enableAutoLanguageDetection() {
|
|
319
|
-
this.model.enableAutoLanguageDetection();
|
|
320
|
-
}
|
|
321
|
-
saveViewState() {
|
|
322
|
-
if (!this._textEditor) {
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
this._editorViewStates = this._textEditor.saveViewState();
|
|
326
|
-
}
|
|
327
|
-
saveTransientState() {
|
|
328
|
-
if (!this._textEditor || !this._textEditor.hasModel()) {
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
this._editorTransientState = readTransientState(this._textEditor.getModel(), this._codeEditorService);
|
|
332
|
-
}
|
|
333
|
-
saveEditorViewState() {
|
|
334
|
-
if (this._textEditor) {
|
|
335
|
-
this._editorViewStates = this._textEditor.saveViewState();
|
|
336
|
-
}
|
|
337
|
-
return this._editorViewStates;
|
|
338
|
-
}
|
|
339
|
-
restoreEditorViewState(editorViewStates, totalHeight) {
|
|
340
|
-
this._editorViewStates = editorViewStates;
|
|
341
|
-
}
|
|
342
|
-
_restoreViewState(state) {
|
|
343
|
-
if (state) {
|
|
344
|
-
this._textEditor?.restoreViewState(state);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
addModelDecoration(decoration) {
|
|
348
|
-
if (!this._textEditor) {
|
|
349
|
-
const id = ++this._lastDecorationId;
|
|
350
|
-
const decorationId = `_lazy_${this.id};${id}`;
|
|
351
|
-
this._resolvedDecorations.set(decorationId, {
|
|
352
|
-
options: decoration
|
|
353
|
-
});
|
|
354
|
-
return decorationId;
|
|
355
|
-
}
|
|
356
|
-
let id;
|
|
357
|
-
this._textEditor.changeDecorations(accessor => {
|
|
358
|
-
id = accessor.addDecoration(decoration.range, decoration.options);
|
|
359
|
-
this._resolvedDecorations.set(id, {
|
|
360
|
-
id,
|
|
361
|
-
options: decoration
|
|
362
|
-
});
|
|
363
|
-
});
|
|
364
|
-
return id;
|
|
365
|
-
}
|
|
366
|
-
removeModelDecoration(decorationId) {
|
|
367
|
-
const realDecorationId = this._resolvedDecorations.get(decorationId);
|
|
368
|
-
if (this._textEditor && realDecorationId && realDecorationId.id !== undefined) {
|
|
369
|
-
this._textEditor.changeDecorations(accessor => {
|
|
370
|
-
accessor.removeDecoration(realDecorationId.id);
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
this._resolvedDecorations.delete(decorationId);
|
|
374
|
-
}
|
|
375
|
-
deltaModelDecorations(oldDecorations, newDecorations) {
|
|
376
|
-
oldDecorations.forEach(id => {
|
|
377
|
-
this.removeModelDecoration(id);
|
|
378
|
-
});
|
|
379
|
-
const ret = ( newDecorations.map(option => {
|
|
380
|
-
return this.addModelDecoration(option);
|
|
381
|
-
}));
|
|
382
|
-
return ret;
|
|
383
|
-
}
|
|
384
|
-
_removeCellDecoration(decorationId) {
|
|
385
|
-
const options = this._resolvedCellDecorations.get(decorationId);
|
|
386
|
-
this._resolvedCellDecorations.delete(decorationId);
|
|
387
|
-
if (options) {
|
|
388
|
-
for (const existingOptions of ( this._resolvedCellDecorations.values())) {
|
|
389
|
-
if (options.className === existingOptions.className) {
|
|
390
|
-
options.className = undefined;
|
|
391
|
-
}
|
|
392
|
-
if (options.outputClassName === existingOptions.outputClassName) {
|
|
393
|
-
options.outputClassName = undefined;
|
|
394
|
-
}
|
|
395
|
-
if (options.gutterClassName === existingOptions.gutterClassName) {
|
|
396
|
-
options.gutterClassName = undefined;
|
|
397
|
-
}
|
|
398
|
-
if (options.topClassName === existingOptions.topClassName) {
|
|
399
|
-
options.topClassName = undefined;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
this._cellDecorationsChanged.fire({
|
|
403
|
-
added: [],
|
|
404
|
-
removed: [options]
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
_addCellDecoration(options) {
|
|
409
|
-
const id = ++this._lastDecorationId;
|
|
410
|
-
const decorationId = `_cell_${this.id};${id}`;
|
|
411
|
-
this._resolvedCellDecorations.set(decorationId, options);
|
|
412
|
-
this._cellDecorationsChanged.fire({
|
|
413
|
-
added: [options],
|
|
414
|
-
removed: []
|
|
415
|
-
});
|
|
416
|
-
return decorationId;
|
|
417
|
-
}
|
|
418
|
-
getCellDecorations() {
|
|
419
|
-
return [...( this._resolvedCellDecorations.values())];
|
|
420
|
-
}
|
|
421
|
-
getCellDecorationRange(decorationId) {
|
|
422
|
-
if (this._textEditor) {
|
|
423
|
-
return this._textEditor.getModel()?.getDecorationRange(decorationId) ?? null;
|
|
424
|
-
}
|
|
425
|
-
return null;
|
|
426
|
-
}
|
|
427
|
-
deltaCellDecorations(oldDecorations, newDecorations) {
|
|
428
|
-
oldDecorations.forEach(id => {
|
|
429
|
-
this._removeCellDecoration(id);
|
|
430
|
-
});
|
|
431
|
-
const ret = ( newDecorations.map(option => {
|
|
432
|
-
return this._addCellDecoration(option);
|
|
433
|
-
}));
|
|
434
|
-
return ret;
|
|
435
|
-
}
|
|
436
|
-
deltaCellStatusBarItems(oldItems, newItems) {
|
|
437
|
-
oldItems.forEach(id => {
|
|
438
|
-
const item = this._cellStatusBarItems.get(id);
|
|
439
|
-
if (item) {
|
|
440
|
-
this._cellStatusBarItems.delete(id);
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
const newIds = ( newItems.map(item => {
|
|
444
|
-
const id = ++this._lastStatusBarId;
|
|
445
|
-
const itemId = `_cell_${this.id};${id}`;
|
|
446
|
-
this._cellStatusBarItems.set(itemId, item);
|
|
447
|
-
return itemId;
|
|
448
|
-
}));
|
|
449
|
-
this._onDidChangeCellStatusBarItems.fire();
|
|
450
|
-
return newIds;
|
|
451
|
-
}
|
|
452
|
-
getCellStatusBarItems() {
|
|
453
|
-
return Array.from(( this._cellStatusBarItems.values()));
|
|
454
|
-
}
|
|
455
|
-
revealRangeInCenter(range) {
|
|
456
|
-
this._textEditor?.revealRangeInCenter(range, ScrollType.Immediate);
|
|
457
|
-
}
|
|
458
|
-
setSelection(range) {
|
|
459
|
-
this._textEditor?.setSelection(range);
|
|
460
|
-
}
|
|
461
|
-
setSelections(selections) {
|
|
462
|
-
if (selections.length) {
|
|
463
|
-
if (this._textEditor) {
|
|
464
|
-
this._textEditor?.setSelections(selections);
|
|
465
|
-
} else if (this._editorViewStates) {
|
|
466
|
-
this._editorViewStates.cursorState = ( selections.map(selection => {
|
|
467
|
-
return {
|
|
468
|
-
inSelectionMode: !selection.isEmpty(),
|
|
469
|
-
selectionStart: selection.getStartPosition(),
|
|
470
|
-
position: selection.getEndPosition()
|
|
471
|
-
};
|
|
472
|
-
}));
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
getSelections() {
|
|
477
|
-
return this._textEditor?.getSelections() ?? this._editorViewStates?.cursorState.map(state => ( new Selection(
|
|
478
|
-
state.selectionStart.lineNumber,
|
|
479
|
-
state.selectionStart.column,
|
|
480
|
-
state.position.lineNumber,
|
|
481
|
-
state.position.column
|
|
482
|
-
))) ?? [];
|
|
483
|
-
}
|
|
484
|
-
getSelectionsStartPosition() {
|
|
485
|
-
if (this._textEditor) {
|
|
486
|
-
const selections = this._textEditor.getSelections();
|
|
487
|
-
return selections?.map(s => s.getStartPosition());
|
|
488
|
-
} else {
|
|
489
|
-
const selections = this._editorViewStates?.cursorState;
|
|
490
|
-
return selections?.map(s => s.selectionStart);
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
getLineScrollTopOffset(line) {
|
|
494
|
-
if (!this._textEditor) {
|
|
495
|
-
return 0;
|
|
496
|
-
}
|
|
497
|
-
const editorPadding = this._viewContext.notebookOptions.computeEditorPadding(this.internalMetadata, this.uri);
|
|
498
|
-
return this._textEditor.getTopForLineNumber(line) + editorPadding.top;
|
|
499
|
-
}
|
|
500
|
-
getPositionScrollTopOffset(range) {
|
|
501
|
-
if (!this._textEditor) {
|
|
502
|
-
return 0;
|
|
503
|
-
}
|
|
504
|
-
const position = range instanceof Selection ? range.getPosition() : range.getStartPosition();
|
|
505
|
-
const editorPadding = this._viewContext.notebookOptions.computeEditorPadding(this.internalMetadata, this.uri);
|
|
506
|
-
return this._textEditor.getTopForPosition(position.lineNumber, position.column) + editorPadding.top;
|
|
507
|
-
}
|
|
508
|
-
cursorAtLineBoundary() {
|
|
509
|
-
if (!this._textEditor || !this.textModel || !this._textEditor.hasTextFocus()) {
|
|
510
|
-
return CursorAtLineBoundary.None;
|
|
511
|
-
}
|
|
512
|
-
const selection = this._textEditor.getSelection();
|
|
513
|
-
if (!selection || !selection.isEmpty()) {
|
|
514
|
-
return CursorAtLineBoundary.None;
|
|
515
|
-
}
|
|
516
|
-
const currentLineLength = this.textModel.getLineLength(selection.startLineNumber);
|
|
517
|
-
if (currentLineLength === 0) {
|
|
518
|
-
return CursorAtLineBoundary.Both;
|
|
519
|
-
}
|
|
520
|
-
switch (selection.startColumn) {
|
|
521
|
-
case 1:
|
|
522
|
-
return CursorAtLineBoundary.Start;
|
|
523
|
-
case currentLineLength + 1:
|
|
524
|
-
return CursorAtLineBoundary.End;
|
|
525
|
-
default:
|
|
526
|
-
return CursorAtLineBoundary.None;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
cursorAtBoundary() {
|
|
530
|
-
if (!this._textEditor) {
|
|
531
|
-
return CursorAtBoundary.None;
|
|
532
|
-
}
|
|
533
|
-
if (!this.textModel) {
|
|
534
|
-
return CursorAtBoundary.None;
|
|
535
|
-
}
|
|
536
|
-
const selection = this._textEditor.getSelection();
|
|
537
|
-
if (!selection || !selection.isEmpty()) {
|
|
538
|
-
return CursorAtBoundary.None;
|
|
539
|
-
}
|
|
540
|
-
const firstViewLineTop = this._textEditor.getTopForPosition(1, 1);
|
|
541
|
-
const lastViewLineTop = this._textEditor.getTopForPosition(
|
|
542
|
-
this.textModel.getLineCount(),
|
|
543
|
-
this.textModel.getLineLength(this.textModel.getLineCount())
|
|
544
|
-
);
|
|
545
|
-
const selectionTop = this._textEditor.getTopForPosition(selection.startLineNumber, selection.startColumn);
|
|
546
|
-
if (selectionTop === lastViewLineTop) {
|
|
547
|
-
if (selectionTop === firstViewLineTop) {
|
|
548
|
-
return CursorAtBoundary.Both;
|
|
549
|
-
} else {
|
|
550
|
-
return CursorAtBoundary.Bottom;
|
|
551
|
-
}
|
|
552
|
-
} else {
|
|
553
|
-
if (selectionTop === firstViewLineTop) {
|
|
554
|
-
return CursorAtBoundary.Top;
|
|
555
|
-
} else {
|
|
556
|
-
return CursorAtBoundary.None;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
get editStateSource() {
|
|
561
|
-
return this._editStateSource;
|
|
562
|
-
}
|
|
563
|
-
updateEditState(newState, source) {
|
|
564
|
-
if (newState === this._editState) {
|
|
565
|
-
return;
|
|
566
|
-
}
|
|
567
|
-
this._editStateSource = source;
|
|
568
|
-
this._editState = newState;
|
|
569
|
-
this._onDidChangeState.fire({
|
|
570
|
-
editStateChanged: true
|
|
571
|
-
});
|
|
572
|
-
if (this._editState === CellEditState.Preview) {
|
|
573
|
-
this.focusMode = CellFocusMode.Container;
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
getEditState() {
|
|
577
|
-
return this._editState;
|
|
578
|
-
}
|
|
579
|
-
get textBuffer() {
|
|
580
|
-
return this.model.textBuffer;
|
|
581
|
-
}
|
|
582
|
-
async resolveTextModel() {
|
|
583
|
-
if (!this._textModelRef || !this.textModel) {
|
|
584
|
-
this._textModelRef = await this._modelService.createModelReference(this.uri);
|
|
585
|
-
if (this._isDisposed) {
|
|
586
|
-
return this.textModel;
|
|
587
|
-
}
|
|
588
|
-
if (!this._textModelRef) {
|
|
589
|
-
throw ( new Error(`Cannot resolve text model for ${this.uri}`));
|
|
590
|
-
}
|
|
591
|
-
this._textModelRefChangeDisposable.value = this.textModel.onDidChangeContent(() => this.onDidChangeTextModelContent());
|
|
592
|
-
}
|
|
593
|
-
return this.textModel;
|
|
594
|
-
}
|
|
595
|
-
cellStartFind(value, options) {
|
|
596
|
-
let cellMatches = [];
|
|
597
|
-
const lineCount = this.textBuffer.getLineCount();
|
|
598
|
-
const findRange = options.findScope?.selectedTextRanges ?? [( new Range(1, 1, lineCount, this.textBuffer.getLineLength(lineCount) + 1))];
|
|
599
|
-
if (this.assertTextModelAttached()) {
|
|
600
|
-
cellMatches = this.textModel.findMatches(
|
|
601
|
-
value,
|
|
602
|
-
findRange,
|
|
603
|
-
options.regex || false,
|
|
604
|
-
options.caseSensitive || false,
|
|
605
|
-
options.wholeWord ? options.wordSeparators || null : null,
|
|
606
|
-
options.regex || false
|
|
607
|
-
);
|
|
608
|
-
} else {
|
|
609
|
-
const searchParams = ( new SearchParams(
|
|
610
|
-
value,
|
|
611
|
-
options.regex || false,
|
|
612
|
-
options.caseSensitive || false,
|
|
613
|
-
options.wholeWord ? options.wordSeparators || null : null
|
|
614
|
-
));
|
|
615
|
-
const searchData = searchParams.parseSearchRequest();
|
|
616
|
-
if (!searchData) {
|
|
617
|
-
return null;
|
|
618
|
-
}
|
|
619
|
-
findRange.forEach(range => {
|
|
620
|
-
cellMatches.push(...this.textBuffer.findMatchesLineByLine(( new Range(
|
|
621
|
-
range.startLineNumber,
|
|
622
|
-
range.startColumn,
|
|
623
|
-
range.endLineNumber,
|
|
624
|
-
range.endColumn
|
|
625
|
-
)), searchData, options.regex || false, 1000));
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
return cellMatches;
|
|
629
|
-
}
|
|
630
|
-
dispose() {
|
|
631
|
-
this._isDisposed = true;
|
|
632
|
-
super.dispose();
|
|
633
|
-
dispose(this._editorListeners);
|
|
634
|
-
if (this._undoRedoService.getUriComparisonKey(this.uri) === ( this.uri.toString())) {
|
|
635
|
-
this._undoRedoService.removeElements(this.uri);
|
|
636
|
-
}
|
|
637
|
-
this._textModelRef?.dispose();
|
|
638
|
-
}
|
|
639
|
-
toJSON() {
|
|
640
|
-
return {
|
|
641
|
-
handle: this.handle
|
|
642
|
-
};
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
export { BaseCellViewModel };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Event } from "../../../../../base/common/event.js";
|
|
2
|
-
import { Disposable } from "../../../../../base/common/lifecycle.js";
|
|
3
|
-
import { IEditorOptions } from "../../../../../editor/common/config/editorOptions.js";
|
|
4
|
-
import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.service.js";
|
|
5
|
-
import { IBaseCellEditorOptions, INotebookEditorDelegate } from "../notebookBrowser.js";
|
|
6
|
-
import { NotebookOptions } from "../notebookOptions.js";
|
|
7
|
-
export declare class BaseCellEditorOptions extends Disposable implements IBaseCellEditorOptions {
|
|
8
|
-
readonly notebookEditor: INotebookEditorDelegate;
|
|
9
|
-
readonly notebookOptions: NotebookOptions;
|
|
10
|
-
readonly configurationService: IConfigurationService;
|
|
11
|
-
readonly language: string;
|
|
12
|
-
private static fixedEditorOptions;
|
|
13
|
-
private readonly _localDisposableStore;
|
|
14
|
-
private readonly _onDidChange;
|
|
15
|
-
readonly onDidChange: Event<void>;
|
|
16
|
-
private _value;
|
|
17
|
-
get value(): Readonly<IEditorOptions>;
|
|
18
|
-
constructor(notebookEditor: INotebookEditorDelegate, notebookOptions: NotebookOptions, configurationService: IConfigurationService, language: string);
|
|
19
|
-
private _recomputeOptions;
|
|
20
|
-
private _computeEditorOptions;
|
|
21
|
-
}
|