@codingame/monaco-vscode-katex-common 25.1.1 → 26.0.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/package.json +2 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +23 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +64 -27
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +3 -1
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +31 -28
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +2 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +71 -50
- package/vscode/src/vs/platform/editor/browser/editor.js +17 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +112 -129
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +110 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +21 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +308 -216
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +153 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +247 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +347 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +287 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +89 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +188 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +677 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentSessionHoverWidget.css +98 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +34 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +19 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +762 -359
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +188 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +166 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +12 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +279 -213
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +382 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +128 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +153 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +1218 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +93 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +42 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +58 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +18 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +132 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +68 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +36 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +22 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +34 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +198 -135
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +38 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +29 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +41 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +23 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +20 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +291 -152
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +227 -162
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.js +68 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +76 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +96 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +74 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +107 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +814 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +34 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +8 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +236 -197
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +492 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +75 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +31 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +42 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +55 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +714 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +2 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +143 -153
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +79 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +10 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +209 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +71 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +248 -190
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +1 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPullRequestContent.css +5 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +493 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +121 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +51 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +46 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +99 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +634 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +132 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.js +15 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +196 -149
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +577 -193
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +119 -86
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +165 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +5 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +75 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +30 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +102 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +44 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +67 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +122 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +39 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +1110 -597
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +291 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +485 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +38 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +650 -689
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +21 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +102 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +1253 -790
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +51 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +102 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +16 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +192 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +11 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +99 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +188 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +129 -167
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +16 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +143 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +206 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +152 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +67 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +80 -19
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +20 -28
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +22 -19
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +122 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +19 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -1040
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +162 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +98 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +416 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +194 -215
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +74 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +45 -91
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +22 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +98 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +96 -68
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +11 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +150 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +141 -147
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +200 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +548 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.js +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +338 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +364 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +21 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +36 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +110 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +692 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +158 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +80 -21
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +440 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.js +0 -139
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +0 -1081
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +0 -199
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +0 -482
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -37
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +0 -94
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +0 -495
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +0 -454
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +0 -66
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +0 -372
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -594
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1746
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -269
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -806
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -116
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -62
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -295
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -241
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -146
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -90
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -42
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -823
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -567
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -189
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -439
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +0 -263
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +0 -48
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -89
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -108
|
@@ -1,823 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
-
import { $ as $$1, append, createElement, addStandardDisposableGenericMouseDownListener, addStandardDisposableGenericMouseUpListener, scheduleAtNextAnimationFrame } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
5
|
-
import { findLastIdx } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arraysFind';
|
|
6
|
-
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
7
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
8
|
-
import { registerThemingParticipant } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
|
|
9
|
-
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
10
|
-
import { EditorPaneSelectionCompareResult, EditorPaneSelectionChangeReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
11
|
-
import { getDefaultNotebookCreationOptions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorWidget';
|
|
12
|
-
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
13
|
-
import { SideBySideDiffElementViewModel } from './diffElementViewModel.js';
|
|
14
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
15
|
-
import { CellDiffSingleSideRenderer, CellDiffSideBySideRenderer, CellDiffPlaceholderRenderer, NotebookDocumentMetadataDiffRenderer, NotebookTextDiffList, NotebookCellTextDiffListDelegate } from './notebookDiffList.js';
|
|
16
|
-
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
17
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
|
|
18
|
-
import { foreground, focusBorder } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
|
|
19
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
20
|
-
import { editorBackground, diffDiagonalFill } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
|
|
21
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
|
|
22
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
|
|
23
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
|
|
24
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
25
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
|
|
26
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
27
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
28
|
-
import { INotebookEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service';
|
|
29
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
30
|
-
import { createBareFontInfoFromRawSettings } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/fontInfoFromSettings';
|
|
31
|
-
import { PixelRatio } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/pixelRatio';
|
|
32
|
-
import { DiffSide, DIFF_CELL_MARGIN } from './notebookDiffEditorBrowser.js';
|
|
33
|
-
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
34
|
-
import { DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
35
|
-
import { EditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
36
|
-
import { NOTEBOOK_DIFF_EDITOR_ID, NotebookSetting, CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
37
|
-
import { SequencerByKey } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
38
|
-
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
39
|
-
import { BackLayerWebView } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView';
|
|
40
|
-
import { NotebookDiffEditorEventDispatcher, NotebookDiffLayoutChangedEvent } from './eventDispatcher.js';
|
|
41
|
-
import { FontMeasurements } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/config/fontMeasurements';
|
|
42
|
-
import { NotebookOptions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookOptions';
|
|
43
|
-
import { cellIndexesToRanges, cellRangesToIndexes } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookRange';
|
|
44
|
-
import { NotebookDiffOverviewRuler } from './notebookDiffOverviewRuler.js';
|
|
45
|
-
import { registerZIndex, ZIndex } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/zIndexRegistry';
|
|
46
|
-
import { NotebookDiffViewModel } from './notebookDiffViewModel.js';
|
|
47
|
-
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
48
|
-
import { DiffEditorHeightCalculatorService } from './editorHeightCalculator.js';
|
|
49
|
-
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
50
|
-
import { NotebookInlineDiffWidget } from './inlineDiff/notebookInlineDiffWidget.js';
|
|
51
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
52
|
-
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
53
|
-
|
|
54
|
-
var NotebookTextDiffEditor_1;
|
|
55
|
-
const $ = $$1;
|
|
56
|
-
class NotebookDiffEditorSelection {
|
|
57
|
-
constructor(selections) {
|
|
58
|
-
this.selections = selections;
|
|
59
|
-
}
|
|
60
|
-
compare(other) {
|
|
61
|
-
if (!(other instanceof NotebookDiffEditorSelection)) {
|
|
62
|
-
return EditorPaneSelectionCompareResult.DIFFERENT;
|
|
63
|
-
}
|
|
64
|
-
if (this.selections.length !== other.selections.length) {
|
|
65
|
-
return EditorPaneSelectionCompareResult.DIFFERENT;
|
|
66
|
-
}
|
|
67
|
-
for (let i = 0; i < this.selections.length; i++) {
|
|
68
|
-
if (this.selections[i] !== other.selections[i]) {
|
|
69
|
-
return EditorPaneSelectionCompareResult.DIFFERENT;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return EditorPaneSelectionCompareResult.IDENTICAL;
|
|
73
|
-
}
|
|
74
|
-
restore(options) {
|
|
75
|
-
const notebookOptions = {
|
|
76
|
-
cellSelections: cellIndexesToRanges(this.selections)
|
|
77
|
-
};
|
|
78
|
-
Object.assign(notebookOptions, options);
|
|
79
|
-
return notebookOptions;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
83
|
-
static { NotebookTextDiffEditor_1 = this; }
|
|
84
|
-
static { this.ENTIRE_DIFF_OVERVIEW_WIDTH = 30; }
|
|
85
|
-
static { this.ID = NOTEBOOK_DIFF_EDITOR_ID; }
|
|
86
|
-
get textModel() {
|
|
87
|
-
return this._model?.modified.notebook;
|
|
88
|
-
}
|
|
89
|
-
get inlineNotebookEditor() {
|
|
90
|
-
if (this._inlineView) {
|
|
91
|
-
return this.inlineDiffWidget?.editorWidget;
|
|
92
|
-
}
|
|
93
|
-
return undefined;
|
|
94
|
-
}
|
|
95
|
-
get notebookOptions() {
|
|
96
|
-
return this._notebookOptions;
|
|
97
|
-
}
|
|
98
|
-
get isDisposed() {
|
|
99
|
-
return this._isDisposed;
|
|
100
|
-
}
|
|
101
|
-
constructor(group, instantiationService, themeService, contextKeyService, notebookEditorWorkerService, configurationService, telemetryService, storageService, notebookService, editorService) {
|
|
102
|
-
super(NotebookTextDiffEditor_1.ID, group, telemetryService, themeService, storageService);
|
|
103
|
-
this.instantiationService = instantiationService;
|
|
104
|
-
this.contextKeyService = contextKeyService;
|
|
105
|
-
this.notebookEditorWorkerService = notebookEditorWorkerService;
|
|
106
|
-
this.configurationService = configurationService;
|
|
107
|
-
this.notebookService = notebookService;
|
|
108
|
-
this.editorService = editorService;
|
|
109
|
-
this.creationOptions = getDefaultNotebookCreationOptions();
|
|
110
|
-
this._dimension = undefined;
|
|
111
|
-
this._modifiedWebview = null;
|
|
112
|
-
this._originalWebview = null;
|
|
113
|
-
this._webviewTransparentCover = null;
|
|
114
|
-
this._inlineView = false;
|
|
115
|
-
this._onMouseUp = this._register(( new Emitter()));
|
|
116
|
-
this.onMouseUp = this._onMouseUp.event;
|
|
117
|
-
this._onDidScroll = this._register(( new Emitter()));
|
|
118
|
-
this.onDidScroll = this._onDidScroll.event;
|
|
119
|
-
this.onDidChangeScroll = this._onDidScroll.event;
|
|
120
|
-
this._model = null;
|
|
121
|
-
this._modifiedResourceDisposableStore = this._register(( new DisposableStore()));
|
|
122
|
-
this._insetModifyQueueByOutputId = ( new SequencerByKey());
|
|
123
|
-
this._onDidDynamicOutputRendered = this._register(( new Emitter()));
|
|
124
|
-
this.onDidDynamicOutputRendered = this._onDidDynamicOutputRendered.event;
|
|
125
|
-
this._localStore = this._register(( new DisposableStore()));
|
|
126
|
-
this._onDidChangeSelection = this._register(( new Emitter()));
|
|
127
|
-
this.onDidChangeSelection = this._onDidChangeSelection.event;
|
|
128
|
-
this._isDisposed = false;
|
|
129
|
-
this._currentChangedIndex = observableValue(this, -1);
|
|
130
|
-
this.currentChangedIndex = this._currentChangedIndex;
|
|
131
|
-
this.pendingLayouts = ( new WeakMap());
|
|
132
|
-
this.diffEditorCalcuator = this.instantiationService.createInstance(DiffEditorHeightCalculatorService, this.fontInfo.lineHeight);
|
|
133
|
-
this._notebookOptions = instantiationService.createInstance(NotebookOptions, this.window, false, undefined);
|
|
134
|
-
this._register(this._notebookOptions);
|
|
135
|
-
this._revealFirst = true;
|
|
136
|
-
}
|
|
137
|
-
get fontInfo() {
|
|
138
|
-
if (!this._fontInfo) {
|
|
139
|
-
this._fontInfo = this.createFontInfo();
|
|
140
|
-
}
|
|
141
|
-
return this._fontInfo;
|
|
142
|
-
}
|
|
143
|
-
createFontInfo() {
|
|
144
|
-
const editorOptions = this.configurationService.getValue('editor');
|
|
145
|
-
return FontMeasurements.readFontInfo(this.window, createBareFontInfoFromRawSettings(editorOptions, PixelRatio.getInstance(this.window).value));
|
|
146
|
-
}
|
|
147
|
-
isOverviewRulerEnabled() {
|
|
148
|
-
return this.configurationService.getValue(NotebookSetting.diffOverviewRuler) ?? false;
|
|
149
|
-
}
|
|
150
|
-
getSelection() {
|
|
151
|
-
const selections = this._list.getFocus();
|
|
152
|
-
return ( new NotebookDiffEditorSelection(selections));
|
|
153
|
-
}
|
|
154
|
-
toggleNotebookCellSelection(cell) {
|
|
155
|
-
}
|
|
156
|
-
updatePerformanceMetadata(cellId, executionId, duration, rendererId) {
|
|
157
|
-
}
|
|
158
|
-
async focusNotebookCell(cell, focus) {
|
|
159
|
-
}
|
|
160
|
-
async focusNextNotebookCell(cell, focus) {
|
|
161
|
-
}
|
|
162
|
-
didFocusOutputInputChange(inputFocused) {
|
|
163
|
-
}
|
|
164
|
-
getScrollTop() {
|
|
165
|
-
return this._list?.scrollTop ?? 0;
|
|
166
|
-
}
|
|
167
|
-
getScrollHeight() {
|
|
168
|
-
return this._list?.scrollHeight ?? 0;
|
|
169
|
-
}
|
|
170
|
-
getScrollPosition() {
|
|
171
|
-
return {
|
|
172
|
-
scrollTop: this.getScrollTop(),
|
|
173
|
-
scrollLeft: this._list?.scrollLeft ?? 0
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
setScrollPosition(scrollPosition) {
|
|
177
|
-
if (!this._list) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
this._list.scrollTop = scrollPosition.scrollTop;
|
|
181
|
-
if (scrollPosition.scrollLeft !== undefined) {
|
|
182
|
-
this._list.scrollLeft = scrollPosition.scrollLeft;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
delegateVerticalScrollbarPointerDown(browserEvent) {
|
|
186
|
-
this._list?.delegateVerticalScrollbarPointerDown(browserEvent);
|
|
187
|
-
}
|
|
188
|
-
updateOutputHeight(cellInfo, output, outputHeight, isInit) {
|
|
189
|
-
const diffElement = cellInfo.diffElement;
|
|
190
|
-
const cell = this.getCellByInfo(cellInfo);
|
|
191
|
-
const outputIndex = cell.outputsViewModels.indexOf(output);
|
|
192
|
-
if (diffElement instanceof SideBySideDiffElementViewModel) {
|
|
193
|
-
const info = CellUri.parse(cellInfo.cellUri);
|
|
194
|
-
if (!info) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
diffElement.updateOutputHeight(( info.notebook.toString()) === this._model?.original.resource.toString() ? DiffSide.Original : DiffSide.Modified, outputIndex, outputHeight);
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
diffElement.updateOutputHeight(diffElement.type === 'insert' ? DiffSide.Modified : DiffSide.Original, outputIndex, outputHeight);
|
|
201
|
-
}
|
|
202
|
-
if (isInit) {
|
|
203
|
-
this._onDidDynamicOutputRendered.fire({ cell, output });
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
setMarkupCellEditState(cellId, editState) {
|
|
207
|
-
}
|
|
208
|
-
didStartDragMarkupCell(cellId, event) {
|
|
209
|
-
}
|
|
210
|
-
didDragMarkupCell(cellId, event) {
|
|
211
|
-
}
|
|
212
|
-
didEndDragMarkupCell(cellId) {
|
|
213
|
-
}
|
|
214
|
-
didDropMarkupCell(cellId) {
|
|
215
|
-
}
|
|
216
|
-
didResizeOutput(cellId) {
|
|
217
|
-
}
|
|
218
|
-
async toggleInlineView() {
|
|
219
|
-
this._layoutCancellationTokenSource?.dispose();
|
|
220
|
-
this._inlineView = !this._inlineView;
|
|
221
|
-
if (!this._lastLayoutProperties) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
if (this._inlineView) {
|
|
225
|
-
this.layout(this._lastLayoutProperties?.dimension, this._lastLayoutProperties?.position);
|
|
226
|
-
this.inlineDiffWidget?.show(this.input, this._model?.modified.notebook, this._model?.original.notebook, this._options);
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
this.layout(this._lastLayoutProperties?.dimension, this._lastLayoutProperties?.position);
|
|
230
|
-
this.inlineDiffWidget?.hide();
|
|
231
|
-
}
|
|
232
|
-
this._layoutCancellationTokenSource = ( new CancellationTokenSource());
|
|
233
|
-
this.updateLayout(this._layoutCancellationTokenSource.token);
|
|
234
|
-
}
|
|
235
|
-
createEditor(parent) {
|
|
236
|
-
this._rootElement = append(parent, $$1('.notebook-text-diff-editor'));
|
|
237
|
-
this._overflowContainer = createElement('div');
|
|
238
|
-
this._overflowContainer.classList.add('notebook-overflow-widget-container', 'monaco-editor');
|
|
239
|
-
append(parent, this._overflowContainer);
|
|
240
|
-
const renderers = [
|
|
241
|
-
this.instantiationService.createInstance(CellDiffSingleSideRenderer, this),
|
|
242
|
-
this.instantiationService.createInstance(CellDiffSideBySideRenderer, this),
|
|
243
|
-
this.instantiationService.createInstance(CellDiffPlaceholderRenderer, this),
|
|
244
|
-
this.instantiationService.createInstance(NotebookDocumentMetadataDiffRenderer, this),
|
|
245
|
-
];
|
|
246
|
-
this._listViewContainer = append(this._rootElement, $$1('.notebook-diff-list-view'));
|
|
247
|
-
this._list = this.instantiationService.createInstance(NotebookTextDiffList, 'NotebookTextDiff', this._listViewContainer, this.instantiationService.createInstance(NotebookCellTextDiffListDelegate, this.window), renderers, this.contextKeyService, {
|
|
248
|
-
setRowLineHeight: false,
|
|
249
|
-
setRowHeight: false,
|
|
250
|
-
supportDynamicHeights: true,
|
|
251
|
-
horizontalScrolling: false,
|
|
252
|
-
keyboardSupport: false,
|
|
253
|
-
mouseSupport: true,
|
|
254
|
-
multipleSelectionSupport: false,
|
|
255
|
-
typeNavigationEnabled: true,
|
|
256
|
-
paddingBottom: 0,
|
|
257
|
-
styleController: (_suffix) => { return this._list; },
|
|
258
|
-
overrideStyles: {
|
|
259
|
-
listBackground: editorBackground,
|
|
260
|
-
listActiveSelectionBackground: editorBackground,
|
|
261
|
-
listActiveSelectionForeground: foreground,
|
|
262
|
-
listFocusAndSelectionBackground: editorBackground,
|
|
263
|
-
listFocusAndSelectionForeground: foreground,
|
|
264
|
-
listFocusBackground: editorBackground,
|
|
265
|
-
listFocusForeground: foreground,
|
|
266
|
-
listHoverForeground: foreground,
|
|
267
|
-
listHoverBackground: editorBackground,
|
|
268
|
-
listHoverOutline: focusBorder,
|
|
269
|
-
listFocusOutline: focusBorder,
|
|
270
|
-
listInactiveSelectionBackground: editorBackground,
|
|
271
|
-
listInactiveSelectionForeground: foreground,
|
|
272
|
-
listInactiveFocusBackground: editorBackground,
|
|
273
|
-
listInactiveFocusOutline: editorBackground,
|
|
274
|
-
},
|
|
275
|
-
accessibilityProvider: {
|
|
276
|
-
getAriaLabel() { return null; },
|
|
277
|
-
getWidgetAriaLabel() {
|
|
278
|
-
return localize(9497, "Notebook Text Diff");
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
});
|
|
282
|
-
this.inlineDiffWidget = this._register(this.instantiationService.createInstance(NotebookInlineDiffWidget, this._rootElement, this.group.id, this.window, this.notebookOptions, this._dimension));
|
|
283
|
-
this._register(this._list);
|
|
284
|
-
this._register(this._list.onMouseUp(e => {
|
|
285
|
-
if (e.element) {
|
|
286
|
-
if (typeof e.index === 'number') {
|
|
287
|
-
this._list.setFocus([e.index]);
|
|
288
|
-
}
|
|
289
|
-
this._onMouseUp.fire({ event: e.browserEvent, target: e.element });
|
|
290
|
-
}
|
|
291
|
-
}));
|
|
292
|
-
this._register(this._list.onDidScroll(() => {
|
|
293
|
-
this._onDidScroll.fire();
|
|
294
|
-
}));
|
|
295
|
-
this._register(this._list.onDidChangeFocus(() => this._onDidChangeSelection.fire({ reason: EditorPaneSelectionChangeReason.USER })));
|
|
296
|
-
this._overviewRulerContainer = createElement('div');
|
|
297
|
-
this._overviewRulerContainer.classList.add('notebook-overview-ruler-container');
|
|
298
|
-
this._rootElement.appendChild(this._overviewRulerContainer);
|
|
299
|
-
this._registerOverviewRuler();
|
|
300
|
-
this._webviewTransparentCover = append(this._list.rowsContainer, $('.webview-cover'));
|
|
301
|
-
this._webviewTransparentCover.style.display = 'none';
|
|
302
|
-
this._register(addStandardDisposableGenericMouseDownListener(this._overflowContainer, (e) => {
|
|
303
|
-
if (e.target.classList.contains('slider') && this._webviewTransparentCover) {
|
|
304
|
-
this._webviewTransparentCover.style.display = 'block';
|
|
305
|
-
}
|
|
306
|
-
}));
|
|
307
|
-
this._register(addStandardDisposableGenericMouseUpListener(this._overflowContainer, () => {
|
|
308
|
-
if (this._webviewTransparentCover) {
|
|
309
|
-
this._webviewTransparentCover.style.display = 'none';
|
|
310
|
-
}
|
|
311
|
-
}));
|
|
312
|
-
this._register(this._list.onDidScroll(e => {
|
|
313
|
-
this._webviewTransparentCover.style.top = `${e.scrollTop}px`;
|
|
314
|
-
}));
|
|
315
|
-
}
|
|
316
|
-
_registerOverviewRuler() {
|
|
317
|
-
this._overviewRuler = this._register(this.instantiationService.createInstance(NotebookDiffOverviewRuler, this, NotebookTextDiffEditor_1.ENTIRE_DIFF_OVERVIEW_WIDTH, this._overviewRulerContainer));
|
|
318
|
-
}
|
|
319
|
-
_updateOutputsOffsetsInWebview(scrollTop, scrollHeight, activeWebview, getActiveNestedCell, diffSide) {
|
|
320
|
-
activeWebview.element.style.height = `${scrollHeight}px`;
|
|
321
|
-
if (activeWebview.insetMapping) {
|
|
322
|
-
const updateItems = [];
|
|
323
|
-
const removedItems = [];
|
|
324
|
-
activeWebview.insetMapping.forEach((value, key) => {
|
|
325
|
-
const cell = getActiveNestedCell(value.cellInfo.diffElement);
|
|
326
|
-
if (!cell) {
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
const viewIndex = this._list.indexOf(value.cellInfo.diffElement);
|
|
330
|
-
if (viewIndex === undefined) {
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
if (cell.outputsViewModels.indexOf(key) < 0) {
|
|
334
|
-
removedItems.push(key);
|
|
335
|
-
}
|
|
336
|
-
else {
|
|
337
|
-
const cellTop = this._list.getCellViewScrollTop(value.cellInfo.diffElement);
|
|
338
|
-
const outputIndex = cell.outputsViewModels.indexOf(key);
|
|
339
|
-
const outputOffset = value.cellInfo.diffElement.getOutputOffsetInCell(diffSide, outputIndex);
|
|
340
|
-
updateItems.push({
|
|
341
|
-
cell,
|
|
342
|
-
output: key,
|
|
343
|
-
cellTop: cellTop,
|
|
344
|
-
outputOffset: outputOffset,
|
|
345
|
-
forceDisplay: false
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
activeWebview.removeInsets(removedItems);
|
|
350
|
-
if (updateItems.length) {
|
|
351
|
-
activeWebview.updateScrollTops(updateItems, []);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
async setInput(input, options, context, token) {
|
|
356
|
-
this.inlineDiffWidget?.hide();
|
|
357
|
-
await super.setInput(input, options, context, token);
|
|
358
|
-
const model = await input.resolve();
|
|
359
|
-
if (this._model !== model) {
|
|
360
|
-
this._detachModel();
|
|
361
|
-
this._attachModel(model);
|
|
362
|
-
}
|
|
363
|
-
this._model = model;
|
|
364
|
-
if (this._model === null) {
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
if (this._inlineView) {
|
|
368
|
-
this._listViewContainer.style.display = 'none';
|
|
369
|
-
this.inlineDiffWidget?.show(input, model.modified.notebook, model.original.notebook, options);
|
|
370
|
-
}
|
|
371
|
-
else {
|
|
372
|
-
this._listViewContainer.style.display = 'block';
|
|
373
|
-
this.inlineDiffWidget?.hide();
|
|
374
|
-
}
|
|
375
|
-
this._revealFirst = true;
|
|
376
|
-
this._modifiedResourceDisposableStore.clear();
|
|
377
|
-
this._layoutCancellationTokenSource = ( new CancellationTokenSource());
|
|
378
|
-
this._modifiedResourceDisposableStore.add(Event.any(this._model.original.notebook.onDidChangeContent, this._model.modified.notebook.onDidChangeContent)(e => {
|
|
379
|
-
if (this._model !== null && this.editorService.activeEditor !== input) {
|
|
380
|
-
this._layoutCancellationTokenSource?.dispose();
|
|
381
|
-
this._layoutCancellationTokenSource = ( new CancellationTokenSource());
|
|
382
|
-
this.updateLayout(this._layoutCancellationTokenSource.token);
|
|
383
|
-
}
|
|
384
|
-
}));
|
|
385
|
-
await this._createOriginalWebview(generateUuid(), this._model.original.viewType, this._model.original.resource);
|
|
386
|
-
if (this._originalWebview) {
|
|
387
|
-
this._modifiedResourceDisposableStore.add(this._originalWebview);
|
|
388
|
-
}
|
|
389
|
-
await this._createModifiedWebview(generateUuid(), this._model.modified.viewType, this._model.modified.resource);
|
|
390
|
-
if (this._modifiedWebview) {
|
|
391
|
-
this._modifiedResourceDisposableStore.add(this._modifiedWebview);
|
|
392
|
-
}
|
|
393
|
-
await this.updateLayout(this._layoutCancellationTokenSource.token, options?.cellSelections ? cellRangesToIndexes(options.cellSelections) : undefined);
|
|
394
|
-
}
|
|
395
|
-
setVisible(visible) {
|
|
396
|
-
super.setVisible(visible);
|
|
397
|
-
if (!visible) {
|
|
398
|
-
this.inlineDiffWidget?.hide();
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
_detachModel() {
|
|
402
|
-
this._localStore.clear();
|
|
403
|
-
this._originalWebview?.dispose();
|
|
404
|
-
this._originalWebview?.element.remove();
|
|
405
|
-
this._originalWebview = null;
|
|
406
|
-
this._modifiedWebview?.dispose();
|
|
407
|
-
this._modifiedWebview?.element.remove();
|
|
408
|
-
this._modifiedWebview = null;
|
|
409
|
-
this.notebookDiffViewModel?.dispose();
|
|
410
|
-
this.notebookDiffViewModel = undefined;
|
|
411
|
-
this._modifiedResourceDisposableStore.clear();
|
|
412
|
-
this._list.clear();
|
|
413
|
-
}
|
|
414
|
-
_attachModel(model) {
|
|
415
|
-
this._model = model;
|
|
416
|
-
this._eventDispatcher = ( new NotebookDiffEditorEventDispatcher());
|
|
417
|
-
const updateInsets = () => {
|
|
418
|
-
scheduleAtNextAnimationFrame(this.window, () => {
|
|
419
|
-
if (this._isDisposed) {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
if (this._modifiedWebview) {
|
|
423
|
-
this._updateOutputsOffsetsInWebview(this._list.scrollTop, this._list.scrollHeight, this._modifiedWebview, (diffElement) => {
|
|
424
|
-
return diffElement.modified;
|
|
425
|
-
}, DiffSide.Modified);
|
|
426
|
-
}
|
|
427
|
-
if (this._originalWebview) {
|
|
428
|
-
this._updateOutputsOffsetsInWebview(this._list.scrollTop, this._list.scrollHeight, this._originalWebview, (diffElement) => {
|
|
429
|
-
return diffElement.original;
|
|
430
|
-
}, DiffSide.Original);
|
|
431
|
-
}
|
|
432
|
-
});
|
|
433
|
-
};
|
|
434
|
-
this._localStore.add(this._list.onDidChangeContentHeight(() => {
|
|
435
|
-
updateInsets();
|
|
436
|
-
}));
|
|
437
|
-
this._localStore.add(this._list.onDidChangeFocus((e) => {
|
|
438
|
-
if (e.indexes.length && this.notebookDiffViewModel && e.indexes[0] < this.notebookDiffViewModel.items.length) {
|
|
439
|
-
const selectedItem = this.notebookDiffViewModel.items[e.indexes[0]];
|
|
440
|
-
const changedItems = this.notebookDiffViewModel.items.filter(item => item.type !== 'unchanged' && item.type !== 'unchangedMetadata' && item.type !== 'placeholder');
|
|
441
|
-
if (selectedItem && selectedItem?.type !== 'placeholder' && selectedItem?.type !== 'unchanged' && selectedItem?.type !== 'unchangedMetadata') {
|
|
442
|
-
return this._currentChangedIndex.set(changedItems.indexOf(selectedItem), undefined);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
return this._currentChangedIndex.set(-1, undefined);
|
|
446
|
-
}));
|
|
447
|
-
this._localStore.add(this._eventDispatcher.onDidChangeCellLayout(() => {
|
|
448
|
-
updateInsets();
|
|
449
|
-
}));
|
|
450
|
-
const vm = this.notebookDiffViewModel = this._register(( new NotebookDiffViewModel(
|
|
451
|
-
this._model,
|
|
452
|
-
this.notebookEditorWorkerService,
|
|
453
|
-
this.configurationService,
|
|
454
|
-
this._eventDispatcher,
|
|
455
|
-
this.notebookService,
|
|
456
|
-
this.diffEditorCalcuator,
|
|
457
|
-
this.fontInfo,
|
|
458
|
-
undefined
|
|
459
|
-
)));
|
|
460
|
-
this._localStore.add(this.notebookDiffViewModel.onDidChangeItems(e => {
|
|
461
|
-
this._originalWebview?.removeInsets([...this._originalWebview?.insetMapping.keys()]);
|
|
462
|
-
this._modifiedWebview?.removeInsets([...this._modifiedWebview?.insetMapping.keys()]);
|
|
463
|
-
if (this._revealFirst && typeof e.firstChangeIndex === 'number' && e.firstChangeIndex > -1 && e.firstChangeIndex < this._list.length) {
|
|
464
|
-
this._revealFirst = false;
|
|
465
|
-
this._list.setFocus([e.firstChangeIndex]);
|
|
466
|
-
this._list.reveal(e.firstChangeIndex, 0.3);
|
|
467
|
-
}
|
|
468
|
-
this._list.splice(e.start, e.deleteCount, e.elements);
|
|
469
|
-
if (this.isOverviewRulerEnabled()) {
|
|
470
|
-
this._overviewRuler.updateViewModels(vm.items, this._eventDispatcher);
|
|
471
|
-
}
|
|
472
|
-
}));
|
|
473
|
-
}
|
|
474
|
-
async _createModifiedWebview(id, viewType, resource) {
|
|
475
|
-
this._modifiedWebview?.dispose();
|
|
476
|
-
this._modifiedWebview = this.instantiationService.createInstance(BackLayerWebView, this, id, viewType, resource, {
|
|
477
|
-
...this._notebookOptions.computeDiffWebviewOptions(),
|
|
478
|
-
fontFamily: this._generateFontFamily()
|
|
479
|
-
}, undefined);
|
|
480
|
-
this._list.rowsContainer.insertAdjacentElement('afterbegin', this._modifiedWebview.element);
|
|
481
|
-
this._modifiedWebview.createWebview(this.window);
|
|
482
|
-
this._modifiedWebview.element.style.width = `calc(50% - 16px)`;
|
|
483
|
-
this._modifiedWebview.element.style.left = `calc(50%)`;
|
|
484
|
-
}
|
|
485
|
-
_generateFontFamily() {
|
|
486
|
-
return this.fontInfo.fontFamily ?? `"SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace`;
|
|
487
|
-
}
|
|
488
|
-
async _createOriginalWebview(id, viewType, resource) {
|
|
489
|
-
this._originalWebview?.dispose();
|
|
490
|
-
this._originalWebview = this.instantiationService.createInstance(BackLayerWebView, this, id, viewType, resource, {
|
|
491
|
-
...this._notebookOptions.computeDiffWebviewOptions(),
|
|
492
|
-
fontFamily: this._generateFontFamily()
|
|
493
|
-
}, undefined);
|
|
494
|
-
this._list.rowsContainer.insertAdjacentElement('afterbegin', this._originalWebview.element);
|
|
495
|
-
this._originalWebview.createWebview(this.window);
|
|
496
|
-
this._originalWebview.element.style.width = `calc(50% - 16px)`;
|
|
497
|
-
this._originalWebview.element.style.left = `16px`;
|
|
498
|
-
}
|
|
499
|
-
setOptions(options) {
|
|
500
|
-
const selections = options?.cellSelections ? cellRangesToIndexes(options.cellSelections) : undefined;
|
|
501
|
-
if (selections) {
|
|
502
|
-
this._list.setFocus(selections);
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
async updateLayout(token, selections) {
|
|
506
|
-
if (!this._model || !this.notebookDiffViewModel) {
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
await this.notebookDiffViewModel.computeDiff(token);
|
|
510
|
-
if (token.isCancellationRequested) {
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
if (selections) {
|
|
514
|
-
this._list.setFocus(selections);
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
scheduleOutputHeightAck(cellInfo, outputId, height) {
|
|
518
|
-
const diffElement = cellInfo.diffElement;
|
|
519
|
-
let diffSide = DiffSide.Original;
|
|
520
|
-
if (diffElement instanceof SideBySideDiffElementViewModel) {
|
|
521
|
-
const info = CellUri.parse(cellInfo.cellUri);
|
|
522
|
-
if (!info) {
|
|
523
|
-
return;
|
|
524
|
-
}
|
|
525
|
-
diffSide = ( info.notebook.toString()) === this._model?.original.resource.toString() ? DiffSide.Original : DiffSide.Modified;
|
|
526
|
-
}
|
|
527
|
-
else {
|
|
528
|
-
diffSide = diffElement.type === 'insert' ? DiffSide.Modified : DiffSide.Original;
|
|
529
|
-
}
|
|
530
|
-
const webview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
|
|
531
|
-
scheduleAtNextAnimationFrame(this.window, () => {
|
|
532
|
-
webview?.ackHeight([{ cellId: cellInfo.cellId, outputId, height }]);
|
|
533
|
-
}, 10);
|
|
534
|
-
}
|
|
535
|
-
layoutNotebookCell(cell, height) {
|
|
536
|
-
const relayout = (cell, height) => {
|
|
537
|
-
this._list.updateElementHeight2(cell, height);
|
|
538
|
-
};
|
|
539
|
-
let disposable = this.pendingLayouts.get(cell);
|
|
540
|
-
if (disposable) {
|
|
541
|
-
this._localStore.delete(disposable);
|
|
542
|
-
}
|
|
543
|
-
let r;
|
|
544
|
-
const layoutDisposable = scheduleAtNextAnimationFrame(this.window, () => {
|
|
545
|
-
this.pendingLayouts.delete(cell);
|
|
546
|
-
relayout(cell, height);
|
|
547
|
-
r();
|
|
548
|
-
});
|
|
549
|
-
disposable = toDisposable(() => {
|
|
550
|
-
layoutDisposable.dispose();
|
|
551
|
-
r();
|
|
552
|
-
});
|
|
553
|
-
this._localStore.add(disposable);
|
|
554
|
-
this.pendingLayouts.set(cell, disposable);
|
|
555
|
-
return ( new Promise(resolve => { r = resolve; }));
|
|
556
|
-
}
|
|
557
|
-
setScrollTop(scrollTop) {
|
|
558
|
-
this._list.scrollTop = scrollTop;
|
|
559
|
-
}
|
|
560
|
-
triggerScroll(event) {
|
|
561
|
-
this._list.triggerScrollFromMouseWheelEvent(event);
|
|
562
|
-
}
|
|
563
|
-
firstChange() {
|
|
564
|
-
if (!this.notebookDiffViewModel) {
|
|
565
|
-
return;
|
|
566
|
-
}
|
|
567
|
-
const currentViewModels = this.notebookDiffViewModel.items;
|
|
568
|
-
const index = currentViewModels.findIndex(vm => vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder');
|
|
569
|
-
if (index >= 0) {
|
|
570
|
-
this._list.setFocus([index]);
|
|
571
|
-
this._list.reveal(index);
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
lastChange() {
|
|
575
|
-
if (!this.notebookDiffViewModel) {
|
|
576
|
-
return;
|
|
577
|
-
}
|
|
578
|
-
const currentViewModels = this.notebookDiffViewModel.items;
|
|
579
|
-
const item = currentViewModels.slice().reverse().find(vm => vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder');
|
|
580
|
-
const index = item ? currentViewModels.indexOf(item) : -1;
|
|
581
|
-
if (index >= 0) {
|
|
582
|
-
this._list.setFocus([index]);
|
|
583
|
-
this._list.reveal(index);
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
previousChange() {
|
|
587
|
-
if (!this.notebookDiffViewModel) {
|
|
588
|
-
return;
|
|
589
|
-
}
|
|
590
|
-
let currFocus = this._list.getFocus()[0];
|
|
591
|
-
if (isNaN(currFocus) || currFocus < 0) {
|
|
592
|
-
currFocus = 0;
|
|
593
|
-
}
|
|
594
|
-
let prevChangeIndex = currFocus - 1;
|
|
595
|
-
const currentViewModels = this.notebookDiffViewModel.items;
|
|
596
|
-
while (prevChangeIndex >= 0) {
|
|
597
|
-
const vm = currentViewModels[prevChangeIndex];
|
|
598
|
-
if (vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder') {
|
|
599
|
-
break;
|
|
600
|
-
}
|
|
601
|
-
prevChangeIndex--;
|
|
602
|
-
}
|
|
603
|
-
if (prevChangeIndex >= 0) {
|
|
604
|
-
this._list.setFocus([prevChangeIndex]);
|
|
605
|
-
this._list.reveal(prevChangeIndex);
|
|
606
|
-
}
|
|
607
|
-
else {
|
|
608
|
-
const index = findLastIdx(currentViewModels, vm => vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder');
|
|
609
|
-
if (index >= 0) {
|
|
610
|
-
this._list.setFocus([index]);
|
|
611
|
-
this._list.reveal(index);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
nextChange() {
|
|
616
|
-
if (!this.notebookDiffViewModel) {
|
|
617
|
-
return;
|
|
618
|
-
}
|
|
619
|
-
let currFocus = this._list.getFocus()[0];
|
|
620
|
-
if (isNaN(currFocus) || currFocus < 0) {
|
|
621
|
-
currFocus = 0;
|
|
622
|
-
}
|
|
623
|
-
let nextChangeIndex = currFocus + 1;
|
|
624
|
-
const currentViewModels = this.notebookDiffViewModel.items;
|
|
625
|
-
while (nextChangeIndex < currentViewModels.length) {
|
|
626
|
-
const vm = currentViewModels[nextChangeIndex];
|
|
627
|
-
if (vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder') {
|
|
628
|
-
break;
|
|
629
|
-
}
|
|
630
|
-
nextChangeIndex++;
|
|
631
|
-
}
|
|
632
|
-
if (nextChangeIndex < currentViewModels.length) {
|
|
633
|
-
this._list.setFocus([nextChangeIndex]);
|
|
634
|
-
this._list.reveal(nextChangeIndex);
|
|
635
|
-
}
|
|
636
|
-
else {
|
|
637
|
-
const index = currentViewModels.findIndex(vm => vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder');
|
|
638
|
-
if (index >= 0) {
|
|
639
|
-
this._list.setFocus([index]);
|
|
640
|
-
this._list.reveal(index);
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
createOutput(cellDiffViewModel, cellViewModel, output, getOffset, diffSide) {
|
|
645
|
-
this._insetModifyQueueByOutputId.queue(output.source.model.outputId + (diffSide === DiffSide.Modified ? '-right' : 'left'), async () => {
|
|
646
|
-
const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
|
|
647
|
-
if (!activeWebview) {
|
|
648
|
-
return;
|
|
649
|
-
}
|
|
650
|
-
if (!( activeWebview.insetMapping.has(output.source))) {
|
|
651
|
-
const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
|
|
652
|
-
await activeWebview.createOutput({ diffElement: cellDiffViewModel, cellHandle: cellViewModel.handle, cellId: cellViewModel.id, cellUri: cellViewModel.uri }, output, cellTop, getOffset());
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
655
|
-
const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
|
|
656
|
-
const outputIndex = cellViewModel.outputsViewModels.indexOf(output.source);
|
|
657
|
-
const outputOffset = cellDiffViewModel.getOutputOffsetInCell(diffSide, outputIndex);
|
|
658
|
-
activeWebview.updateScrollTops([{
|
|
659
|
-
cell: cellViewModel,
|
|
660
|
-
output: output.source,
|
|
661
|
-
cellTop,
|
|
662
|
-
outputOffset,
|
|
663
|
-
forceDisplay: true
|
|
664
|
-
}], []);
|
|
665
|
-
}
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
updateMarkupCellHeight() {
|
|
669
|
-
}
|
|
670
|
-
getCellByInfo(cellInfo) {
|
|
671
|
-
return cellInfo.diffElement.getCellByUri(cellInfo.cellUri);
|
|
672
|
-
}
|
|
673
|
-
getCellById(cellId) {
|
|
674
|
-
throw ( new Error('Not implemented'));
|
|
675
|
-
}
|
|
676
|
-
removeInset(cellDiffViewModel, cellViewModel, displayOutput, diffSide) {
|
|
677
|
-
this._insetModifyQueueByOutputId.queue(displayOutput.model.outputId + (diffSide === DiffSide.Modified ? '-right' : 'left'), async () => {
|
|
678
|
-
const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
|
|
679
|
-
if (!activeWebview) {
|
|
680
|
-
return;
|
|
681
|
-
}
|
|
682
|
-
if (!( activeWebview.insetMapping.has(displayOutput))) {
|
|
683
|
-
return;
|
|
684
|
-
}
|
|
685
|
-
activeWebview.removeInsets([displayOutput]);
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
showInset(cellDiffViewModel, cellViewModel, displayOutput, diffSide) {
|
|
689
|
-
this._insetModifyQueueByOutputId.queue(displayOutput.model.outputId + (diffSide === DiffSide.Modified ? '-right' : 'left'), async () => {
|
|
690
|
-
const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
|
|
691
|
-
if (!activeWebview) {
|
|
692
|
-
return;
|
|
693
|
-
}
|
|
694
|
-
if (!( activeWebview.insetMapping.has(displayOutput))) {
|
|
695
|
-
return;
|
|
696
|
-
}
|
|
697
|
-
const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
|
|
698
|
-
const outputIndex = cellViewModel.outputsViewModels.indexOf(displayOutput);
|
|
699
|
-
const outputOffset = cellDiffViewModel.getOutputOffsetInCell(diffSide, outputIndex);
|
|
700
|
-
activeWebview.updateScrollTops([{
|
|
701
|
-
cell: cellViewModel,
|
|
702
|
-
output: displayOutput,
|
|
703
|
-
cellTop,
|
|
704
|
-
outputOffset,
|
|
705
|
-
forceDisplay: true,
|
|
706
|
-
}], []);
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
hideInset(cellDiffViewModel, cellViewModel, output) {
|
|
710
|
-
this._modifiedWebview?.hideInset(output);
|
|
711
|
-
this._originalWebview?.hideInset(output);
|
|
712
|
-
}
|
|
713
|
-
getDomNode() {
|
|
714
|
-
return this._rootElement;
|
|
715
|
-
}
|
|
716
|
-
getOverflowContainerDomNode() {
|
|
717
|
-
return this._overflowContainer;
|
|
718
|
-
}
|
|
719
|
-
getControl() {
|
|
720
|
-
return this;
|
|
721
|
-
}
|
|
722
|
-
clearInput() {
|
|
723
|
-
this.inlineDiffWidget?.hide();
|
|
724
|
-
super.clearInput();
|
|
725
|
-
this._modifiedResourceDisposableStore.clear();
|
|
726
|
-
this._list?.splice(0, this._list?.length || 0);
|
|
727
|
-
this._model = null;
|
|
728
|
-
this.notebookDiffViewModel?.dispose();
|
|
729
|
-
this.notebookDiffViewModel = undefined;
|
|
730
|
-
}
|
|
731
|
-
deltaCellOutputContainerClassNames(diffSide, cellId, added, removed) {
|
|
732
|
-
if (diffSide === DiffSide.Original) {
|
|
733
|
-
this._originalWebview?.deltaCellOutputContainerClassNames(cellId, added, removed);
|
|
734
|
-
}
|
|
735
|
-
else {
|
|
736
|
-
this._modifiedWebview?.deltaCellOutputContainerClassNames(cellId, added, removed);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
getLayoutInfo() {
|
|
740
|
-
if (!this._list) {
|
|
741
|
-
throw ( new Error('Editor is not initalized successfully'));
|
|
742
|
-
}
|
|
743
|
-
return {
|
|
744
|
-
width: this._dimension.width,
|
|
745
|
-
height: this._dimension.height,
|
|
746
|
-
fontInfo: this.fontInfo,
|
|
747
|
-
scrollHeight: this._list?.getScrollHeight() ?? 0,
|
|
748
|
-
stickyHeight: 0,
|
|
749
|
-
listViewOffsetTop: 0,
|
|
750
|
-
};
|
|
751
|
-
}
|
|
752
|
-
layout(dimension, position) {
|
|
753
|
-
this._rootElement.classList.toggle('mid-width', dimension.width < 1000 && dimension.width >= 600);
|
|
754
|
-
this._rootElement.classList.toggle('narrow-width', dimension.width < 600);
|
|
755
|
-
const overviewRulerEnabled = this.isOverviewRulerEnabled();
|
|
756
|
-
this._dimension = dimension.with(dimension.width - (overviewRulerEnabled ? NotebookTextDiffEditor_1.ENTIRE_DIFF_OVERVIEW_WIDTH : 0));
|
|
757
|
-
this._listViewContainer.style.height = `${dimension.height}px`;
|
|
758
|
-
this._listViewContainer.style.width = `${this._dimension.width}px`;
|
|
759
|
-
if (this._inlineView) {
|
|
760
|
-
this._listViewContainer.style.display = 'none';
|
|
761
|
-
this.inlineDiffWidget?.setLayout(dimension, position);
|
|
762
|
-
}
|
|
763
|
-
else {
|
|
764
|
-
this.inlineDiffWidget?.hide();
|
|
765
|
-
this._listViewContainer.style.display = 'block';
|
|
766
|
-
this._list?.layout(this._dimension.height, this._dimension.width);
|
|
767
|
-
if (this._modifiedWebview) {
|
|
768
|
-
this._modifiedWebview.element.style.width = `calc(50% - 16px)`;
|
|
769
|
-
this._modifiedWebview.element.style.left = `calc(50%)`;
|
|
770
|
-
}
|
|
771
|
-
if (this._originalWebview) {
|
|
772
|
-
this._originalWebview.element.style.width = `calc(50% - 16px)`;
|
|
773
|
-
this._originalWebview.element.style.left = `16px`;
|
|
774
|
-
}
|
|
775
|
-
if (this._webviewTransparentCover) {
|
|
776
|
-
this._webviewTransparentCover.style.height = `${this._dimension.height}px`;
|
|
777
|
-
this._webviewTransparentCover.style.width = `${this._dimension.width}px`;
|
|
778
|
-
}
|
|
779
|
-
if (overviewRulerEnabled) {
|
|
780
|
-
this._overviewRuler.layout();
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
this._lastLayoutProperties = { dimension, position };
|
|
784
|
-
this._eventDispatcher?.emit([( new NotebookDiffLayoutChangedEvent({ width: true, fontInfo: true }, this.getLayoutInfo()))]);
|
|
785
|
-
}
|
|
786
|
-
dispose() {
|
|
787
|
-
this._isDisposed = true;
|
|
788
|
-
this._layoutCancellationTokenSource?.dispose();
|
|
789
|
-
this._detachModel();
|
|
790
|
-
super.dispose();
|
|
791
|
-
}
|
|
792
|
-
};
|
|
793
|
-
NotebookTextDiffEditor = NotebookTextDiffEditor_1 = ( __decorate([
|
|
794
|
-
( __param(1, IInstantiationService)),
|
|
795
|
-
( __param(2, IThemeService)),
|
|
796
|
-
( __param(3, IContextKeyService)),
|
|
797
|
-
( __param(4, INotebookEditorWorkerService)),
|
|
798
|
-
( __param(5, IConfigurationService)),
|
|
799
|
-
( __param(6, ITelemetryService)),
|
|
800
|
-
( __param(7, IStorageService)),
|
|
801
|
-
( __param(8, INotebookService)),
|
|
802
|
-
( __param(9, IEditorService))
|
|
803
|
-
], NotebookTextDiffEditor));
|
|
804
|
-
registerZIndex(ZIndex.Base, 10, 'notebook-diff-view-viewport-slider');
|
|
805
|
-
registerThemingParticipant((theme, collector) => {
|
|
806
|
-
const diffDiagonalFillColor = theme.getColor(diffDiagonalFill);
|
|
807
|
-
collector.addRule(`
|
|
808
|
-
.notebook-text-diff-editor .diagonal-fill {
|
|
809
|
-
background-image: linear-gradient(
|
|
810
|
-
-45deg,
|
|
811
|
-
${diffDiagonalFillColor} 12.5%,
|
|
812
|
-
#0000 12.5%, #0000 50%,
|
|
813
|
-
${diffDiagonalFillColor} 50%, ${diffDiagonalFillColor} 62.5%,
|
|
814
|
-
#0000 62.5%, #0000 100%
|
|
815
|
-
);
|
|
816
|
-
background-size: 8px 8px;
|
|
817
|
-
}
|
|
818
|
-
`);
|
|
819
|
-
collector.addRule(`.notebook-text-diff-editor .cell-body { margin: ${DIFF_CELL_MARGIN}px; }`);
|
|
820
|
-
collector.addRule(`.notebook-text-diff-editor .cell-placeholder-body { margin: ${DIFF_CELL_MARGIN}px 0; }`);
|
|
821
|
-
});
|
|
822
|
-
|
|
823
|
-
export { NotebookTextDiffEditor };
|