@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
|
+
import { hash } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hash';
|
|
3
4
|
import { KeyCode, KeyMod } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
4
5
|
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
5
6
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
@@ -18,13 +19,16 @@ import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbenc
|
|
|
18
19
|
import { IChatModeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service';
|
|
19
20
|
import { chatVariableLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
20
21
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
21
|
-
import { ChatModeKind,
|
|
22
|
+
import { ChatModeKind, ChatConfiguration, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
22
23
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
24
|
+
import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
25
|
+
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
23
26
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
27
|
+
import { AgentSessionProviders, getAgentSessionProvider } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
24
28
|
import { getEditingSessionContext } from '../chatEditing/chatEditingActions.js';
|
|
25
|
-
import { ctxHasEditorModification } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
|
|
29
|
+
import { ctxHasEditorModification, ctxIsGlobalEditingSession, ctxHasRequestInProgress } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
|
|
26
30
|
import { CHAT_CATEGORY, handleModeSwitch, ACTION_ID_NEW_CHAT, handleCurrentEditingSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
27
|
-
import {
|
|
31
|
+
import { CreateRemoteAgentJobAction } from './chatContinueInAction.js';
|
|
28
32
|
|
|
29
33
|
class SubmitAction extends Action2 {
|
|
30
34
|
async run(accessor, ...args) {
|
|
@@ -32,6 +36,10 @@ class SubmitAction extends Action2 {
|
|
|
32
36
|
const telemetryService = accessor.get(ITelemetryService);
|
|
33
37
|
const widgetService = accessor.get(IChatWidgetService);
|
|
34
38
|
const widget = context?.widget ?? widgetService.lastFocusedWidget;
|
|
39
|
+
const pendingDelegationTarget = widget?.input.pendingDelegationTarget;
|
|
40
|
+
if (pendingDelegationTarget && pendingDelegationTarget !== AgentSessionProviders.Local) {
|
|
41
|
+
return await this.handleDelegation(accessor, widget, pendingDelegationTarget);
|
|
42
|
+
}
|
|
35
43
|
if (widget?.viewModel?.editing) {
|
|
36
44
|
const configurationService = accessor.get(IConfigurationService);
|
|
37
45
|
const dialogService = accessor.get(IDialogService);
|
|
@@ -51,89 +59,108 @@ class SubmitAction extends Action2 {
|
|
|
51
59
|
const editsToUndo = chatRequests.length - itemIndex;
|
|
52
60
|
const requestsToRemove = chatRequests.slice(itemIndex);
|
|
53
61
|
const requestIdsToRemove = ( new Set(( requestsToRemove.map(request => request.id))));
|
|
54
|
-
const entriesModifiedInRequestsToRemove = session.entries.get().filter(
|
|
55
|
-
const shouldPrompt = entriesModifiedInRequestsToRemove.length > 0 && configurationService.getValue(
|
|
62
|
+
const entriesModifiedInRequestsToRemove = session.entries.get().filter(entry => ( requestIdsToRemove.has(entry.lastModifyingRequestId))) ?? [];
|
|
63
|
+
const shouldPrompt = entriesModifiedInRequestsToRemove.length > 0 && configurationService.getValue("chat.editing.confirmEditRequestRemoval") === true;
|
|
56
64
|
let message;
|
|
57
65
|
if (editsToUndo === 1) {
|
|
58
66
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
59
67
|
message = ( localize(
|
|
60
|
-
|
|
68
|
+
4771,
|
|
61
69
|
"This will remove your last request and undo the edits made to {0}. Do you want to proceed?",
|
|
62
70
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
63
71
|
));
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
72
|
+
} else {
|
|
66
73
|
message = ( localize(
|
|
67
|
-
|
|
74
|
+
4772,
|
|
68
75
|
"This will remove your last request and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
69
76
|
entriesModifiedInRequestsToRemove.length
|
|
70
77
|
));
|
|
71
78
|
}
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
79
|
+
} else {
|
|
74
80
|
if (entriesModifiedInRequestsToRemove.length === 1) {
|
|
75
81
|
message = ( localize(
|
|
76
|
-
|
|
82
|
+
4773,
|
|
77
83
|
"This will remove all subsequent requests and undo edits made to {0}. Do you want to proceed?",
|
|
78
84
|
basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
|
|
79
85
|
));
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
86
|
+
} else {
|
|
82
87
|
message = ( localize(
|
|
83
|
-
|
|
88
|
+
4774,
|
|
84
89
|
"This will remove all subsequent requests and undo edits made to {0} files in your working set. Do you want to proceed?",
|
|
85
90
|
entriesModifiedInRequestsToRemove.length
|
|
86
91
|
));
|
|
87
92
|
}
|
|
88
93
|
}
|
|
89
|
-
const confirmation = shouldPrompt
|
|
90
|
-
?
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
const confirmation = shouldPrompt ? await dialogService.confirm({
|
|
95
|
+
title: editsToUndo === 1 ? ( localize(4775, "Do you want to undo your last edit?")) : ( localize(4776, "Do you want to undo {0} edits?", editsToUndo)),
|
|
96
|
+
message: message,
|
|
97
|
+
primaryButton: ( localize(4777, "Yes")),
|
|
98
|
+
checkbox: {
|
|
99
|
+
label: ( localize(4778, "Don't ask again")),
|
|
100
|
+
checked: false
|
|
101
|
+
},
|
|
102
|
+
type: "info"
|
|
103
|
+
}) : {
|
|
104
|
+
confirmed: true
|
|
105
|
+
};
|
|
100
106
|
if (!confirmation.confirmed) {
|
|
101
|
-
telemetryService.publicLog2(
|
|
102
|
-
editRequestType: configurationService.getValue(
|
|
103
|
-
outcome:
|
|
107
|
+
telemetryService.publicLog2("chat.undoEditsConfirmation", {
|
|
108
|
+
editRequestType: configurationService.getValue("chat.editRequests"),
|
|
109
|
+
outcome: "cancelled",
|
|
104
110
|
editsUndoCount: editsToUndo
|
|
105
111
|
});
|
|
106
112
|
return;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
outcome: 'applied',
|
|
113
|
+
} else if (editsToUndo > 0) {
|
|
114
|
+
telemetryService.publicLog2("chat.undoEditsConfirmation", {
|
|
115
|
+
editRequestType: configurationService.getValue("chat.editRequests"),
|
|
116
|
+
outcome: "applied",
|
|
112
117
|
editsUndoCount: editsToUndo
|
|
113
118
|
});
|
|
114
119
|
}
|
|
115
120
|
if (confirmation.checkboxChecked) {
|
|
116
|
-
await configurationService.updateValue(
|
|
121
|
+
await configurationService.updateValue("chat.editing.confirmEditRequestRemoval", false);
|
|
117
122
|
}
|
|
118
123
|
const snapshotRequestId = chatRequests[itemIndex].id;
|
|
119
124
|
await session.restoreSnapshot(snapshotRequestId, undefined);
|
|
120
125
|
}
|
|
121
|
-
}
|
|
122
|
-
else if (widget?.viewModel?.model.checkpoint) {
|
|
126
|
+
} else if (widget?.viewModel?.model.checkpoint) {
|
|
123
127
|
widget.viewModel.model.setCheckpoint(undefined);
|
|
124
128
|
}
|
|
125
129
|
widget?.acceptInput(context?.inputValue);
|
|
126
130
|
}
|
|
131
|
+
async handleDelegation(accessor, widget, delegationTarget) {
|
|
132
|
+
const chatSessionsService = accessor.get(IChatSessionsService);
|
|
133
|
+
const contributions = chatSessionsService.getAllChatSessionContributions();
|
|
134
|
+
const targetContribution = contributions.find(contrib => {
|
|
135
|
+
const providerType = getAgentSessionProvider(contrib.type);
|
|
136
|
+
return providerType === delegationTarget;
|
|
137
|
+
});
|
|
138
|
+
if (!targetContribution) {
|
|
139
|
+
throw ( new Error(`No contribution found for delegation target: ${delegationTarget}`));
|
|
140
|
+
}
|
|
141
|
+
if (targetContribution.canDelegate === false) {
|
|
142
|
+
throw ( new Error(
|
|
143
|
+
`The contribution for delegation target: ${delegationTarget} does not support delegation.`
|
|
144
|
+
));
|
|
145
|
+
}
|
|
146
|
+
return ( new CreateRemoteAgentJobAction()).run(accessor, targetContribution, widget);
|
|
147
|
+
}
|
|
127
148
|
}
|
|
128
149
|
const whenNotInProgress = ( ChatContextKeys.requestInProgress.negate());
|
|
129
150
|
class ChatSubmitAction extends SubmitAction {
|
|
130
|
-
static {
|
|
151
|
+
static {
|
|
152
|
+
this.ID = "workbench.action.chat.submit";
|
|
153
|
+
}
|
|
131
154
|
constructor() {
|
|
132
155
|
const menuCondition = ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Ask));
|
|
133
|
-
const precondition = ( ContextKeyExpr.and(
|
|
156
|
+
const precondition = ( ContextKeyExpr.and(
|
|
157
|
+
ChatContextKeys.inputHasText,
|
|
158
|
+
whenNotInProgress,
|
|
159
|
+
ChatContextKeys.chatSessionOptionsValid
|
|
160
|
+
));
|
|
134
161
|
super({
|
|
135
162
|
id: ChatSubmitAction.ID,
|
|
136
|
-
title: ( localize2(
|
|
163
|
+
title: ( localize2(4779, "Send")),
|
|
137
164
|
f1: false,
|
|
138
165
|
category: CHAT_CATEGORY,
|
|
139
166
|
icon: Codicon.send,
|
|
@@ -141,91 +168,41 @@ class ChatSubmitAction extends SubmitAction {
|
|
|
141
168
|
toggled: {
|
|
142
169
|
condition: ChatContextKeys.lockedToCodingAgent,
|
|
143
170
|
icon: Codicon.send,
|
|
144
|
-
tooltip: ( localize(
|
|
171
|
+
tooltip: ( localize(4780, "Send to Agent"))
|
|
145
172
|
},
|
|
146
173
|
keybinding: {
|
|
147
174
|
when: ( ContextKeyExpr.and(ChatContextKeys.inChatInput, ( ChatContextKeys.withinEditSessionDiff.negate()))),
|
|
148
175
|
primary: KeyCode.Enter,
|
|
149
176
|
weight: KeybindingWeight.EditorContrib
|
|
150
177
|
},
|
|
151
|
-
menu: [
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
icon: Codicon.plus
|
|
161
|
-
}
|
|
162
|
-
}, {
|
|
163
|
-
id: MenuId.ChatEditorInlineExecute,
|
|
164
|
-
group: 'navigation',
|
|
165
|
-
order: 4,
|
|
166
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(( ctxHasEditorModification.negate()), ChatContextKeys.inputHasText)), whenNotInProgress, ( ChatContextKeys.requestInProgress.negate()), menuCondition)),
|
|
167
|
-
}
|
|
168
|
-
]
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
class ChatDelegateToEditSessionAction extends Action2 {
|
|
173
|
-
static { this.ID = 'workbench.action.chat.delegateToEditSession'; }
|
|
174
|
-
constructor() {
|
|
175
|
-
super({
|
|
176
|
-
id: ChatDelegateToEditSessionAction.ID,
|
|
177
|
-
title: ( localize2(4747, "Send to Edit Session")),
|
|
178
|
-
f1: false,
|
|
179
|
-
category: CHAT_CATEGORY,
|
|
180
|
-
icon: Codicon.commentDiscussion,
|
|
181
|
-
keybinding: {
|
|
182
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.inChatInput, ChatContextKeys.withinEditSessionDiff)),
|
|
183
|
-
primary: KeyCode.Enter,
|
|
184
|
-
weight: KeybindingWeight.EditorContrib
|
|
185
|
-
},
|
|
186
|
-
menu: [
|
|
187
|
-
{
|
|
188
|
-
id: MenuId.ChatExecute,
|
|
189
|
-
order: 4,
|
|
190
|
-
when: ( ContextKeyExpr.and(whenNotInProgress, ChatContextKeys.withinEditSessionDiff)),
|
|
191
|
-
group: 'navigation',
|
|
178
|
+
menu: [{
|
|
179
|
+
id: MenuId.ChatExecute,
|
|
180
|
+
order: 4,
|
|
181
|
+
when: ( ContextKeyExpr.and(whenNotInProgress, menuCondition, ( ChatContextKeys.withinEditSessionDiff.negate()))),
|
|
182
|
+
group: "navigation",
|
|
183
|
+
alt: {
|
|
184
|
+
id: "workbench.action.chat.sendToNewChat",
|
|
185
|
+
title: ( localize2(4781, "Send to New Chat")),
|
|
186
|
+
icon: Codicon.plus
|
|
192
187
|
}
|
|
193
|
-
|
|
188
|
+
}, {
|
|
189
|
+
id: MenuId.ChatEditorInlineExecute,
|
|
190
|
+
group: "navigation",
|
|
191
|
+
order: 4,
|
|
192
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(( ctxHasEditorModification.negate()), ChatContextKeys.inputHasText)), whenNotInProgress, ( ChatContextKeys.requestInProgress.negate()), menuCondition))
|
|
193
|
+
}]
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
|
-
async run(accessor, ...args) {
|
|
197
|
-
const context = args[0];
|
|
198
|
-
const widgetService = accessor.get(IChatWidgetService);
|
|
199
|
-
const inlineWidget = context?.widget ?? widgetService.lastFocusedWidget;
|
|
200
|
-
const locationData = inlineWidget?.locationData;
|
|
201
|
-
if (inlineWidget && locationData?.type === ChatAgentLocation.EditorInline && locationData.delegateSessionResource) {
|
|
202
|
-
const sessionWidget = widgetService.getWidgetBySessionResource(locationData.delegateSessionResource);
|
|
203
|
-
if (sessionWidget) {
|
|
204
|
-
await widgetService.reveal(sessionWidget);
|
|
205
|
-
sessionWidget.attachmentModel.addContext({
|
|
206
|
-
id: 'vscode.delegate.inline',
|
|
207
|
-
kind: 'file',
|
|
208
|
-
modelDescription: `User's chat context`,
|
|
209
|
-
name: 'delegate-inline',
|
|
210
|
-
value: { range: locationData.wholeRange, uri: locationData.document },
|
|
211
|
-
});
|
|
212
|
-
sessionWidget.acceptInput(inlineWidget.getInput(), {
|
|
213
|
-
noCommandDetection: true,
|
|
214
|
-
enableImplicitContext: false,
|
|
215
|
-
});
|
|
216
|
-
inlineWidget.setInput('');
|
|
217
|
-
locationData.close();
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
196
|
}
|
|
222
|
-
const ToggleAgentModeActionId =
|
|
197
|
+
const ToggleAgentModeActionId = "workbench.action.chat.toggleAgentMode";
|
|
223
198
|
class ToggleChatModeAction extends Action2 {
|
|
224
|
-
static {
|
|
199
|
+
static {
|
|
200
|
+
this.ID = ToggleAgentModeActionId;
|
|
201
|
+
}
|
|
225
202
|
constructor() {
|
|
226
203
|
super({
|
|
227
204
|
id: ToggleChatModeAction.ID,
|
|
228
|
-
title: ( localize2(
|
|
205
|
+
title: ( localize2(4782, "Switch to Next Agent")),
|
|
229
206
|
f1: true,
|
|
230
207
|
category: CHAT_CATEGORY,
|
|
231
208
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.requestInProgress.negate())))
|
|
@@ -242,8 +219,7 @@ class ToggleChatModeAction extends Action2 {
|
|
|
242
219
|
let widget;
|
|
243
220
|
if (arg?.sessionResource) {
|
|
244
221
|
widget = chatWidgetService.getWidgetBySessionResource(arg.sessionResource);
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
222
|
+
} else {
|
|
247
223
|
widget = getEditingSessionContext(accessor, args)?.chatWidget;
|
|
248
224
|
}
|
|
249
225
|
if (!widget) {
|
|
@@ -251,22 +227,35 @@ class ToggleChatModeAction extends Action2 {
|
|
|
251
227
|
}
|
|
252
228
|
const chatSession = widget.viewModel?.model;
|
|
253
229
|
const requestCount = chatSession?.getRequests().length ?? 0;
|
|
254
|
-
const switchToMode = (arg && modeService.findModeById(arg.modeId)) ?? this.getNextMode(widget, requestCount, configurationService, modeService);
|
|
230
|
+
const switchToMode = (arg && (modeService.findModeById(arg.modeId) || modeService.findModeByName(arg.modeId))) ?? this.getNextMode(widget, requestCount, configurationService, modeService);
|
|
255
231
|
const currentMode = widget.input.currentModeObs.get();
|
|
256
232
|
if (switchToMode.id === currentMode.id) {
|
|
257
233
|
return;
|
|
258
234
|
}
|
|
259
|
-
const chatModeCheck = await instaService.invokeFunction(
|
|
235
|
+
const chatModeCheck = await instaService.invokeFunction(
|
|
236
|
+
handleModeSwitch,
|
|
237
|
+
widget.input.currentModeKind,
|
|
238
|
+
switchToMode.kind,
|
|
239
|
+
requestCount,
|
|
240
|
+
widget.viewModel?.model
|
|
241
|
+
);
|
|
260
242
|
if (!chatModeCheck) {
|
|
261
243
|
return;
|
|
262
244
|
}
|
|
263
|
-
const storage = switchToMode.source?.storage ??
|
|
264
|
-
const extensionId = switchToMode.source?.storage ===
|
|
245
|
+
const storage = switchToMode.source?.storage ?? "builtin";
|
|
246
|
+
const extensionId = switchToMode.source?.storage === "extension" ? switchToMode.source.extensionId.value : undefined;
|
|
265
247
|
const toolsCount = switchToMode.customTools?.get()?.length ?? 0;
|
|
266
248
|
const handoffsCount = switchToMode.handOffs?.get()?.length ?? 0;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
249
|
+
const getModeNameForTelemetry = mode => {
|
|
250
|
+
const modeStorage = mode.source?.storage;
|
|
251
|
+
if (modeStorage === PromptsStorage.local || modeStorage === PromptsStorage.user) {
|
|
252
|
+
return String(hash(mode.name.get()));
|
|
253
|
+
}
|
|
254
|
+
return mode.name.get();
|
|
255
|
+
};
|
|
256
|
+
telemetryService.publicLog2("chat.modeChange", {
|
|
257
|
+
fromMode: getModeNameForTelemetry(currentMode),
|
|
258
|
+
mode: getModeNameForTelemetry(switchToMode),
|
|
270
259
|
requestCount: requestCount,
|
|
271
260
|
storage,
|
|
272
261
|
extensionId,
|
|
@@ -280,26 +269,25 @@ class ToggleChatModeAction extends Action2 {
|
|
|
280
269
|
}
|
|
281
270
|
getNextMode(chatWidget, requestCount, configurationService, modeService) {
|
|
282
271
|
const modes = modeService.getModes();
|
|
283
|
-
const flat = [
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}),
|
|
287
|
-
...(modes.custom ?? []),
|
|
288
|
-
];
|
|
272
|
+
const flat = [...modes.builtin.filter(mode => {
|
|
273
|
+
return mode.kind !== ChatModeKind.Edit || configurationService.getValue(ChatConfiguration.Edits2Enabled) || requestCount === 0;
|
|
274
|
+
}), ...(modes.custom ?? [])];
|
|
289
275
|
const curModeIndex = flat.findIndex(mode => mode.id === chatWidget.input.currentModeObs.get().id);
|
|
290
276
|
const newMode = flat[(curModeIndex + 1) % flat.length];
|
|
291
277
|
return newMode;
|
|
292
278
|
}
|
|
293
279
|
}
|
|
294
280
|
class SwitchToNextModelAction extends Action2 {
|
|
295
|
-
static {
|
|
281
|
+
static {
|
|
282
|
+
this.ID = "workbench.action.chat.switchToNextModel";
|
|
283
|
+
}
|
|
296
284
|
constructor() {
|
|
297
285
|
super({
|
|
298
286
|
id: SwitchToNextModelAction.ID,
|
|
299
|
-
title: ( localize2(
|
|
287
|
+
title: ( localize2(4783, "Switch to Next Model")),
|
|
300
288
|
category: CHAT_CATEGORY,
|
|
301
289
|
f1: true,
|
|
302
|
-
precondition: ChatContextKeys.enabled
|
|
290
|
+
precondition: ChatContextKeys.enabled
|
|
303
291
|
});
|
|
304
292
|
}
|
|
305
293
|
run(accessor, ...args) {
|
|
@@ -308,13 +296,14 @@ class SwitchToNextModelAction extends Action2 {
|
|
|
308
296
|
widget?.input.switchToNextModel();
|
|
309
297
|
}
|
|
310
298
|
}
|
|
311
|
-
const ChatOpenModelPickerActionId = 'workbench.action.chat.openModelPicker';
|
|
312
299
|
class OpenModelPickerAction extends Action2 {
|
|
313
|
-
static {
|
|
300
|
+
static {
|
|
301
|
+
this.ID = "workbench.action.chat.openModelPicker";
|
|
302
|
+
}
|
|
314
303
|
constructor() {
|
|
315
304
|
super({
|
|
316
305
|
id: OpenModelPickerAction.ID,
|
|
317
|
-
title: ( localize2(
|
|
306
|
+
title: ( localize2(4784, "Open Model Picker")),
|
|
318
307
|
category: CHAT_CATEGORY,
|
|
319
308
|
f1: false,
|
|
320
309
|
keybinding: {
|
|
@@ -326,8 +315,9 @@ class OpenModelPickerAction extends Action2 {
|
|
|
326
315
|
menu: {
|
|
327
316
|
id: MenuId.ChatInput,
|
|
328
317
|
order: 3,
|
|
329
|
-
group:
|
|
330
|
-
when: ( ContextKeyExpr.and(( ChatContextKeys.lockedToCodingAgent.negate()), ( ContextKeyExpr.or(( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Chat)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.EditorInline)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Notebook)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Terminal))))
|
|
318
|
+
group: "navigation",
|
|
319
|
+
when: ( ContextKeyExpr.and(( ChatContextKeys.lockedToCodingAgent.negate()), ( ContextKeyExpr.or(( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Chat)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.EditorInline)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Notebook)), ( ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Terminal)))), (
|
|
320
|
+
ContextKeyExpr.or(( ChatContextKeys.inAgentSessionsWelcome.negate()), ( ChatContextKeys.agentSessionType.isEqualTo(AgentSessionProviders.Local))))))
|
|
331
321
|
}
|
|
332
322
|
});
|
|
333
323
|
}
|
|
@@ -341,12 +331,14 @@ class OpenModelPickerAction extends Action2 {
|
|
|
341
331
|
}
|
|
342
332
|
}
|
|
343
333
|
class OpenModePickerAction extends Action2 {
|
|
344
|
-
static {
|
|
334
|
+
static {
|
|
335
|
+
this.ID = "workbench.action.chat.openModePicker";
|
|
336
|
+
}
|
|
345
337
|
constructor() {
|
|
346
338
|
super({
|
|
347
339
|
id: OpenModePickerAction.ID,
|
|
348
|
-
title: ( localize2(
|
|
349
|
-
tooltip: ( localize(
|
|
340
|
+
title: ( localize2(4785, "Open Agent Picker")),
|
|
341
|
+
tooltip: ( localize(4786, "Set Agent")),
|
|
350
342
|
category: CHAT_CATEGORY,
|
|
351
343
|
f1: false,
|
|
352
344
|
precondition: ChatContextKeys.enabled,
|
|
@@ -355,14 +347,13 @@ class OpenModePickerAction extends Action2 {
|
|
|
355
347
|
primary: KeyMod.CtrlCmd | KeyCode.Period,
|
|
356
348
|
weight: KeybindingWeight.EditorContrib
|
|
357
349
|
},
|
|
358
|
-
menu: [
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
]
|
|
350
|
+
menu: [{
|
|
351
|
+
id: MenuId.ChatInput,
|
|
352
|
+
order: 1,
|
|
353
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ( ContextKeyExpr.or(( ChatContextKeys.lockedToCodingAgent.negate()), ChatContextKeys.chatSessionHasCustomAgentTarget)), (
|
|
354
|
+
ContextKeyExpr.or(( ChatContextKeys.inAgentSessionsWelcome.negate()), ( ChatContextKeys.agentSessionType.isEqualTo(AgentSessionProviders.Local)))))),
|
|
355
|
+
group: "navigation"
|
|
356
|
+
}]
|
|
366
357
|
});
|
|
367
358
|
}
|
|
368
359
|
async run(accessor, ...args) {
|
|
@@ -373,20 +364,100 @@ class OpenModePickerAction extends Action2 {
|
|
|
373
364
|
}
|
|
374
365
|
}
|
|
375
366
|
}
|
|
367
|
+
class OpenSessionTargetPickerAction extends Action2 {
|
|
368
|
+
static {
|
|
369
|
+
this.ID = "workbench.action.chat.openSessionTargetPicker";
|
|
370
|
+
}
|
|
371
|
+
constructor() {
|
|
372
|
+
super({
|
|
373
|
+
id: OpenSessionTargetPickerAction.ID,
|
|
374
|
+
title: ( localize2(4787, "Open Session Target Picker")),
|
|
375
|
+
tooltip: ( localize(4788, "Set Session Target")),
|
|
376
|
+
category: CHAT_CATEGORY,
|
|
377
|
+
f1: false,
|
|
378
|
+
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(ChatContextKeys.chatSessionIsEmpty, ChatContextKeys.inAgentSessionsWelcome)), ( ChatContextKeys.currentlyEditingInput.negate()), ( ChatContextKeys.currentlyEditing.negate()))),
|
|
379
|
+
menu: [{
|
|
380
|
+
id: MenuId.ChatInput,
|
|
381
|
+
order: 0,
|
|
382
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ChatContextKeys.chatSessionIsEmpty)),
|
|
383
|
+
group: "navigation"
|
|
384
|
+
}]
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
async run(accessor, ...args) {
|
|
388
|
+
const widgetService = accessor.get(IChatWidgetService);
|
|
389
|
+
const widget = widgetService.lastFocusedWidget;
|
|
390
|
+
if (widget) {
|
|
391
|
+
widget.input.openSessionTargetPicker();
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
class OpenDelegationPickerAction extends Action2 {
|
|
396
|
+
static {
|
|
397
|
+
this.ID = "workbench.action.chat.openDelegationPicker";
|
|
398
|
+
}
|
|
399
|
+
constructor() {
|
|
400
|
+
super({
|
|
401
|
+
id: OpenDelegationPickerAction.ID,
|
|
402
|
+
title: ( localize2(4789, "Open Delegation Picker")),
|
|
403
|
+
tooltip: ( localize(4790, "Delegate Session")),
|
|
404
|
+
category: CHAT_CATEGORY,
|
|
405
|
+
f1: false,
|
|
406
|
+
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.chatSessionIsEmpty.negate()), ( ChatContextKeys.currentlyEditingInput.negate()), ( ChatContextKeys.currentlyEditing.negate()))),
|
|
407
|
+
menu: [{
|
|
408
|
+
id: MenuId.ChatInput,
|
|
409
|
+
order: 0.5,
|
|
410
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Chat)), ( ChatContextKeys.inQuickChat.negate()), ( ChatContextKeys.chatSessionIsEmpty.negate()))),
|
|
411
|
+
group: "navigation"
|
|
412
|
+
}]
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
async run(accessor, ...args) {
|
|
416
|
+
const widgetService = accessor.get(IChatWidgetService);
|
|
417
|
+
const widget = widgetService.lastFocusedWidget;
|
|
418
|
+
if (widget) {
|
|
419
|
+
widget.input.openDelegationPicker();
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
class OpenWorkspacePickerAction extends Action2 {
|
|
424
|
+
static {
|
|
425
|
+
this.ID = "workbench.action.chat.openWorkspacePicker";
|
|
426
|
+
}
|
|
427
|
+
constructor() {
|
|
428
|
+
super({
|
|
429
|
+
id: OpenWorkspacePickerAction.ID,
|
|
430
|
+
title: ( localize2(4791, "Open Workspace Picker")),
|
|
431
|
+
tooltip: ( localize(4792, "Select Target Workspace")),
|
|
432
|
+
category: CHAT_CATEGORY,
|
|
433
|
+
f1: false,
|
|
434
|
+
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.inAgentSessionsWelcome)),
|
|
435
|
+
menu: [{
|
|
436
|
+
id: MenuId.ChatInput,
|
|
437
|
+
order: 0.6,
|
|
438
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.inAgentSessionsWelcome, ( ChatContextKeys.chatSessionType.isEqualTo("local")))),
|
|
439
|
+
group: "navigation"
|
|
440
|
+
}]
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
async run(accessor, ...args) {}
|
|
444
|
+
}
|
|
376
445
|
class ChatSessionPrimaryPickerAction extends Action2 {
|
|
377
|
-
static {
|
|
446
|
+
static {
|
|
447
|
+
this.ID = "workbench.action.chat.chatSessionPrimaryPicker";
|
|
448
|
+
}
|
|
378
449
|
constructor() {
|
|
379
450
|
super({
|
|
380
451
|
id: ChatSessionPrimaryPickerAction.ID,
|
|
381
|
-
title: ( localize2(
|
|
452
|
+
title: ( localize2(4793, "Open Model Picker")),
|
|
382
453
|
category: CHAT_CATEGORY,
|
|
383
454
|
f1: false,
|
|
384
455
|
precondition: ChatContextKeys.enabled,
|
|
385
456
|
menu: {
|
|
386
457
|
id: MenuId.ChatInput,
|
|
387
458
|
order: 4,
|
|
388
|
-
group:
|
|
389
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.lockedToCodingAgent, ChatContextKeys.
|
|
459
|
+
group: "navigation",
|
|
460
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.chatSessionHasModels, ( ContextKeyExpr.or(ChatContextKeys.lockedToCodingAgent, ( ContextKeyExpr.and(ChatContextKeys.inAgentSessionsWelcome, ( ChatContextKeys.chatSessionType.notEqualsTo("local"))))))))
|
|
390
461
|
}
|
|
391
462
|
});
|
|
392
463
|
}
|
|
@@ -398,21 +469,25 @@ class ChatSessionPrimaryPickerAction extends Action2 {
|
|
|
398
469
|
}
|
|
399
470
|
}
|
|
400
471
|
}
|
|
401
|
-
const ChangeChatModelActionId =
|
|
472
|
+
const ChangeChatModelActionId = "workbench.action.chat.changeModel";
|
|
402
473
|
class ChangeChatModelAction extends Action2 {
|
|
403
|
-
static {
|
|
474
|
+
static {
|
|
475
|
+
this.ID = ChangeChatModelActionId;
|
|
476
|
+
}
|
|
404
477
|
constructor() {
|
|
405
478
|
super({
|
|
406
479
|
id: ChangeChatModelAction.ID,
|
|
407
|
-
title: ( localize2(
|
|
480
|
+
title: ( localize2(4794, "Change Model")),
|
|
408
481
|
category: CHAT_CATEGORY,
|
|
409
482
|
f1: false,
|
|
410
|
-
precondition: ChatContextKeys.enabled
|
|
483
|
+
precondition: ChatContextKeys.enabled
|
|
411
484
|
});
|
|
412
485
|
}
|
|
413
486
|
run(accessor, ...args) {
|
|
414
487
|
const modelInfo = args[0];
|
|
415
|
-
assertType(
|
|
488
|
+
assertType(
|
|
489
|
+
typeof modelInfo.vendor === "string" && typeof modelInfo.id === "string" && typeof modelInfo.family === "string"
|
|
490
|
+
);
|
|
416
491
|
const widgetService = accessor.get(IChatWidgetService);
|
|
417
492
|
const widgets = widgetService.getAllWidgets();
|
|
418
493
|
for (const widget of widgets) {
|
|
@@ -421,40 +496,46 @@ class ChangeChatModelAction extends Action2 {
|
|
|
421
496
|
}
|
|
422
497
|
}
|
|
423
498
|
class ChatEditingSessionSubmitAction extends SubmitAction {
|
|
424
|
-
static {
|
|
499
|
+
static {
|
|
500
|
+
this.ID = "workbench.action.edits.submit";
|
|
501
|
+
}
|
|
425
502
|
constructor() {
|
|
426
503
|
const menuCondition = ( ChatContextKeys.chatModeKind.notEqualsTo(ChatModeKind.Ask));
|
|
427
|
-
const precondition = ( ContextKeyExpr.and(
|
|
504
|
+
const precondition = ( ContextKeyExpr.and(
|
|
505
|
+
ChatContextKeys.inputHasText,
|
|
506
|
+
whenNotInProgress,
|
|
507
|
+
ChatContextKeys.chatSessionOptionsValid
|
|
508
|
+
));
|
|
428
509
|
super({
|
|
429
510
|
id: ChatEditingSessionSubmitAction.ID,
|
|
430
|
-
title: ( localize2(
|
|
511
|
+
title: ( localize2(4795, "Send")),
|
|
431
512
|
f1: false,
|
|
432
513
|
category: CHAT_CATEGORY,
|
|
433
514
|
icon: Codicon.send,
|
|
434
515
|
precondition,
|
|
435
|
-
menu: [
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
icon: Codicon.plus
|
|
445
|
-
}
|
|
516
|
+
menu: [{
|
|
517
|
+
id: MenuId.ChatExecute,
|
|
518
|
+
order: 4,
|
|
519
|
+
when: ( ContextKeyExpr.and(( ChatContextKeys.requestInProgress.negate()), menuCondition)),
|
|
520
|
+
group: "navigation",
|
|
521
|
+
alt: {
|
|
522
|
+
id: "workbench.action.chat.sendToNewChat",
|
|
523
|
+
title: ( localize2(4781, "Send to New Chat")),
|
|
524
|
+
icon: Codicon.plus
|
|
446
525
|
}
|
|
447
|
-
]
|
|
526
|
+
}]
|
|
448
527
|
});
|
|
449
528
|
}
|
|
450
529
|
}
|
|
451
530
|
class SubmitWithoutDispatchingAction extends Action2 {
|
|
452
|
-
static {
|
|
531
|
+
static {
|
|
532
|
+
this.ID = "workbench.action.chat.submitWithoutDispatching";
|
|
533
|
+
}
|
|
453
534
|
constructor() {
|
|
454
535
|
const precondition = ( ContextKeyExpr.and(ChatContextKeys.inputHasText, whenNotInProgress, ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Ask))));
|
|
455
536
|
super({
|
|
456
537
|
id: SubmitWithoutDispatchingAction.ID,
|
|
457
|
-
title: ( localize2(
|
|
538
|
+
title: ( localize2(4796, "Send")),
|
|
458
539
|
f1: false,
|
|
459
540
|
category: CHAT_CATEGORY,
|
|
460
541
|
precondition,
|
|
@@ -469,22 +550,26 @@ class SubmitWithoutDispatchingAction extends Action2 {
|
|
|
469
550
|
const context = args[0];
|
|
470
551
|
const widgetService = accessor.get(IChatWidgetService);
|
|
471
552
|
const widget = context?.widget ?? widgetService.lastFocusedWidget;
|
|
472
|
-
widget?.acceptInput(context?.inputValue, {
|
|
553
|
+
widget?.acceptInput(context?.inputValue, {
|
|
554
|
+
noCommandDetection: true
|
|
555
|
+
});
|
|
473
556
|
}
|
|
474
557
|
}
|
|
475
558
|
class ChatSubmitWithCodebaseAction extends Action2 {
|
|
476
|
-
static {
|
|
559
|
+
static {
|
|
560
|
+
this.ID = "workbench.action.chat.submitWithCodebase";
|
|
561
|
+
}
|
|
477
562
|
constructor() {
|
|
478
563
|
const precondition = ( ContextKeyExpr.and(ChatContextKeys.inputHasText, whenNotInProgress));
|
|
479
564
|
super({
|
|
480
565
|
id: ChatSubmitWithCodebaseAction.ID,
|
|
481
|
-
title: ( localize2(
|
|
566
|
+
title: ( localize2(4797, "Send with {0}", `${chatVariableLeader}codebase`)),
|
|
482
567
|
precondition,
|
|
483
568
|
keybinding: {
|
|
484
569
|
when: ChatContextKeys.inChatInput,
|
|
485
570
|
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
|
486
571
|
weight: KeybindingWeight.EditorContrib
|
|
487
|
-
}
|
|
572
|
+
}
|
|
488
573
|
});
|
|
489
574
|
}
|
|
490
575
|
run(accessor, ...args) {
|
|
@@ -495,17 +580,17 @@ class ChatSubmitWithCodebaseAction extends Action2 {
|
|
|
495
580
|
return;
|
|
496
581
|
}
|
|
497
582
|
const languageModelToolsService = accessor.get(ILanguageModelToolsService);
|
|
498
|
-
const codebaseTool = languageModelToolsService.getToolByName(
|
|
583
|
+
const codebaseTool = languageModelToolsService.getToolByName("codebase");
|
|
499
584
|
if (!codebaseTool) {
|
|
500
585
|
return;
|
|
501
586
|
}
|
|
502
587
|
widget.input.attachmentModel.addContext({
|
|
503
588
|
id: codebaseTool.id,
|
|
504
|
-
name: codebaseTool.displayName ??
|
|
505
|
-
fullName: codebaseTool.displayName ??
|
|
589
|
+
name: codebaseTool.displayName ?? "",
|
|
590
|
+
fullName: codebaseTool.displayName ?? "",
|
|
506
591
|
value: undefined,
|
|
507
592
|
icon: ThemeIcon.isThemeIcon(codebaseTool.icon) ? codebaseTool.icon : undefined,
|
|
508
|
-
kind:
|
|
593
|
+
kind: "tool"
|
|
509
594
|
});
|
|
510
595
|
widget.acceptInput();
|
|
511
596
|
}
|
|
@@ -514,15 +599,15 @@ class SendToNewChatAction extends Action2 {
|
|
|
514
599
|
constructor() {
|
|
515
600
|
const precondition = ChatContextKeys.inputHasText;
|
|
516
601
|
super({
|
|
517
|
-
id:
|
|
518
|
-
title: ( localize2(
|
|
602
|
+
id: "workbench.action.chat.sendToNewChat",
|
|
603
|
+
title: ( localize2(4781, "Send to New Chat")),
|
|
519
604
|
precondition,
|
|
520
605
|
category: CHAT_CATEGORY,
|
|
521
606
|
f1: false,
|
|
522
607
|
keybinding: {
|
|
523
608
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
524
609
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter,
|
|
525
|
-
when: ChatContextKeys.inChatInput
|
|
610
|
+
when: ChatContextKeys.inChatInput
|
|
526
611
|
}
|
|
527
612
|
});
|
|
528
613
|
}
|
|
@@ -545,35 +630,41 @@ class SendToNewChatAction extends Action2 {
|
|
|
545
630
|
}
|
|
546
631
|
}
|
|
547
632
|
await widget.clear();
|
|
548
|
-
widget.acceptInput(inputBeforeClear, {
|
|
633
|
+
widget.acceptInput(inputBeforeClear, {
|
|
634
|
+
storeToHistory: true
|
|
635
|
+
});
|
|
549
636
|
}
|
|
550
637
|
}
|
|
551
|
-
const CancelChatActionId =
|
|
638
|
+
const CancelChatActionId = "workbench.action.chat.cancel";
|
|
552
639
|
class CancelAction extends Action2 {
|
|
553
|
-
static {
|
|
640
|
+
static {
|
|
641
|
+
this.ID = CancelChatActionId;
|
|
642
|
+
}
|
|
554
643
|
constructor() {
|
|
555
644
|
super({
|
|
556
645
|
id: CancelAction.ID,
|
|
557
|
-
title: ( localize2(
|
|
646
|
+
title: ( localize2(4798, "Cancel")),
|
|
558
647
|
f1: false,
|
|
559
648
|
category: CHAT_CATEGORY,
|
|
560
649
|
icon: Codicon.stopCircle,
|
|
561
650
|
menu: [{
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
],
|
|
651
|
+
id: MenuId.ChatExecute,
|
|
652
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.requestInProgress, ( ChatContextKeys.remoteJobCreating.negate()))),
|
|
653
|
+
order: 4,
|
|
654
|
+
group: "navigation"
|
|
655
|
+
}, {
|
|
656
|
+
id: MenuId.ChatEditorInlineExecute,
|
|
657
|
+
when: ( ContextKeyExpr.and(( ctxIsGlobalEditingSession.negate()), ctxHasRequestInProgress)),
|
|
658
|
+
order: 4,
|
|
659
|
+
group: "navigation"
|
|
660
|
+
}],
|
|
573
661
|
keybinding: {
|
|
574
662
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
575
663
|
primary: KeyMod.CtrlCmd | KeyCode.Escape,
|
|
576
|
-
|
|
664
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.requestInProgress, ( ChatContextKeys.remoteJobCreating.negate()))),
|
|
665
|
+
win: {
|
|
666
|
+
primary: KeyMod.Alt | KeyCode.Backspace
|
|
667
|
+
}
|
|
577
668
|
}
|
|
578
669
|
});
|
|
579
670
|
}
|
|
@@ -590,28 +681,28 @@ class CancelAction extends Action2 {
|
|
|
590
681
|
}
|
|
591
682
|
}
|
|
592
683
|
}
|
|
593
|
-
const CancelChatEditId =
|
|
684
|
+
const CancelChatEditId = "workbench.edit.chat.cancel";
|
|
594
685
|
class CancelEdit extends Action2 {
|
|
595
|
-
static {
|
|
686
|
+
static {
|
|
687
|
+
this.ID = CancelChatEditId;
|
|
688
|
+
}
|
|
596
689
|
constructor() {
|
|
597
690
|
super({
|
|
598
691
|
id: CancelEdit.ID,
|
|
599
|
-
title: ( localize2(
|
|
692
|
+
title: ( localize2(4799, "Cancel Edit")),
|
|
600
693
|
f1: false,
|
|
601
694
|
category: CHAT_CATEGORY,
|
|
602
695
|
icon: Codicon.x,
|
|
603
|
-
menu: [
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}
|
|
614
|
-
],
|
|
696
|
+
menu: [{
|
|
697
|
+
id: MenuId.ChatMessageTitle,
|
|
698
|
+
group: "navigation",
|
|
699
|
+
order: 1,
|
|
700
|
+
when: ( ContextKeyExpr.and(
|
|
701
|
+
ChatContextKeys.isRequest,
|
|
702
|
+
ChatContextKeys.currentlyEditing,
|
|
703
|
+
( ContextKeyExpr.equals(`config.${ChatConfiguration.EditRequests}`, "input"))
|
|
704
|
+
))
|
|
705
|
+
}],
|
|
615
706
|
keybinding: {
|
|
616
707
|
primary: KeyCode.Escape,
|
|
617
708
|
when: ( ContextKeyExpr.and(ChatContextKeys.inChatInput, ( EditorContextKeys.hoverVisible.toNegated()), ( EditorContextKeys.hasNonEmptySelection.toNegated()), ( EditorContextKeys.hasMultipleSelections.toNegated()), ( ContextKeyExpr.or(ChatContextKeys.currentlyEditing, ChatContextKeys.currentlyEditingInput)))),
|
|
@@ -631,20 +722,21 @@ class CancelEdit extends Action2 {
|
|
|
631
722
|
}
|
|
632
723
|
function registerChatExecuteActions() {
|
|
633
724
|
registerAction2(ChatSubmitAction);
|
|
634
|
-
registerAction2(ChatDelegateToEditSessionAction);
|
|
635
725
|
registerAction2(ChatEditingSessionSubmitAction);
|
|
636
726
|
registerAction2(SubmitWithoutDispatchingAction);
|
|
637
727
|
registerAction2(CancelAction);
|
|
638
728
|
registerAction2(SendToNewChatAction);
|
|
639
729
|
registerAction2(ChatSubmitWithCodebaseAction);
|
|
640
|
-
registerAction2(ContinueChatInSessionAction);
|
|
641
730
|
registerAction2(ToggleChatModeAction);
|
|
642
731
|
registerAction2(SwitchToNextModelAction);
|
|
643
732
|
registerAction2(OpenModelPickerAction);
|
|
644
733
|
registerAction2(OpenModePickerAction);
|
|
734
|
+
registerAction2(OpenSessionTargetPickerAction);
|
|
735
|
+
registerAction2(OpenDelegationPickerAction);
|
|
736
|
+
registerAction2(OpenWorkspacePickerAction);
|
|
645
737
|
registerAction2(ChatSessionPrimaryPickerAction);
|
|
646
738
|
registerAction2(ChangeChatModelAction);
|
|
647
739
|
registerAction2(CancelEdit);
|
|
648
740
|
}
|
|
649
741
|
|
|
650
|
-
export { CancelAction, CancelChatActionId, CancelChatEditId, CancelEdit, ChangeChatModelActionId,
|
|
742
|
+
export { CancelAction, CancelChatActionId, CancelChatEditId, CancelEdit, ChangeChatModelActionId, ChatEditingSessionSubmitAction, ChatSessionPrimaryPickerAction, ChatSubmitAction, ChatSubmitWithCodebaseAction, OpenDelegationPickerAction, OpenModePickerAction, OpenModelPickerAction, OpenSessionTargetPickerAction, OpenWorkspacePickerAction, ToggleAgentModeActionId, registerChatExecuteActions };
|