@codingame/monaco-vscode-katex-common 31.0.0 → 32.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 +15 -3
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +6 -5
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +5 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +45 -14
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +15 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +51 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +45 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +13 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +46 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +155 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +20 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +37 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.js +250 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +14 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +7 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +51 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +56 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +68 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.d.ts +58 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +653 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +28 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +91 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +53 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +42 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +93 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css +169 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatToolConfirmationCarousel.css +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +60 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +13 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +15 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +125 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +29 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +119 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/media/toolRiskBadge.css +77 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.js +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +132 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +16 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +156 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.js +133 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +53 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +288 -125
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +23 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +699 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +12 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +12 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.js +120 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatInputNotificationWidget.css +191 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatPhoneInputPresenter.css +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +9 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +89 -108
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +521 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +19 -19
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionStorageKeys.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionStorageKeys.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.js +82 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +44 -17
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +3 -46
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/{inlineChatEditorAffordance.d.ts → inlineChatAffordanceWidget.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/{inlineChatEditorAffordance.js → inlineChatAffordanceWidget.js} +6 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -18
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +19 -400
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +4 -9
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +5 -19
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +47 -133
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +103 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +29 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +3 -32
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -92
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +99 -32
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +13 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +76 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +89 -28
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +11 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +7 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +11 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +59 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +24 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +111 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +60 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +455 -171
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +82 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.js +49 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.js +302 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.js +118 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +34 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +233 -48
- package/vscode/src/vs/platform/actions/browser/actionbar.d.ts +0 -16
- package/vscode/src/vs/platform/actions/browser/actionbar.js +0 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +0 -539
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +0 -386
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +0 -101
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +0 -509
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +0 -130
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +0 -276
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +0 -93
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +0 -39
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +0 -617
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +0 -231
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
4
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
5
|
-
|
|
6
|
-
let WorkbenchActionBar = class WorkbenchActionBar extends ActionBar {
|
|
7
|
-
constructor(container, options, telemetryService) {
|
|
8
|
-
super(container, options);
|
|
9
|
-
const telemetrySource = options.telemetrySource;
|
|
10
|
-
if (telemetrySource) {
|
|
11
|
-
this._store.add(
|
|
12
|
-
this.onDidRun(e => telemetryService.publicLog2("workbenchActionExecuted", {
|
|
13
|
-
id: e.action.id,
|
|
14
|
-
from: telemetrySource
|
|
15
|
-
}))
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
WorkbenchActionBar = ( __decorate([( __param(2, ITelemetryService))], WorkbenchActionBar));
|
|
21
|
-
|
|
22
|
-
export { WorkbenchActionBar };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions";
|
|
2
|
-
import { Action2, IAction2Options } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
|
|
3
|
-
import { IChatEditingSession, IModifiedFileEntry, IModifiedFileEntryEditorIntegration } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
|
|
4
|
-
declare abstract class ChatEditingEditorAction extends Action2 {
|
|
5
|
-
constructor(desc: Readonly<IAction2Options>);
|
|
6
|
-
run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void>;
|
|
7
|
-
abstract runChatEditingCommand(accessor: ServicesAccessor, session: IChatEditingSession, entry: IModifiedFileEntry, integration: IModifiedFileEntryEditorIntegration, ...args: unknown[]): Promise<void> | void;
|
|
8
|
-
}
|
|
9
|
-
declare abstract class KeepOrUndoAction extends ChatEditingEditorAction {
|
|
10
|
-
private _keep;
|
|
11
|
-
constructor(id: string, _keep: boolean);
|
|
12
|
-
runChatEditingCommand(accessor: ServicesAccessor, session: IChatEditingSession, entry: IModifiedFileEntry, _integration: IModifiedFileEntryEditorIntegration): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
export declare class AcceptAction extends KeepOrUndoAction {
|
|
15
|
-
static readonly ID = "chatEditor.action.accept";
|
|
16
|
-
constructor();
|
|
17
|
-
}
|
|
18
|
-
export declare class RejectAction extends KeepOrUndoAction {
|
|
19
|
-
static readonly ID = "chatEditor.action.reject";
|
|
20
|
-
constructor();
|
|
21
|
-
}
|
|
22
|
-
declare abstract class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
|
23
|
-
private readonly _accept;
|
|
24
|
-
constructor(_accept: boolean);
|
|
25
|
-
runChatEditingCommand(accessor: ServicesAccessor, session: IChatEditingSession, entry: IModifiedFileEntry, ctrl: IModifiedFileEntryEditorIntegration, ...args: unknown[]): Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
export declare class AcceptHunkAction extends AcceptRejectHunkAction {
|
|
28
|
-
static readonly ID = "chatEditor.action.acceptHunk";
|
|
29
|
-
constructor();
|
|
30
|
-
}
|
|
31
|
-
export declare class RejectHunkAction extends AcceptRejectHunkAction {
|
|
32
|
-
static readonly ID = "chatEditor.action.undoHunk";
|
|
33
|
-
constructor();
|
|
34
|
-
}
|
|
35
|
-
export declare class ReviewChangesAction extends ChatEditingEditorAction {
|
|
36
|
-
constructor();
|
|
37
|
-
runChatEditingCommand(_accessor: ServicesAccessor, _session: IChatEditingSession, entry: IModifiedFileEntry, _integration: IModifiedFileEntryEditorIntegration, ..._args: unknown[]): void;
|
|
38
|
-
}
|
|
39
|
-
export declare class AcceptAllEditsAction extends ChatEditingEditorAction {
|
|
40
|
-
static readonly ID = "chatEditor.action.acceptAllEdits";
|
|
41
|
-
constructor();
|
|
42
|
-
runChatEditingCommand(_accessor: ServicesAccessor, session: IChatEditingSession, _entry: IModifiedFileEntry, _integration: IModifiedFileEntryEditorIntegration, ..._args: unknown[]): Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
export declare function registerChatEditorActions(): void;
|
|
45
|
-
export declare const navigationBearingFakeActionId = "chatEditor.navigation.bearings";
|
|
46
|
-
export {};
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js
DELETED
|
@@ -1,539 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
|
-
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
4
|
-
import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
5
|
-
import { EditorContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/editorContextKeys';
|
|
6
|
-
import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
7
|
-
import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility';
|
|
8
|
-
import { Action2, MenuId, registerAction2, MenuRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
9
|
-
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
10
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
|
-
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
12
|
-
import { IListService } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService.service';
|
|
13
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
14
|
-
import { resolveCommandsContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorCommandsContext';
|
|
15
|
-
import { ActiveEditorContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
16
|
-
import { EditorResourceAccessor, SideBySideEditor, TEXT_DIFF_EDITOR_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
17
|
-
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
18
|
-
import { ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
19
|
-
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
20
|
-
import { CTX_HOVER_MODE } from '../../../inlineChat/common/inlineChat.js';
|
|
21
|
-
import { MultiDiffEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditor';
|
|
22
|
-
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
23
|
-
import { NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_EDITOR_FOCUSED } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
24
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
25
|
-
import { ModifiedFileEntryState, CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME, parseChatMultiDiffUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
26
|
-
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
|
|
27
|
-
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
28
|
-
import { ctxReviewModeEnabled, ctxHasEditorModification, ctxIsGlobalEditingSession, ctxHasRequestInProgress, ctxIsCurrentlyBeingModified, ctxCursorInChangeRange } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
|
|
29
|
-
import { ChatEditingExplanationWidgetManager } from './chatEditingExplanationWidget.js';
|
|
30
|
-
import { IChatEditingExplanationModelManager } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.service';
|
|
31
|
-
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
32
|
-
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
33
|
-
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
34
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
35
|
-
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
36
|
-
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
37
|
-
|
|
38
|
-
class ChatEditingEditorAction extends Action2 {
|
|
39
|
-
constructor(desc) {
|
|
40
|
-
super({
|
|
41
|
-
category: CHAT_CATEGORY,
|
|
42
|
-
...desc
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
async run(accessor, ...args) {
|
|
46
|
-
const instaService = accessor.get(IInstantiationService);
|
|
47
|
-
const chatEditingService = accessor.get(IChatEditingService);
|
|
48
|
-
const editorService = accessor.get(IEditorService);
|
|
49
|
-
const uri = EditorResourceAccessor.getOriginalUri(editorService.activeEditorPane?.input, {
|
|
50
|
-
supportSideBySide: SideBySideEditor.PRIMARY
|
|
51
|
-
});
|
|
52
|
-
if (!uri || !editorService.activeEditorPane) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const session = chatEditingService.editingSessionsObs.get().find(candidate => candidate.getEntry(uri));
|
|
56
|
-
if (!session) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const entry = session.getEntry(uri);
|
|
60
|
-
const ctrl = entry.getEditorIntegration(editorService.activeEditorPane);
|
|
61
|
-
return instaService.invokeFunction(this.runChatEditingCommand.bind(this), session, entry, ctrl, ...args);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
class NavigateAction extends ChatEditingEditorAction {
|
|
65
|
-
constructor(next) {
|
|
66
|
-
super({
|
|
67
|
-
id: next ? "chatEditor.action.navigateNext" : "chatEditor.action.navigatePrevious",
|
|
68
|
-
title: next ? ( localize2(6093, "Go to Next Chat Edit")) : ( localize2(6094, "Go to Previous Chat Edit")),
|
|
69
|
-
icon: next ? Codicon.arrowDown : Codicon.arrowUp,
|
|
70
|
-
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ctxHasEditorModification)),
|
|
71
|
-
keybinding: {
|
|
72
|
-
primary: next ? KeyMod.Alt | KeyCode.F5 : KeyMod.Alt | KeyMod.Shift | KeyCode.F5,
|
|
73
|
-
weight: KeybindingWeight.WorkbenchContrib,
|
|
74
|
-
when: ( ContextKeyExpr.and(ctxHasEditorModification, ( ContextKeyExpr.or(EditorContextKeys.focus, NOTEBOOK_CELL_LIST_FOCUSED))))
|
|
75
|
-
},
|
|
76
|
-
f1: true,
|
|
77
|
-
menu: {
|
|
78
|
-
id: MenuId.ChatEditingEditorContent,
|
|
79
|
-
group: "navigate",
|
|
80
|
-
order: !next ? 2 : 3,
|
|
81
|
-
when: ( ContextKeyExpr.and(ctxReviewModeEnabled, ctxHasEditorModification))
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
this.next = next;
|
|
85
|
-
}
|
|
86
|
-
async runChatEditingCommand(accessor, session, entry, ctrl) {
|
|
87
|
-
const instaService = accessor.get(IInstantiationService);
|
|
88
|
-
const done = this.next ? ctrl.next(false) : ctrl.previous(false);
|
|
89
|
-
if (done) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const didOpenNext = await instaService.invokeFunction(openNextOrPreviousChange, session, entry, this.next);
|
|
93
|
-
if (didOpenNext) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
this.next ? ctrl.next(true) : ctrl.previous(true);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
async function openNextOrPreviousChange(accessor, session, entry, next) {
|
|
100
|
-
const editorService = accessor.get(IEditorService);
|
|
101
|
-
const entries = session.entries.get();
|
|
102
|
-
let idx = entries.indexOf(entry);
|
|
103
|
-
let newEntry;
|
|
104
|
-
while (true) {
|
|
105
|
-
idx = (idx + (next ? 1 : -1) + entries.length) % entries.length;
|
|
106
|
-
newEntry = entries[idx];
|
|
107
|
-
if (newEntry.state.get() === ModifiedFileEntryState.Modified) {
|
|
108
|
-
break;
|
|
109
|
-
} else if (newEntry === entry) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
const pane = await editorService.openEditor({
|
|
114
|
-
resource: newEntry.modifiedURI,
|
|
115
|
-
options: {
|
|
116
|
-
revealIfOpened: false,
|
|
117
|
-
revealIfVisible: false
|
|
118
|
-
}
|
|
119
|
-
}, ACTIVE_GROUP);
|
|
120
|
-
if (!pane) {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
if (session.entries.get().includes(newEntry)) {
|
|
124
|
-
newEntry.getEditorIntegration(pane).reveal(next);
|
|
125
|
-
}
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
class KeepOrUndoAction extends ChatEditingEditorAction {
|
|
129
|
-
constructor(id, _keep) {
|
|
130
|
-
super({
|
|
131
|
-
id,
|
|
132
|
-
title: _keep ? ( localize2(6095, "Keep Chat Edits")) : ( localize2(6096, "Undo Chat Edits")),
|
|
133
|
-
shortTitle: _keep ? ( localize2(6097, "Keep")) : ( localize2(6098, "Undo")),
|
|
134
|
-
tooltip: _keep ? ( localize2(6099, "Keep Chat Edits in this File")) : ( localize2(6100, "Undo Chat Edits in this File")),
|
|
135
|
-
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
136
|
-
icon: _keep ? Codicon.check : Codicon.discard,
|
|
137
|
-
f1: true,
|
|
138
|
-
keybinding: {
|
|
139
|
-
when: ( ContextKeyExpr.or(EditorContextKeys.focus, NOTEBOOK_EDITOR_FOCUSED)),
|
|
140
|
-
weight: KeybindingWeight.WorkbenchContrib + 10,
|
|
141
|
-
primary: _keep ? KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyY : KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyN
|
|
142
|
-
},
|
|
143
|
-
menu: {
|
|
144
|
-
id: MenuId.ChatEditingEditorContent,
|
|
145
|
-
group: "a_resolve",
|
|
146
|
-
order: _keep ? 0 : 1,
|
|
147
|
-
when: ( ContextKeyExpr.and(!_keep ? ctxReviewModeEnabled : undefined, ( ContextKeyExpr.or(ctxIsGlobalEditingSession, ( ctxHasRequestInProgress.negate())))))
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
this._keep = _keep;
|
|
151
|
-
}
|
|
152
|
-
async runChatEditingCommand(accessor, session, entry, _integration) {
|
|
153
|
-
const instaService = accessor.get(IInstantiationService);
|
|
154
|
-
const configService = accessor.get(IConfigurationService);
|
|
155
|
-
if (this._keep) {
|
|
156
|
-
session.accept(entry.modifiedURI);
|
|
157
|
-
} else {
|
|
158
|
-
session.reject(entry.modifiedURI);
|
|
159
|
-
}
|
|
160
|
-
if (configService.getValue(ChatConfiguration.RevealNextChangeOnResolve)) {
|
|
161
|
-
await instaService.invokeFunction(openNextOrPreviousChange, session, entry, true);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
class AcceptAction extends KeepOrUndoAction {
|
|
166
|
-
static {
|
|
167
|
-
this.ID = "chatEditor.action.accept";
|
|
168
|
-
}
|
|
169
|
-
constructor() {
|
|
170
|
-
super(AcceptAction.ID, true);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
class RejectAction extends KeepOrUndoAction {
|
|
174
|
-
static {
|
|
175
|
-
this.ID = "chatEditor.action.reject";
|
|
176
|
-
}
|
|
177
|
-
constructor() {
|
|
178
|
-
super(RejectAction.ID, false);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
const acceptHunkId = "chatEditor.action.acceptHunk";
|
|
182
|
-
const undoHunkId = "chatEditor.action.undoHunk";
|
|
183
|
-
class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
|
184
|
-
constructor(_accept) {
|
|
185
|
-
super({
|
|
186
|
-
id: _accept ? acceptHunkId : undoHunkId,
|
|
187
|
-
title: _accept ? ( localize2(6101, "Keep this Change")) : ( localize2(6102, "Undo this Change")),
|
|
188
|
-
shortTitle: _accept ? ( localize2(6103, "Keep")) : ( localize2(6104, "Undo")),
|
|
189
|
-
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
190
|
-
f1: true,
|
|
191
|
-
keybinding: {
|
|
192
|
-
when: ( ContextKeyExpr.and(ctxCursorInChangeRange, ( ContextKeyExpr.or(EditorContextKeys.focus, NOTEBOOK_CELL_LIST_FOCUSED)))),
|
|
193
|
-
weight: KeybindingWeight.WorkbenchContrib + 1,
|
|
194
|
-
primary: _accept ? KeyMod.CtrlCmd | KeyCode.KeyY : KeyMod.CtrlCmd | KeyCode.KeyN
|
|
195
|
-
},
|
|
196
|
-
menu: {
|
|
197
|
-
id: MenuId.ChatEditingEditorHunk,
|
|
198
|
-
order: 1
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
this._accept = _accept;
|
|
202
|
-
}
|
|
203
|
-
async runChatEditingCommand(accessor, session, entry, ctrl, ...args) {
|
|
204
|
-
const instaService = accessor.get(IInstantiationService);
|
|
205
|
-
const configService = accessor.get(IConfigurationService);
|
|
206
|
-
if (this._accept) {
|
|
207
|
-
await ctrl.acceptNearestChange(args[0]);
|
|
208
|
-
} else {
|
|
209
|
-
await ctrl.rejectNearestChange(args[0]);
|
|
210
|
-
}
|
|
211
|
-
if (configService.getValue(ChatConfiguration.RevealNextChangeOnResolve) && entry.changesCount.get() === 0) {
|
|
212
|
-
await instaService.invokeFunction(openNextOrPreviousChange, session, entry, true);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
class AcceptHunkAction extends AcceptRejectHunkAction {
|
|
217
|
-
static {
|
|
218
|
-
this.ID = acceptHunkId;
|
|
219
|
-
}
|
|
220
|
-
constructor() {
|
|
221
|
-
super(true);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
class RejectHunkAction extends AcceptRejectHunkAction {
|
|
225
|
-
static {
|
|
226
|
-
this.ID = undoHunkId;
|
|
227
|
-
}
|
|
228
|
-
constructor() {
|
|
229
|
-
super(false);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
class ToggleDiffAction extends ChatEditingEditorAction {
|
|
233
|
-
constructor() {
|
|
234
|
-
super({
|
|
235
|
-
id: "chatEditor.action.toggleDiff",
|
|
236
|
-
title: ( localize2(6105, "Toggle Diff Editor for Chat Edits")),
|
|
237
|
-
category: CHAT_CATEGORY,
|
|
238
|
-
toggled: {
|
|
239
|
-
condition: ( ContextKeyExpr.or(EditorContextKeys.inDiffEditor, ( ActiveEditorContext.isEqualTo(TEXT_DIFF_EDITOR_ID)))),
|
|
240
|
-
icon: Codicon.goToFile
|
|
241
|
-
},
|
|
242
|
-
precondition: ( ContextKeyExpr.and(ctxHasEditorModification)),
|
|
243
|
-
icon: Codicon.diffSingle,
|
|
244
|
-
keybinding: {
|
|
245
|
-
when: EditorContextKeys.focus,
|
|
246
|
-
weight: KeybindingWeight.WorkbenchContrib,
|
|
247
|
-
primary: KeyMod.Alt | KeyMod.Shift | KeyCode.F7
|
|
248
|
-
},
|
|
249
|
-
menu: [{
|
|
250
|
-
id: MenuId.ChatEditingEditorHunk,
|
|
251
|
-
order: 10
|
|
252
|
-
}, {
|
|
253
|
-
id: MenuId.ChatEditingEditorContent,
|
|
254
|
-
group: "a_resolve",
|
|
255
|
-
order: 2,
|
|
256
|
-
when: ( ContextKeyExpr.and(ctxReviewModeEnabled))
|
|
257
|
-
}, {
|
|
258
|
-
id: MenuId.ChatEditorInlineExecute,
|
|
259
|
-
group: "a_resolve",
|
|
260
|
-
order: 2,
|
|
261
|
-
when: ( ContextKeyExpr.and(ctxReviewModeEnabled, CTX_HOVER_MODE))
|
|
262
|
-
}]
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
runChatEditingCommand(_accessor, _session, _entry, integration, ...args) {
|
|
266
|
-
integration.toggleDiff(args[0]);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
class ToggleAccessibleDiffViewAction extends ChatEditingEditorAction {
|
|
270
|
-
constructor() {
|
|
271
|
-
super({
|
|
272
|
-
id: "chatEditor.action.showAccessibleDiffView",
|
|
273
|
-
title: ( localize2(6106, "Show Accessible Diff View for Chat Edits")),
|
|
274
|
-
f1: true,
|
|
275
|
-
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
276
|
-
keybinding: {
|
|
277
|
-
when: ( ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_ACCESSIBILITY_MODE_ENABLED)),
|
|
278
|
-
weight: KeybindingWeight.WorkbenchContrib,
|
|
279
|
-
primary: KeyCode.F7
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
runChatEditingCommand(_accessor, _session, _entry, integration) {
|
|
284
|
-
integration.enableAccessibleDiffView();
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
class ReviewChangesAction extends ChatEditingEditorAction {
|
|
288
|
-
constructor() {
|
|
289
|
-
super({
|
|
290
|
-
id: "chatEditor.action.reviewChanges",
|
|
291
|
-
title: ( localize2(6107, "Review")),
|
|
292
|
-
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
293
|
-
menu: [{
|
|
294
|
-
id: MenuId.ChatEditingEditorContent,
|
|
295
|
-
group: "a_resolve",
|
|
296
|
-
order: 3,
|
|
297
|
-
when: ( ContextKeyExpr.and(( ctxReviewModeEnabled.negate()), ( ctxIsCurrentlyBeingModified.negate()), ( ContextKeyExpr.or(ctxIsGlobalEditingSession, ( ctxHasRequestInProgress.negate())))))
|
|
298
|
-
}]
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
runChatEditingCommand(_accessor, _session, entry, _integration, ..._args) {
|
|
302
|
-
entry.enableReviewModeUntilSettled();
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
class AcceptAllEditsAction extends ChatEditingEditorAction {
|
|
306
|
-
static {
|
|
307
|
-
this.ID = "chatEditor.action.acceptAllEdits";
|
|
308
|
-
}
|
|
309
|
-
constructor() {
|
|
310
|
-
super({
|
|
311
|
-
id: AcceptAllEditsAction.ID,
|
|
312
|
-
title: ( localize2(6108, "Keep All Chat Edits")),
|
|
313
|
-
tooltip: ( localize2(6109, "Keep All Chat Edits in this Session")),
|
|
314
|
-
precondition: ( ContextKeyExpr.and(ctxHasEditorModification, ( ctxIsCurrentlyBeingModified.negate()))),
|
|
315
|
-
icon: Codicon.checkAll,
|
|
316
|
-
f1: true,
|
|
317
|
-
keybinding: {
|
|
318
|
-
when: ( ContextKeyExpr.or(EditorContextKeys.focus, NOTEBOOK_EDITOR_FOCUSED)),
|
|
319
|
-
weight: KeybindingWeight.WorkbenchContrib + 10,
|
|
320
|
-
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyY
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
async runChatEditingCommand(_accessor, session, _entry, _integration, ..._args) {
|
|
325
|
-
await session.accept();
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
class MultiDiffAcceptDiscardAction extends Action2 {
|
|
329
|
-
constructor(accept) {
|
|
330
|
-
super({
|
|
331
|
-
id: accept ? "chatEditing.multidiff.acceptAllFiles" : "chatEditing.multidiff.discardAllFiles",
|
|
332
|
-
title: accept ? ( localize(6110, "Keep All Edits")) : ( localize(6111, "Undo All Edits")),
|
|
333
|
-
icon: accept ? Codicon.check : Codicon.discard,
|
|
334
|
-
menu: {
|
|
335
|
-
when: ( ContextKeyExpr.equals("resourceScheme", CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)),
|
|
336
|
-
id: MenuId.EditorTitle,
|
|
337
|
-
order: accept ? 0 : 1,
|
|
338
|
-
group: "navigation"
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
this.accept = accept;
|
|
342
|
-
}
|
|
343
|
-
async run(accessor, ...args) {
|
|
344
|
-
const chatEditingService = accessor.get(IChatEditingService);
|
|
345
|
-
const editorService = accessor.get(IEditorService);
|
|
346
|
-
const editorGroupsService = accessor.get(IEditorGroupsService);
|
|
347
|
-
const listService = accessor.get(IListService);
|
|
348
|
-
const resolvedContext = resolveCommandsContext(args, editorService, editorGroupsService, listService);
|
|
349
|
-
const groupContext = resolvedContext.groupedEditors[0];
|
|
350
|
-
if (!groupContext) {
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
const editor = groupContext.editors[0];
|
|
354
|
-
if (!(editor instanceof MultiDiffEditorInput) || !editor.resource) {
|
|
355
|
-
return;
|
|
356
|
-
}
|
|
357
|
-
const {
|
|
358
|
-
chatSessionResource
|
|
359
|
-
} = parseChatMultiDiffUri(editor.resource);
|
|
360
|
-
const session = chatEditingService.getEditingSession(chatSessionResource);
|
|
361
|
-
if (session) {
|
|
362
|
-
if (this.accept) {
|
|
363
|
-
await session.accept();
|
|
364
|
-
} else {
|
|
365
|
-
await session.reject();
|
|
366
|
-
}
|
|
367
|
-
editorService.closeEditor({
|
|
368
|
-
editor,
|
|
369
|
-
groupId: groupContext.group.id
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
const explainMultiDiffSchemes = [
|
|
375
|
-
CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME,
|
|
376
|
-
"copilotcli-worktree-changes",
|
|
377
|
-
"copilotcloud-pr-changes"
|
|
378
|
-
];
|
|
379
|
-
class ExplainMultiDiffAction extends Action2 {
|
|
380
|
-
constructor() {
|
|
381
|
-
super({
|
|
382
|
-
id: "chatEditing.multidiff.explain",
|
|
383
|
-
title: ( localize(6112, "Explain")),
|
|
384
|
-
menu: {
|
|
385
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(...( explainMultiDiffSchemes.map(scheme => ( ContextKeyExpr.equals("resourceScheme", scheme)))))), ( ContextKeyExpr.has(`config.${ChatConfiguration.ExplainChangesEnabled}`)))),
|
|
386
|
-
id: MenuId.MultiDiffEditorContent,
|
|
387
|
-
order: 10
|
|
388
|
-
}
|
|
389
|
-
});
|
|
390
|
-
this._widgetsByInput = ( new WeakMap());
|
|
391
|
-
}
|
|
392
|
-
async run(accessor, ...args) {
|
|
393
|
-
const editorService = accessor.get(IEditorService);
|
|
394
|
-
const explanationModelManager = accessor.get(IChatEditingExplanationModelManager);
|
|
395
|
-
const chatWidgetService = accessor.get(IChatWidgetService);
|
|
396
|
-
const viewsService = accessor.get(IViewsService);
|
|
397
|
-
const chatEditingService = accessor.get(IChatEditingService);
|
|
398
|
-
const activePane = editorService.activeEditorPane;
|
|
399
|
-
if (!activePane) {
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
if (!(activePane instanceof MultiDiffEditor) || !activePane.viewModel) {
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
const input = activePane.input;
|
|
406
|
-
if (!input) {
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
this._widgetsByInput.get(input)?.dispose();
|
|
410
|
-
const widgetsStore = ( new DisposableStore());
|
|
411
|
-
this._widgetsByInput.set(input, widgetsStore);
|
|
412
|
-
Event.once(input.onWillDispose)(() => {
|
|
413
|
-
widgetsStore.dispose();
|
|
414
|
-
this._widgetsByInput.delete(input);
|
|
415
|
-
});
|
|
416
|
-
const viewModel = activePane.viewModel;
|
|
417
|
-
const items = viewModel.items.get();
|
|
418
|
-
let chatSessionResource;
|
|
419
|
-
if (input instanceof MultiDiffEditorInput && input.resource?.scheme === CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME) {
|
|
420
|
-
chatSessionResource = parseChatMultiDiffUri(input.resource).chatSessionResource;
|
|
421
|
-
}
|
|
422
|
-
if (!chatSessionResource) {
|
|
423
|
-
const fileUris = ( items.map(item => {
|
|
424
|
-
const docDiffItem = item.documentDiffItem;
|
|
425
|
-
const goToFileUri = docDiffItem?.multiDiffEditorItem?.goToFileUri;
|
|
426
|
-
if (goToFileUri) {
|
|
427
|
-
return goToFileUri;
|
|
428
|
-
}
|
|
429
|
-
const modifiedUri = docDiffItem?.multiDiffEditorItem?.modifiedUri ?? item.modifiedUri;
|
|
430
|
-
if (modifiedUri?.path) {
|
|
431
|
-
return URI.file(modifiedUri.path);
|
|
432
|
-
}
|
|
433
|
-
return undefined;
|
|
434
|
-
})).filter(uri => !!uri);
|
|
435
|
-
for (const session of chatEditingService.editingSessionsObs.get()) {
|
|
436
|
-
if (( fileUris.some(uri => session.getEntry(uri)))) {
|
|
437
|
-
chatSessionResource = session.chatSessionResource;
|
|
438
|
-
break;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
const diffsByFile = ( new Map());
|
|
443
|
-
for (const item of items) {
|
|
444
|
-
const modifiedUri = item.modifiedUri;
|
|
445
|
-
if (!modifiedUri) {
|
|
446
|
-
continue;
|
|
447
|
-
}
|
|
448
|
-
const editorInfo = activePane.tryGetCodeEditor(modifiedUri);
|
|
449
|
-
if (!editorInfo) {
|
|
450
|
-
continue;
|
|
451
|
-
}
|
|
452
|
-
const diffEditorVM = item.diffEditorViewModel;
|
|
453
|
-
await diffEditorVM.waitForDiff();
|
|
454
|
-
const diff = diffEditorVM.diff.get();
|
|
455
|
-
if (!diff || diff.identical) {
|
|
456
|
-
continue;
|
|
457
|
-
}
|
|
458
|
-
const fileKey = ( modifiedUri.toString());
|
|
459
|
-
const existing = diffsByFile.get(fileKey);
|
|
460
|
-
if (existing) {
|
|
461
|
-
existing.changes.push(...( diff.mappings.map(m => m.lineRangeMapping)));
|
|
462
|
-
} else {
|
|
463
|
-
diffsByFile.set(fileKey, {
|
|
464
|
-
editor: editorInfo.editor,
|
|
465
|
-
changes: ( diff.mappings.map(m => m.lineRangeMapping)),
|
|
466
|
-
originalModel: diffEditorVM.model.original,
|
|
467
|
-
modifiedModel: diffEditorVM.model.modified
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
const allDiffInfos = [];
|
|
472
|
-
for (const fileData of ( diffsByFile.values())) {
|
|
473
|
-
const diffInfo = {
|
|
474
|
-
changes: fileData.changes,
|
|
475
|
-
identical: false,
|
|
476
|
-
originalModel: fileData.originalModel,
|
|
477
|
-
modifiedModel: fileData.modifiedModel
|
|
478
|
-
};
|
|
479
|
-
allDiffInfos.push(diffInfo);
|
|
480
|
-
const manager = ( new ChatEditingExplanationWidgetManager(
|
|
481
|
-
fileData.editor,
|
|
482
|
-
chatWidgetService,
|
|
483
|
-
viewsService,
|
|
484
|
-
explanationModelManager,
|
|
485
|
-
diffInfo.modifiedModel.uri
|
|
486
|
-
));
|
|
487
|
-
widgetsStore.add(manager);
|
|
488
|
-
}
|
|
489
|
-
if (allDiffInfos.length > 0) {
|
|
490
|
-
widgetsStore.add(
|
|
491
|
-
explanationModelManager.generateExplanations(allDiffInfos, chatSessionResource, CancellationToken.None)
|
|
492
|
-
);
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
function registerChatEditorActions() {
|
|
497
|
-
registerAction2(class NextAction extends NavigateAction {
|
|
498
|
-
constructor() {
|
|
499
|
-
super(true);
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
registerAction2(class PrevAction extends NavigateAction {
|
|
503
|
-
constructor() {
|
|
504
|
-
super(false);
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
registerAction2(ReviewChangesAction);
|
|
508
|
-
registerAction2(AcceptAction);
|
|
509
|
-
registerAction2(RejectAction);
|
|
510
|
-
registerAction2(AcceptAllEditsAction);
|
|
511
|
-
registerAction2(AcceptHunkAction);
|
|
512
|
-
registerAction2(RejectHunkAction);
|
|
513
|
-
registerAction2(ToggleDiffAction);
|
|
514
|
-
registerAction2(ToggleAccessibleDiffViewAction);
|
|
515
|
-
registerAction2(class extends MultiDiffAcceptDiscardAction {
|
|
516
|
-
constructor() {
|
|
517
|
-
super(true);
|
|
518
|
-
}
|
|
519
|
-
});
|
|
520
|
-
registerAction2(class extends MultiDiffAcceptDiscardAction {
|
|
521
|
-
constructor() {
|
|
522
|
-
super(false);
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
registerAction2(ExplainMultiDiffAction);
|
|
526
|
-
MenuRegistry.appendMenuItem(MenuId.ChatEditingEditorContent, {
|
|
527
|
-
command: {
|
|
528
|
-
id: navigationBearingFakeActionId,
|
|
529
|
-
title: ( localize(6113, "Navigation Status")),
|
|
530
|
-
precondition: ( ContextKeyExpr.false())
|
|
531
|
-
},
|
|
532
|
-
group: "navigate",
|
|
533
|
-
order: -1,
|
|
534
|
-
when: ( ContextKeyExpr.and(ctxReviewModeEnabled, ctxHasEditorModification))
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
const navigationBearingFakeActionId = "chatEditor.navigation.bearings";
|
|
538
|
-
|
|
539
|
-
export { AcceptAction, AcceptAllEditsAction, AcceptHunkAction, RejectAction, RejectHunkAction, ReviewChangesAction, navigationBearingFakeActionId, registerChatEditorActions };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
2
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
3
|
-
import { IModifiedFileEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
|
|
4
|
-
import { ActionViewItem, IActionViewItemOptions } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems";
|
|
5
|
-
import { IAction, IActionRunner } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
6
|
-
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
7
|
-
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
8
|
-
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
9
|
-
import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
10
|
-
export declare class ChatEditingAcceptRejectActionViewItem extends ActionViewItem {
|
|
11
|
-
private readonly _entry;
|
|
12
|
-
private readonly _editor;
|
|
13
|
-
private readonly _keybindingService;
|
|
14
|
-
private readonly _primaryActionIds;
|
|
15
|
-
private readonly _reveal;
|
|
16
|
-
constructor(action: IAction, options: IActionViewItemOptions, _entry: IObservable<IModifiedFileEntry | undefined>, _editor: {
|
|
17
|
-
focus(): void;
|
|
18
|
-
} | undefined, _keybindingService: IKeybindingService, _primaryActionIds?: readonly string[]);
|
|
19
|
-
render(container: HTMLElement): void;
|
|
20
|
-
set actionRunner(actionRunner: IActionRunner);
|
|
21
|
-
get actionRunner(): IActionRunner;
|
|
22
|
-
protected getTooltip(): string | undefined;
|
|
23
|
-
}
|
|
24
|
-
export declare class ChatEditingEditorOverlay implements IWorkbenchContribution {
|
|
25
|
-
static readonly ID = "chat.edits.editorOverlay";
|
|
26
|
-
private readonly _store;
|
|
27
|
-
constructor(editorGroupsService: IEditorGroupsService, instantiationService: IInstantiationService, environmentService: IWorkbenchEnvironmentService);
|
|
28
|
-
dispose(): void;
|
|
29
|
-
}
|