@codingame/monaco-vscode-katex-common 25.1.2 → 26.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,263 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
4
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
5
|
-
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
6
|
-
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
7
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
-
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
9
|
-
import { INotebookEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service';
|
|
10
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
11
|
-
import { createBareFontInfoFromRawSettings } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/fontInfoFromSettings';
|
|
12
|
-
import { PixelRatio } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/pixelRatio';
|
|
13
|
-
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
14
|
-
import { EditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
15
|
-
import { NOTEBOOK_MULTI_DIFF_EDITOR_ID, CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
16
|
-
import { FontMeasurements } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/config/fontMeasurements';
|
|
17
|
-
import { NotebookOptions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookOptions';
|
|
18
|
-
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
19
|
-
import { NotebookMultiDiffEditorWidgetInput } from './notebookMultiDiffEditorInput.js';
|
|
20
|
-
import { MultiDiffEditorWidget } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget';
|
|
21
|
-
import { ResourceLabel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/labels';
|
|
22
|
-
import { INotebookDocumentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/notebook/common/notebookDocumentService.service';
|
|
23
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
24
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
25
|
-
import { getIconClassesForLanguageId } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/getIconClasses';
|
|
26
|
-
import { NotebookDiffViewModel } from './notebookDiffViewModel.js';
|
|
27
|
-
import { NotebookDiffEditorEventDispatcher } from './eventDispatcher.js';
|
|
28
|
-
import { NOTEBOOK_DIFF_CELLS_COLLAPSED, NOTEBOOK_DIFF_HAS_UNCHANGED_CELLS, NOTEBOOK_DIFF_UNCHANGED_CELLS_HIDDEN } from './notebookDiffEditorBrowser.js';
|
|
29
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
30
|
-
import { DiffEditorHeightCalculatorService } from './editorHeightCalculator.js';
|
|
31
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
32
|
-
import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
|
|
33
|
-
|
|
34
|
-
var NotebookMultiTextDiffEditor_1;
|
|
35
|
-
let NotebookMultiTextDiffEditor = class NotebookMultiTextDiffEditor extends EditorPane {
|
|
36
|
-
static { NotebookMultiTextDiffEditor_1 = this; }
|
|
37
|
-
static { this.ID = NOTEBOOK_MULTI_DIFF_EDITOR_ID; }
|
|
38
|
-
get textModel() {
|
|
39
|
-
return this._model?.modified.notebook;
|
|
40
|
-
}
|
|
41
|
-
get notebookOptions() {
|
|
42
|
-
return this._notebookOptions;
|
|
43
|
-
}
|
|
44
|
-
constructor(group, instantiationService, themeService, _parentContextKeyService, notebookEditorWorkerService, configurationService, telemetryService, storageService, notebookService) {
|
|
45
|
-
super(NotebookMultiTextDiffEditor_1.ID, group, telemetryService, themeService, storageService);
|
|
46
|
-
this.instantiationService = instantiationService;
|
|
47
|
-
this._parentContextKeyService = _parentContextKeyService;
|
|
48
|
-
this.notebookEditorWorkerService = notebookEditorWorkerService;
|
|
49
|
-
this.configurationService = configurationService;
|
|
50
|
-
this.notebookService = notebookService;
|
|
51
|
-
this.modelSpecificResources = this._register(( new DisposableStore()));
|
|
52
|
-
this.ctxAllCollapsed = this._parentContextKeyService.createKey(NOTEBOOK_DIFF_CELLS_COLLAPSED.key, false);
|
|
53
|
-
this.ctxHasUnchangedCells = this._parentContextKeyService.createKey(NOTEBOOK_DIFF_HAS_UNCHANGED_CELLS.key, false);
|
|
54
|
-
this.ctxHiddenUnchangedCells = this._parentContextKeyService.createKey(NOTEBOOK_DIFF_UNCHANGED_CELLS_HIDDEN.key, true);
|
|
55
|
-
this._notebookOptions = instantiationService.createInstance(NotebookOptions, this.window, false, undefined);
|
|
56
|
-
this._register(this._notebookOptions);
|
|
57
|
-
}
|
|
58
|
-
get fontInfo() {
|
|
59
|
-
if (!this._fontInfo) {
|
|
60
|
-
this._fontInfo = this.createFontInfo();
|
|
61
|
-
}
|
|
62
|
-
return this._fontInfo;
|
|
63
|
-
}
|
|
64
|
-
layout(dimension, position) {
|
|
65
|
-
this._multiDiffEditorWidget.layout(dimension);
|
|
66
|
-
}
|
|
67
|
-
createFontInfo() {
|
|
68
|
-
const editorOptions = this.configurationService.getValue('editor');
|
|
69
|
-
return FontMeasurements.readFontInfo(this.window, createBareFontInfoFromRawSettings(editorOptions, PixelRatio.getInstance(this.window).value));
|
|
70
|
-
}
|
|
71
|
-
createEditor(parent) {
|
|
72
|
-
this._multiDiffEditorWidget = this._register(this.instantiationService.createInstance(MultiDiffEditorWidget, parent, this.instantiationService.createInstance(WorkbenchUIElementFactory)));
|
|
73
|
-
this._register(this._multiDiffEditorWidget.onDidChangeActiveControl(() => {
|
|
74
|
-
this._onDidChangeControl.fire();
|
|
75
|
-
}));
|
|
76
|
-
}
|
|
77
|
-
async setInput(input, options, context, token) {
|
|
78
|
-
super.setInput(input, options, context, token);
|
|
79
|
-
const model = await input.resolve();
|
|
80
|
-
if (this._model !== model) {
|
|
81
|
-
this._detachModel();
|
|
82
|
-
this._model = model;
|
|
83
|
-
}
|
|
84
|
-
const eventDispatcher = this.modelSpecificResources.add(( new NotebookDiffEditorEventDispatcher()));
|
|
85
|
-
const diffEditorHeightCalculator = this.instantiationService.createInstance(DiffEditorHeightCalculatorService, this.fontInfo.lineHeight);
|
|
86
|
-
this.viewModel = this.modelSpecificResources.add(( new NotebookDiffViewModel(
|
|
87
|
-
model,
|
|
88
|
-
this.notebookEditorWorkerService,
|
|
89
|
-
this.configurationService,
|
|
90
|
-
eventDispatcher,
|
|
91
|
-
this.notebookService,
|
|
92
|
-
diffEditorHeightCalculator,
|
|
93
|
-
undefined,
|
|
94
|
-
true
|
|
95
|
-
)));
|
|
96
|
-
await this.viewModel.computeDiff(this.modelSpecificResources.add(( new CancellationTokenSource())).token);
|
|
97
|
-
this.ctxHasUnchangedCells.set(this.viewModel.hasUnchangedCells);
|
|
98
|
-
this.ctxHasUnchangedCells.set(this.viewModel.hasUnchangedCells);
|
|
99
|
-
const widgetInput = this.modelSpecificResources.add(NotebookMultiDiffEditorWidgetInput.createInput(this.viewModel, this.instantiationService));
|
|
100
|
-
this.widgetViewModel = this.modelSpecificResources.add(await widgetInput.getViewModel());
|
|
101
|
-
const itemsWeHaveSeen = ( new WeakSet());
|
|
102
|
-
this.modelSpecificResources.add(autorun(reader => {
|
|
103
|
-
if (!this.widgetViewModel || !this.viewModel) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
const items = this.widgetViewModel.items.read(reader);
|
|
107
|
-
const diffItems = this.viewModel.value;
|
|
108
|
-
if (items.length !== diffItems.length) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
transaction((tx) => {
|
|
112
|
-
items.forEach(item => {
|
|
113
|
-
if (( itemsWeHaveSeen.has(item))) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
itemsWeHaveSeen.add(item);
|
|
117
|
-
const diffItem = diffItems.find(d => d.modifiedUri?.toString() === item.modifiedUri?.toString() && d.originalUri?.toString() === item.originalUri?.toString());
|
|
118
|
-
if (diffItem && diffItem.type === 'unchanged') {
|
|
119
|
-
item.collapsed.set(true, tx);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
}));
|
|
124
|
-
this._multiDiffEditorWidget.setViewModel(this.widgetViewModel);
|
|
125
|
-
}
|
|
126
|
-
_detachModel() {
|
|
127
|
-
this.viewModel = undefined;
|
|
128
|
-
this.modelSpecificResources.clear();
|
|
129
|
-
}
|
|
130
|
-
_generateFontFamily() {
|
|
131
|
-
return this.fontInfo.fontFamily ?? `"SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace`;
|
|
132
|
-
}
|
|
133
|
-
setOptions(options) {
|
|
134
|
-
super.setOptions(options);
|
|
135
|
-
}
|
|
136
|
-
getControl() {
|
|
137
|
-
return this._multiDiffEditorWidget.getActiveControl();
|
|
138
|
-
}
|
|
139
|
-
focus() {
|
|
140
|
-
super.focus();
|
|
141
|
-
this._multiDiffEditorWidget?.getActiveControl()?.focus();
|
|
142
|
-
}
|
|
143
|
-
hasFocus() {
|
|
144
|
-
return this._multiDiffEditorWidget?.getActiveControl()?.hasTextFocus() || super.hasFocus();
|
|
145
|
-
}
|
|
146
|
-
clearInput() {
|
|
147
|
-
super.clearInput();
|
|
148
|
-
this._multiDiffEditorWidget.setViewModel(undefined);
|
|
149
|
-
this.modelSpecificResources.clear();
|
|
150
|
-
this.viewModel = undefined;
|
|
151
|
-
this.widgetViewModel = undefined;
|
|
152
|
-
}
|
|
153
|
-
expandAll() {
|
|
154
|
-
if (this.widgetViewModel) {
|
|
155
|
-
this.widgetViewModel.expandAll();
|
|
156
|
-
this.ctxAllCollapsed.set(false);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
collapseAll() {
|
|
160
|
-
if (this.widgetViewModel) {
|
|
161
|
-
this.widgetViewModel.collapseAll();
|
|
162
|
-
this.ctxAllCollapsed.set(true);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
hideUnchanged() {
|
|
166
|
-
if (this.viewModel) {
|
|
167
|
-
this.viewModel.includeUnchanged = false;
|
|
168
|
-
this.ctxHiddenUnchangedCells.set(true);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
showUnchanged() {
|
|
172
|
-
if (this.viewModel) {
|
|
173
|
-
this.viewModel.includeUnchanged = true;
|
|
174
|
-
this.ctxHiddenUnchangedCells.set(false);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
getDiffElementViewModel(uri) {
|
|
178
|
-
if (uri.scheme === Schemas.vscodeNotebookCellOutput || uri.scheme === Schemas.vscodeNotebookCellOutputDiff ||
|
|
179
|
-
uri.scheme === Schemas.vscodeNotebookCellMetadata || uri.scheme === Schemas.vscodeNotebookCellMetadataDiff) {
|
|
180
|
-
const data = CellUri.parseCellPropertyUri(uri, uri.scheme);
|
|
181
|
-
if (data) {
|
|
182
|
-
uri = CellUri.generate(data.notebook, data.handle);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
if (uri.scheme === Schemas.vscodeNotebookMetadata) {
|
|
186
|
-
return this.viewModel?.items.find(item => item.type === 'modifiedMetadata' ||
|
|
187
|
-
item.type === 'unchangedMetadata');
|
|
188
|
-
}
|
|
189
|
-
return this.viewModel?.items.find(c => {
|
|
190
|
-
switch (c.type) {
|
|
191
|
-
case 'delete':
|
|
192
|
-
return c.original?.uri.toString() === ( uri.toString());
|
|
193
|
-
case 'insert':
|
|
194
|
-
return c.modified?.uri.toString() === ( uri.toString());
|
|
195
|
-
case 'modified':
|
|
196
|
-
case 'unchanged':
|
|
197
|
-
return c.modified?.uri.toString() === ( uri.toString()) || c.original?.uri.toString() === ( uri.toString());
|
|
198
|
-
default:
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
NotebookMultiTextDiffEditor = NotebookMultiTextDiffEditor_1 = ( __decorate([
|
|
205
|
-
( __param(1, IInstantiationService)),
|
|
206
|
-
( __param(2, IThemeService)),
|
|
207
|
-
( __param(3, IContextKeyService)),
|
|
208
|
-
( __param(4, INotebookEditorWorkerService)),
|
|
209
|
-
( __param(5, IConfigurationService)),
|
|
210
|
-
( __param(6, ITelemetryService)),
|
|
211
|
-
( __param(7, IStorageService)),
|
|
212
|
-
( __param(8, INotebookService))
|
|
213
|
-
], NotebookMultiTextDiffEditor));
|
|
214
|
-
let WorkbenchUIElementFactory = class WorkbenchUIElementFactory {
|
|
215
|
-
constructor(_instantiationService, notebookDocumentService, notebookService) {
|
|
216
|
-
this._instantiationService = _instantiationService;
|
|
217
|
-
this.notebookDocumentService = notebookDocumentService;
|
|
218
|
-
this.notebookService = notebookService;
|
|
219
|
-
}
|
|
220
|
-
createResourceLabel(element) {
|
|
221
|
-
const label = this._instantiationService.createInstance(ResourceLabel, element, {});
|
|
222
|
-
const that = this;
|
|
223
|
-
return {
|
|
224
|
-
setUri(uri, options = {}) {
|
|
225
|
-
if (!uri) {
|
|
226
|
-
label.element.clear();
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
let name = '';
|
|
230
|
-
let description = '';
|
|
231
|
-
let extraClasses = undefined;
|
|
232
|
-
if (uri.scheme === Schemas.vscodeNotebookCell) {
|
|
233
|
-
const notebookDocument = uri.scheme === Schemas.vscodeNotebookCell ? that.notebookDocumentService.getNotebook(uri) : undefined;
|
|
234
|
-
const cellIndex = Schemas.vscodeNotebookCell ? that.notebookDocumentService.getNotebook(uri)?.getCellIndex(uri) : undefined;
|
|
235
|
-
if (notebookDocument && cellIndex !== undefined) {
|
|
236
|
-
name = ( localize(9504, "Cell {0}", `${cellIndex + 1}`));
|
|
237
|
-
const nb = notebookDocument ? that.notebookService.getNotebookTextModel(notebookDocument?.uri) : undefined;
|
|
238
|
-
const cellLanguage = nb && cellIndex !== undefined ? nb.cells[cellIndex].language : undefined;
|
|
239
|
-
extraClasses = cellLanguage ? getIconClassesForLanguageId(cellLanguage) : undefined;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
else if (uri.scheme === Schemas.vscodeNotebookCellMetadata || uri.scheme === Schemas.vscodeNotebookCellMetadataDiff) {
|
|
243
|
-
description = ( localize(9505, "Metadata"));
|
|
244
|
-
}
|
|
245
|
-
else if (uri.scheme === Schemas.vscodeNotebookCellOutput || uri.scheme === Schemas.vscodeNotebookCellOutputDiff) {
|
|
246
|
-
description = ( localize(9506, "Output"));
|
|
247
|
-
}
|
|
248
|
-
label.element.setResource({ name, description }, { strikethrough: options.strikethrough, forceLabel: true, hideIcon: !extraClasses, extraClasses });
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
dispose() {
|
|
252
|
-
label.dispose();
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
WorkbenchUIElementFactory = ( __decorate([
|
|
258
|
-
( __param(0, IInstantiationService)),
|
|
259
|
-
( __param(1, INotebookDocumentService)),
|
|
260
|
-
( __param(2, INotebookService))
|
|
261
|
-
], WorkbenchUIElementFactory));
|
|
262
|
-
|
|
263
|
-
export { NotebookMultiTextDiffEditor };
|
package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
3
|
-
import { ITextResourceConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service";
|
|
4
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
-
import { MultiDiffEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput";
|
|
6
|
-
import { IResolvedMultiDiffSource, type IMultiDiffSourceResolver } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService";
|
|
7
|
-
import { IMultiDiffSourceResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service";
|
|
8
|
-
import { NotebookDiffViewModel } from "./notebookDiffViewModel.js";
|
|
9
|
-
import { NotebookDiffEditorInput } from "../../common/notebookDiffEditorInput.js";
|
|
10
|
-
import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
|
|
11
|
-
export declare const NotebookMultiDiffEditorScheme = "multi-cell-notebook-diff-editor";
|
|
12
|
-
export declare class NotebookMultiDiffEditorInput extends NotebookDiffEditorInput {
|
|
13
|
-
static readonly ID: string;
|
|
14
|
-
static create(instantiationService: IInstantiationService, resource: URI, name: string | undefined, description: string | undefined, originalResource: URI, viewType: string): NotebookMultiDiffEditorInput;
|
|
15
|
-
}
|
|
16
|
-
export declare class NotebookMultiDiffEditorWidgetInput extends MultiDiffEditorInput implements IMultiDiffSourceResolver {
|
|
17
|
-
private readonly notebookDiffViewModel;
|
|
18
|
-
static createInput(notebookDiffViewModel: NotebookDiffViewModel, instantiationService: IInstantiationService): NotebookMultiDiffEditorWidgetInput;
|
|
19
|
-
constructor(multiDiffSource: URI, notebookDiffViewModel: NotebookDiffViewModel, _textModelService: ITextModelService, _textResourceConfigurationService: ITextResourceConfigurationService, _instantiationService: IInstantiationService, _multiDiffSourceResolverService: IMultiDiffSourceResolverService, _textFileService: ITextFileService);
|
|
20
|
-
canHandleUri(uri: URI): boolean;
|
|
21
|
-
resolveDiffSource(_: URI): Promise<IResolvedMultiDiffSource>;
|
|
22
|
-
}
|
package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
|
-
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
5
|
-
import { ITextResourceConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service';
|
|
6
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
|
-
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
8
|
-
import { IMultiDiffSourceResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service';
|
|
9
|
-
import { NotebookDiffEditorInput } from '../../common/notebookDiffEditorInput.js';
|
|
10
|
-
import { NotebookEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
11
|
-
import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
12
|
-
|
|
13
|
-
var NotebookMultiDiffEditorWidgetInput_1;
|
|
14
|
-
const NotebookMultiDiffEditorScheme = 'multi-cell-notebook-diff-editor';
|
|
15
|
-
class NotebookMultiDiffEditorInput extends NotebookDiffEditorInput {
|
|
16
|
-
static { this.ID = 'workbench.input.multiDiffNotebookInput'; }
|
|
17
|
-
static create(instantiationService, resource, name, description, originalResource, viewType) {
|
|
18
|
-
const original = NotebookEditorInput.getOrCreate(instantiationService, originalResource, undefined, viewType);
|
|
19
|
-
const modified = NotebookEditorInput.getOrCreate(instantiationService, resource, undefined, viewType);
|
|
20
|
-
return instantiationService.createInstance(NotebookMultiDiffEditorInput, name, description, original, modified, viewType);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
let NotebookMultiDiffEditorWidgetInput = NotebookMultiDiffEditorWidgetInput_1 = class NotebookMultiDiffEditorWidgetInput extends MultiDiffEditorInput {
|
|
24
|
-
static createInput(notebookDiffViewModel, instantiationService) {
|
|
25
|
-
const multiDiffSource = ( URI.parse(`${NotebookMultiDiffEditorScheme}:${( ( new Date()).getMilliseconds().toString()) + ( Math.random().toString())}`));
|
|
26
|
-
return instantiationService.createInstance(NotebookMultiDiffEditorWidgetInput_1, multiDiffSource, notebookDiffViewModel);
|
|
27
|
-
}
|
|
28
|
-
constructor(multiDiffSource, notebookDiffViewModel, _textModelService, _textResourceConfigurationService, _instantiationService, _multiDiffSourceResolverService, _textFileService) {
|
|
29
|
-
super(multiDiffSource, undefined, undefined, true, _textModelService, _textResourceConfigurationService, _instantiationService, _multiDiffSourceResolverService, _textFileService);
|
|
30
|
-
this.notebookDiffViewModel = notebookDiffViewModel;
|
|
31
|
-
this._register(_multiDiffSourceResolverService.registerResolver(this));
|
|
32
|
-
}
|
|
33
|
-
canHandleUri(uri) {
|
|
34
|
-
return ( uri.toString()) === ( this.multiDiffSource.toString());
|
|
35
|
-
}
|
|
36
|
-
async resolveDiffSource(_) {
|
|
37
|
-
return { resources: this.notebookDiffViewModel };
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
NotebookMultiDiffEditorWidgetInput = NotebookMultiDiffEditorWidgetInput_1 = ( __decorate([
|
|
41
|
-
( __param(2, ITextModelService)),
|
|
42
|
-
( __param(3, ITextResourceConfigurationService)),
|
|
43
|
-
( __param(4, IInstantiationService)),
|
|
44
|
-
( __param(5, IMultiDiffSourceResolverService)),
|
|
45
|
-
( __param(6, ITextFileService))
|
|
46
|
-
], NotebookMultiDiffEditorWidgetInput));
|
|
47
|
-
|
|
48
|
-
export { NotebookMultiDiffEditorInput, NotebookMultiDiffEditorScheme, NotebookMultiDiffEditorWidgetInput };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
-
import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
-
export type UnchangedEditorRegionOptions = {
|
|
5
|
-
options: {
|
|
6
|
-
enabled: boolean;
|
|
7
|
-
contextLineCount: number;
|
|
8
|
-
minimumLineCount: number;
|
|
9
|
-
revealLineCount: number;
|
|
10
|
-
};
|
|
11
|
-
readonly onDidChangeEnablement: Event<boolean>;
|
|
12
|
-
};
|
|
13
|
-
export declare function getUnchangedRegionSettings(configurationService: IConfigurationService): (Readonly<UnchangedEditorRegionOptions> & IDisposable);
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
3
|
-
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
-
|
|
5
|
-
function getUnchangedRegionSettings(configurationService) {
|
|
6
|
-
return createHideUnchangedRegionOptions(configurationService);
|
|
7
|
-
}
|
|
8
|
-
function createHideUnchangedRegionOptions(configurationService) {
|
|
9
|
-
const disposables = ( new DisposableStore());
|
|
10
|
-
const unchangedRegionsEnablementEmitter = disposables.add(( new Emitter()));
|
|
11
|
-
const result = {
|
|
12
|
-
options: {
|
|
13
|
-
enabled: configurationService.getValue('diffEditor.hideUnchangedRegions.enabled'),
|
|
14
|
-
minimumLineCount: configurationService.getValue('diffEditor.hideUnchangedRegions.minimumLineCount'),
|
|
15
|
-
contextLineCount: configurationService.getValue('diffEditor.hideUnchangedRegions.contextLineCount'),
|
|
16
|
-
revealLineCount: configurationService.getValue('diffEditor.hideUnchangedRegions.revealLineCount'),
|
|
17
|
-
},
|
|
18
|
-
onDidChangeEnablement: unchangedRegionsEnablementEmitter.event.bind(unchangedRegionsEnablementEmitter),
|
|
19
|
-
dispose: () => disposables.dispose()
|
|
20
|
-
};
|
|
21
|
-
disposables.add(configurationService.onDidChangeConfiguration(e => {
|
|
22
|
-
if (e.affectsConfiguration('diffEditor.hideUnchangedRegions.minimumLineCount')) {
|
|
23
|
-
result.options.minimumLineCount = configurationService.getValue('diffEditor.hideUnchangedRegions.minimumLineCount');
|
|
24
|
-
}
|
|
25
|
-
if (e.affectsConfiguration('diffEditor.hideUnchangedRegions.contextLineCount')) {
|
|
26
|
-
result.options.contextLineCount = configurationService.getValue('diffEditor.hideUnchangedRegions.contextLineCount');
|
|
27
|
-
}
|
|
28
|
-
if (e.affectsConfiguration('diffEditor.hideUnchangedRegions.revealLineCount')) {
|
|
29
|
-
result.options.revealLineCount = configurationService.getValue('diffEditor.hideUnchangedRegions.revealLineCount');
|
|
30
|
-
}
|
|
31
|
-
if (e.affectsConfiguration('diffEditor.hideUnchangedRegions.enabled')) {
|
|
32
|
-
result.options.enabled = configurationService.getValue('diffEditor.hideUnchangedRegions.enabled');
|
|
33
|
-
unchangedRegionsEnablementEmitter.fire(result.options.enabled);
|
|
34
|
-
}
|
|
35
|
-
}));
|
|
36
|
-
return result;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { getUnchangedRegionSettings };
|
package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { INotebookDocumentMetadataTextModel, INotebookTextModel, NotebookDocumentMetadata, TransientDocumentMetadata } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
2
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
-
import { ITextBuffer } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
5
|
-
export declare function getFormattedNotebookMetadataJSON(transientMetadata: TransientDocumentMetadata | undefined, metadata: NotebookDocumentMetadata): string;
|
|
6
|
-
export declare class NotebookDocumentMetadataTextModel extends Disposable implements INotebookDocumentMetadataTextModel {
|
|
7
|
-
readonly notebookModel: INotebookTextModel;
|
|
8
|
-
readonly uri: URI;
|
|
9
|
-
get metadata(): NotebookDocumentMetadata;
|
|
10
|
-
private readonly _onDidChange;
|
|
11
|
-
readonly onDidChange: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
12
|
-
private _textBufferHash;
|
|
13
|
-
private _textBuffer?;
|
|
14
|
-
get textBuffer(): ITextBuffer;
|
|
15
|
-
constructor(notebookModel: INotebookTextModel);
|
|
16
|
-
getHash(): string;
|
|
17
|
-
getValue(): string;
|
|
18
|
-
private getFullModelRange;
|
|
19
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { toFormattedString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/jsonFormatter';
|
|
3
|
-
import { NotebookMetadataUri, NotebookCellsChangeType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
4
|
-
import { StringSHA1 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hash';
|
|
5
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
-
import { DefaultEndOfLine, EndOfLinePreference } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model';
|
|
7
|
-
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
|
-
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
9
|
-
import { createTextBuffer } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/textModel';
|
|
10
|
-
|
|
11
|
-
function getFormattedNotebookMetadataJSON(transientMetadata, metadata) {
|
|
12
|
-
let filteredMetadata = {};
|
|
13
|
-
if (transientMetadata) {
|
|
14
|
-
const keys = ( new Set([...( Object.keys(metadata))]));
|
|
15
|
-
for (const key of keys) {
|
|
16
|
-
if (!(transientMetadata[key])) {
|
|
17
|
-
filteredMetadata[key] = metadata[key];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
filteredMetadata = metadata;
|
|
23
|
-
}
|
|
24
|
-
const metadataSource = toFormattedString(filteredMetadata, {});
|
|
25
|
-
return metadataSource;
|
|
26
|
-
}
|
|
27
|
-
class NotebookDocumentMetadataTextModel extends Disposable {
|
|
28
|
-
get metadata() {
|
|
29
|
-
return this.notebookModel.metadata;
|
|
30
|
-
}
|
|
31
|
-
get textBuffer() {
|
|
32
|
-
if (this._textBuffer) {
|
|
33
|
-
return this._textBuffer;
|
|
34
|
-
}
|
|
35
|
-
const source = getFormattedNotebookMetadataJSON(this.notebookModel.transientOptions.transientDocumentMetadata, this.metadata);
|
|
36
|
-
this._textBuffer = this._register(createTextBuffer(source, DefaultEndOfLine.LF).textBuffer);
|
|
37
|
-
this._register(this._textBuffer.onDidChangeContent(() => {
|
|
38
|
-
this._onDidChange.fire();
|
|
39
|
-
}));
|
|
40
|
-
return this._textBuffer;
|
|
41
|
-
}
|
|
42
|
-
constructor(notebookModel) {
|
|
43
|
-
super();
|
|
44
|
-
this.notebookModel = notebookModel;
|
|
45
|
-
this._onDidChange = this._register(( new Emitter()));
|
|
46
|
-
this.onDidChange = this._onDidChange.event;
|
|
47
|
-
this._textBufferHash = null;
|
|
48
|
-
this.uri = NotebookMetadataUri.generate(this.notebookModel.uri);
|
|
49
|
-
this._register(this.notebookModel.onDidChangeContent((e) => {
|
|
50
|
-
if (( e.rawEvents.some(
|
|
51
|
-
event => event.kind === NotebookCellsChangeType.ChangeDocumentMetadata || event.kind === NotebookCellsChangeType.ModelChange
|
|
52
|
-
))) {
|
|
53
|
-
this._textBuffer?.dispose();
|
|
54
|
-
this._textBuffer = undefined;
|
|
55
|
-
this._textBufferHash = null;
|
|
56
|
-
this._onDidChange.fire();
|
|
57
|
-
}
|
|
58
|
-
}));
|
|
59
|
-
}
|
|
60
|
-
getHash() {
|
|
61
|
-
if (this._textBufferHash !== null) {
|
|
62
|
-
return this._textBufferHash;
|
|
63
|
-
}
|
|
64
|
-
const shaComputer = ( new StringSHA1());
|
|
65
|
-
const snapshot = this.textBuffer.createSnapshot(false);
|
|
66
|
-
let text;
|
|
67
|
-
while ((text = snapshot.read())) {
|
|
68
|
-
shaComputer.update(text);
|
|
69
|
-
}
|
|
70
|
-
this._textBufferHash = shaComputer.digest();
|
|
71
|
-
return this._textBufferHash;
|
|
72
|
-
}
|
|
73
|
-
getValue() {
|
|
74
|
-
const fullRange = this.getFullModelRange();
|
|
75
|
-
const eol = this.textBuffer.getEOL();
|
|
76
|
-
if (eol === '\n') {
|
|
77
|
-
return this.textBuffer.getValueInRange(fullRange, EndOfLinePreference.LF);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
return this.textBuffer.getValueInRange(fullRange, EndOfLinePreference.CRLF);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
getFullModelRange() {
|
|
84
|
-
const lineCount = this.textBuffer.getLineCount();
|
|
85
|
-
return ( new Range(1, 1, lineCount, this.textBuffer.getLineLength(lineCount) + 1));
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export { NotebookDocumentMetadataTextModel, getFormattedNotebookMetadataJSON };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CellKind, INotebookDiffResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
2
|
-
export type CellDiffInfo = {
|
|
3
|
-
originalCellIndex: number;
|
|
4
|
-
modifiedCellIndex: number;
|
|
5
|
-
type: "unchanged" | "modified";
|
|
6
|
-
} | {
|
|
7
|
-
originalCellIndex: number;
|
|
8
|
-
type: "delete";
|
|
9
|
-
} | {
|
|
10
|
-
modifiedCellIndex: number;
|
|
11
|
-
type: "insert";
|
|
12
|
-
};
|
|
13
|
-
interface ICell {
|
|
14
|
-
cellKind: CellKind;
|
|
15
|
-
getHashValue(): number;
|
|
16
|
-
equal(cell: ICell): boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare function computeDiff(originalModel: {
|
|
19
|
-
readonly cells: readonly ICell[];
|
|
20
|
-
}, modifiedModel: {
|
|
21
|
-
readonly cells: readonly ICell[];
|
|
22
|
-
}, diffResult: INotebookDiffResult): {
|
|
23
|
-
cellDiffInfo: CellDiffInfo[];
|
|
24
|
-
firstChangeIndex: number;
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function computeDiff(originalModel, modifiedModel, diffResult) {
|
|
4
|
-
const cellChanges = diffResult.cellsDiff.changes;
|
|
5
|
-
const cellDiffInfo = [];
|
|
6
|
-
let originalCellIndex = 0;
|
|
7
|
-
let modifiedCellIndex = 0;
|
|
8
|
-
let firstChangeIndex = -1;
|
|
9
|
-
for (let i = 0; i < cellChanges.length; i++) {
|
|
10
|
-
const change = cellChanges[i];
|
|
11
|
-
for (let j = 0; j < change.originalStart - originalCellIndex; j++) {
|
|
12
|
-
const originalCell = originalModel.cells[originalCellIndex + j];
|
|
13
|
-
const modifiedCell = modifiedModel.cells[modifiedCellIndex + j];
|
|
14
|
-
if (originalCell.getHashValue() === modifiedCell.getHashValue()) {
|
|
15
|
-
cellDiffInfo.push({
|
|
16
|
-
originalCellIndex: originalCellIndex + j,
|
|
17
|
-
modifiedCellIndex: modifiedCellIndex + j,
|
|
18
|
-
type: 'unchanged'
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
if (firstChangeIndex === -1) {
|
|
23
|
-
firstChangeIndex = cellDiffInfo.length;
|
|
24
|
-
}
|
|
25
|
-
cellDiffInfo.push({
|
|
26
|
-
originalCellIndex: originalCellIndex + j,
|
|
27
|
-
modifiedCellIndex: modifiedCellIndex + j,
|
|
28
|
-
type: 'modified'
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
const modifiedLCS = computeModifiedLCS(change, originalModel, modifiedModel);
|
|
33
|
-
if (modifiedLCS.length && firstChangeIndex === -1) {
|
|
34
|
-
firstChangeIndex = cellDiffInfo.length;
|
|
35
|
-
}
|
|
36
|
-
cellDiffInfo.push(...modifiedLCS);
|
|
37
|
-
originalCellIndex = change.originalStart + change.originalLength;
|
|
38
|
-
modifiedCellIndex = change.modifiedStart + change.modifiedLength;
|
|
39
|
-
}
|
|
40
|
-
for (let i = originalCellIndex; i < originalModel.cells.length; i++) {
|
|
41
|
-
cellDiffInfo.push({
|
|
42
|
-
originalCellIndex: i,
|
|
43
|
-
modifiedCellIndex: i - originalCellIndex + modifiedCellIndex,
|
|
44
|
-
type: 'unchanged'
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
cellDiffInfo,
|
|
49
|
-
firstChangeIndex
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function computeModifiedLCS(change, originalModel, modifiedModel) {
|
|
53
|
-
const result = [];
|
|
54
|
-
const modifiedLen = Math.min(change.originalLength, change.modifiedLength);
|
|
55
|
-
for (let j = 0; j < modifiedLen; j++) {
|
|
56
|
-
const originalCell = originalModel.cells[change.originalStart + j];
|
|
57
|
-
const modifiedCell = modifiedModel.cells[change.modifiedStart + j];
|
|
58
|
-
if (originalCell.cellKind !== modifiedCell.cellKind) {
|
|
59
|
-
result.push({
|
|
60
|
-
originalCellIndex: change.originalStart + j,
|
|
61
|
-
type: 'delete'
|
|
62
|
-
});
|
|
63
|
-
result.push({
|
|
64
|
-
modifiedCellIndex: change.modifiedStart + j,
|
|
65
|
-
type: 'insert'
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
const isTheSame = originalCell.equal(modifiedCell);
|
|
70
|
-
result.push({
|
|
71
|
-
originalCellIndex: change.originalStart + j,
|
|
72
|
-
modifiedCellIndex: change.modifiedStart + j,
|
|
73
|
-
type: isTheSame ? 'unchanged' : 'modified'
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
for (let j = modifiedLen; j < change.originalLength; j++) {
|
|
78
|
-
result.push({
|
|
79
|
-
originalCellIndex: change.originalStart + j,
|
|
80
|
-
type: 'delete'
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
for (let j = modifiedLen; j < change.modifiedLength; j++) {
|
|
84
|
-
result.push({
|
|
85
|
-
modifiedCellIndex: change.modifiedStart + j,
|
|
86
|
-
type: 'insert'
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
return result;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export { computeDiff };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { IResourceDiffEditorInput, IResourceSideBySideEditorInput, IUntypedEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
2
|
-
import { EditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput";
|
|
3
|
-
import { EditorModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorModel";
|
|
4
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
-
import { INotebookDiffEditorModel, IResolvedNotebookEditorModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
7
|
-
import { DiffEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/diffEditorInput";
|
|
8
|
-
import { NotebookEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput";
|
|
9
|
-
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
10
|
-
declare class NotebookDiffEditorModel extends EditorModel implements INotebookDiffEditorModel {
|
|
11
|
-
readonly original: IResolvedNotebookEditorModel;
|
|
12
|
-
readonly modified: IResolvedNotebookEditorModel;
|
|
13
|
-
constructor(original: IResolvedNotebookEditorModel, modified: IResolvedNotebookEditorModel);
|
|
14
|
-
}
|
|
15
|
-
export declare class NotebookDiffEditorInput extends DiffEditorInput {
|
|
16
|
-
readonly original: NotebookEditorInput;
|
|
17
|
-
readonly modified: NotebookEditorInput;
|
|
18
|
-
readonly viewType: string;
|
|
19
|
-
static create(instantiationService: IInstantiationService, resource: URI, name: string | undefined, description: string | undefined, originalResource: URI, viewType: string): NotebookDiffEditorInput;
|
|
20
|
-
static readonly ID: string;
|
|
21
|
-
private _modifiedTextModel;
|
|
22
|
-
private _originalTextModel;
|
|
23
|
-
get resource(): URI;
|
|
24
|
-
get editorId(): string;
|
|
25
|
-
private _cachedModel;
|
|
26
|
-
constructor(name: string | undefined, description: string | undefined, original: NotebookEditorInput, modified: NotebookEditorInput, viewType: string, editorService: IEditorService);
|
|
27
|
-
get typeId(): string;
|
|
28
|
-
resolve(): Promise<NotebookDiffEditorModel>;
|
|
29
|
-
toUntyped(): IResourceDiffEditorInput & IResourceSideBySideEditorInput;
|
|
30
|
-
matches(otherInput: EditorInput | IUntypedEditorInput): boolean;
|
|
31
|
-
dispose(): void;
|
|
32
|
-
}
|
|
33
|
-
export {};
|