@codingame/monaco-vscode-katex-common 25.1.2 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +23 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +64 -27
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +3 -1
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +31 -28
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +2 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +71 -50
- package/vscode/src/vs/platform/editor/browser/editor.js +17 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +112 -129
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +110 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +21 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +308 -216
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +153 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +247 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +347 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +287 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +89 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +188 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +677 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentSessionHoverWidget.css +98 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +34 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +19 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +762 -359
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +188 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +166 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +12 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +279 -213
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +382 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +128 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +153 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +1218 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +93 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +42 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +58 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +18 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +132 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +68 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +36 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +22 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +34 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +198 -135
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +38 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +29 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +41 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +23 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +20 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +291 -152
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +227 -162
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.js +68 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +76 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +96 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +74 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +107 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +814 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +34 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +8 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +236 -197
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +492 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +75 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +31 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +42 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +55 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +714 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +2 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +143 -153
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +79 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +10 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +209 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +71 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +248 -190
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +1 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPullRequestContent.css +5 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +493 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +121 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +51 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +46 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +99 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +634 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +132 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.js +15 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +196 -149
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +577 -193
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +119 -86
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +165 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +5 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +75 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +30 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +102 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +44 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +67 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +122 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +39 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +1110 -597
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +291 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +485 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +38 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +650 -689
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +21 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +102 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +1253 -790
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +51 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +102 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +16 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +192 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +11 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +99 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +188 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +129 -167
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +16 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +143 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +206 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +152 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +67 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +80 -19
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +20 -28
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +22 -19
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +122 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +19 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -1040
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +162 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +98 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +416 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +194 -215
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +74 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +45 -91
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +22 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +98 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +96 -68
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +11 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +150 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +141 -147
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +200 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +548 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.js +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +338 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +364 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +21 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +36 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +110 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +692 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +158 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +80 -21
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +440 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.js +0 -139
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +0 -1081
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +0 -199
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +0 -482
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -37
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +0 -94
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +0 -495
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +0 -454
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +0 -66
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +0 -372
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -594
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1746
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -269
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -806
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -116
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -62
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -295
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -241
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -146
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -90
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -42
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -823
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -567
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -189
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -439
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +0 -263
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +0 -48
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -89
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -108
|
@@ -30,6 +30,8 @@ import { isRequestVM, isResponseVM, isChatTreeItem } from '@codingame/monaco-vsc
|
|
|
30
30
|
import { ChatAgentLocation, ChatConfiguration, ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
31
31
|
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
32
32
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
33
|
+
import { isAgentSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
34
|
+
import { AgentSessionProviders } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
33
35
|
|
|
34
36
|
class EditingSessionAction extends Action2 {
|
|
35
37
|
constructor(opts) {
|
|
@@ -59,15 +61,17 @@ function getEditingSessionContext(accessor, args) {
|
|
|
59
61
|
return;
|
|
60
62
|
}
|
|
61
63
|
const editingSession = chatEditingService.getEditingSession(chatWidget.viewModel.model.sessionResource);
|
|
62
|
-
return {
|
|
64
|
+
return {
|
|
65
|
+
editingSession,
|
|
66
|
+
chatWidget
|
|
67
|
+
};
|
|
63
68
|
}
|
|
64
69
|
class WorkingSetAction extends EditingSessionAction {
|
|
65
70
|
runEditingSessionAction(accessor, editingSession, chatWidget, ...args) {
|
|
66
71
|
const uris = [];
|
|
67
72
|
if (URI.isUri(args[0])) {
|
|
68
73
|
uris.push(args[0]);
|
|
69
|
-
}
|
|
70
|
-
else if (chatWidget) {
|
|
74
|
+
} else if (chatWidget) {
|
|
71
75
|
uris.push(...chatWidget.input.selectedElements);
|
|
72
76
|
}
|
|
73
77
|
if (!uris.length) {
|
|
@@ -79,15 +83,15 @@ class WorkingSetAction extends EditingSessionAction {
|
|
|
79
83
|
registerAction2(class OpenFileInDiffAction extends WorkingSetAction {
|
|
80
84
|
constructor() {
|
|
81
85
|
super({
|
|
82
|
-
id:
|
|
83
|
-
title: ( localize2(
|
|
86
|
+
id: "chatEditing.openFileInDiff",
|
|
87
|
+
title: ( localize2(5252, "Open Changes in Diff Editor")),
|
|
84
88
|
icon: Codicon.diffSingle,
|
|
85
89
|
menu: [{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
id: MenuId.ChatEditingWidgetModifiedFilesToolbar,
|
|
91
|
+
when: ( ContextKeyExpr.equals(chatEditingWidgetFileStateContextKey.key, ModifiedFileEntryState.Modified)),
|
|
92
|
+
order: 2,
|
|
93
|
+
group: "navigation"
|
|
94
|
+
}]
|
|
91
95
|
});
|
|
92
96
|
}
|
|
93
97
|
async runWorkingSetAction(accessor, currentEditingSession, _chatWidget, ...uris) {
|
|
@@ -95,7 +99,9 @@ registerAction2(class OpenFileInDiffAction extends WorkingSetAction {
|
|
|
95
99
|
for (const uri of uris) {
|
|
96
100
|
let pane = editorService.activeEditorPane;
|
|
97
101
|
if (!pane) {
|
|
98
|
-
pane = await editorService.openEditor({
|
|
102
|
+
pane = await editorService.openEditor({
|
|
103
|
+
resource: uri
|
|
104
|
+
});
|
|
99
105
|
}
|
|
100
106
|
if (!pane) {
|
|
101
107
|
return;
|
|
@@ -108,20 +114,23 @@ registerAction2(class OpenFileInDiffAction extends WorkingSetAction {
|
|
|
108
114
|
registerAction2(class AcceptAction extends WorkingSetAction {
|
|
109
115
|
constructor() {
|
|
110
116
|
super({
|
|
111
|
-
id:
|
|
112
|
-
title: ( localize2(
|
|
117
|
+
id: "chatEditing.acceptFile",
|
|
118
|
+
title: ( localize2(5253, "Keep")),
|
|
113
119
|
icon: Codicon.check,
|
|
114
120
|
menu: [{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("resourceScheme", CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)), ContextKeyExpr.notIn(
|
|
122
|
+
chatEditingResourceContextKey.key,
|
|
123
|
+
decidedChatEditingResourceContextKey.key
|
|
124
|
+
))),
|
|
125
|
+
id: MenuId.MultiDiffEditorFileToolbar,
|
|
126
|
+
order: 0,
|
|
127
|
+
group: "navigation"
|
|
128
|
+
}, {
|
|
129
|
+
id: MenuId.ChatEditingWidgetModifiedFilesToolbar,
|
|
130
|
+
when: ( ContextKeyExpr.equals(chatEditingWidgetFileStateContextKey.key, ModifiedFileEntryState.Modified)),
|
|
131
|
+
order: 0,
|
|
132
|
+
group: "navigation"
|
|
133
|
+
}]
|
|
125
134
|
});
|
|
126
135
|
}
|
|
127
136
|
async runWorkingSetAction(accessor, currentEditingSession, chatWidget, ...uris) {
|
|
@@ -131,20 +140,23 @@ registerAction2(class AcceptAction extends WorkingSetAction {
|
|
|
131
140
|
registerAction2(class DiscardAction extends WorkingSetAction {
|
|
132
141
|
constructor() {
|
|
133
142
|
super({
|
|
134
|
-
id:
|
|
135
|
-
title: ( localize2(
|
|
143
|
+
id: "chatEditing.discardFile",
|
|
144
|
+
title: ( localize2(5254, "Undo")),
|
|
136
145
|
icon: Codicon.discard,
|
|
137
146
|
menu: [{
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("resourceScheme", CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)), ContextKeyExpr.notIn(
|
|
148
|
+
chatEditingResourceContextKey.key,
|
|
149
|
+
decidedChatEditingResourceContextKey.key
|
|
150
|
+
))),
|
|
151
|
+
id: MenuId.MultiDiffEditorFileToolbar,
|
|
152
|
+
order: 2,
|
|
153
|
+
group: "navigation"
|
|
154
|
+
}, {
|
|
155
|
+
id: MenuId.ChatEditingWidgetModifiedFilesToolbar,
|
|
156
|
+
when: ( ContextKeyExpr.equals(chatEditingWidgetFileStateContextKey.key, ModifiedFileEntryState.Modified)),
|
|
157
|
+
order: 1,
|
|
158
|
+
group: "navigation"
|
|
159
|
+
}]
|
|
148
160
|
});
|
|
149
161
|
}
|
|
150
162
|
async runWorkingSetAction(accessor, currentEditingSession, chatWidget, ...uris) {
|
|
@@ -154,24 +166,22 @@ registerAction2(class DiscardAction extends WorkingSetAction {
|
|
|
154
166
|
class ChatEditingAcceptAllAction extends EditingSessionAction {
|
|
155
167
|
constructor() {
|
|
156
168
|
super({
|
|
157
|
-
id:
|
|
158
|
-
title: ( localize(
|
|
169
|
+
id: "chatEditing.acceptAllFiles",
|
|
170
|
+
title: ( localize(5255, "Keep")),
|
|
159
171
|
icon: Codicon.check,
|
|
160
|
-
tooltip: ( localize(
|
|
172
|
+
tooltip: ( localize(5256, "Keep All Edits")),
|
|
161
173
|
precondition: hasUndecidedChatEditingResourceContextKey,
|
|
162
174
|
keybinding: {
|
|
163
175
|
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
|
164
176
|
when: ( ContextKeyExpr.and(hasUndecidedChatEditingResourceContextKey, ChatContextKeys.inChatInput)),
|
|
165
|
-
weight: KeybindingWeight.WorkbenchContrib
|
|
177
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
166
178
|
},
|
|
167
|
-
menu: [
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
]
|
|
179
|
+
menu: [{
|
|
180
|
+
id: MenuId.ChatEditingWidgetToolbar,
|
|
181
|
+
group: "navigation",
|
|
182
|
+
order: 0,
|
|
183
|
+
when: ( ContextKeyExpr.and(( applyingChatEditsFailedContextKey.negate()), ( ContextKeyExpr.and(hasUndecidedChatEditingResourceContextKey))))
|
|
184
|
+
}]
|
|
175
185
|
});
|
|
176
186
|
}
|
|
177
187
|
async runEditingSessionAction(accessor, editingSession, chatWidget, ...args) {
|
|
@@ -182,19 +192,17 @@ registerAction2(ChatEditingAcceptAllAction);
|
|
|
182
192
|
class ChatEditingDiscardAllAction extends EditingSessionAction {
|
|
183
193
|
constructor() {
|
|
184
194
|
super({
|
|
185
|
-
id:
|
|
186
|
-
title: ( localize(
|
|
195
|
+
id: "chatEditing.discardAllFiles",
|
|
196
|
+
title: ( localize(5257, "Undo")),
|
|
187
197
|
icon: Codicon.discard,
|
|
188
|
-
tooltip: ( localize(
|
|
198
|
+
tooltip: ( localize(5258, "Undo All Edits")),
|
|
189
199
|
precondition: hasUndecidedChatEditingResourceContextKey,
|
|
190
|
-
menu: [
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
],
|
|
200
|
+
menu: [{
|
|
201
|
+
id: MenuId.ChatEditingWidgetToolbar,
|
|
202
|
+
group: "navigation",
|
|
203
|
+
order: 1,
|
|
204
|
+
when: ( ContextKeyExpr.and(( applyingChatEditsFailedContextKey.negate()), hasUndecidedChatEditingResourceContextKey))
|
|
205
|
+
}],
|
|
198
206
|
keybinding: {
|
|
199
207
|
when: ( ContextKeyExpr.and(
|
|
200
208
|
hasUndecidedChatEditingResourceContextKey,
|
|
@@ -202,8 +210,8 @@ class ChatEditingDiscardAllAction extends EditingSessionAction {
|
|
|
202
210
|
( ChatContextKeys.inputHasText.negate())
|
|
203
211
|
)),
|
|
204
212
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
205
|
-
primary: KeyMod.CtrlCmd | KeyCode.Backspace
|
|
206
|
-
}
|
|
213
|
+
primary: KeyMod.CtrlCmd | KeyCode.Backspace
|
|
214
|
+
}
|
|
207
215
|
});
|
|
208
216
|
}
|
|
209
217
|
async runEditingSessionAction(accessor, editingSession, chatWidget, ...args) {
|
|
@@ -211,25 +219,50 @@ class ChatEditingDiscardAllAction extends EditingSessionAction {
|
|
|
211
219
|
}
|
|
212
220
|
}
|
|
213
221
|
registerAction2(ChatEditingDiscardAllAction);
|
|
222
|
+
class ToggleExplanationWidgetAction extends EditingSessionAction {
|
|
223
|
+
static {
|
|
224
|
+
this.ID = "chatEditing.toggleExplanationWidget";
|
|
225
|
+
}
|
|
226
|
+
constructor() {
|
|
227
|
+
super({
|
|
228
|
+
id: ToggleExplanationWidgetAction.ID,
|
|
229
|
+
title: ( localize(5259, "Explain")),
|
|
230
|
+
tooltip: ( localize(5260, "Toggle Change Explanations")),
|
|
231
|
+
precondition: hasUndecidedChatEditingResourceContextKey,
|
|
232
|
+
menu: [{
|
|
233
|
+
id: MenuId.ChatEditingWidgetToolbar,
|
|
234
|
+
group: "navigation",
|
|
235
|
+
order: 2,
|
|
236
|
+
when: ( ContextKeyExpr.and(hasUndecidedChatEditingResourceContextKey, ( ContextKeyExpr.has(`config.${ChatConfiguration.ExplainChangesEnabled}`))))
|
|
237
|
+
}]
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
async runEditingSessionAction(accessor, editingSession, chatWidget, ...args) {
|
|
241
|
+
if (editingSession.hasExplanations()) {
|
|
242
|
+
editingSession.clearExplanations();
|
|
243
|
+
} else {
|
|
244
|
+
await editingSession.triggerExplanationGeneration();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
registerAction2(ToggleExplanationWidgetAction);
|
|
214
249
|
async function discardAllEditsWithConfirmation(accessor, currentEditingSession) {
|
|
215
250
|
const dialogService = accessor.get(IDialogService);
|
|
216
251
|
const entries = currentEditingSession.entries.get().filter(e => e.state.get() === ModifiedFileEntryState.Modified);
|
|
217
252
|
if (entries.length > 0) {
|
|
218
253
|
const confirmation = await dialogService.confirm({
|
|
219
|
-
title: ( localize(
|
|
220
|
-
message: entries.length === 1
|
|
221
|
-
|
|
222
|
-
5105,
|
|
254
|
+
title: ( localize(5261, "Undo all edits?")),
|
|
255
|
+
message: entries.length === 1 ? ( localize(
|
|
256
|
+
5262,
|
|
223
257
|
"This will undo changes made in {0}. Do you want to proceed?",
|
|
224
258
|
basename(entries[0].modifiedURI)
|
|
225
|
-
))
|
|
226
|
-
|
|
227
|
-
5106,
|
|
259
|
+
)) : ( localize(
|
|
260
|
+
5263,
|
|
228
261
|
"This will undo changes made in {0} files. Do you want to proceed?",
|
|
229
262
|
entries.length
|
|
230
263
|
)),
|
|
231
|
-
primaryButton: ( localize(
|
|
232
|
-
type:
|
|
264
|
+
primaryButton: ( localize(5264, "Yes")),
|
|
265
|
+
type: "info"
|
|
233
266
|
});
|
|
234
267
|
if (!confirmation.confirmed) {
|
|
235
268
|
return false;
|
|
@@ -239,24 +272,29 @@ async function discardAllEditsWithConfirmation(accessor, currentEditingSession)
|
|
|
239
272
|
return true;
|
|
240
273
|
}
|
|
241
274
|
class ChatEditingShowChangesAction extends EditingSessionAction {
|
|
242
|
-
static {
|
|
243
|
-
|
|
275
|
+
static {
|
|
276
|
+
this.ID = "chatEditing.viewChanges";
|
|
277
|
+
}
|
|
278
|
+
static {
|
|
279
|
+
this.LABEL = ( localize(5265, "View All Edits"));
|
|
280
|
+
}
|
|
244
281
|
constructor() {
|
|
245
282
|
super({
|
|
246
283
|
id: ChatEditingShowChangesAction.ID,
|
|
247
|
-
title: {
|
|
284
|
+
title: {
|
|
285
|
+
value: ChatEditingShowChangesAction.LABEL,
|
|
286
|
+
original: ChatEditingShowChangesAction.LABEL
|
|
287
|
+
},
|
|
248
288
|
tooltip: ChatEditingShowChangesAction.LABEL,
|
|
249
289
|
f1: true,
|
|
250
290
|
icon: Codicon.diffMultiple,
|
|
251
291
|
precondition: hasUndecidedChatEditingResourceContextKey,
|
|
252
|
-
menu: [
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
],
|
|
292
|
+
menu: [{
|
|
293
|
+
id: MenuId.ChatEditingWidgetToolbar,
|
|
294
|
+
group: "navigation",
|
|
295
|
+
order: 4,
|
|
296
|
+
when: ( ContextKeyExpr.and(( applyingChatEditsFailedContextKey.negate()), ( ContextKeyExpr.and(hasAppliedChatEditsContextKey, hasUndecidedChatEditingResourceContextKey))))
|
|
297
|
+
}]
|
|
260
298
|
});
|
|
261
299
|
}
|
|
262
300
|
async runEditingSessionAction(accessor, editingSession, chatWidget, ...args) {
|
|
@@ -265,45 +303,63 @@ class ChatEditingShowChangesAction extends EditingSessionAction {
|
|
|
265
303
|
}
|
|
266
304
|
registerAction2(ChatEditingShowChangesAction);
|
|
267
305
|
class ViewAllSessionChangesAction extends Action2 {
|
|
268
|
-
static {
|
|
306
|
+
static {
|
|
307
|
+
this.ID = "chatEditing.viewAllSessionChanges";
|
|
308
|
+
}
|
|
269
309
|
constructor() {
|
|
270
310
|
super({
|
|
271
311
|
id: ViewAllSessionChangesAction.ID,
|
|
272
|
-
title: ( localize2(
|
|
312
|
+
title: ( localize2(5266, "View All Changes")),
|
|
273
313
|
icon: Codicon.diffMultiple,
|
|
274
314
|
category: CHAT_CATEGORY,
|
|
275
315
|
precondition: ChatContextKeys.hasAgentSessionChanges,
|
|
276
|
-
menu: [
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
316
|
+
menu: [{
|
|
317
|
+
id: MenuId.ChatEditingSessionChangesToolbar,
|
|
318
|
+
group: "navigation",
|
|
319
|
+
order: 10,
|
|
320
|
+
when: ChatContextKeys.hasAgentSessionChanges
|
|
321
|
+
}, {
|
|
322
|
+
id: MenuId.AgentSessionItemToolbar,
|
|
323
|
+
group: "navigation",
|
|
324
|
+
order: 0,
|
|
325
|
+
when: ChatContextKeys.hasAgentSessionChanges
|
|
326
|
+
}]
|
|
284
327
|
});
|
|
285
328
|
}
|
|
286
|
-
async run(accessor,
|
|
329
|
+
async run(accessor, sessionOrSessionResource) {
|
|
287
330
|
const agentSessionsService = accessor.get(IAgentSessionsService);
|
|
288
331
|
const commandService = accessor.get(ICommandService);
|
|
289
|
-
|
|
332
|
+
const chatEditingService = accessor.get(IChatEditingService);
|
|
333
|
+
if (!URI.isUri(sessionOrSessionResource) && !isAgentSession(sessionOrSessionResource)) {
|
|
290
334
|
return;
|
|
291
335
|
}
|
|
336
|
+
const sessionResource = URI.isUri(sessionOrSessionResource) ? sessionOrSessionResource : sessionOrSessionResource.resource;
|
|
292
337
|
const session = agentSessionsService.getSession(sessionResource);
|
|
293
338
|
const changes = session?.changes;
|
|
294
|
-
if (!
|
|
339
|
+
if (!session || !changes) {
|
|
295
340
|
return;
|
|
296
341
|
}
|
|
297
|
-
|
|
298
|
-
.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
342
|
+
if (session.providerType === AgentSessionProviders.Background || session.providerType === AgentSessionProviders.Cloud) {
|
|
343
|
+
if (!Array.isArray(changes) || changes.length === 0) {
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
const resources = ( changes.map(d => ({
|
|
347
|
+
originalUri: d.originalUri,
|
|
348
|
+
modifiedUri: d.modifiedUri
|
|
349
|
+
})));
|
|
350
|
+
await commandService.executeCommand("_workbench.openMultiDiffEditor", {
|
|
351
|
+
multiDiffSourceUri: sessionResource.with({
|
|
352
|
+
scheme: sessionResource.scheme + "-worktree-changes"
|
|
353
|
+
}),
|
|
354
|
+
title: ( localize(5267, "All Session Changes")),
|
|
355
|
+
resources
|
|
305
356
|
});
|
|
357
|
+
session?.setRead(true);
|
|
358
|
+
return;
|
|
306
359
|
}
|
|
360
|
+
const editingSession = chatEditingService.getEditingSession(sessionResource);
|
|
361
|
+
await editingSession?.show();
|
|
362
|
+
session?.setRead(true);
|
|
307
363
|
}
|
|
308
364
|
}
|
|
309
365
|
registerAction2(ViewAllSessionChangesAction);
|
|
@@ -321,66 +377,63 @@ async function restoreSnapshotWithConfirmation(accessor, item) {
|
|
|
321
377
|
if (!session) {
|
|
322
378
|
return;
|
|
323
379
|
}
|
|
324
|
-
const requestId = isRequestVM(item) ? item.id :
|
|
325
|
-
isResponseVM(item) ? item.requestId : undefined;
|
|
380
|
+
const requestId = isRequestVM(item) ? item.id : isResponseVM(item) ? item.requestId : undefined;
|
|
326
381
|
if (requestId) {
|
|
327
382
|
const chatRequests = chatModel.getRequests();
|
|
328
383
|
const itemIndex = chatRequests.findIndex(request => request.id === requestId);
|
|
329
384
|
const editsToUndo = chatRequests.length - itemIndex;
|
|
330
385
|
const requestsToRemove = chatRequests.slice(itemIndex);
|
|
331
386
|
const requestIdsToRemove = ( new Set(( requestsToRemove.map(request => request.id))));
|
|
332
|
-
const entriesModifiedInRequestsToRemove = session.entries.get().filter(
|
|
333
|
-
const shouldPrompt = entriesModifiedInRequestsToRemove.length > 0 && configurationService.getValue(
|
|
387
|
+
const entriesModifiedInRequestsToRemove = session.entries.get().filter(entry => ( requestIdsToRemove.has(entry.lastModifyingRequestId))) ?? [];
|
|
388
|
+
const shouldPrompt = entriesModifiedInRequestsToRemove.length > 0 && configurationService.getValue("chat.editing.confirmEditRequestRemoval") === true;
|
|
334
389
|
let message;
|
|
335
390
|
if (editsToUndo === 1) {
|
|
336
391
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
337
392
|
message = ( localize(
|
|
338
|
-
|
|
393
|
+
5268,
|
|
339
394
|
"This will remove your last request and undo the edits made to {0}. Do you want to proceed?",
|
|
340
395
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
341
396
|
));
|
|
342
|
-
}
|
|
343
|
-
else {
|
|
397
|
+
} else {
|
|
344
398
|
message = ( localize(
|
|
345
|
-
|
|
399
|
+
5269,
|
|
346
400
|
"This will remove your last request and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
347
401
|
entriesModifiedInRequestsToRemove.length
|
|
348
402
|
));
|
|
349
403
|
}
|
|
350
|
-
}
|
|
351
|
-
else {
|
|
404
|
+
} else {
|
|
352
405
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
353
406
|
message = ( localize(
|
|
354
|
-
|
|
407
|
+
5270,
|
|
355
408
|
"This will remove all subsequent requests and undo edits made to {0}. Do you want to proceed?",
|
|
356
409
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
357
410
|
));
|
|
358
|
-
}
|
|
359
|
-
else {
|
|
411
|
+
} else {
|
|
360
412
|
message = ( localize(
|
|
361
|
-
|
|
413
|
+
5271,
|
|
362
414
|
"This will remove all subsequent requests and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
363
415
|
entriesModifiedInRequestsToRemove.length
|
|
364
416
|
));
|
|
365
417
|
}
|
|
366
418
|
}
|
|
367
|
-
const confirmation = shouldPrompt
|
|
368
|
-
?
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
419
|
+
const confirmation = shouldPrompt ? await dialogService.confirm({
|
|
420
|
+
title: editsToUndo === 1 ? ( localize(5272, "Do you want to undo your last edit?")) : ( localize(5273, "Do you want to undo {0} edits?", editsToUndo)),
|
|
421
|
+
message: message,
|
|
422
|
+
primaryButton: ( localize(5274, "Yes")),
|
|
423
|
+
checkbox: {
|
|
424
|
+
label: ( localize(5275, "Don't ask again")),
|
|
425
|
+
checked: false
|
|
426
|
+
},
|
|
427
|
+
type: "info"
|
|
428
|
+
}) : {
|
|
429
|
+
confirmed: true
|
|
430
|
+
};
|
|
378
431
|
if (!confirmation.confirmed) {
|
|
379
432
|
widget?.viewModel?.model.setCheckpoint(undefined);
|
|
380
433
|
return;
|
|
381
434
|
}
|
|
382
435
|
if (confirmation.checkboxChecked) {
|
|
383
|
-
await configurationService.updateValue(
|
|
436
|
+
await configurationService.updateValue("chat.editing.confirmEditRequestRemoval", false);
|
|
384
437
|
}
|
|
385
438
|
const snapshotRequestId = chatRequests[itemIndex].id;
|
|
386
439
|
await session.restoreSnapshot(snapshotRequestId, undefined);
|
|
@@ -389,27 +442,25 @@ async function restoreSnapshotWithConfirmation(accessor, item) {
|
|
|
389
442
|
registerAction2(class RemoveAction extends Action2 {
|
|
390
443
|
constructor() {
|
|
391
444
|
super({
|
|
392
|
-
id:
|
|
393
|
-
title: ( localize2(
|
|
445
|
+
id: "workbench.action.chat.undoEdits",
|
|
446
|
+
title: ( localize2(5276, "Undo Requests")),
|
|
394
447
|
f1: false,
|
|
395
448
|
category: CHAT_CATEGORY,
|
|
396
449
|
icon: Codicon.discard,
|
|
397
450
|
keybinding: {
|
|
398
451
|
primary: KeyCode.Delete,
|
|
399
452
|
mac: {
|
|
400
|
-
primary: KeyMod.CtrlCmd | KeyCode.Backspace
|
|
453
|
+
primary: KeyMod.CtrlCmd | KeyCode.Backspace
|
|
401
454
|
},
|
|
402
455
|
when: ( ContextKeyExpr.and(ChatContextKeys.inChatSession, ( EditorContextKeys.textInputFocus.negate()))),
|
|
403
|
-
weight: KeybindingWeight.WorkbenchContrib
|
|
456
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
404
457
|
},
|
|
405
|
-
menu: [
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
]
|
|
458
|
+
menu: [{
|
|
459
|
+
id: MenuId.ChatMessageTitle,
|
|
460
|
+
group: "navigation",
|
|
461
|
+
order: 2,
|
|
462
|
+
when: ( ContextKeyExpr.and(( ( ContextKeyExpr.equals(`config.${ChatConfiguration.EditRequests}`, "input")).negate()), ( ContextKeyExpr.equals(`config.${ChatConfiguration.CheckpointsEnabled}`, false)), ( ChatContextKeys.lockedToCodingAgent.negate())))
|
|
463
|
+
}]
|
|
413
464
|
});
|
|
414
465
|
}
|
|
415
466
|
async run(accessor, ...args) {
|
|
@@ -424,7 +475,7 @@ registerAction2(class RemoveAction extends Action2 {
|
|
|
424
475
|
return;
|
|
425
476
|
}
|
|
426
477
|
await restoreSnapshotWithConfirmation(accessor, item);
|
|
427
|
-
if (isRequestVM(item) && configurationService.getValue(
|
|
478
|
+
if (isRequestVM(item) && configurationService.getValue("chat.undoRequests.restoreInput")) {
|
|
428
479
|
widget?.focusInput();
|
|
429
480
|
widget?.input.setValue(item.messageText, false);
|
|
430
481
|
}
|
|
@@ -433,27 +484,25 @@ registerAction2(class RemoveAction extends Action2 {
|
|
|
433
484
|
registerAction2(class RestoreCheckpointAction extends Action2 {
|
|
434
485
|
constructor() {
|
|
435
486
|
super({
|
|
436
|
-
id:
|
|
437
|
-
title: ( localize2(
|
|
438
|
-
tooltip: ( localize2(
|
|
487
|
+
id: "workbench.action.chat.restoreCheckpoint",
|
|
488
|
+
title: ( localize2(5277, "Restore Checkpoint")),
|
|
489
|
+
tooltip: ( localize2(5278, "Restores workspace and chat to this point")),
|
|
439
490
|
f1: false,
|
|
440
491
|
category: CHAT_CATEGORY,
|
|
441
492
|
keybinding: {
|
|
442
493
|
primary: KeyCode.Delete,
|
|
443
494
|
mac: {
|
|
444
|
-
primary: KeyMod.CtrlCmd | KeyCode.Backspace
|
|
495
|
+
primary: KeyMod.CtrlCmd | KeyCode.Backspace
|
|
445
496
|
},
|
|
446
497
|
when: ( ContextKeyExpr.and(ChatContextKeys.inChatSession, ( EditorContextKeys.textInputFocus.negate()))),
|
|
447
|
-
weight: KeybindingWeight.WorkbenchContrib
|
|
498
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
448
499
|
},
|
|
449
|
-
menu: [
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
]
|
|
500
|
+
menu: [{
|
|
501
|
+
id: MenuId.ChatMessageCheckpoint,
|
|
502
|
+
group: "navigation",
|
|
503
|
+
order: 2,
|
|
504
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.isRequest, ( ChatContextKeys.lockedToCodingAgent.negate())))
|
|
505
|
+
}]
|
|
457
506
|
});
|
|
458
507
|
}
|
|
459
508
|
async run(accessor, ...args) {
|
|
@@ -477,23 +526,21 @@ registerAction2(class RestoreCheckpointAction extends Action2 {
|
|
|
477
526
|
registerAction2(class RestoreLastCheckpoint extends Action2 {
|
|
478
527
|
constructor() {
|
|
479
528
|
super({
|
|
480
|
-
id:
|
|
481
|
-
title: ( localize2(
|
|
529
|
+
id: "workbench.action.chat.restoreLastCheckpoint",
|
|
530
|
+
title: ( localize2(5279, "Restore to Last Checkpoint")),
|
|
482
531
|
f1: false,
|
|
483
532
|
category: CHAT_CATEGORY,
|
|
484
533
|
icon: Codicon.discard,
|
|
485
|
-
menu: [
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
}
|
|
496
|
-
]
|
|
534
|
+
menu: [{
|
|
535
|
+
id: MenuId.ChatMessageFooter,
|
|
536
|
+
group: "navigation",
|
|
537
|
+
order: 1,
|
|
538
|
+
when: ( ContextKeyExpr.and(
|
|
539
|
+
ContextKeyExpr.in(ChatContextKeys.itemId.key, ChatContextKeys.lastItemId.key),
|
|
540
|
+
( ContextKeyExpr.equals(`config.${ChatConfiguration.CheckpointsEnabled}`, true)),
|
|
541
|
+
( ChatContextKeys.lockedToCodingAgent.negate())
|
|
542
|
+
))
|
|
543
|
+
}]
|
|
497
544
|
});
|
|
498
545
|
}
|
|
499
546
|
async run(accessor, ...args) {
|
|
@@ -529,24 +576,22 @@ registerAction2(class RestoreLastCheckpoint extends Action2 {
|
|
|
529
576
|
registerAction2(class EditAction extends Action2 {
|
|
530
577
|
constructor() {
|
|
531
578
|
super({
|
|
532
|
-
id:
|
|
533
|
-
title: ( localize2(
|
|
579
|
+
id: "workbench.action.chat.editRequests",
|
|
580
|
+
title: ( localize2(5280, "Edit Request")),
|
|
534
581
|
f1: false,
|
|
535
582
|
category: CHAT_CATEGORY,
|
|
536
583
|
icon: Codicon.edit,
|
|
537
584
|
keybinding: {
|
|
538
585
|
primary: KeyCode.Enter,
|
|
539
586
|
when: ( ContextKeyExpr.and(ChatContextKeys.inChatSession, ( EditorContextKeys.textInputFocus.negate()))),
|
|
540
|
-
weight: KeybindingWeight.WorkbenchContrib
|
|
587
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
541
588
|
},
|
|
542
|
-
menu: [
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
}
|
|
549
|
-
]
|
|
589
|
+
menu: [{
|
|
590
|
+
id: MenuId.ChatMessageTitle,
|
|
591
|
+
group: "navigation",
|
|
592
|
+
order: 2,
|
|
593
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(( ContextKeyExpr.equals(`config.${ChatConfiguration.EditRequests}`, "hover")), ( ContextKeyExpr.equals(`config.${ChatConfiguration.EditRequests}`, "input"))))))
|
|
594
|
+
}]
|
|
550
595
|
});
|
|
551
596
|
}
|
|
552
597
|
async run(accessor, ...args) {
|
|
@@ -565,16 +610,18 @@ registerAction2(class EditAction extends Action2 {
|
|
|
565
610
|
}
|
|
566
611
|
});
|
|
567
612
|
registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
|
|
568
|
-
static {
|
|
613
|
+
static {
|
|
614
|
+
this.id = "chat.openFileUpdatedBySnapshot";
|
|
615
|
+
}
|
|
569
616
|
constructor() {
|
|
570
617
|
super({
|
|
571
618
|
id: OpenWorkingSetHistoryAction.id,
|
|
572
|
-
title: ( localize(
|
|
619
|
+
title: ( localize(5281, "Open File")),
|
|
573
620
|
menu: [{
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
621
|
+
id: MenuId.ChatEditingCodeBlockContext,
|
|
622
|
+
group: "navigation",
|
|
623
|
+
order: 0
|
|
624
|
+
}]
|
|
578
625
|
});
|
|
579
626
|
}
|
|
580
627
|
async run(accessor, ...args) {
|
|
@@ -583,20 +630,24 @@ registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
|
|
|
583
630
|
return;
|
|
584
631
|
}
|
|
585
632
|
const editorService = accessor.get(IEditorService);
|
|
586
|
-
await editorService.openEditor({
|
|
633
|
+
await editorService.openEditor({
|
|
634
|
+
resource: context.uri
|
|
635
|
+
});
|
|
587
636
|
}
|
|
588
637
|
});
|
|
589
638
|
registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
|
|
590
|
-
static {
|
|
639
|
+
static {
|
|
640
|
+
this.id = "chat.openFileSnapshot";
|
|
641
|
+
}
|
|
591
642
|
constructor() {
|
|
592
643
|
super({
|
|
593
644
|
id: OpenWorkingSetHistoryAction.id,
|
|
594
|
-
title: ( localize(
|
|
645
|
+
title: ( localize(5282, "Open File Snapshot")),
|
|
595
646
|
menu: [{
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
647
|
+
id: MenuId.ChatEditingCodeBlockContext,
|
|
648
|
+
group: "navigation",
|
|
649
|
+
order: 1
|
|
650
|
+
}]
|
|
600
651
|
});
|
|
601
652
|
}
|
|
602
653
|
async run(accessor, ...args) {
|
|
@@ -613,9 +664,17 @@ registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
|
|
|
613
664
|
}
|
|
614
665
|
const snapshot = chatEditingService.getEditingSession(chatModel.sessionResource)?.getSnapshotUri(context.requestId, context.uri, context.stopId);
|
|
615
666
|
if (snapshot) {
|
|
616
|
-
const editor = await editorService.openEditor({
|
|
667
|
+
const editor = await editorService.openEditor({
|
|
668
|
+
resource: snapshot,
|
|
669
|
+
label: ( localize(5283, "{0} (Snapshot)", basename(context.uri))),
|
|
670
|
+
options: {
|
|
671
|
+
activation: EditorActivation.ACTIVATE
|
|
672
|
+
}
|
|
673
|
+
});
|
|
617
674
|
if (isCodeEditor(editor)) {
|
|
618
|
-
editor.updateOptions({
|
|
675
|
+
editor.updateOptions({
|
|
676
|
+
readOnly: true
|
|
677
|
+
});
|
|
619
678
|
}
|
|
620
679
|
}
|
|
621
680
|
}
|
|
@@ -623,13 +682,13 @@ registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
|
|
|
623
682
|
registerAction2(class ResolveSymbolsContextAction extends EditingSessionAction {
|
|
624
683
|
constructor() {
|
|
625
684
|
super({
|
|
626
|
-
id:
|
|
627
|
-
title: ( localize2(
|
|
685
|
+
id: "workbench.action.edits.addFilesFromReferences",
|
|
686
|
+
title: ( localize2(5284, "Add Files From References")),
|
|
628
687
|
f1: false,
|
|
629
688
|
category: CHAT_CATEGORY,
|
|
630
689
|
menu: {
|
|
631
690
|
id: MenuId.ChatInputSymbolAttachmentContext,
|
|
632
|
-
group:
|
|
691
|
+
group: "navigation",
|
|
633
692
|
order: 1,
|
|
634
693
|
when: ( ContextKeyExpr.and(( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Ask)), EditorContextKeys.hasReferenceProvider))
|
|
635
694
|
}
|
|
@@ -661,45 +720,52 @@ registerAction2(class ResolveSymbolsContextAction extends EditingSessionAction {
|
|
|
661
720
|
}
|
|
662
721
|
async getReferences(position, textModel, languageFeaturesService) {
|
|
663
722
|
const referenceProviders = languageFeaturesService.referenceProvider.all(textModel);
|
|
664
|
-
const references = await Promise.all(( referenceProviders.map(async
|
|
665
|
-
return (await referenceProvider.provideReferences(textModel, position, {
|
|
723
|
+
const references = await Promise.all(( referenceProviders.map(async referenceProvider => {
|
|
724
|
+
return (await referenceProvider.provideReferences(textModel, position, {
|
|
725
|
+
includeDeclaration: true
|
|
726
|
+
}, CancellationToken.None)) ?? [];
|
|
666
727
|
})));
|
|
667
728
|
return references.flat();
|
|
668
729
|
}
|
|
669
730
|
async getDefinitions(position, textModel, languageFeaturesService) {
|
|
670
731
|
const definitionProviders = languageFeaturesService.definitionProvider.all(textModel);
|
|
671
|
-
const definitions = await Promise.all(( definitionProviders.map(async
|
|
732
|
+
const definitions = await Promise.all(( definitionProviders.map(async definitionProvider => {
|
|
672
733
|
return (await definitionProvider.provideDefinition(textModel, position, CancellationToken.None)) ?? [];
|
|
673
734
|
})));
|
|
674
735
|
return definitions.flat();
|
|
675
736
|
}
|
|
676
737
|
async getImplementations(position, textModel, languageFeaturesService) {
|
|
677
738
|
const implementationProviders = languageFeaturesService.implementationProvider.all(textModel);
|
|
678
|
-
const implementations = await Promise.all(( implementationProviders.map(async
|
|
739
|
+
const implementations = await Promise.all(( implementationProviders.map(async implementationProvider => {
|
|
679
740
|
return (await implementationProvider.provideImplementation(textModel, position, CancellationToken.None)) ?? [];
|
|
680
741
|
})));
|
|
681
742
|
return implementations.flat();
|
|
682
743
|
}
|
|
683
744
|
});
|
|
684
745
|
class ViewPreviousEditsAction extends EditingSessionAction {
|
|
685
|
-
static {
|
|
686
|
-
|
|
746
|
+
static {
|
|
747
|
+
this.Id = "chatEditing.viewPreviousEdits";
|
|
748
|
+
}
|
|
749
|
+
static {
|
|
750
|
+
this.Label = ( localize(5285, "View Previous Edits"));
|
|
751
|
+
}
|
|
687
752
|
constructor() {
|
|
688
753
|
super({
|
|
689
754
|
id: ViewPreviousEditsAction.Id,
|
|
690
|
-
title: {
|
|
755
|
+
title: {
|
|
756
|
+
value: ViewPreviousEditsAction.Label,
|
|
757
|
+
original: ViewPreviousEditsAction.Label
|
|
758
|
+
},
|
|
691
759
|
tooltip: ViewPreviousEditsAction.Label,
|
|
692
760
|
f1: true,
|
|
693
761
|
icon: Codicon.diffMultiple,
|
|
694
762
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( hasUndecidedChatEditingResourceContextKey.negate()))),
|
|
695
|
-
menu: [
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
}
|
|
702
|
-
],
|
|
763
|
+
menu: [{
|
|
764
|
+
id: MenuId.ChatEditingWidgetToolbar,
|
|
765
|
+
group: "navigation",
|
|
766
|
+
order: 4,
|
|
767
|
+
when: ( ContextKeyExpr.and(( applyingChatEditsFailedContextKey.negate()), ( ContextKeyExpr.and(hasAppliedChatEditsContextKey, ( hasUndecidedChatEditingResourceContextKey.negate())))))
|
|
768
|
+
}]
|
|
703
769
|
});
|
|
704
770
|
}
|
|
705
771
|
async runEditingSessionAction(accessor, editingSession, chatWidget, ...args) {
|
|
@@ -707,7 +773,7 @@ class ViewPreviousEditsAction extends EditingSessionAction {
|
|
|
707
773
|
}
|
|
708
774
|
}
|
|
709
775
|
registerAction2(ViewPreviousEditsAction);
|
|
710
|
-
CommandsRegistry.registerCommand(
|
|
776
|
+
CommandsRegistry.registerCommand("_chat.editSessions.accept", async (accessor, resources) => {
|
|
711
777
|
if (resources.length === 0) {
|
|
712
778
|
return;
|
|
713
779
|
}
|
|
@@ -718,4 +784,4 @@ CommandsRegistry.registerCommand('_chat.editSessions.accept', async (accessor, r
|
|
|
718
784
|
}
|
|
719
785
|
});
|
|
720
786
|
|
|
721
|
-
export { ChatEditingAcceptAllAction, ChatEditingDiscardAllAction, ChatEditingShowChangesAction, EditingSessionAction, ViewAllSessionChangesAction, ViewPreviousEditsAction, discardAllEditsWithConfirmation, getEditingSessionContext };
|
|
787
|
+
export { ChatEditingAcceptAllAction, ChatEditingDiscardAllAction, ChatEditingShowChangesAction, EditingSessionAction, ToggleExplanationWidgetAction, ViewAllSessionChangesAction, ViewPreviousEditsAction, discardAllEditsWithConfirmation, getEditingSessionContext };
|