@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
|
@@ -11,7 +11,6 @@ import { DomScrollableElement } from '@codingame/monaco-vscode-api/vscode/vs/bas
|
|
|
11
11
|
import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
12
12
|
import { findLast } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arraysFind';
|
|
13
13
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
14
|
-
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
15
14
|
import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
16
15
|
import { Disposable, toDisposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
17
16
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
@@ -41,7 +40,7 @@ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
41
40
|
import { AccessibilityWorkbenchSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
42
41
|
import { IAiEditTelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service';
|
|
43
42
|
import { MarkedKatexSupport } from '../../../../markdown/browser/markedKatexSupport.js';
|
|
44
|
-
import { extractCodeblockUrisFromText } from '
|
|
43
|
+
import { extractCodeblockUrisFromText } from '../../../common/widget/annotations.js';
|
|
45
44
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
46
45
|
import { isResponseVM, isRequestVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
47
46
|
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
@@ -60,12 +59,32 @@ registerCss(chatCodeBlockPill);
|
|
|
60
59
|
registerCss(chatMarkdownPart);
|
|
61
60
|
const $ = $$1;
|
|
62
61
|
let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
63
|
-
static {
|
|
64
|
-
|
|
62
|
+
static {
|
|
63
|
+
ChatMarkdownContentPart_1 = this;
|
|
64
|
+
}
|
|
65
|
+
static {
|
|
66
|
+
this.ID_POOL = 0;
|
|
67
|
+
}
|
|
65
68
|
get codeblocks() {
|
|
66
69
|
return this._codeblocks;
|
|
67
70
|
}
|
|
68
|
-
constructor(
|
|
71
|
+
constructor(
|
|
72
|
+
markdown,
|
|
73
|
+
context,
|
|
74
|
+
editorPool,
|
|
75
|
+
fillInIncompleteTokens = false,
|
|
76
|
+
codeBlockStartIndex = 0,
|
|
77
|
+
renderer,
|
|
78
|
+
markdownRenderOptions,
|
|
79
|
+
currentWidth,
|
|
80
|
+
codeBlockModelCollection,
|
|
81
|
+
rendererOptions,
|
|
82
|
+
contextKeyService,
|
|
83
|
+
configurationService,
|
|
84
|
+
textModelService,
|
|
85
|
+
instantiationService,
|
|
86
|
+
aiEditTelemetryService
|
|
87
|
+
) {
|
|
69
88
|
super();
|
|
70
89
|
this.markdown = markdown;
|
|
71
90
|
this.editorPool = editorPool;
|
|
@@ -76,16 +95,14 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
|
76
95
|
this.aiEditTelemetryService = aiEditTelemetryService;
|
|
77
96
|
this.codeblocksPartId = String(++ChatMarkdownContentPart_1.ID_POOL);
|
|
78
97
|
this.allRefs = [];
|
|
79
|
-
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
80
|
-
this.onDidChangeHeight = this._onDidChangeHeight.event;
|
|
81
98
|
this._codeblocks = [];
|
|
82
99
|
this.mathLayoutParticipants = ( new Set());
|
|
83
100
|
const element = context.element;
|
|
84
|
-
const inUndoStop = findLast(context.content, e => e.kind ===
|
|
101
|
+
const inUndoStop = findLast(context.content, e => e.kind === "undoStop", context.contentIndex)?.id;
|
|
85
102
|
const orderedDisposablesList = [];
|
|
86
103
|
let globalCodeBlockIndexStart = codeBlockStartIndex;
|
|
87
104
|
let thisPartCodeBlockIndexStart = 0;
|
|
88
|
-
this.domNode = $(
|
|
105
|
+
this.domNode = $("div.chat-markdown-part");
|
|
89
106
|
if (this.rendererOptions.accessibilityOptions?.statusMessage) {
|
|
90
107
|
this.domNode.ariaLabel = this.rendererOptions.accessibilityOptions.statusMessage;
|
|
91
108
|
if (configurationService.getValue(AccessibilityWorkbenchSettingId.VerboseChatProgressUpdates)) {
|
|
@@ -97,34 +114,35 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
|
97
114
|
if (this._store.isDisposed) {
|
|
98
115
|
return;
|
|
99
116
|
}
|
|
100
|
-
const markedExtensions = enableMath
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
})])
|
|
104
|
-
: [];
|
|
117
|
+
const markedExtensions = enableMath ? coalesce([MarkedKatexSupport.getExtension(getWindow(context.container), {
|
|
118
|
+
throwOnError: false
|
|
119
|
+
})]) : [];
|
|
105
120
|
const markedOpts = {
|
|
106
121
|
gfm: true,
|
|
107
|
-
breaks: true
|
|
122
|
+
breaks: true
|
|
108
123
|
};
|
|
109
124
|
const result = this._register(renderer.render(markdown.content, {
|
|
110
125
|
sanitizerConfig: MarkedKatexSupport.getSanitizerOptions({
|
|
111
126
|
allowedTags: allowedChatMarkdownHtmlTags,
|
|
112
|
-
allowedAttributes: allowedMarkdownHtmlAttributes
|
|
127
|
+
allowedAttributes: allowedMarkdownHtmlAttributes
|
|
113
128
|
}),
|
|
114
129
|
fillInIncompleteTokens,
|
|
115
130
|
codeBlockRendererSync: (languageId, text, raw) => {
|
|
116
131
|
const isCodeBlockComplete = !isResponseVM(context.element) || context.element.isComplete || !raw || codeblockHasClosingBackticks(raw);
|
|
117
|
-
if ((!text || (text.startsWith(
|
|
118
|
-
const hideEmptyCodeblock = $(
|
|
119
|
-
hideEmptyCodeblock.style.display =
|
|
132
|
+
if ((!text || (text.startsWith("<vscode_codeblock_uri") && !text.includes("\n"))) && !isCodeBlockComplete) {
|
|
133
|
+
const hideEmptyCodeblock = $("div");
|
|
134
|
+
hideEmptyCodeblock.style.display = "none";
|
|
120
135
|
return hideEmptyCodeblock;
|
|
121
136
|
}
|
|
122
|
-
if (languageId ===
|
|
137
|
+
if (languageId === "diff" && raw && this.rendererOptions.allowInlineDiffs) {
|
|
123
138
|
const match = raw.match(/^```diff:(\w+)/);
|
|
124
139
|
if (match && isResponseVM(context.element)) {
|
|
125
140
|
const actualLanguageId = match[1];
|
|
126
141
|
const codeBlockUri = extractCodeblockUrisFromText(text);
|
|
127
|
-
const {
|
|
142
|
+
const {
|
|
143
|
+
before,
|
|
144
|
+
after
|
|
145
|
+
} = parseUnifiedDiff(codeBlockUri?.textWithoutResult ?? text);
|
|
128
146
|
const diffData = {
|
|
129
147
|
element: context.element,
|
|
130
148
|
codeBlockIndex: globalCodeBlockIndexStart++,
|
|
@@ -133,23 +151,29 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
|
133
151
|
afterContent: after,
|
|
134
152
|
codeBlockResource: codeBlockUri?.uri,
|
|
135
153
|
isReadOnly: true,
|
|
136
|
-
horizontalPadding: this.rendererOptions.horizontalPadding
|
|
154
|
+
horizontalPadding: this.rendererOptions.horizontalPadding
|
|
137
155
|
};
|
|
138
|
-
const diffPart = this.instantiationService.createInstance(
|
|
156
|
+
const diffPart = this.instantiationService.createInstance(
|
|
157
|
+
MarkdownDiffBlockPart,
|
|
158
|
+
diffData,
|
|
159
|
+
context.diffEditorPool,
|
|
160
|
+
context.currentWidth.get()
|
|
161
|
+
);
|
|
139
162
|
const ref = {
|
|
140
163
|
object: diffPart,
|
|
141
164
|
isStale: () => false,
|
|
142
165
|
dispose: () => diffPart.dispose()
|
|
143
166
|
};
|
|
144
167
|
this.allRefs.push(ref);
|
|
145
|
-
this._register(diffPart.onDidChangeContentHeight(() => this._onDidChangeHeight.fire()));
|
|
146
168
|
orderedDisposablesList.push(ref);
|
|
147
169
|
return diffPart.element;
|
|
148
170
|
}
|
|
149
171
|
}
|
|
150
|
-
if (languageId ===
|
|
151
|
-
const chatExtensions = this._register(instantiationService.createInstance(ChatExtensionsContentPart, {
|
|
152
|
-
|
|
172
|
+
if (languageId === "vscode-extensions") {
|
|
173
|
+
const chatExtensions = this._register(instantiationService.createInstance(ChatExtensionsContentPart, {
|
|
174
|
+
kind: "extensions",
|
|
175
|
+
extensions: text.split(",")
|
|
176
|
+
}));
|
|
153
177
|
return chatExtensions.domNode;
|
|
154
178
|
}
|
|
155
179
|
const globalIndex = globalCodeBlockIndexStart++;
|
|
@@ -163,35 +187,47 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
|
163
187
|
const parsedBody = parseLocalFileData(text);
|
|
164
188
|
range = parsedBody.range && Range.lift(parsedBody.range);
|
|
165
189
|
textModel = this.textModelService.createModelReference(parsedBody.uri).then(ref => ref.object.textEditorModel);
|
|
190
|
+
} catch (e) {
|
|
191
|
+
return $("div");
|
|
166
192
|
}
|
|
167
|
-
|
|
168
|
-
return $('div');
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
193
|
+
} else {
|
|
172
194
|
if (isResponseVM(element) || isRequestVM(element)) {
|
|
173
195
|
const modelEntry = this.codeBlockModelCollection.getOrCreate(element.sessionResource, element, globalIndex);
|
|
174
|
-
const fastUpdateModelEntry = this.codeBlockModelCollection.updateSync(element.sessionResource, element, globalIndex, {
|
|
196
|
+
const fastUpdateModelEntry = this.codeBlockModelCollection.updateSync(element.sessionResource, element, globalIndex, {
|
|
197
|
+
text,
|
|
198
|
+
languageId,
|
|
199
|
+
isComplete: isCodeBlockComplete
|
|
200
|
+
});
|
|
175
201
|
vulns = modelEntry.vulns;
|
|
176
202
|
codeblockEntry = fastUpdateModelEntry;
|
|
177
203
|
textModel = modelEntry.model;
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
204
|
+
} else {
|
|
180
205
|
textModel = undefined;
|
|
181
206
|
}
|
|
182
207
|
}
|
|
183
208
|
const hideToolbar = isResponseVM(element) && element.errorDetails?.responseIsFiltered;
|
|
184
209
|
const renderOptions = {
|
|
185
|
-
...this.rendererOptions.codeBlockRenderOptions
|
|
210
|
+
...this.rendererOptions.codeBlockRenderOptions
|
|
186
211
|
};
|
|
187
212
|
if (hideToolbar !== undefined) {
|
|
188
213
|
renderOptions.hideToolbar = hideToolbar;
|
|
189
214
|
}
|
|
190
|
-
const codeBlockInfo = {
|
|
215
|
+
const codeBlockInfo = {
|
|
216
|
+
languageId,
|
|
217
|
+
textModel,
|
|
218
|
+
codeBlockIndex: globalIndex,
|
|
219
|
+
codeBlockPartIndex: thisPartIndex,
|
|
220
|
+
element,
|
|
221
|
+
range,
|
|
222
|
+
parentContextKeyService: contextKeyService,
|
|
223
|
+
vulns,
|
|
224
|
+
codemapperUri: codeblockEntry?.codemapperUri,
|
|
225
|
+
renderOptions,
|
|
226
|
+
chatSessionResource: element.sessionResource
|
|
227
|
+
};
|
|
191
228
|
if (element.isCompleteAddedRequest || !codeblockEntry?.codemapperUri || !codeblockEntry.isEdit) {
|
|
192
229
|
const ref = this.renderCodeBlock(codeBlockInfo, text, isCodeBlockComplete, currentWidth);
|
|
193
230
|
this.allRefs.push(ref);
|
|
194
|
-
this._register(ref.object.onDidChangeContentHeight(() => this._onDidChangeHeight.fire()));
|
|
195
231
|
const ownerMarkdownPartId = this.codeblocksPartId;
|
|
196
232
|
const info = new (class {
|
|
197
233
|
constructor() {
|
|
@@ -215,14 +251,26 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
|
215
251
|
this._codeblocks.push(info);
|
|
216
252
|
orderedDisposablesList.push(ref);
|
|
217
253
|
return ref.object.element;
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
254
|
+
} else {
|
|
220
255
|
const requestId = isRequestVM(element) ? element.id : element.requestId;
|
|
221
|
-
const ref = this.renderCodeBlockPill(
|
|
256
|
+
const ref = this.renderCodeBlockPill(
|
|
257
|
+
element.sessionResource,
|
|
258
|
+
requestId,
|
|
259
|
+
inUndoStop,
|
|
260
|
+
codeBlockInfo.codemapperUri
|
|
261
|
+
);
|
|
222
262
|
if (isResponseVM(codeBlockInfo.element)) {
|
|
223
|
-
this.codeBlockModelCollection.update(
|
|
263
|
+
this.codeBlockModelCollection.update(
|
|
264
|
+
codeBlockInfo.element.sessionResource,
|
|
265
|
+
codeBlockInfo.element,
|
|
266
|
+
codeBlockInfo.codeBlockIndex,
|
|
267
|
+
{
|
|
268
|
+
text,
|
|
269
|
+
languageId: codeBlockInfo.languageId,
|
|
270
|
+
isComplete: isCodeBlockComplete
|
|
271
|
+
}
|
|
272
|
+
).then(e => {
|
|
224
273
|
this._codeblocks[codeBlockInfo.codeBlockPartIndex].codemapperUri = e.codemapperUri;
|
|
225
|
-
this._onDidChangeHeight.fire();
|
|
226
274
|
});
|
|
227
275
|
}
|
|
228
276
|
this.allRefs.push(ref);
|
|
@@ -251,69 +299,67 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
|
251
299
|
return ref.object.element;
|
|
252
300
|
}
|
|
253
301
|
},
|
|
254
|
-
asyncRenderCallback: () => this._onDidChangeHeight.fire(),
|
|
255
302
|
markedOptions: markedOpts,
|
|
256
303
|
markedExtensions,
|
|
257
|
-
...markdownRenderOptions
|
|
304
|
+
...markdownRenderOptions
|
|
258
305
|
}, this.domNode));
|
|
259
306
|
if (isResponseVM(element) && !element.model.codeBlockInfos && element.model.isComplete) {
|
|
260
307
|
element.model.initializeCodeBlockInfos(( this._codeblocks.map(info => {
|
|
261
308
|
return {
|
|
262
309
|
suggestionId: this.aiEditTelemetryService.createSuggestionId({
|
|
263
|
-
presentation:
|
|
264
|
-
feature:
|
|
310
|
+
presentation: "codeBlock",
|
|
311
|
+
feature: "sideBarChat",
|
|
265
312
|
editDeltaInfo: info.editDeltaInfo,
|
|
266
313
|
languageId: info.languageId,
|
|
267
314
|
modeId: element.model.request?.modeInfo?.modeId,
|
|
268
315
|
modelId: element.model.request?.modelId,
|
|
269
316
|
applyCodeBlockSuggestionId: undefined,
|
|
270
|
-
source: undefined
|
|
317
|
+
source: undefined
|
|
271
318
|
})
|
|
272
319
|
};
|
|
273
320
|
})));
|
|
274
321
|
}
|
|
275
322
|
const markdownDecorationsRenderer = instantiationService.createInstance(ChatMarkdownDecorationsRenderer);
|
|
276
|
-
this._register(
|
|
323
|
+
this._register(
|
|
324
|
+
markdownDecorationsRenderer.walkTreeAndAnnotateReferenceLinks(markdown, result.element)
|
|
325
|
+
);
|
|
277
326
|
const layoutParticipants = ( new Lazy(() => {
|
|
278
327
|
const observer = ( new ResizeObserver(() => this.mathLayoutParticipants.forEach(layout => layout())));
|
|
279
328
|
observer.observe(this.domNode);
|
|
280
329
|
this._register(toDisposable(() => observer.disconnect()));
|
|
281
330
|
return this.mathLayoutParticipants;
|
|
282
331
|
}));
|
|
283
|
-
for (const katexBlock of this.domNode.querySelectorAll(
|
|
332
|
+
for (const katexBlock of this.domNode.querySelectorAll(".katex-display")) {
|
|
284
333
|
if (!isHTMLElement(katexBlock)) {
|
|
285
334
|
continue;
|
|
286
335
|
}
|
|
287
336
|
const scrollable = ( new DomScrollableElement(katexBlock.cloneNode(true), {
|
|
288
337
|
vertical: ScrollbarVisibility.Hidden,
|
|
289
|
-
horizontal: ScrollbarVisibility.Auto
|
|
338
|
+
horizontal: ScrollbarVisibility.Auto
|
|
290
339
|
}));
|
|
291
340
|
orderedDisposablesList.push(scrollable);
|
|
292
341
|
katexBlock.replaceWith(scrollable.getDomNode());
|
|
293
|
-
layoutParticipants.value.add(() => {
|
|
342
|
+
layoutParticipants.value.add(() => {
|
|
343
|
+
scrollable.scanDomNode();
|
|
344
|
+
});
|
|
294
345
|
scrollable.scanDomNode();
|
|
295
346
|
}
|
|
296
347
|
orderedDisposablesList.reverse().forEach(d => this._register(d));
|
|
297
348
|
};
|
|
298
349
|
if (enableMath && !MarkedKatexSupport.getExtension(getWindow(context.container))) {
|
|
299
|
-
MarkedKatexSupport.loadExtension(getWindow(context.container))
|
|
300
|
-
.
|
|
301
|
-
console.error('Failed to load MarkedKatexSupport extension:', e);
|
|
350
|
+
MarkedKatexSupport.loadExtension(getWindow(context.container)).catch(e => {
|
|
351
|
+
console.error("Failed to load MarkedKatexSupport extension:", e);
|
|
302
352
|
}).finally(() => {
|
|
303
353
|
doRenderMarkdown();
|
|
304
|
-
if (!this._store.isDisposed) {
|
|
305
|
-
this._onDidChangeHeight.fire();
|
|
306
|
-
}
|
|
307
354
|
});
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
355
|
+
} else {
|
|
310
356
|
doRenderMarkdown();
|
|
311
357
|
}
|
|
312
358
|
}
|
|
313
|
-
renderCodeBlockPill(sessionResource, requestId, inUndoStop, codemapperUri
|
|
359
|
+
renderCodeBlockPill(sessionResource, requestId, inUndoStop, codemapperUri) {
|
|
314
360
|
const codeBlock = this.instantiationService.createInstance(CollapsedCodeBlock, sessionResource, requestId, inUndoStop);
|
|
315
361
|
if (codemapperUri) {
|
|
316
|
-
codeBlock.render(codemapperUri
|
|
362
|
+
codeBlock.render(codemapperUri);
|
|
317
363
|
}
|
|
318
364
|
return {
|
|
319
365
|
object: codeBlock,
|
|
@@ -324,19 +370,18 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
|
324
370
|
renderCodeBlock(data, text, isComplete, currentWidth) {
|
|
325
371
|
const ref = this.editorPool.get();
|
|
326
372
|
const editorInfo = ref.object;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
editorInfo.render(data, currentWidth).then(() => {
|
|
334
|
-
this._onDidChangeHeight.fire();
|
|
373
|
+
this.codeBlockModelCollection.update(data.element.sessionResource, data.element, data.codeBlockIndex, {
|
|
374
|
+
text,
|
|
375
|
+
languageId: data.languageId,
|
|
376
|
+
isComplete
|
|
377
|
+
}).then(e => {
|
|
378
|
+
this._codeblocks[data.codeBlockPartIndex].codemapperUri = e.codemapperUri;
|
|
335
379
|
});
|
|
380
|
+
editorInfo.render(data, currentWidth);
|
|
336
381
|
return ref;
|
|
337
382
|
}
|
|
338
383
|
hasSameContent(other) {
|
|
339
|
-
if (other.kind !==
|
|
384
|
+
if (other.kind !== "markdownContent") {
|
|
340
385
|
return false;
|
|
341
386
|
}
|
|
342
387
|
if (other.content.value === this.markdown.content.value) {
|
|
@@ -344,7 +389,7 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
|
344
389
|
}
|
|
345
390
|
const lastCodeblock = this._codeblocks.at(-1);
|
|
346
391
|
if (lastCodeblock && lastCodeblock.codemapperUri !== undefined && lastCodeblock.isStreamingEdit) {
|
|
347
|
-
return other.content.value.lastIndexOf(
|
|
392
|
+
return other.content.value.lastIndexOf("```") === this.markdown.content.value.lastIndexOf("```");
|
|
348
393
|
}
|
|
349
394
|
return false;
|
|
350
395
|
}
|
|
@@ -352,11 +397,9 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
|
352
397
|
this.allRefs.forEach((ref, index) => {
|
|
353
398
|
if (ref.object instanceof CodeBlockPart) {
|
|
354
399
|
ref.object.layout(width);
|
|
355
|
-
}
|
|
356
|
-
else if (ref.object instanceof MarkdownDiffBlockPart) {
|
|
400
|
+
} else if (ref.object instanceof MarkdownDiffBlockPart) {
|
|
357
401
|
ref.object.layout(width);
|
|
358
|
-
}
|
|
359
|
-
else if (ref.object instanceof CollapsedCodeBlock) {
|
|
402
|
+
} else if (ref.object instanceof CollapsedCodeBlock) {
|
|
360
403
|
const codeblockModel = this._codeblocks[index];
|
|
361
404
|
if (codeblockModel.codemapperUri && ref.object.uri?.toString() !== ( codeblockModel.codemapperUri.toString())) {
|
|
362
405
|
ref.object.render(codeblockModel.codemapperUri);
|
|
@@ -365,24 +408,41 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
|
|
|
365
408
|
});
|
|
366
409
|
this.mathLayoutParticipants.forEach(layout => layout());
|
|
367
410
|
}
|
|
411
|
+
onDidRemount() {
|
|
412
|
+
for (const ref of this.allRefs) {
|
|
413
|
+
if (ref.object instanceof CodeBlockPart) {
|
|
414
|
+
ref.object.onDidRemount();
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
368
418
|
addDisposable(disposable) {
|
|
369
419
|
this._register(disposable);
|
|
370
420
|
}
|
|
371
421
|
};
|
|
372
|
-
ChatMarkdownContentPart = ChatMarkdownContentPart_1 = ( __decorate([
|
|
373
|
-
( __param(10, IContextKeyService)),
|
|
374
|
-
( __param(11, IConfigurationService)),
|
|
375
|
-
( __param(12, ITextModelService)),
|
|
376
|
-
( __param(13, IInstantiationService)),
|
|
377
|
-
( __param(14, IAiEditTelemetryService))
|
|
378
|
-
], ChatMarkdownContentPart));
|
|
422
|
+
ChatMarkdownContentPart = ChatMarkdownContentPart_1 = ( __decorate([( __param(10, IContextKeyService)), ( __param(11, IConfigurationService)), ( __param(12, ITextModelService)), ( __param(13, IInstantiationService)), ( __param(14, IAiEditTelemetryService))], ChatMarkdownContentPart));
|
|
379
423
|
function codeblockHasClosingBackticks(str) {
|
|
380
424
|
str = str.trim();
|
|
381
425
|
return !!str.match(/\n```+$/);
|
|
382
426
|
}
|
|
383
427
|
let CollapsedCodeBlock = class CollapsedCodeBlock extends Disposable {
|
|
384
|
-
get uri() {
|
|
385
|
-
|
|
428
|
+
get uri() {
|
|
429
|
+
return this._uri;
|
|
430
|
+
}
|
|
431
|
+
constructor(
|
|
432
|
+
sessionResource,
|
|
433
|
+
requestId,
|
|
434
|
+
inUndoStop,
|
|
435
|
+
labelService,
|
|
436
|
+
editorService,
|
|
437
|
+
modelService,
|
|
438
|
+
languageService,
|
|
439
|
+
contextMenuService,
|
|
440
|
+
contextKeyService,
|
|
441
|
+
menuService,
|
|
442
|
+
hoverService,
|
|
443
|
+
chatService,
|
|
444
|
+
configurationService
|
|
445
|
+
) {
|
|
386
446
|
super();
|
|
387
447
|
this.sessionResource = sessionResource;
|
|
388
448
|
this.requestId = requestId;
|
|
@@ -399,68 +459,82 @@ let CollapsedCodeBlock = class CollapsedCodeBlock extends Disposable {
|
|
|
399
459
|
this.configurationService = configurationService;
|
|
400
460
|
this.hover = this._register(( new MutableDisposable()));
|
|
401
461
|
this.progressStore = this._store.add(( new DisposableStore()));
|
|
402
|
-
this.element = $(
|
|
403
|
-
this.statusIndicatorContainer = $(
|
|
404
|
-
this.pillElement = $(
|
|
462
|
+
this.element = $("div.chat-codeblock-pill-container");
|
|
463
|
+
this.statusIndicatorContainer = $("div.status-indicator-container");
|
|
464
|
+
this.pillElement = $(".chat-codeblock-pill-widget");
|
|
405
465
|
this.pillElement.tabIndex = 0;
|
|
406
|
-
this.pillElement.classList.add(
|
|
407
|
-
this.pillElement.role =
|
|
466
|
+
this.pillElement.classList.add("show-file-icons");
|
|
467
|
+
this.pillElement.role = "button";
|
|
408
468
|
this.element.appendChild(this.statusIndicatorContainer);
|
|
409
469
|
this.element.appendChild(this.pillElement);
|
|
410
470
|
this.registerListeners();
|
|
411
471
|
}
|
|
412
472
|
registerListeners() {
|
|
413
473
|
this._register(registerOpenEditorListeners(this.pillElement, e => this.showDiff(e)));
|
|
414
|
-
this._register(
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
const menu = this.menuService.getMenuActions(MenuId.ChatEditingCodeBlockContext, this.contextKeyService, {
|
|
425
|
-
arg: {
|
|
426
|
-
sessionResource: this.sessionResource,
|
|
427
|
-
requestId: this.requestId,
|
|
428
|
-
uri: this.uri,
|
|
429
|
-
stopId: this.inUndoStop
|
|
474
|
+
this._register(
|
|
475
|
+
addDisposableListener(this.pillElement, EventType.CONTEXT_MENU, e => {
|
|
476
|
+
const event = ( new StandardMouseEvent(getWindow(e), e));
|
|
477
|
+
EventHelper.stop(e, true);
|
|
478
|
+
this.contextMenuService.showContextMenu({
|
|
479
|
+
contextKeyService: this.contextKeyService,
|
|
480
|
+
getAnchor: () => event,
|
|
481
|
+
getActions: () => {
|
|
482
|
+
if (!this.uri) {
|
|
483
|
+
return [];
|
|
430
484
|
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
485
|
+
const menu = this.menuService.getMenuActions(MenuId.ChatEditingCodeBlockContext, this.contextKeyService, {
|
|
486
|
+
arg: {
|
|
487
|
+
sessionResource: this.sessionResource,
|
|
488
|
+
requestId: this.requestId,
|
|
489
|
+
uri: this.uri,
|
|
490
|
+
stopId: this.inUndoStop
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
return getFlatContextMenuActions(menu);
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
})
|
|
497
|
+
);
|
|
436
498
|
}
|
|
437
|
-
showDiff(
|
|
499
|
+
showDiff(
|
|
500
|
+
{
|
|
501
|
+
editorOptions: options,
|
|
502
|
+
openToSide
|
|
503
|
+
}
|
|
504
|
+
) {
|
|
438
505
|
if (this.currentDiff) {
|
|
439
506
|
this.editorService.openEditor({
|
|
440
|
-
original: {
|
|
441
|
-
|
|
507
|
+
original: {
|
|
508
|
+
resource: this.currentDiff.originalURI
|
|
509
|
+
},
|
|
510
|
+
modified: {
|
|
511
|
+
resource: this.currentDiff.modifiedURI
|
|
512
|
+
},
|
|
513
|
+
options
|
|
514
|
+
}, openToSide ? SIDE_GROUP : undefined);
|
|
515
|
+
} else if (this.uri) {
|
|
516
|
+
this.editorService.openEditor({
|
|
517
|
+
resource: this.uri,
|
|
442
518
|
options
|
|
443
519
|
}, openToSide ? SIDE_GROUP : undefined);
|
|
444
520
|
}
|
|
445
|
-
else if (this.uri) {
|
|
446
|
-
this.editorService.openEditor({ resource: this.uri, options }, openToSide ? SIDE_GROUP : undefined);
|
|
447
|
-
}
|
|
448
521
|
}
|
|
449
|
-
render(uri
|
|
450
|
-
this.pillElement.classList.toggle('from-sub-agent', !!fromSubagent);
|
|
522
|
+
render(uri) {
|
|
451
523
|
this.progressStore.clear();
|
|
452
524
|
this._uri = uri;
|
|
453
525
|
const session = this.chatService.getSession(this.sessionResource);
|
|
454
526
|
const iconText = this.labelService.getUriBasenameLabel(uri);
|
|
455
|
-
const statusIconEl = $$1(
|
|
456
|
-
const statusLabelEl = $$1(
|
|
527
|
+
const statusIconEl = $$1("span.status-icon");
|
|
528
|
+
const statusLabelEl = $$1("span.status-label", {}, "");
|
|
457
529
|
this.statusIndicatorContainer.replaceChildren(statusIconEl, statusLabelEl);
|
|
458
|
-
const iconEl = $$1(
|
|
459
|
-
const iconLabelEl = $$1(
|
|
460
|
-
const labelDetail = $$1(
|
|
461
|
-
const progressFill = $$1(
|
|
530
|
+
const iconEl = $$1("span.icon");
|
|
531
|
+
const iconLabelEl = $$1("span.icon-label", {}, iconText);
|
|
532
|
+
const labelDetail = $$1("span.label-detail", {}, "");
|
|
533
|
+
const progressFill = $$1("span.progress-fill");
|
|
462
534
|
this.pillElement.replaceChildren(progressFill, iconEl, iconLabelEl, labelDetail);
|
|
463
|
-
const tooltipLabel = this.labelService.getUriLabel(uri, {
|
|
535
|
+
const tooltipLabel = this.labelService.getUriLabel(uri, {
|
|
536
|
+
relative: true
|
|
537
|
+
});
|
|
464
538
|
this.updateTooltip(tooltipLabel);
|
|
465
539
|
const editSession = session?.editingSession;
|
|
466
540
|
if (!editSession) {
|
|
@@ -481,35 +555,33 @@ let CollapsedCodeBlock = class CollapsedCodeBlock extends Disposable {
|
|
|
481
555
|
statusIconEl.classList.remove(...statusIconClasses);
|
|
482
556
|
iconEl.classList.remove(...pillIconClasses);
|
|
483
557
|
if (isStreaming.read(r)) {
|
|
484
|
-
const codicon = ThemeIcon.modify(Codicon.loading,
|
|
558
|
+
const codicon = ThemeIcon.modify(Codicon.loading, "spin");
|
|
485
559
|
statusIconClasses = ThemeIcon.asClassNameArray(codicon);
|
|
486
560
|
statusIconEl.classList.add(...statusIconClasses);
|
|
487
561
|
const entry = editSession.readEntry(uri, r);
|
|
488
562
|
const rwRatio = Math.floor((entry?.rewriteRatio.read(r) || 0) * 100);
|
|
489
|
-
statusLabelEl.textContent = ( localize(
|
|
563
|
+
statusLabelEl.textContent = ( localize(5851, "Applying edits"));
|
|
490
564
|
const showAnimation = this.configurationService.getValue(ChatConfiguration.ShowCodeBlockProgressAnimation);
|
|
491
565
|
if (showAnimation) {
|
|
492
566
|
progressFill.style.width = `${rwRatio}%`;
|
|
493
|
-
this.pillElement.classList.add(
|
|
494
|
-
labelDetail.textContent =
|
|
567
|
+
this.pillElement.classList.add("progress-filling");
|
|
568
|
+
labelDetail.textContent = "";
|
|
569
|
+
} else {
|
|
570
|
+
progressFill.style.width = "0%";
|
|
571
|
+
this.pillElement.classList.remove("progress-filling");
|
|
572
|
+
labelDetail.textContent = rwRatio === 0 || !rwRatio ? ( localize(5852, "Generating edits...")) : ( localize(5853, "({0}%)...", rwRatio));
|
|
495
573
|
}
|
|
496
|
-
|
|
497
|
-
progressFill.style.width = '0%';
|
|
498
|
-
this.pillElement.classList.remove('progress-filling');
|
|
499
|
-
labelDetail.textContent = rwRatio === 0 || !rwRatio ? ( localize(5633, "Generating edits...")) : ( localize(5634, "({0}%)...", rwRatio));
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
else {
|
|
574
|
+
} else {
|
|
503
575
|
const statusCodeicon = Codicon.check;
|
|
504
576
|
statusIconClasses = ThemeIcon.asClassNameArray(statusCodeicon);
|
|
505
577
|
statusIconEl.classList.add(...statusIconClasses);
|
|
506
|
-
statusLabelEl.textContent = ( localize(
|
|
507
|
-
const fileKind = uri.path.endsWith(
|
|
578
|
+
statusLabelEl.textContent = ( localize(5854, "Edited"));
|
|
579
|
+
const fileKind = uri.path.endsWith("/") ? FileKind.FOLDER : FileKind.FILE;
|
|
508
580
|
pillIconClasses = getIconClasses(this.modelService, this.languageService, uri, fileKind);
|
|
509
581
|
iconEl.classList.add(...pillIconClasses);
|
|
510
|
-
this.pillElement.classList.remove(
|
|
511
|
-
progressFill.style.width =
|
|
512
|
-
labelDetail.textContent =
|
|
582
|
+
this.pillElement.classList.remove("progress-filling");
|
|
583
|
+
progressFill.style.width = "0%";
|
|
584
|
+
labelDetail.textContent = "";
|
|
513
585
|
}
|
|
514
586
|
}));
|
|
515
587
|
this.progressStore.add(autorunSelfDisposable(r => {
|
|
@@ -517,17 +589,17 @@ let CollapsedCodeBlock = class CollapsedCodeBlock extends Disposable {
|
|
|
517
589
|
if (changes === undefined) {
|
|
518
590
|
return;
|
|
519
591
|
}
|
|
520
|
-
const labelAdded = this.pillElement.querySelector(
|
|
521
|
-
const labelRemoved = this.pillElement.querySelector(
|
|
592
|
+
const labelAdded = this.pillElement.querySelector(".label-added") ?? this.pillElement.appendChild($$1("span.label-added"));
|
|
593
|
+
const labelRemoved = this.pillElement.querySelector(".label-removed") ?? this.pillElement.appendChild($$1("span.label-removed"));
|
|
522
594
|
if (changes && !changes?.identical && !changes?.quitEarly) {
|
|
523
595
|
this.currentDiff = changes;
|
|
524
596
|
labelAdded.textContent = `+${changes.added}`;
|
|
525
597
|
labelRemoved.textContent = `-${changes.removed}`;
|
|
526
|
-
const insertionsFragment = changes.added === 1 ? ( localize(
|
|
527
|
-
const deletionsFragment = changes.removed === 1 ? ( localize(
|
|
598
|
+
const insertionsFragment = changes.added === 1 ? ( localize(5855, "1 insertion")) : ( localize(5856, "{0} insertions", changes.added));
|
|
599
|
+
const deletionsFragment = changes.removed === 1 ? ( localize(5857, "1 deletion")) : ( localize(5858, "{0} deletions", changes.removed));
|
|
528
600
|
const summary = ( localize(
|
|
529
|
-
|
|
530
|
-
|
|
601
|
+
5859,
|
|
602
|
+
"Edited {0}, {1}, {2}",
|
|
531
603
|
iconText,
|
|
532
604
|
insertionsFragment,
|
|
533
605
|
deletionsFragment
|
|
@@ -545,23 +617,16 @@ let CollapsedCodeBlock = class CollapsedCodeBlock extends Disposable {
|
|
|
545
617
|
this.hover.value = this.hoverService.setupDelayedHover(this.pillElement, () => ({
|
|
546
618
|
content: this.tooltip,
|
|
547
619
|
style: HoverStyle.Pointer,
|
|
548
|
-
position: {
|
|
549
|
-
|
|
620
|
+
position: {
|
|
621
|
+
hoverPosition: HoverPosition.BELOW
|
|
622
|
+
},
|
|
623
|
+
persistence: {
|
|
624
|
+
hideOnKeyDown: true
|
|
625
|
+
}
|
|
550
626
|
}));
|
|
551
627
|
}
|
|
552
628
|
}
|
|
553
629
|
};
|
|
554
|
-
CollapsedCodeBlock = ( __decorate([
|
|
555
|
-
( __param(3, ILabelService)),
|
|
556
|
-
( __param(4, IEditorService)),
|
|
557
|
-
( __param(5, IModelService)),
|
|
558
|
-
( __param(6, ILanguageService)),
|
|
559
|
-
( __param(7, IContextMenuService)),
|
|
560
|
-
( __param(8, IContextKeyService)),
|
|
561
|
-
( __param(9, IMenuService)),
|
|
562
|
-
( __param(10, IHoverService)),
|
|
563
|
-
( __param(11, IChatService)),
|
|
564
|
-
( __param(12, IConfigurationService))
|
|
565
|
-
], CollapsedCodeBlock));
|
|
630
|
+
CollapsedCodeBlock = ( __decorate([( __param(3, ILabelService)), ( __param(4, IEditorService)), ( __param(5, IModelService)), ( __param(6, ILanguageService)), ( __param(7, IContextMenuService)), ( __param(8, IContextKeyService)), ( __param(9, IMenuService)), ( __param(10, IHoverService)), ( __param(11, IChatService)), ( __param(12, IConfigurationService))], CollapsedCodeBlock));
|
|
566
631
|
|
|
567
632
|
export { ChatMarkdownContentPart, CollapsedCodeBlock, codeblockHasClosingBackticks };
|