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