@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
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
|
|
2
|
+
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
|
+
import * as chatEditingEditorOverlay from './media/chatEditingEditorOverlay.css';
|
|
5
|
+
import { MutableDisposable, Disposable, DisposableStore, toDisposable, DisposableMap, combinedDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
7
|
+
import { MenuWorkbenchToolBar, HiddenItemStrategy } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
8
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
|
+
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
10
|
+
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
|
|
11
|
+
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
12
|
+
import { ActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
13
|
+
import { addDisposableGenericMouseMoveListener, createElement, append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
14
|
+
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
15
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
16
|
+
import { AcceptAction, navigationBearingFakeActionId, RejectAction } from './chatEditingEditorActions.js';
|
|
17
|
+
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
18
|
+
import { EditorGroupView } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorGroupView';
|
|
19
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
20
|
+
import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
21
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
22
|
+
import { EditorResourceAccessor, SideBySideEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
23
|
+
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
24
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
25
|
+
import { renderIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
26
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
27
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
28
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
29
|
+
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
30
|
+
import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
|
|
31
|
+
import { derived, derivedOpts } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
32
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
33
|
+
import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
|
|
34
|
+
|
|
35
|
+
registerCss(chatEditingEditorOverlay);
|
|
36
|
+
class ChatEditingAcceptRejectActionViewItem extends ActionViewItem {
|
|
37
|
+
constructor(
|
|
38
|
+
action,
|
|
39
|
+
options,
|
|
40
|
+
_entry,
|
|
41
|
+
_editor,
|
|
42
|
+
_keybindingService,
|
|
43
|
+
_primaryActionIds = [AcceptAction.ID]
|
|
44
|
+
) {
|
|
45
|
+
super(undefined, action, {
|
|
46
|
+
...options,
|
|
47
|
+
icon: false,
|
|
48
|
+
label: true,
|
|
49
|
+
keybindingNotRenderedWithLabel: true
|
|
50
|
+
});
|
|
51
|
+
this._entry = _entry;
|
|
52
|
+
this._editor = _editor;
|
|
53
|
+
this._keybindingService = _keybindingService;
|
|
54
|
+
this._primaryActionIds = _primaryActionIds;
|
|
55
|
+
this._reveal = this._store.add(( new MutableDisposable()));
|
|
56
|
+
}
|
|
57
|
+
render(container) {
|
|
58
|
+
super.render(container);
|
|
59
|
+
if (this._primaryActionIds.includes(this._action.id)) {
|
|
60
|
+
this.element?.classList.add("primary");
|
|
61
|
+
}
|
|
62
|
+
if (this._action.id === AcceptAction.ID) {
|
|
63
|
+
const listener = this._store.add(( new MutableDisposable()));
|
|
64
|
+
this._store.add(autorun(r => {
|
|
65
|
+
assertType(this.label);
|
|
66
|
+
assertType(this.element);
|
|
67
|
+
const ctrl = this._entry.read(r)?.autoAcceptController.read(r);
|
|
68
|
+
if (ctrl) {
|
|
69
|
+
const ratio = -100 * (ctrl.remaining / ctrl.total);
|
|
70
|
+
this.element.style.setProperty("--vscode-action-item-auto-timeout", `${ratio}%`);
|
|
71
|
+
this.element.classList.toggle("auto", true);
|
|
72
|
+
listener.value = addDisposableGenericMouseMoveListener(this.element, () => ctrl.cancel());
|
|
73
|
+
} else {
|
|
74
|
+
this.element.classList.toggle("auto", false);
|
|
75
|
+
listener.clear();
|
|
76
|
+
}
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
set actionRunner(actionRunner) {
|
|
81
|
+
super.actionRunner = actionRunner;
|
|
82
|
+
if (this._editor) {
|
|
83
|
+
this._reveal.value = actionRunner.onWillRun(_e => {
|
|
84
|
+
this._editor.focus();
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
get actionRunner() {
|
|
89
|
+
return super.actionRunner;
|
|
90
|
+
}
|
|
91
|
+
getTooltip() {
|
|
92
|
+
const value = super.getTooltip();
|
|
93
|
+
if (!value || this.options.keybinding) {
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
return this._keybindingService.appendKeybinding(value, this._action.id);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
let ChatEditorOverlayWidget = class ChatEditorOverlayWidget extends Disposable {
|
|
100
|
+
constructor(_editor, _keybindingService, _instaService) {
|
|
101
|
+
super();
|
|
102
|
+
this._editor = _editor;
|
|
103
|
+
this._keybindingService = _keybindingService;
|
|
104
|
+
this._instaService = _instaService;
|
|
105
|
+
this._showStore = this._store.add(( new DisposableStore()));
|
|
106
|
+
this._session = observableValue(this, undefined);
|
|
107
|
+
this._entry = observableValue(this, undefined);
|
|
108
|
+
this._navigationBearings = observableValue(this, {
|
|
109
|
+
changeCount: -1,
|
|
110
|
+
activeIdx: -1,
|
|
111
|
+
entriesCount: -1
|
|
112
|
+
});
|
|
113
|
+
this._domNode = createElement("div");
|
|
114
|
+
this._domNode.classList.add("chat-editor-overlay-widget");
|
|
115
|
+
this._isBusy = derived(r => {
|
|
116
|
+
const entry = this._entry.read(r);
|
|
117
|
+
return entry?.waitsForLastEdits.read(r);
|
|
118
|
+
});
|
|
119
|
+
const progressNode = createElement("div");
|
|
120
|
+
progressNode.classList.add("chat-editor-overlay-progress");
|
|
121
|
+
append(progressNode, renderIcon(ThemeIcon.modify(Codicon.loading, "spin")));
|
|
122
|
+
const textProgress = append(progressNode, $("span.progress-message"));
|
|
123
|
+
this._domNode.appendChild(progressNode);
|
|
124
|
+
this._store.add(autorun(r => {
|
|
125
|
+
const busy = this._isBusy.read(r);
|
|
126
|
+
this._domNode.classList.toggle("busy", busy);
|
|
127
|
+
textProgress.innerText = "";
|
|
128
|
+
}));
|
|
129
|
+
this._toolbarNode = createElement("div");
|
|
130
|
+
this._toolbarNode.classList.add("chat-editor-overlay-toolbar");
|
|
131
|
+
}
|
|
132
|
+
dispose() {
|
|
133
|
+
this.hide();
|
|
134
|
+
super.dispose();
|
|
135
|
+
}
|
|
136
|
+
getDomNode() {
|
|
137
|
+
return this._domNode;
|
|
138
|
+
}
|
|
139
|
+
show(session, entry, indicies) {
|
|
140
|
+
this._showStore.clear();
|
|
141
|
+
transaction(tx => {
|
|
142
|
+
this._session.set(session, tx);
|
|
143
|
+
this._entry.set(entry, tx);
|
|
144
|
+
});
|
|
145
|
+
this._showStore.add(autorun(r => {
|
|
146
|
+
const entryIndex = indicies.entryIndex.read(r);
|
|
147
|
+
const changeIndex = indicies.changeIndex.read(r);
|
|
148
|
+
const entries = session.entries.read(r);
|
|
149
|
+
let activeIdx = entryIndex !== undefined && changeIndex !== undefined ? changeIndex : -1;
|
|
150
|
+
let totalChangesCount = 0;
|
|
151
|
+
for (let i = 0; i < entries.length; i++) {
|
|
152
|
+
const changesCount = entries[i].changesCount.read(r);
|
|
153
|
+
totalChangesCount += changesCount;
|
|
154
|
+
if (entryIndex !== undefined && i < entryIndex) {
|
|
155
|
+
activeIdx += changesCount;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
this._navigationBearings.set({
|
|
159
|
+
changeCount: totalChangesCount,
|
|
160
|
+
activeIdx,
|
|
161
|
+
entriesCount: entries.length
|
|
162
|
+
}, undefined);
|
|
163
|
+
}));
|
|
164
|
+
this._domNode.appendChild(this._toolbarNode);
|
|
165
|
+
this._showStore.add(toDisposable(() => this._toolbarNode.remove()));
|
|
166
|
+
this._showStore.add(this._instaService.createInstance(
|
|
167
|
+
MenuWorkbenchToolBar,
|
|
168
|
+
this._toolbarNode,
|
|
169
|
+
MenuId.ChatEditingEditorContent,
|
|
170
|
+
{
|
|
171
|
+
telemetrySource: "chatEditor.overlayToolbar",
|
|
172
|
+
hiddenItemStrategy: HiddenItemStrategy.Ignore,
|
|
173
|
+
toolbarOptions: {
|
|
174
|
+
primaryGroup: () => true,
|
|
175
|
+
useSeparatorsInPrimaryActions: true
|
|
176
|
+
},
|
|
177
|
+
menuOptions: {
|
|
178
|
+
renderShortTitle: true
|
|
179
|
+
},
|
|
180
|
+
actionViewItemProvider: (action, options) => {
|
|
181
|
+
const that = this;
|
|
182
|
+
if (action.id === navigationBearingFakeActionId) {
|
|
183
|
+
return new (class extends ActionViewItem {
|
|
184
|
+
constructor() {
|
|
185
|
+
super(undefined, action, {
|
|
186
|
+
...options,
|
|
187
|
+
icon: false,
|
|
188
|
+
label: true,
|
|
189
|
+
keybindingNotRenderedWithLabel: true
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
render(container) {
|
|
193
|
+
super.render(container);
|
|
194
|
+
container.classList.add("label-item");
|
|
195
|
+
this._store.add(autorun(r => {
|
|
196
|
+
assertType(this.label);
|
|
197
|
+
const {
|
|
198
|
+
changeCount,
|
|
199
|
+
activeIdx
|
|
200
|
+
} = that._navigationBearings.read(r);
|
|
201
|
+
if (changeCount > 0) {
|
|
202
|
+
const n = activeIdx === -1 ? "1" : `${activeIdx + 1}`;
|
|
203
|
+
this.label.innerText = ( localize(5315, "{0} of {1}", n, changeCount));
|
|
204
|
+
} else {
|
|
205
|
+
this.label.innerText = ( localize(5316, "—"));
|
|
206
|
+
}
|
|
207
|
+
this.updateTooltip();
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
getTooltip() {
|
|
211
|
+
const {
|
|
212
|
+
changeCount,
|
|
213
|
+
entriesCount
|
|
214
|
+
} = that._navigationBearings.get();
|
|
215
|
+
if (changeCount === -1 || entriesCount === -1) {
|
|
216
|
+
return undefined;
|
|
217
|
+
}
|
|
218
|
+
let result;
|
|
219
|
+
if (changeCount === 1 && entriesCount === 1) {
|
|
220
|
+
result = ( localize(5317, "1 change in 1 file"));
|
|
221
|
+
} else if (changeCount === 1) {
|
|
222
|
+
result = ( localize(5318, "1 change in {0} files", entriesCount));
|
|
223
|
+
} else if (entriesCount === 1) {
|
|
224
|
+
result = ( localize(5319, "{0} changes in 1 file", changeCount));
|
|
225
|
+
} else {
|
|
226
|
+
result = ( localize(5320, "{0} changes in {1} files", changeCount, entriesCount));
|
|
227
|
+
}
|
|
228
|
+
if (!that._isBusy.get()) {
|
|
229
|
+
return result;
|
|
230
|
+
}
|
|
231
|
+
return localize(5321, "{0} - Working...", result);
|
|
232
|
+
}
|
|
233
|
+
})();
|
|
234
|
+
}
|
|
235
|
+
if (action.id === AcceptAction.ID || action.id === RejectAction.ID) {
|
|
236
|
+
return ( new ChatEditingAcceptRejectActionViewItem(action, options, that._entry, that._editor, that._keybindingService));
|
|
237
|
+
}
|
|
238
|
+
return undefined;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
));
|
|
242
|
+
}
|
|
243
|
+
hide() {
|
|
244
|
+
transaction(tx => {
|
|
245
|
+
this._session.set(undefined, tx);
|
|
246
|
+
this._entry.set(undefined, tx);
|
|
247
|
+
this._navigationBearings.set({
|
|
248
|
+
changeCount: -1,
|
|
249
|
+
activeIdx: -1,
|
|
250
|
+
entriesCount: -1
|
|
251
|
+
}, tx);
|
|
252
|
+
});
|
|
253
|
+
this._showStore.clear();
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
ChatEditorOverlayWidget = ( __decorate([( __param(1, IKeybindingService)), ( __param(2, IInstantiationService))], ChatEditorOverlayWidget));
|
|
257
|
+
let ChatEditingOverlayController = class ChatEditingOverlayController {
|
|
258
|
+
constructor(container, group, instaService, chatEditingService) {
|
|
259
|
+
this._store = ( new DisposableStore());
|
|
260
|
+
this._domNode = createElement("div");
|
|
261
|
+
this._domNode.classList.add("chat-editing-editor-overlay");
|
|
262
|
+
this._domNode.style.position = "absolute";
|
|
263
|
+
this._domNode.style.bottom = `24px`;
|
|
264
|
+
this._domNode.style.right = `24px`;
|
|
265
|
+
this._domNode.style.zIndex = `100`;
|
|
266
|
+
const widget = instaService.createInstance(ChatEditorOverlayWidget, group);
|
|
267
|
+
this._domNode.appendChild(widget.getDomNode());
|
|
268
|
+
this._store.add(toDisposable(() => this._domNode.remove()));
|
|
269
|
+
this._store.add(widget);
|
|
270
|
+
const show = () => {
|
|
271
|
+
if (!container.contains(this._domNode)) {
|
|
272
|
+
container.appendChild(this._domNode);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
const hide = () => {
|
|
276
|
+
if (container.contains(this._domNode)) {
|
|
277
|
+
widget.hide();
|
|
278
|
+
this._domNode.remove();
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
const activeEditorSignal = observableSignalFromEvent(this, Event.any(group.onDidActiveEditorChange, group.onDidModelChange));
|
|
282
|
+
const activeUriObs = derivedOpts({
|
|
283
|
+
equalsFn: isEqual
|
|
284
|
+
}, r => {
|
|
285
|
+
activeEditorSignal.read(r);
|
|
286
|
+
const editor = group.activeEditorPane;
|
|
287
|
+
const uri = EditorResourceAccessor.getOriginalUri(editor?.input, {
|
|
288
|
+
supportSideBySide: SideBySideEditor.PRIMARY
|
|
289
|
+
});
|
|
290
|
+
return uri;
|
|
291
|
+
});
|
|
292
|
+
const sessionAndEntry = derived(r => {
|
|
293
|
+
activeEditorSignal.read(r);
|
|
294
|
+
const uri = activeUriObs.read(r);
|
|
295
|
+
if (!uri) {
|
|
296
|
+
return undefined;
|
|
297
|
+
}
|
|
298
|
+
for (const session of chatEditingService.editingSessionsObs.read(r)) {
|
|
299
|
+
if (!session.isGlobalEditingSession) {
|
|
300
|
+
continue;
|
|
301
|
+
}
|
|
302
|
+
const entry = session.readEntry(uri, r);
|
|
303
|
+
if (entry) {
|
|
304
|
+
return {
|
|
305
|
+
session,
|
|
306
|
+
entry
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return undefined;
|
|
311
|
+
});
|
|
312
|
+
this._store.add(autorun(r => {
|
|
313
|
+
const data = sessionAndEntry.read(r);
|
|
314
|
+
if (!data) {
|
|
315
|
+
hide();
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
const {
|
|
319
|
+
session,
|
|
320
|
+
entry
|
|
321
|
+
} = data;
|
|
322
|
+
if (entry?.state.read(r) === ModifiedFileEntryState.Modified) {
|
|
323
|
+
const editorPane = group.activeEditorPane;
|
|
324
|
+
assertType(editorPane);
|
|
325
|
+
const changeIndex = derived(
|
|
326
|
+
r => entry ? entry.getEditorIntegration(editorPane).currentIndex.read(r) : 0
|
|
327
|
+
);
|
|
328
|
+
const entryIndex = derived(r => entry ? session.entries.read(r).indexOf(entry) : 0);
|
|
329
|
+
widget.show(session, entry, {
|
|
330
|
+
entryIndex,
|
|
331
|
+
changeIndex
|
|
332
|
+
});
|
|
333
|
+
show();
|
|
334
|
+
} else {
|
|
335
|
+
hide();
|
|
336
|
+
}
|
|
337
|
+
}));
|
|
338
|
+
}
|
|
339
|
+
dispose() {
|
|
340
|
+
this._store.dispose();
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
ChatEditingOverlayController = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IChatEditingService))], ChatEditingOverlayController));
|
|
344
|
+
let ChatEditingEditorOverlay = class ChatEditingEditorOverlay {
|
|
345
|
+
static {
|
|
346
|
+
this.ID = "chat.edits.editorOverlay";
|
|
347
|
+
}
|
|
348
|
+
constructor(editorGroupsService, instantiationService) {
|
|
349
|
+
this._store = ( new DisposableStore());
|
|
350
|
+
const editorGroups = observableFromEvent(
|
|
351
|
+
this,
|
|
352
|
+
Event.any(editorGroupsService.onDidAddGroup, editorGroupsService.onDidRemoveGroup),
|
|
353
|
+
() => editorGroupsService.groups
|
|
354
|
+
);
|
|
355
|
+
const overlayWidgets = this._store.add(( new DisposableMap()));
|
|
356
|
+
this._store.add(autorun(r => {
|
|
357
|
+
const toDelete = ( new Set(( overlayWidgets.keys())));
|
|
358
|
+
const groups = editorGroups.read(r);
|
|
359
|
+
for (const group of groups) {
|
|
360
|
+
if (!(group instanceof EditorGroupView)) {
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
363
|
+
toDelete.delete(group);
|
|
364
|
+
if (!( overlayWidgets.has(group))) {
|
|
365
|
+
const scopedInstaService = instantiationService.createChild(( new ServiceCollection([IContextKeyService, group.scopedContextKeyService])));
|
|
366
|
+
const container = group.element;
|
|
367
|
+
const ctrl = scopedInstaService.createInstance(ChatEditingOverlayController, container, group);
|
|
368
|
+
overlayWidgets.set(group, combinedDisposable(ctrl, scopedInstaService));
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
for (const group of toDelete) {
|
|
372
|
+
overlayWidgets.deleteAndDispose(group);
|
|
373
|
+
}
|
|
374
|
+
}));
|
|
375
|
+
}
|
|
376
|
+
dispose() {
|
|
377
|
+
this._store.dispose();
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
ChatEditingEditorOverlay = ( __decorate([( __param(0, IEditorGroupsService)), ( __param(1, IInstantiationService))], ChatEditingEditorOverlay));
|
|
381
|
+
|
|
382
|
+
export { ChatEditingAcceptRejectActionViewItem, ChatEditingEditorOverlay };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
|
|
3
|
+
import { DetailedLineRangeMapping, LineRangeMapping } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping";
|
|
4
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
6
|
+
import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
|
|
7
|
+
import { IExplanationDiffInfo } from "@codingame/monaco-vscode-chat-service-override/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager";
|
|
8
|
+
import { IChatEditingExplanationModelManager } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.service";
|
|
9
|
+
/**
|
|
10
|
+
* Widget that displays explanatory comments for chat-made changes
|
|
11
|
+
* Positioned on the right side of the editor like a speech bubble
|
|
12
|
+
*/
|
|
13
|
+
export declare class ChatEditingExplanationWidget extends Disposable implements IOverlayWidget {
|
|
14
|
+
private readonly _editor;
|
|
15
|
+
private _changes;
|
|
16
|
+
private readonly _chatWidgetService;
|
|
17
|
+
private readonly _viewsService;
|
|
18
|
+
private readonly _chatSessionResource?;
|
|
19
|
+
private static _idPool;
|
|
20
|
+
private readonly _id;
|
|
21
|
+
private readonly _domNode;
|
|
22
|
+
private readonly _headerNode;
|
|
23
|
+
private readonly _readIndicator;
|
|
24
|
+
private readonly _titleNode;
|
|
25
|
+
private readonly _dismissButton;
|
|
26
|
+
private readonly _toggleButton;
|
|
27
|
+
private readonly _bodyNode;
|
|
28
|
+
private readonly _explanationItems;
|
|
29
|
+
private _position;
|
|
30
|
+
private _explanations;
|
|
31
|
+
private _isExpanded;
|
|
32
|
+
private _isAllRead;
|
|
33
|
+
private _disposed;
|
|
34
|
+
private _startLineNumber;
|
|
35
|
+
private readonly _uri;
|
|
36
|
+
private readonly _rangeHighlightDecoration;
|
|
37
|
+
private readonly _eventStore;
|
|
38
|
+
constructor(_editor: ICodeEditor, _changes: readonly (LineRangeMapping | DetailedLineRangeMapping)[], diffInfo: IExplanationDiffInfo, _chatWidgetService: IChatWidgetService, _viewsService: IViewsService, _chatSessionResource?: URI | undefined);
|
|
39
|
+
private _setupEventHandlers;
|
|
40
|
+
private _toggleExpanded;
|
|
41
|
+
private _dismiss;
|
|
42
|
+
private _updateReadIndicator;
|
|
43
|
+
private _updateTitle;
|
|
44
|
+
private _updateToggleButton;
|
|
45
|
+
private _buildExplanationItems;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the explanation for a change matching the given line number range.
|
|
48
|
+
* @returns true if a matching explanation was found and updated
|
|
49
|
+
*/
|
|
50
|
+
setExplanationByLineNumber(startLineNumber: number, endLineNumber: number, explanation: string): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Gets the number of explanations in this widget.
|
|
53
|
+
*/
|
|
54
|
+
get explanationCount(): number;
|
|
55
|
+
private _updateExplanationText;
|
|
56
|
+
private _updateItemReadIndicator;
|
|
57
|
+
private _updateExplanationItemsReadState;
|
|
58
|
+
/**
|
|
59
|
+
* Updates the widget position and layout
|
|
60
|
+
*/
|
|
61
|
+
layout(startLineNumber: number): void;
|
|
62
|
+
/**
|
|
63
|
+
* Shows or hides the widget
|
|
64
|
+
*/
|
|
65
|
+
toggle(show: boolean): void;
|
|
66
|
+
/**
|
|
67
|
+
* Relayouts the widget at its current line number
|
|
68
|
+
*/
|
|
69
|
+
relayout(): void;
|
|
70
|
+
getId(): string;
|
|
71
|
+
getDomNode(): HTMLElement;
|
|
72
|
+
getPosition(): IOverlayWidgetPosition | null;
|
|
73
|
+
dispose(): void;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Manager for explanation widgets in an editor
|
|
77
|
+
* Groups changes and creates combined widgets for nearby changes
|
|
78
|
+
*/
|
|
79
|
+
export declare class ChatEditingExplanationWidgetManager extends Disposable {
|
|
80
|
+
private readonly _editor;
|
|
81
|
+
private readonly _chatWidgetService;
|
|
82
|
+
private readonly _viewsService;
|
|
83
|
+
private readonly _modelUri;
|
|
84
|
+
private readonly _widgets;
|
|
85
|
+
private _visible;
|
|
86
|
+
private _chatSessionResource;
|
|
87
|
+
private _diffInfo;
|
|
88
|
+
constructor(_editor: ICodeEditor, _chatWidgetService: IChatWidgetService, _viewsService: IViewsService, modelManager: IChatEditingExplanationModelManager, _modelUri: URI);
|
|
89
|
+
private _createWidgets;
|
|
90
|
+
private _handleExplanations;
|
|
91
|
+
/**
|
|
92
|
+
* Shows all widgets
|
|
93
|
+
*/
|
|
94
|
+
show(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Hides all widgets
|
|
97
|
+
*/
|
|
98
|
+
hide(): void;
|
|
99
|
+
private _clearWidgets;
|
|
100
|
+
dispose(): void;
|
|
101
|
+
}
|