@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
package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js
CHANGED
|
@@ -49,7 +49,7 @@ import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
49
49
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
50
50
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
51
51
|
import { ResourceLabel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/labels';
|
|
52
|
-
import {
|
|
52
|
+
import { StaticResourceContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
53
53
|
import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
54
54
|
import { InspectEditorTokensController } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens';
|
|
55
55
|
import { MenuPreventer } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/codeEditor/browser/menuPreventer';
|
|
@@ -64,21 +64,19 @@ import { SnippetController2 } from '@codingame/monaco-vscode-api/vscode/vs/edito
|
|
|
64
64
|
|
|
65
65
|
registerCss(codeBlockPart);
|
|
66
66
|
const $ = $$1;
|
|
67
|
-
const localFileLanguageId =
|
|
67
|
+
const localFileLanguageId = "vscode-local-file";
|
|
68
68
|
function parseLocalFileData(text) {
|
|
69
69
|
let data;
|
|
70
70
|
try {
|
|
71
71
|
data = JSON.parse(text);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
throw ( new Error('Could not parse code block local file data'));
|
|
72
|
+
} catch (e) {
|
|
73
|
+
throw ( new Error("Could not parse code block local file data"));
|
|
75
74
|
}
|
|
76
75
|
let uri;
|
|
77
76
|
try {
|
|
78
77
|
uri = URI.revive(data?.uri);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
throw ( new Error('Invalid code block local file data URI'));
|
|
78
|
+
} catch (e) {
|
|
79
|
+
throw ( new Error("Invalid code block local file data URI"));
|
|
82
80
|
}
|
|
83
81
|
let range;
|
|
84
82
|
if (data.range) {
|
|
@@ -89,14 +87,28 @@ function parseLocalFileData(text) {
|
|
|
89
87
|
data.range.endColumn + 1
|
|
90
88
|
));
|
|
91
89
|
}
|
|
92
|
-
return {
|
|
90
|
+
return {
|
|
91
|
+
uri,
|
|
92
|
+
range
|
|
93
|
+
};
|
|
93
94
|
}
|
|
94
95
|
const defaultCodeblockPadding = 10;
|
|
95
96
|
let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
96
97
|
get verticalPadding() {
|
|
97
98
|
return this.currentCodeBlockData?.renderOptions?.verticalPadding ?? defaultCodeblockPadding;
|
|
98
99
|
}
|
|
99
|
-
constructor(
|
|
100
|
+
constructor(
|
|
101
|
+
editorOptions,
|
|
102
|
+
menuId,
|
|
103
|
+
delegate,
|
|
104
|
+
overflowWidgetsDomNode,
|
|
105
|
+
isSimpleWidget = false,
|
|
106
|
+
instantiationService,
|
|
107
|
+
contextKeyService,
|
|
108
|
+
modelService,
|
|
109
|
+
configurationService,
|
|
110
|
+
accessibilityService
|
|
111
|
+
) {
|
|
100
112
|
super();
|
|
101
113
|
this.editorOptions = editorOptions;
|
|
102
114
|
this.menuId = menuId;
|
|
@@ -108,47 +120,52 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
108
120
|
this.onDidChangeContentHeight = this._onDidChangeContentHeight.event;
|
|
109
121
|
this.currentScrollWidth = 0;
|
|
110
122
|
this.isDisposed = false;
|
|
111
|
-
this.element = $(
|
|
112
|
-
this.resourceContextKey =
|
|
123
|
+
this.element = $(".interactive-result-code-block");
|
|
124
|
+
this.resourceContextKey = instantiationService.createInstance(StaticResourceContextKey);
|
|
113
125
|
this.contextKeyService = this._register(contextKeyService.createScoped(this.element));
|
|
114
126
|
const scopedInstantiationService = this._register(instantiationService.createChild(( new ServiceCollection([IContextKeyService, this.contextKeyService]))));
|
|
115
|
-
const editorElement = append(this.element, $(
|
|
127
|
+
const editorElement = append(this.element, $(".interactive-result-editor"));
|
|
116
128
|
this.editor = this.createEditor(scopedInstantiationService, editorElement, {
|
|
117
129
|
...getSimpleEditorOptions(this.configurationService),
|
|
118
130
|
readOnly: true,
|
|
119
|
-
lineNumbers:
|
|
131
|
+
lineNumbers: "off",
|
|
120
132
|
selectOnLineNumbers: true,
|
|
121
133
|
scrollBeyondLastLine: false,
|
|
122
134
|
lineDecorationsWidth: 8,
|
|
123
135
|
dragAndDrop: false,
|
|
124
|
-
padding: {
|
|
136
|
+
padding: {
|
|
137
|
+
top: this.verticalPadding,
|
|
138
|
+
bottom: this.verticalPadding
|
|
139
|
+
},
|
|
125
140
|
mouseWheelZoom: false,
|
|
126
141
|
scrollbar: {
|
|
127
|
-
vertical:
|
|
142
|
+
vertical: "hidden",
|
|
128
143
|
alwaysConsumeMouseWheel: false
|
|
129
144
|
},
|
|
130
145
|
definitionLinkOpensInPeek: false,
|
|
131
146
|
gotoLocation: {
|
|
132
|
-
multiple:
|
|
133
|
-
multipleDeclarations:
|
|
134
|
-
multipleDefinitions:
|
|
135
|
-
multipleImplementations:
|
|
147
|
+
multiple: "goto",
|
|
148
|
+
multipleDeclarations: "goto",
|
|
149
|
+
multipleDefinitions: "goto",
|
|
150
|
+
multipleImplementations: "goto"
|
|
136
151
|
},
|
|
137
|
-
ariaLabel: ( localize(
|
|
152
|
+
ariaLabel: ( localize(5946, "Code block")),
|
|
138
153
|
overflowWidgetsDomNode,
|
|
139
154
|
tabFocusMode: true,
|
|
140
|
-
...this.getEditorOptionsFromConfig()
|
|
155
|
+
...this.getEditorOptionsFromConfig()
|
|
141
156
|
});
|
|
142
|
-
const toolbarElement = append(this.element, $(
|
|
157
|
+
const toolbarElement = append(this.element, $(".interactive-result-code-block-toolbar"));
|
|
143
158
|
const editorScopedService = this.editor.contextKeyService.createScoped(toolbarElement);
|
|
144
159
|
const editorScopedInstantiationService = this._register(scopedInstantiationService.createChild(( new ServiceCollection([IContextKeyService, editorScopedService]))));
|
|
145
|
-
this.toolbar = this._register(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
160
|
+
this.toolbar = this._register(
|
|
161
|
+
editorScopedInstantiationService.createInstance(MenuWorkbenchToolBar, toolbarElement, menuId, {
|
|
162
|
+
menuOptions: {
|
|
163
|
+
shouldForwardArgs: true
|
|
164
|
+
}
|
|
165
|
+
})
|
|
166
|
+
);
|
|
167
|
+
const vulnsContainer = append(this.element, $(".interactive-result-vulns"));
|
|
168
|
+
const vulnsHeaderElement = append(vulnsContainer, $(".interactive-result-vulns-header", undefined));
|
|
152
169
|
this.vulnsButton = this._register(( new Button(vulnsHeaderElement, {
|
|
153
170
|
buttonBackground: undefined,
|
|
154
171
|
buttonBorder: undefined,
|
|
@@ -160,20 +177,22 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
160
177
|
buttonSeparator: undefined,
|
|
161
178
|
supportIcons: true
|
|
162
179
|
})));
|
|
163
|
-
this.vulnsListElement = append(vulnsContainer, $(
|
|
180
|
+
this.vulnsListElement = append(vulnsContainer, $("ul.interactive-result-vulns-list"));
|
|
164
181
|
this._register(this.vulnsButton.onDidClick(() => {
|
|
165
182
|
const element = this.currentCodeBlockData.element;
|
|
166
183
|
element.vulnerabilitiesListExpanded = !element.vulnerabilitiesListExpanded;
|
|
167
184
|
this.vulnsButton.label = this.getVulnerabilitiesLabel();
|
|
168
|
-
this.element.classList.toggle(
|
|
185
|
+
this.element.classList.toggle("chat-vulnerabilities-collapsed", !element.vulnerabilitiesListExpanded);
|
|
169
186
|
this._onDidChangeContentHeight.fire();
|
|
170
187
|
}));
|
|
171
188
|
this._register(this.toolbar.onDidChangeDropdownVisibility(e => {
|
|
172
|
-
toolbarElement.classList.toggle(
|
|
189
|
+
toolbarElement.classList.toggle("force-visibility", e);
|
|
173
190
|
}));
|
|
174
191
|
this._configureForScreenReader();
|
|
175
|
-
this._register(
|
|
176
|
-
|
|
192
|
+
this._register(
|
|
193
|
+
this.accessibilityService.onDidChangeScreenReaderOptimized(() => this._configureForScreenReader())
|
|
194
|
+
);
|
|
195
|
+
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
177
196
|
if (( e.affectedKeys.has(AccessibilityVerbositySettingId.Chat))) {
|
|
178
197
|
this._configureForScreenReader();
|
|
179
198
|
}
|
|
@@ -190,19 +209,21 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
190
209
|
}
|
|
191
210
|
}));
|
|
192
211
|
this._register(this.editor.onDidBlurEditorWidget(() => {
|
|
193
|
-
this.element.classList.remove(
|
|
212
|
+
this.element.classList.remove("focused");
|
|
194
213
|
WordHighlighterContribution.get(this.editor)?.stopHighlighting();
|
|
195
214
|
this.clearWidgets();
|
|
196
215
|
}));
|
|
197
216
|
this._register(this.editor.onDidFocusEditorWidget(() => {
|
|
198
|
-
this.element.classList.add(
|
|
217
|
+
this.element.classList.add("focused");
|
|
199
218
|
WordHighlighterContribution.get(this.editor)?.restoreViewState(true);
|
|
200
219
|
}));
|
|
201
|
-
this._register(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
220
|
+
this._register(
|
|
221
|
+
Event.any(this.editor.onDidChangeModel, this.editor.onDidChangeModelContent)(() => {
|
|
222
|
+
if (this.currentCodeBlockData) {
|
|
223
|
+
this.updateContexts(this.currentCodeBlockData);
|
|
224
|
+
}
|
|
225
|
+
})
|
|
226
|
+
);
|
|
206
227
|
if (delegate.onDidScroll) {
|
|
207
228
|
this._register(delegate.onDidScroll(e => {
|
|
208
229
|
this.clearWidgets();
|
|
@@ -235,7 +256,7 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
235
256
|
SnippetController2.ID,
|
|
236
257
|
ColorDetector.ID,
|
|
237
258
|
LinkDetector.ID,
|
|
238
|
-
InspectEditorTokensController.ID
|
|
259
|
+
InspectEditorTokensController.ID
|
|
239
260
|
])
|
|
240
261
|
}));
|
|
241
262
|
}
|
|
@@ -245,18 +266,20 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
245
266
|
updatePaddingForLayout() {
|
|
246
267
|
const horizontalScrollbarVisible = this.currentScrollWidth > this.editor.getLayoutInfo().contentWidth;
|
|
247
268
|
const scrollbarHeight = this.editor.getLayoutInfo().horizontalScrollbarHeight;
|
|
248
|
-
const bottomPadding = horizontalScrollbarVisible ?
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
269
|
+
const bottomPadding = horizontalScrollbarVisible ? Math.max(this.verticalPadding - scrollbarHeight, 2) : this.verticalPadding;
|
|
270
|
+
this.editor.updateOptions({
|
|
271
|
+
padding: {
|
|
272
|
+
top: this.verticalPadding,
|
|
273
|
+
bottom: bottomPadding
|
|
274
|
+
}
|
|
275
|
+
});
|
|
252
276
|
}
|
|
253
277
|
_configureForScreenReader() {
|
|
254
278
|
const toolbarElt = this.toolbar.getElement();
|
|
255
279
|
if (this.accessibilityService.isScreenReaderOptimized()) {
|
|
256
|
-
toolbarElt.style.display =
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
toolbarElt.style.display = '';
|
|
280
|
+
toolbarElt.style.display = "block";
|
|
281
|
+
} else {
|
|
282
|
+
toolbarElt.style.display = "";
|
|
260
283
|
}
|
|
261
284
|
}
|
|
262
285
|
getEditorOptionsFromConfig() {
|
|
@@ -264,31 +287,35 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
264
287
|
wordWrap: this.editorOptions.configuration.resultEditor.wordWrap,
|
|
265
288
|
fontLigatures: this.editorOptions.configuration.resultEditor.fontLigatures,
|
|
266
289
|
bracketPairColorization: this.editorOptions.configuration.resultEditor.bracketPairColorization,
|
|
267
|
-
fontFamily: this.editorOptions.configuration.resultEditor.fontFamily ===
|
|
268
|
-
EDITOR_FONT_DEFAULTS.fontFamily :
|
|
269
|
-
this.editorOptions.configuration.resultEditor.fontFamily,
|
|
290
|
+
fontFamily: this.editorOptions.configuration.resultEditor.fontFamily === "default" ? EDITOR_FONT_DEFAULTS.fontFamily : this.editorOptions.configuration.resultEditor.fontFamily,
|
|
270
291
|
fontSize: this.editorOptions.configuration.resultEditor.fontSize,
|
|
271
292
|
fontWeight: this.editorOptions.configuration.resultEditor.fontWeight,
|
|
272
293
|
lineHeight: this.editorOptions.configuration.resultEditor.lineHeight,
|
|
273
|
-
...this.currentCodeBlockData?.renderOptions?.editorOptions
|
|
294
|
+
...this.currentCodeBlockData?.renderOptions?.editorOptions
|
|
274
295
|
};
|
|
275
296
|
}
|
|
276
297
|
layout(width) {
|
|
277
298
|
const contentHeight = this.getContentHeight();
|
|
278
299
|
let height = contentHeight;
|
|
279
300
|
if (this.currentCodeBlockData?.renderOptions?.maxHeightInLines) {
|
|
280
|
-
height = Math.min(
|
|
301
|
+
height = Math.min(
|
|
302
|
+
contentHeight,
|
|
303
|
+
this.editor.getOption(EditorOption.lineHeight) * this.currentCodeBlockData?.renderOptions?.maxHeightInLines
|
|
304
|
+
);
|
|
281
305
|
}
|
|
282
306
|
const editorBorder = 2;
|
|
283
307
|
width = width - editorBorder - (this.currentCodeBlockData?.renderOptions?.reserveWidth ?? 0);
|
|
284
|
-
this.editor.layout({
|
|
308
|
+
this.editor.layout({
|
|
309
|
+
width: isRequestVM(this.currentCodeBlockData?.element) ? width * 0.9 : width,
|
|
310
|
+
height
|
|
311
|
+
}, true);
|
|
285
312
|
this.updatePaddingForLayout();
|
|
286
313
|
}
|
|
287
314
|
getContentHeight() {
|
|
288
315
|
if (this.currentCodeBlockData?.range) {
|
|
289
316
|
const lineCount = this.currentCodeBlockData.range.endLineNumber - this.currentCodeBlockData.range.startLineNumber + 1;
|
|
290
317
|
const lineHeight = this.editor.getOption(EditorOption.lineHeight);
|
|
291
|
-
return lineCount * lineHeight;
|
|
318
|
+
return lineCount * lineHeight + 2 * this.verticalPadding;
|
|
292
319
|
}
|
|
293
320
|
return this.editor.getContentHeight();
|
|
294
321
|
}
|
|
@@ -297,7 +324,7 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
297
324
|
if (data.parentContextKeyService) {
|
|
298
325
|
this.contextKeyService.updateParent(data.parentContextKeyService);
|
|
299
326
|
}
|
|
300
|
-
if (this.getEditorOptionsFromConfig().wordWrap ===
|
|
327
|
+
if (this.getEditorOptionsFromConfig().wordWrap === "on") {
|
|
301
328
|
this.layout(width);
|
|
302
329
|
}
|
|
303
330
|
const didUpdate = await this.updateEditor(data);
|
|
@@ -305,32 +332,36 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
305
332
|
return;
|
|
306
333
|
}
|
|
307
334
|
this.editor.updateOptions({
|
|
308
|
-
...this.getEditorOptionsFromConfig()
|
|
335
|
+
...this.getEditorOptionsFromConfig()
|
|
309
336
|
});
|
|
310
337
|
if (!this.editor.getOption(EditorOption.ariaLabel)) {
|
|
311
338
|
this.editor.updateOptions({
|
|
312
|
-
ariaLabel: ( localize(
|
|
339
|
+
ariaLabel: ( localize(5947, "Code block {0}", data.codeBlockIndex + 1))
|
|
313
340
|
});
|
|
314
341
|
}
|
|
315
342
|
this.layout(width);
|
|
316
|
-
this.toolbar.setAriaLabel(( localize(
|
|
343
|
+
this.toolbar.setAriaLabel(( localize(5948, "Code block {0}", data.codeBlockIndex + 1)));
|
|
317
344
|
if (data.renderOptions?.hideToolbar) {
|
|
318
345
|
hide(this.toolbar.getElement());
|
|
319
|
-
}
|
|
320
|
-
else {
|
|
346
|
+
} else {
|
|
321
347
|
show(this.toolbar.getElement());
|
|
322
348
|
}
|
|
323
349
|
if (data.vulns?.length && isResponseVM(data.element)) {
|
|
324
350
|
clearNode(this.vulnsListElement);
|
|
325
|
-
this.element.classList.remove(
|
|
326
|
-
this.element.classList.toggle(
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
)
|
|
351
|
+
this.element.classList.remove("no-vulns");
|
|
352
|
+
this.element.classList.toggle(
|
|
353
|
+
"chat-vulnerabilities-collapsed",
|
|
354
|
+
!data.element.vulnerabilitiesListExpanded
|
|
355
|
+
);
|
|
356
|
+
append(this.vulnsListElement, ...( data.vulns.map(v => $(
|
|
357
|
+
"li",
|
|
358
|
+
undefined,
|
|
359
|
+
$("span.chat-vuln-title", undefined, v.title),
|
|
360
|
+
" " + v.description
|
|
361
|
+
))));
|
|
330
362
|
this.vulnsButton.label = this.getVulnerabilitiesLabel();
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
this.element.classList.add('no-vulns');
|
|
363
|
+
} else {
|
|
364
|
+
this.element.classList.add("no-vulns");
|
|
334
365
|
}
|
|
335
366
|
this._onDidChangeContentHeight.fire();
|
|
336
367
|
}
|
|
@@ -338,6 +369,11 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
338
369
|
this.clearWidgets();
|
|
339
370
|
this.currentCodeBlockData = undefined;
|
|
340
371
|
}
|
|
372
|
+
onDidRemount() {
|
|
373
|
+
if (this.currentCodeBlockData) {
|
|
374
|
+
this.editor.renderAsync(true);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
341
377
|
clearWidgets() {
|
|
342
378
|
ContentHoverController.get(this.editor)?.hideContentHover();
|
|
343
379
|
GlyphHoverController.get(this.editor)?.hideGlyphHover();
|
|
@@ -357,12 +393,10 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
357
393
|
}
|
|
358
394
|
getVulnerabilitiesLabel() {
|
|
359
395
|
if (!this.currentCodeBlockData || !this.currentCodeBlockData.vulns) {
|
|
360
|
-
return
|
|
396
|
+
return "";
|
|
361
397
|
}
|
|
362
|
-
const referencesLabel = this.currentCodeBlockData.vulns.length > 1 ?
|
|
363
|
-
|
|
364
|
-
( localize(5701, "{0} vulnerability", 1));
|
|
365
|
-
const icon = (element) => element.vulnerabilitiesListExpanded ? Codicon.chevronDown : Codicon.chevronRight;
|
|
398
|
+
const referencesLabel = this.currentCodeBlockData.vulns.length > 1 ? ( localize(5949, "{0} vulnerabilities", this.currentCodeBlockData.vulns.length)) : ( localize(5950, "{0} vulnerability", 1));
|
|
399
|
+
const icon = element => element.vulnerabilitiesListExpanded ? Codicon.chevronDown : Codicon.chevronRight;
|
|
366
400
|
return `${referencesLabel} $(${icon(this.currentCodeBlockData.element).id})`;
|
|
367
401
|
}
|
|
368
402
|
updateContexts(data) {
|
|
@@ -371,7 +405,10 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
371
405
|
return;
|
|
372
406
|
}
|
|
373
407
|
this.toolbar.context = {
|
|
374
|
-
code: textModel.getTextBuffer().getValueInRange(
|
|
408
|
+
code: textModel.getTextBuffer().getValueInRange(
|
|
409
|
+
data.range ?? textModel.getFullModelRange(),
|
|
410
|
+
EndOfLinePreference.TextDefined
|
|
411
|
+
),
|
|
375
412
|
codeBlockIndex: data.codeBlockIndex,
|
|
376
413
|
element: data.element,
|
|
377
414
|
languageId: textModel.getLanguageId(),
|
|
@@ -381,33 +418,39 @@ let CodeBlockPart = class CodeBlockPart extends Disposable {
|
|
|
381
418
|
this.resourceContextKey.set(textModel.uri);
|
|
382
419
|
}
|
|
383
420
|
};
|
|
384
|
-
CodeBlockPart = ( __decorate([
|
|
385
|
-
( __param(5, IInstantiationService)),
|
|
386
|
-
( __param(6, IContextKeyService)),
|
|
387
|
-
( __param(7, IModelService)),
|
|
388
|
-
( __param(8, IConfigurationService)),
|
|
389
|
-
( __param(9, IAccessibilityService))
|
|
390
|
-
], CodeBlockPart));
|
|
421
|
+
CodeBlockPart = ( __decorate([( __param(5, IInstantiationService)), ( __param(6, IContextKeyService)), ( __param(7, IModelService)), ( __param(8, IConfigurationService)), ( __param(9, IAccessibilityService))], CodeBlockPart));
|
|
391
422
|
let ChatCodeBlockContentProvider = class ChatCodeBlockContentProvider extends Disposable {
|
|
392
423
|
constructor(textModelService, _modelService) {
|
|
393
424
|
super();
|
|
394
425
|
this._modelService = _modelService;
|
|
395
|
-
this._register(
|
|
426
|
+
this._register(
|
|
427
|
+
textModelService.registerTextModelContentProvider(Schemas.vscodeChatCodeBlock, this)
|
|
428
|
+
);
|
|
396
429
|
}
|
|
397
430
|
async provideTextContent(resource) {
|
|
398
431
|
const existing = this._modelService.getModel(resource);
|
|
399
432
|
if (existing) {
|
|
400
433
|
return existing;
|
|
401
434
|
}
|
|
402
|
-
return this._modelService.createModel(
|
|
435
|
+
return this._modelService.createModel("", null, resource);
|
|
403
436
|
}
|
|
404
437
|
};
|
|
405
|
-
ChatCodeBlockContentProvider = ( __decorate([
|
|
406
|
-
( __param(0, ITextModelService)),
|
|
407
|
-
( __param(1, IModelService))
|
|
408
|
-
], ChatCodeBlockContentProvider));
|
|
438
|
+
ChatCodeBlockContentProvider = ( __decorate([( __param(0, ITextModelService)), ( __param(1, IModelService))], ChatCodeBlockContentProvider));
|
|
409
439
|
let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
410
|
-
constructor(
|
|
440
|
+
constructor(
|
|
441
|
+
options,
|
|
442
|
+
menuId,
|
|
443
|
+
delegate,
|
|
444
|
+
overflowWidgetsDomNode,
|
|
445
|
+
isSimpleWidget = false,
|
|
446
|
+
instantiationService,
|
|
447
|
+
contextKeyService,
|
|
448
|
+
modelService,
|
|
449
|
+
configurationService,
|
|
450
|
+
accessibilityService,
|
|
451
|
+
labelService,
|
|
452
|
+
openerService
|
|
453
|
+
) {
|
|
411
454
|
super();
|
|
412
455
|
this.options = options;
|
|
413
456
|
this.menuId = menuId;
|
|
@@ -422,60 +465,71 @@ let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
|
422
465
|
this._lastDiffEditorViewModel = this._store.add(( new MutableDisposable()));
|
|
423
466
|
this.currentScrollWidth = 0;
|
|
424
467
|
this.currentHorizontalPadding = 0;
|
|
425
|
-
this.element = $(
|
|
426
|
-
this.element.classList.add(
|
|
427
|
-
this.messageElement = append(this.element, $(
|
|
428
|
-
this.messageElement.setAttribute(
|
|
468
|
+
this.element = $(".interactive-result-code-block");
|
|
469
|
+
this.element.classList.add("compare");
|
|
470
|
+
this.messageElement = append(this.element, $(".message"));
|
|
471
|
+
this.messageElement.setAttribute("role", "status");
|
|
429
472
|
this.messageElement.tabIndex = 0;
|
|
430
473
|
this.contextKeyService = this._register(contextKeyService.createScoped(this.element));
|
|
431
474
|
const scopedInstantiationService = this._register(instantiationService.createChild(( new ServiceCollection(
|
|
432
475
|
[IContextKeyService, this.contextKeyService],
|
|
433
476
|
[IEditorProgressService, new class {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
477
|
+
show(_total, _delay) {
|
|
478
|
+
return emptyProgressRunner;
|
|
479
|
+
}
|
|
480
|
+
async showWhile(promise, _delay) {
|
|
481
|
+
await promise;
|
|
482
|
+
}
|
|
483
|
+
}()]
|
|
441
484
|
))));
|
|
442
|
-
const editorHeader = this.editorHeader = append(this.element, $(
|
|
443
|
-
const editorElement = append(this.element, $(
|
|
485
|
+
const editorHeader = this.editorHeader = append(this.element, $(".interactive-result-header.show-file-icons"));
|
|
486
|
+
const editorElement = append(this.element, $(".interactive-result-editor"));
|
|
444
487
|
this.diffEditor = this.createDiffEditor(scopedInstantiationService, editorElement, {
|
|
445
488
|
...getSimpleEditorOptions(this.configurationService),
|
|
446
|
-
lineNumbers:
|
|
489
|
+
lineNumbers: "on",
|
|
447
490
|
selectOnLineNumbers: true,
|
|
448
491
|
scrollBeyondLastLine: false,
|
|
449
492
|
lineDecorationsWidth: 12,
|
|
450
493
|
dragAndDrop: false,
|
|
451
|
-
padding: {
|
|
494
|
+
padding: {
|
|
495
|
+
top: defaultCodeblockPadding,
|
|
496
|
+
bottom: defaultCodeblockPadding
|
|
497
|
+
},
|
|
452
498
|
mouseWheelZoom: false,
|
|
453
499
|
scrollbar: {
|
|
454
|
-
vertical:
|
|
500
|
+
vertical: "hidden",
|
|
455
501
|
alwaysConsumeMouseWheel: false
|
|
456
502
|
},
|
|
457
503
|
definitionLinkOpensInPeek: false,
|
|
458
504
|
gotoLocation: {
|
|
459
|
-
multiple:
|
|
460
|
-
multipleDeclarations:
|
|
461
|
-
multipleDefinitions:
|
|
462
|
-
multipleImplementations:
|
|
505
|
+
multiple: "goto",
|
|
506
|
+
multipleDeclarations: "goto",
|
|
507
|
+
multipleDefinitions: "goto",
|
|
508
|
+
multipleImplementations: "goto"
|
|
463
509
|
},
|
|
464
|
-
ariaLabel: ( localize(
|
|
510
|
+
ariaLabel: ( localize(5946, "Code block")),
|
|
465
511
|
overflowWidgetsDomNode,
|
|
466
|
-
...this.getEditorOptionsFromConfig()
|
|
512
|
+
...this.getEditorOptionsFromConfig()
|
|
467
513
|
});
|
|
468
|
-
this.resourceLabel = this._register(scopedInstantiationService.createInstance(ResourceLabel, editorHeader, {
|
|
469
|
-
|
|
470
|
-
const editorScopedInstantiationService = this._register(scopedInstantiationService.createChild(( new ServiceCollection([IContextKeyService, editorScopedService]))));
|
|
471
|
-
this.toolbar = this._register(editorScopedInstantiationService.createInstance(MenuWorkbenchToolBar, editorHeader, menuId, {
|
|
472
|
-
menuOptions: {
|
|
473
|
-
shouldForwardArgs: true
|
|
474
|
-
}
|
|
514
|
+
this.resourceLabel = this._register(scopedInstantiationService.createInstance(ResourceLabel, editorHeader, {
|
|
515
|
+
supportIcons: true
|
|
475
516
|
}));
|
|
517
|
+
const editorScopedService = this._register(
|
|
518
|
+
this.diffEditor.getModifiedEditor().contextKeyService.createScoped(editorHeader)
|
|
519
|
+
);
|
|
520
|
+
const editorScopedInstantiationService = this._register(scopedInstantiationService.createChild(( new ServiceCollection([IContextKeyService, editorScopedService]))));
|
|
521
|
+
this.toolbar = this._register(
|
|
522
|
+
editorScopedInstantiationService.createInstance(MenuWorkbenchToolBar, editorHeader, menuId, {
|
|
523
|
+
menuOptions: {
|
|
524
|
+
shouldForwardArgs: true
|
|
525
|
+
}
|
|
526
|
+
})
|
|
527
|
+
);
|
|
476
528
|
this._configureForScreenReader();
|
|
477
|
-
this._register(
|
|
478
|
-
|
|
529
|
+
this._register(
|
|
530
|
+
this.accessibilityService.onDidChangeScreenReaderOptimized(() => this._configureForScreenReader())
|
|
531
|
+
);
|
|
532
|
+
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
479
533
|
if (( e.affectedKeys.has(AccessibilityVerbositySettingId.Chat))) {
|
|
480
534
|
this._configureForScreenReader();
|
|
481
535
|
}
|
|
@@ -492,12 +546,12 @@ let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
|
492
546
|
}
|
|
493
547
|
}));
|
|
494
548
|
this._register(this.diffEditor.getModifiedEditor().onDidBlurEditorWidget(() => {
|
|
495
|
-
this.element.classList.remove(
|
|
549
|
+
this.element.classList.remove("focused");
|
|
496
550
|
WordHighlighterContribution.get(this.diffEditor.getModifiedEditor())?.stopHighlighting();
|
|
497
551
|
this.clearWidgets();
|
|
498
552
|
}));
|
|
499
553
|
this._register(this.diffEditor.getModifiedEditor().onDidFocusEditorWidget(() => {
|
|
500
|
-
this.element.classList.add(
|
|
554
|
+
this.element.classList.add("focused");
|
|
501
555
|
WordHighlighterContribution.get(this.diffEditor.getModifiedEditor())?.restoreViewState(true);
|
|
502
556
|
}));
|
|
503
557
|
if (delegate.onDidScroll) {
|
|
@@ -522,32 +576,44 @@ let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
|
522
576
|
SmartSelectController.ID,
|
|
523
577
|
ContentHoverController.ID,
|
|
524
578
|
GlyphHoverController.ID,
|
|
525
|
-
GotoDefinitionAtPositionEditorContribution.ID
|
|
579
|
+
GotoDefinitionAtPositionEditorContribution.ID
|
|
526
580
|
])
|
|
527
581
|
};
|
|
528
582
|
return this._register(instantiationService.createInstance(DiffEditorWidget, parent, {
|
|
529
|
-
scrollbar: {
|
|
583
|
+
scrollbar: {
|
|
584
|
+
useShadows: false,
|
|
585
|
+
alwaysConsumeMouseWheel: false,
|
|
586
|
+
ignoreHorizontalScrollbarInContentHeight: true
|
|
587
|
+
},
|
|
530
588
|
renderMarginRevertIcon: false,
|
|
531
589
|
diffCodeLens: false,
|
|
532
590
|
scrollBeyondLastLine: false,
|
|
533
|
-
stickyScroll: {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
591
|
+
stickyScroll: {
|
|
592
|
+
enabled: false
|
|
593
|
+
},
|
|
594
|
+
originalAriaLabel: ( localize(5951, "Original")),
|
|
595
|
+
modifiedAriaLabel: ( localize(5952, "Modified")),
|
|
596
|
+
diffAlgorithm: "advanced",
|
|
537
597
|
readOnly: false,
|
|
538
598
|
isInEmbeddedEditor: true,
|
|
539
599
|
useInlineViewWhenSpaceIsLimited: true,
|
|
540
600
|
experimental: {
|
|
541
|
-
useTrueInlineView: true
|
|
601
|
+
useTrueInlineView: true
|
|
542
602
|
},
|
|
543
603
|
renderSideBySideInlineBreakpoint: 300,
|
|
544
604
|
renderOverviewRuler: false,
|
|
545
605
|
compactMode: true,
|
|
546
|
-
hideUnchangedRegions: {
|
|
606
|
+
hideUnchangedRegions: {
|
|
607
|
+
enabled: true,
|
|
608
|
+
contextLineCount: 1
|
|
609
|
+
},
|
|
547
610
|
renderGutterMenu: false,
|
|
548
611
|
lineNumbersMinChars: 1,
|
|
549
612
|
...options
|
|
550
|
-
}, {
|
|
613
|
+
}, {
|
|
614
|
+
originalEditor: widgetOptions,
|
|
615
|
+
modifiedEditor: widgetOptions
|
|
616
|
+
}));
|
|
551
617
|
}
|
|
552
618
|
focus() {
|
|
553
619
|
this.diffEditor.focus();
|
|
@@ -555,19 +621,21 @@ let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
|
555
621
|
updatePaddingForLayout() {
|
|
556
622
|
const horizontalScrollbarVisible = this.currentScrollWidth > this.diffEditor.getModifiedEditor().getLayoutInfo().contentWidth;
|
|
557
623
|
const scrollbarHeight = this.diffEditor.getModifiedEditor().getLayoutInfo().horizontalScrollbarHeight;
|
|
558
|
-
const bottomPadding = horizontalScrollbarVisible ?
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
624
|
+
const bottomPadding = horizontalScrollbarVisible ? Math.max(defaultCodeblockPadding - scrollbarHeight, 2) : defaultCodeblockPadding;
|
|
625
|
+
this.diffEditor.updateOptions({
|
|
626
|
+
padding: {
|
|
627
|
+
top: defaultCodeblockPadding,
|
|
628
|
+
bottom: bottomPadding
|
|
629
|
+
}
|
|
630
|
+
});
|
|
562
631
|
}
|
|
563
632
|
_configureForScreenReader() {
|
|
564
633
|
const toolbarElt = this.toolbar.getElement();
|
|
565
634
|
if (this.accessibilityService.isScreenReaderOptimized()) {
|
|
566
|
-
toolbarElt.style.display =
|
|
567
|
-
toolbarElt.ariaLabel = ( localize(
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
toolbarElt.style.display = '';
|
|
635
|
+
toolbarElt.style.display = "block";
|
|
636
|
+
toolbarElt.ariaLabel = ( localize(5953, "Code block toolbar"));
|
|
637
|
+
} else {
|
|
638
|
+
toolbarElt.style.display = "";
|
|
571
639
|
}
|
|
572
640
|
}
|
|
573
641
|
getEditorOptionsFromConfig() {
|
|
@@ -575,21 +643,20 @@ let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
|
575
643
|
wordWrap: this.options.configuration.resultEditor.wordWrap,
|
|
576
644
|
fontLigatures: this.options.configuration.resultEditor.fontLigatures,
|
|
577
645
|
bracketPairColorization: this.options.configuration.resultEditor.bracketPairColorization,
|
|
578
|
-
fontFamily: this.options.configuration.resultEditor.fontFamily ===
|
|
579
|
-
EDITOR_FONT_DEFAULTS.fontFamily :
|
|
580
|
-
this.options.configuration.resultEditor.fontFamily,
|
|
646
|
+
fontFamily: this.options.configuration.resultEditor.fontFamily === "default" ? EDITOR_FONT_DEFAULTS.fontFamily : this.options.configuration.resultEditor.fontFamily,
|
|
581
647
|
fontSize: this.options.configuration.resultEditor.fontSize,
|
|
582
648
|
fontWeight: this.options.configuration.resultEditor.fontWeight,
|
|
583
|
-
lineHeight: this.options.configuration.resultEditor.lineHeight
|
|
649
|
+
lineHeight: this.options.configuration.resultEditor.lineHeight
|
|
584
650
|
};
|
|
585
651
|
}
|
|
586
652
|
layout(width) {
|
|
587
653
|
const editorBorder = 2;
|
|
588
654
|
const toolbar = getTotalHeight(this.editorHeader);
|
|
589
|
-
const content = this.diffEditor.getModel()
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
655
|
+
const content = this.diffEditor.getModel() ? this.diffEditor.getContentHeight() : getTotalHeight(this.messageElement);
|
|
656
|
+
const dimension = new Dimension(
|
|
657
|
+
width - editorBorder - this.currentHorizontalPadding * 2,
|
|
658
|
+
toolbar + content
|
|
659
|
+
);
|
|
593
660
|
this.element.style.height = `${dimension.height}px`;
|
|
594
661
|
this.element.style.width = `${dimension.width}px`;
|
|
595
662
|
this.diffEditor.layout(dimension.with(undefined, content - editorBorder));
|
|
@@ -600,18 +667,21 @@ let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
|
600
667
|
if (data.parentContextKeyService) {
|
|
601
668
|
this.contextKeyService.updateParent(data.parentContextKeyService);
|
|
602
669
|
}
|
|
603
|
-
if (this.options.configuration.resultEditor.wordWrap ===
|
|
670
|
+
if (this.options.configuration.resultEditor.wordWrap === "on") {
|
|
604
671
|
this.layout(width);
|
|
605
672
|
}
|
|
606
673
|
await this.updateEditor(data, token);
|
|
607
674
|
this.layout(width);
|
|
608
675
|
this.diffEditor.updateOptions({
|
|
609
|
-
ariaLabel: ( localize(
|
|
610
|
-
readOnly: !!data.isReadOnly
|
|
676
|
+
ariaLabel: ( localize(5954, "Code Edits")),
|
|
677
|
+
readOnly: !!data.isReadOnly
|
|
611
678
|
});
|
|
612
679
|
this.resourceLabel.element.setFile(data.edit.uri, {
|
|
613
680
|
fileKind: FileKind.FILE,
|
|
614
|
-
fileDecorations: {
|
|
681
|
+
fileDecorations: {
|
|
682
|
+
colors: true,
|
|
683
|
+
badges: false
|
|
684
|
+
}
|
|
615
685
|
});
|
|
616
686
|
this._onDidChangeContentHeight.fire();
|
|
617
687
|
}
|
|
@@ -630,20 +700,21 @@ let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
|
630
700
|
}
|
|
631
701
|
const isEditApplied = Boolean(data.edit.state?.applied ?? 0);
|
|
632
702
|
ChatContextKeys.editApplied.bindTo(this.contextKeyService).set(isEditApplied);
|
|
633
|
-
this.element.classList.toggle(
|
|
703
|
+
this.element.classList.toggle("no-diff", isEditApplied);
|
|
634
704
|
if (isEditApplied) {
|
|
635
705
|
assertType(data.edit.state?.applied);
|
|
636
|
-
const uriLabel = this.labelService.getUriLabel(data.edit.uri, {
|
|
706
|
+
const uriLabel = this.labelService.getUriLabel(data.edit.uri, {
|
|
707
|
+
relative: true,
|
|
708
|
+
noPrefix: true
|
|
709
|
+
});
|
|
637
710
|
let template;
|
|
638
711
|
if (data.edit.state.applied === 1) {
|
|
639
|
-
template = ( localize(
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
}
|
|
644
|
-
else {
|
|
712
|
+
template = ( localize(5955, "Applied 1 change in [[``{0}``]]", uriLabel));
|
|
713
|
+
} else if (data.edit.state.applied < 0) {
|
|
714
|
+
template = ( localize(5956, "Edits in [[``{0}``]] have been rejected", uriLabel));
|
|
715
|
+
} else {
|
|
645
716
|
template = ( localize(
|
|
646
|
-
|
|
717
|
+
5957,
|
|
647
718
|
"Applied {0} changes in [[``{1}``]]",
|
|
648
719
|
data.edit.state.applied,
|
|
649
720
|
uriLabel
|
|
@@ -653,9 +724,12 @@ let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
|
653
724
|
renderCodeSegments: true,
|
|
654
725
|
actionHandler: {
|
|
655
726
|
callback: () => {
|
|
656
|
-
this.openerService.open(data.edit.uri, {
|
|
727
|
+
this.openerService.open(data.edit.uri, {
|
|
728
|
+
fromUserGesture: true,
|
|
729
|
+
allowCommands: false
|
|
730
|
+
});
|
|
657
731
|
},
|
|
658
|
-
disposables: this._store
|
|
732
|
+
disposables: this._store
|
|
659
733
|
}
|
|
660
734
|
});
|
|
661
735
|
reset(this.messageElement, message);
|
|
@@ -675,8 +749,7 @@ let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
|
675
749
|
});
|
|
676
750
|
this.diffEditor.setModel(viewModel);
|
|
677
751
|
this._lastDiffEditorViewModel.value = combinedDisposable(listener, viewModel);
|
|
678
|
-
}
|
|
679
|
-
else {
|
|
752
|
+
} else {
|
|
680
753
|
this.diffEditor.setModel(null);
|
|
681
754
|
this._lastDiffEditorViewModel.value = undefined;
|
|
682
755
|
this._onDidChangeContentHeight.fire();
|
|
@@ -684,19 +757,11 @@ let CodeCompareBlockPart = class CodeCompareBlockPart extends Disposable {
|
|
|
684
757
|
this.toolbar.context = {
|
|
685
758
|
edit: data.edit,
|
|
686
759
|
element: data.element,
|
|
687
|
-
diffEditor: this.diffEditor
|
|
760
|
+
diffEditor: this.diffEditor
|
|
688
761
|
};
|
|
689
762
|
}
|
|
690
763
|
};
|
|
691
|
-
CodeCompareBlockPart = ( __decorate([
|
|
692
|
-
( __param(5, IInstantiationService)),
|
|
693
|
-
( __param(6, IContextKeyService)),
|
|
694
|
-
( __param(7, IModelService)),
|
|
695
|
-
( __param(8, IConfigurationService)),
|
|
696
|
-
( __param(9, IAccessibilityService)),
|
|
697
|
-
( __param(10, ILabelService)),
|
|
698
|
-
( __param(11, IOpenerService))
|
|
699
|
-
], CodeCompareBlockPart));
|
|
764
|
+
CodeCompareBlockPart = ( __decorate([( __param(5, IInstantiationService)), ( __param(6, IContextKeyService)), ( __param(7, IModelService)), ( __param(8, IConfigurationService)), ( __param(9, IAccessibilityService)), ( __param(10, ILabelService)), ( __param(11, IOpenerService))], CodeCompareBlockPart));
|
|
700
765
|
let DefaultChatTextEditor = class DefaultChatTextEditor {
|
|
701
766
|
constructor(modelService, editorService, dialogService) {
|
|
702
767
|
this.modelService = modelService;
|
|
@@ -723,9 +788,7 @@ let DefaultChatTextEditor = class DefaultChatTextEditor {
|
|
|
723
788
|
}
|
|
724
789
|
}
|
|
725
790
|
}
|
|
726
|
-
const edits = diffEditor
|
|
727
|
-
? await this._applyWithDiffEditor(diffEditor, item)
|
|
728
|
-
: await this._apply(item);
|
|
791
|
+
const edits = diffEditor ? await this._applyWithDiffEditor(diffEditor, item) : await this._apply(item);
|
|
729
792
|
response.setEditApplied(item, edits);
|
|
730
793
|
}
|
|
731
794
|
async _applyWithDiffEditor(diffEditor, item) {
|
|
@@ -762,16 +825,15 @@ let DefaultChatTextEditor = class DefaultChatTextEditor {
|
|
|
762
825
|
}
|
|
763
826
|
ref.object.textEditorModel.pushStackElement();
|
|
764
827
|
return total;
|
|
765
|
-
}
|
|
766
|
-
finally {
|
|
828
|
+
} finally {
|
|
767
829
|
ref.dispose();
|
|
768
830
|
}
|
|
769
831
|
}
|
|
770
832
|
async _checkSha1(model, item) {
|
|
771
833
|
if (item.state?.sha1 && this._sha1.computeSHA1(model) && this._sha1.computeSHA1(model) !== item.state.sha1) {
|
|
772
834
|
const result = await this.dialogService.confirm({
|
|
773
|
-
message: ( localize(
|
|
774
|
-
detail: ( localize(
|
|
835
|
+
message: ( localize(5958, "The original file has been modified.")),
|
|
836
|
+
detail: ( localize(5959, "Do you want to apply the changes anyway?"))
|
|
775
837
|
});
|
|
776
838
|
if (!result.confirmed) {
|
|
777
839
|
return false;
|
|
@@ -789,10 +851,6 @@ let DefaultChatTextEditor = class DefaultChatTextEditor {
|
|
|
789
851
|
response.setEditApplied(item, -1);
|
|
790
852
|
}
|
|
791
853
|
};
|
|
792
|
-
DefaultChatTextEditor = ( __decorate([
|
|
793
|
-
( __param(0, ITextModelService)),
|
|
794
|
-
( __param(1, ICodeEditorService)),
|
|
795
|
-
( __param(2, IDialogService))
|
|
796
|
-
], DefaultChatTextEditor));
|
|
854
|
+
DefaultChatTextEditor = ( __decorate([( __param(0, ITextModelService)), ( __param(1, ICodeEditorService)), ( __param(2, IDialogService))], DefaultChatTextEditor));
|
|
797
855
|
|
|
798
856
|
export { ChatCodeBlockContentProvider, CodeBlockPart, CodeCompareBlockPart, DefaultChatTextEditor, localFileLanguageId, parseLocalFileData };
|