@codingame/monaco-vscode-katex-common 31.0.1 → 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
|
@@ -5,9 +5,9 @@ import { Position } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/c
|
|
|
5
5
|
import { Selection } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection";
|
|
6
6
|
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
7
7
|
import { IChatEditingSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
|
|
8
|
-
import { IChatModel
|
|
8
|
+
import { IChatModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
9
9
|
export type InlineChatSessionTerminationState = string | IMarkdownString;
|
|
10
|
-
export interface
|
|
10
|
+
export interface IInlineChatSession {
|
|
11
11
|
readonly initialPosition: Position;
|
|
12
12
|
readonly initialSelection: Selection;
|
|
13
13
|
readonly uri: URI;
|
|
@@ -17,10 +17,5 @@ export interface IInlineChatSession2 {
|
|
|
17
17
|
setTerminationState(state: InlineChatSessionTerminationState | undefined): void;
|
|
18
18
|
dispose(): void;
|
|
19
19
|
}
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
22
|
-
uri: URI;
|
|
23
|
-
selection: Selection;
|
|
24
|
-
}): Promise<void>;
|
|
25
|
-
export declare function continueInPanelChat(accessor: ServicesAccessor, session: IInlineChatSession2): Promise<void>;
|
|
26
|
-
export declare function rephraseInlineChat(accessor: ServicesAccessor, session: IInlineChatSession2): string | undefined;
|
|
20
|
+
export declare function continueInPanelChat(accessor: ServicesAccessor, session: IInlineChatSession): Promise<void>;
|
|
21
|
+
export declare function rephraseInlineChat(accessor: ServicesAccessor, session: IInlineChatSession): string | undefined;
|
|
@@ -4,8 +4,6 @@ import { DisposableStore } from "@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
4
4
|
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
5
5
|
import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
|
|
6
6
|
import { ICodeEditorViewState } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon";
|
|
7
|
-
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
8
|
-
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
9
7
|
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
10
8
|
import { IAccessibleViewService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView.service";
|
|
11
9
|
import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service";
|
|
@@ -21,7 +19,6 @@ import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs
|
|
|
21
19
|
import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
|
|
22
20
|
import { IChatWidgetViewOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
23
21
|
import { ChatWidget, IChatWidgetLocationOptions } from "../../chat/browser/widget/chatWidget.js";
|
|
24
|
-
import { IChatModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
25
22
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
26
23
|
export interface InlineChatWidgetViewState {
|
|
27
24
|
editorViewState: ICodeEditorViewState;
|
|
@@ -32,7 +29,7 @@ export interface IInlineChatWidgetConstructionOptions {
|
|
|
32
29
|
/**
|
|
33
30
|
* The menu that rendered as button bar, use for accept, discard etc
|
|
34
31
|
*/
|
|
35
|
-
statusMenuId
|
|
32
|
+
statusMenuId?: {
|
|
36
33
|
menu: MenuId;
|
|
37
34
|
options: IWorkbenchButtonBarOptions;
|
|
38
35
|
};
|
|
@@ -43,7 +40,7 @@ export interface IInlineChatWidgetConstructionOptions {
|
|
|
43
40
|
chatWidgetViewOptions?: IChatWidgetViewOptions;
|
|
44
41
|
inZoneWidget?: boolean;
|
|
45
42
|
}
|
|
46
|
-
export declare class InlineChatWidget {
|
|
43
|
+
export declare abstract class InlineChatWidget {
|
|
47
44
|
#private;
|
|
48
45
|
protected readonly _instantiationService: IInstantiationService;
|
|
49
46
|
protected readonly _textModelResolverService: ITextModelService;
|
|
@@ -59,15 +56,14 @@ export declare class InlineChatWidget {
|
|
|
59
56
|
status: HTMLDivElement;
|
|
60
57
|
};
|
|
61
58
|
protected readonly _store: DisposableStore;
|
|
59
|
+
readonly chatWidget: ChatWidget;
|
|
62
60
|
protected readonly _onDidChangeHeight: Emitter<void>;
|
|
63
61
|
readonly onDidChangeHeight: Event<void>;
|
|
64
62
|
readonly requestInProgress: IObservable<boolean>;
|
|
65
63
|
readonly scopedContextKeyService: IContextKeyService;
|
|
66
|
-
constructor(location: IChatWidgetLocationOptions, options: IInlineChatWidgetConstructionOptions, _instantiationService: IInstantiationService, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, accessibilityService: IAccessibilityService, configurationService: IConfigurationService, accessibleViewService: IAccessibleViewService, _textModelResolverService: ITextModelService,
|
|
64
|
+
constructor(location: IChatWidgetLocationOptions, options: IInlineChatWidgetConstructionOptions, _instantiationService: IInstantiationService, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, accessibilityService: IAccessibilityService, configurationService: IConfigurationService, accessibleViewService: IAccessibleViewService, _textModelResolverService: ITextModelService, chatService: IChatService, hoverService: IHoverService, chatEntitlementService: IChatEntitlementService, markdownRendererService: IMarkdownRendererService);
|
|
67
65
|
dispose(): void;
|
|
68
66
|
get domNode(): HTMLElement;
|
|
69
|
-
get chatWidget(): ChatWidget;
|
|
70
|
-
saveState(): void;
|
|
71
67
|
layout(widgetDim: Dimension): void;
|
|
72
68
|
protected _doLayout(dimension: Dimension): void;
|
|
73
69
|
/**
|
|
@@ -76,16 +72,6 @@ export declare class InlineChatWidget {
|
|
|
76
72
|
get contentHeight(): number;
|
|
77
73
|
get minHeight(): number;
|
|
78
74
|
protected _getExtraHeight(): number;
|
|
79
|
-
get value(): string;
|
|
80
|
-
set value(value: string);
|
|
81
|
-
selectAll(): void;
|
|
82
|
-
set placeholder(value: string);
|
|
83
|
-
toggleStatus(show: boolean): void;
|
|
84
|
-
updateToolbar(show: boolean): void;
|
|
85
|
-
getCodeBlockInfo(codeBlockIndex: number): Promise<ITextModel | undefined>;
|
|
86
|
-
get responseContent(): string | undefined;
|
|
87
|
-
getChatModel(): IChatModel | undefined;
|
|
88
|
-
setChatModel(chatModel: IChatModel): void;
|
|
89
75
|
updateInfo(message: string): void;
|
|
90
76
|
updateStatus(message: string, ops?: {
|
|
91
77
|
classes?: string[];
|
|
@@ -98,7 +84,7 @@ export declare class InlineChatWidget {
|
|
|
98
84
|
hasFocus(): boolean;
|
|
99
85
|
}
|
|
100
86
|
export declare class EditorBasedInlineChatWidget extends InlineChatWidget {
|
|
101
|
-
constructor(location: IChatWidgetLocationOptions, parentEditor: ICodeEditor, options: IInlineChatWidgetConstructionOptions, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, instantiationService: IInstantiationService, accessibilityService: IAccessibilityService, configurationService: IConfigurationService, accessibleViewService: IAccessibleViewService, textModelResolverService: ITextModelService,
|
|
87
|
+
constructor(location: IChatWidgetLocationOptions, parentEditor: ICodeEditor, options: IInlineChatWidgetConstructionOptions, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, instantiationService: IInstantiationService, accessibilityService: IAccessibilityService, configurationService: IConfigurationService, accessibleViewService: IAccessibleViewService, textModelResolverService: ITextModelService, chatService: IChatService, hoverService: IHoverService, layoutService: ILayoutService, chatEntitlementService: IChatEntitlementService, markdownRendererService: IMarkdownRendererService);
|
|
102
88
|
protected _doLayout(dimension: Dimension): void;
|
|
103
89
|
reset(): void;
|
|
104
90
|
}
|
|
@@ -9,8 +9,6 @@ import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/comm
|
|
|
9
9
|
import { DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
10
10
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
11
11
|
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
12
|
-
import { Selection } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection';
|
|
13
|
-
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
14
12
|
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
15
13
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
16
14
|
import { IAccessibleViewService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView.service';
|
|
@@ -59,7 +57,6 @@ registerCss(inlineChat);
|
|
|
59
57
|
let InlineChatWidget = class InlineChatWidget {
|
|
60
58
|
#ctxInputEditorFocused;
|
|
61
59
|
#ctxResponseFocused;
|
|
62
|
-
#chatWidget;
|
|
63
60
|
#requestInProgress;
|
|
64
61
|
#isLayouting;
|
|
65
62
|
#options;
|
|
@@ -67,7 +64,6 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
67
64
|
#accessibilityService;
|
|
68
65
|
#configurationService;
|
|
69
66
|
#accessibleViewService;
|
|
70
|
-
#modelService;
|
|
71
67
|
#chatService;
|
|
72
68
|
#chatEntitlementService;
|
|
73
69
|
#markdownRendererService;
|
|
@@ -81,7 +77,6 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
81
77
|
configurationService,
|
|
82
78
|
accessibleViewService,
|
|
83
79
|
_textModelResolverService,
|
|
84
|
-
modelService,
|
|
85
80
|
chatService,
|
|
86
81
|
hoverService,
|
|
87
82
|
chatEntitlementService,
|
|
@@ -111,13 +106,12 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
111
106
|
this.#accessibilityService = accessibilityService;
|
|
112
107
|
this.#configurationService = configurationService;
|
|
113
108
|
this.#accessibleViewService = accessibleViewService;
|
|
114
|
-
this.#modelService = modelService;
|
|
115
109
|
this.#chatService = chatService;
|
|
116
110
|
this.#chatEntitlementService = chatEntitlementService;
|
|
117
111
|
this.#markdownRendererService = markdownRendererService;
|
|
118
112
|
this.scopedContextKeyService = this._store.add(contextKeyService.createScoped(this._elements.chatWidget));
|
|
119
113
|
const scopedInstaService = _instantiationService.createChild(( new ServiceCollection([IContextKeyService, this.scopedContextKeyService])), this._store);
|
|
120
|
-
this
|
|
114
|
+
this.chatWidget = scopedInstaService.createInstance(ChatWidget, location, {
|
|
121
115
|
isInlineChat: true
|
|
122
116
|
}, {
|
|
123
117
|
autoScroll: true,
|
|
@@ -152,22 +146,22 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
152
146
|
resultEditorBackground: editorBackground
|
|
153
147
|
});
|
|
154
148
|
this._elements.root.classList.toggle("in-zone-widget", !!options.inZoneWidget);
|
|
155
|
-
this
|
|
149
|
+
this.chatWidget.render(this._elements.chatWidget);
|
|
156
150
|
this._elements.chatWidget.style.setProperty(
|
|
157
151
|
asCssVariableName(chatRequestBackground),
|
|
158
152
|
asCssVariable(inlineChatBackground)
|
|
159
153
|
);
|
|
160
|
-
this
|
|
161
|
-
this._store.add(this
|
|
154
|
+
this.chatWidget.setVisible(true);
|
|
155
|
+
this._store.add(this.chatWidget);
|
|
162
156
|
const ctxResponse = ChatContextKeys.isResponse.bindTo(this.scopedContextKeyService);
|
|
163
157
|
const ctxResponseVote = ChatContextKeys.responseVote.bindTo(this.scopedContextKeyService);
|
|
164
158
|
const ctxResponseSupportIssues = ChatContextKeys.responseSupportsIssueReporting.bindTo(this.scopedContextKeyService);
|
|
165
159
|
const ctxResponseError = ChatContextKeys.responseHasError.bindTo(this.scopedContextKeyService);
|
|
166
160
|
const ctxResponseErrorFiltered = ChatContextKeys.responseIsFiltered.bindTo(this.scopedContextKeyService);
|
|
167
161
|
const viewModelStore = this._store.add(( new DisposableStore()));
|
|
168
|
-
this._store.add(this
|
|
162
|
+
this._store.add(this.chatWidget.onDidChangeViewModel(() => {
|
|
169
163
|
viewModelStore.clear();
|
|
170
|
-
const viewModel = this
|
|
164
|
+
const viewModel = this.chatWidget.viewModel;
|
|
171
165
|
if (!viewModel) {
|
|
172
166
|
return;
|
|
173
167
|
}
|
|
@@ -205,25 +199,31 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
205
199
|
this._store.add(tracker.onDidFocus(() => this.#ctxResponseFocused.set(true)));
|
|
206
200
|
this.#ctxInputEditorFocused = CTX_INLINE_CHAT_FOCUSED.bindTo(contextKeyService);
|
|
207
201
|
this._store.add(
|
|
208
|
-
this
|
|
202
|
+
this.chatWidget.inputEditor.onDidFocusEditorWidget(() => this.#ctxInputEditorFocused.set(true))
|
|
209
203
|
);
|
|
210
204
|
this._store.add(
|
|
211
|
-
this
|
|
205
|
+
this.chatWidget.inputEditor.onDidBlurEditorWidget(() => this.#ctxInputEditorFocused.set(false))
|
|
212
206
|
);
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
207
|
+
if (options.statusMenuId) {
|
|
208
|
+
const statusMenuOptions = options.statusMenuId.options;
|
|
209
|
+
const statusButtonBar = scopedInstaService.createInstance(
|
|
210
|
+
MenuWorkbenchButtonBar,
|
|
211
|
+
this._elements.toolbar1,
|
|
212
|
+
options.statusMenuId.menu,
|
|
213
|
+
{
|
|
214
|
+
toolbarOptions: {
|
|
215
|
+
primaryGroup: "0_main"
|
|
216
|
+
},
|
|
217
|
+
telemetrySource: options.chatWidgetViewOptions?.menus?.telemetrySource,
|
|
218
|
+
menuOptions: {
|
|
219
|
+
renderShortTitle: true
|
|
220
|
+
},
|
|
221
|
+
...statusMenuOptions
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
this._store.add(statusButtonBar.onDidChange(() => this._onDidChangeHeight.fire()));
|
|
225
|
+
this._store.add(statusButtonBar);
|
|
226
|
+
}
|
|
227
227
|
const toolbar2 = scopedInstaService.createInstance(
|
|
228
228
|
MenuWorkbenchToolBar,
|
|
229
229
|
this._elements.toolbar2,
|
|
@@ -256,8 +256,8 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
256
256
|
})
|
|
257
257
|
);
|
|
258
258
|
this._store.add(this.#chatService.onDidPerformUserAction(e => {
|
|
259
|
-
if (isEqual(e.sessionResource, this
|
|
260
|
-
this.updateStatus(( localize(
|
|
259
|
+
if (isEqual(e.sessionResource, this.chatWidget.viewModel?.model.sessionResource) && e.action.kind === "vote") {
|
|
260
|
+
this.updateStatus(( localize(10429, "Thank you for your feedback!")), {
|
|
261
261
|
resetAfter: 1250
|
|
262
262
|
});
|
|
263
263
|
}
|
|
@@ -270,15 +270,15 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
270
270
|
if (this.#configurationService.getValue(AccessibilityVerbositySettingId.InlineChat)) {
|
|
271
271
|
const kbLabel = this.#keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibilityHelp)?.getLabel();
|
|
272
272
|
label = kbLabel ? ( localize(
|
|
273
|
-
|
|
273
|
+
10430,
|
|
274
274
|
"Inline Chat Input, Use {0} for Inline Chat Accessibility Help.",
|
|
275
275
|
kbLabel
|
|
276
276
|
)) : ( localize(
|
|
277
|
-
|
|
277
|
+
10431,
|
|
278
278
|
"Inline Chat Input, Run the Inline Chat Accessibility Help command for more information."
|
|
279
279
|
));
|
|
280
280
|
}
|
|
281
|
-
this
|
|
281
|
+
this.chatWidget.inputEditor.updateOptions({
|
|
282
282
|
ariaLabel: label
|
|
283
283
|
});
|
|
284
284
|
}
|
|
@@ -295,7 +295,7 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
295
295
|
this._elements.disclaimerLabel.classList.toggle("hidden", !showDisclaimer);
|
|
296
296
|
if (showDisclaimer) {
|
|
297
297
|
const renderedMarkdown = disposables.add(this.#markdownRendererService.render(( new MarkdownString(( localize(
|
|
298
|
-
|
|
298
|
+
10432,
|
|
299
299
|
"By continuing with {0} Copilot, you agree to {1}'s [Terms]({2}) and [Privacy Statement]({3})",
|
|
300
300
|
product.defaultChatAgent?.provider?.default?.name ?? "",
|
|
301
301
|
product.defaultChatAgent?.provider?.default?.name ?? "",
|
|
@@ -315,12 +315,6 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
315
315
|
get domNode() {
|
|
316
316
|
return this._elements.root;
|
|
317
317
|
}
|
|
318
|
-
get chatWidget() {
|
|
319
|
-
return this.#chatWidget;
|
|
320
|
-
}
|
|
321
|
-
saveState() {
|
|
322
|
-
this.#chatWidget.saveState();
|
|
323
|
-
}
|
|
324
318
|
layout(widgetDim) {
|
|
325
319
|
const contentHeight = this.contentHeight;
|
|
326
320
|
this.#isLayouting = true;
|
|
@@ -338,11 +332,11 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
338
332
|
const statusHeight = getTotalHeight(this._elements.status);
|
|
339
333
|
this._elements.root.style.height = `${dimension.height - extraHeight}px`;
|
|
340
334
|
this._elements.root.style.width = `${dimension.width}px`;
|
|
341
|
-
this
|
|
335
|
+
this.chatWidget.layout(dimension.height - statusHeight - extraHeight, dimension.width);
|
|
342
336
|
}
|
|
343
337
|
get contentHeight() {
|
|
344
338
|
const data = {
|
|
345
|
-
chatWidgetContentHeight: this
|
|
339
|
+
chatWidgetContentHeight: this.chatWidget.contentHeight,
|
|
346
340
|
statusHeight: getTotalHeight(this._elements.status),
|
|
347
341
|
extraHeight: this._getExtraHeight()
|
|
348
342
|
};
|
|
@@ -351,102 +345,23 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
351
345
|
}
|
|
352
346
|
get minHeight() {
|
|
353
347
|
let maxWidgetOutputHeight = 100;
|
|
354
|
-
for (const item of this
|
|
348
|
+
for (const item of this.chatWidget.viewModel?.getItems() ?? []) {
|
|
355
349
|
if (isResponseVM(item) && ( item.response.value.some(r => r.kind === "textEditGroup" && !r.state?.applied))) {
|
|
356
350
|
maxWidgetOutputHeight = 270;
|
|
357
351
|
break;
|
|
358
352
|
}
|
|
359
353
|
}
|
|
360
354
|
let value = this.contentHeight;
|
|
361
|
-
value -= this
|
|
355
|
+
value -= this.chatWidget.contentHeight;
|
|
362
356
|
value += Math.min(
|
|
363
|
-
this
|
|
364
|
-
this
|
|
357
|
+
this.chatWidget.input.height.get() + maxWidgetOutputHeight,
|
|
358
|
+
this.chatWidget.contentHeight
|
|
365
359
|
);
|
|
366
360
|
return value;
|
|
367
361
|
}
|
|
368
362
|
_getExtraHeight() {
|
|
369
363
|
return this.#options.inZoneWidget ? 1 : (2 + 4) ;
|
|
370
364
|
}
|
|
371
|
-
get value() {
|
|
372
|
-
return this.#chatWidget.getInput();
|
|
373
|
-
}
|
|
374
|
-
set value(value) {
|
|
375
|
-
this.#chatWidget.setInput(value);
|
|
376
|
-
}
|
|
377
|
-
selectAll() {
|
|
378
|
-
this.#chatWidget.inputEditor.setSelection(( new Selection(1, 1, Number.MAX_SAFE_INTEGER, 1)));
|
|
379
|
-
}
|
|
380
|
-
set placeholder(value) {
|
|
381
|
-
this.#chatWidget.setInputPlaceholder(value);
|
|
382
|
-
}
|
|
383
|
-
toggleStatus(show) {
|
|
384
|
-
this._elements.toolbar1.classList.toggle("hidden", !show);
|
|
385
|
-
this._elements.toolbar2.classList.toggle("hidden", !show);
|
|
386
|
-
this._elements.status.classList.toggle("hidden", !show);
|
|
387
|
-
this._elements.infoLabel.classList.toggle("hidden", !show);
|
|
388
|
-
this._onDidChangeHeight.fire();
|
|
389
|
-
}
|
|
390
|
-
updateToolbar(show) {
|
|
391
|
-
this._elements.root.classList.toggle("toolbar", show);
|
|
392
|
-
this._elements.toolbar1.classList.toggle("hidden", !show);
|
|
393
|
-
this._elements.toolbar2.classList.toggle("hidden", !show);
|
|
394
|
-
this._elements.status.classList.toggle("actions", show);
|
|
395
|
-
this._elements.infoLabel.classList.toggle("hidden", show);
|
|
396
|
-
this._onDidChangeHeight.fire();
|
|
397
|
-
}
|
|
398
|
-
async getCodeBlockInfo(codeBlockIndex) {
|
|
399
|
-
const {
|
|
400
|
-
viewModel
|
|
401
|
-
} = this.#chatWidget;
|
|
402
|
-
if (!viewModel) {
|
|
403
|
-
return undefined;
|
|
404
|
-
}
|
|
405
|
-
const items = viewModel.getItems().filter(i => isResponseVM(i));
|
|
406
|
-
const item = items.at(-1);
|
|
407
|
-
if (!item) {
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
const codeBlocks = this.#chatWidget.getCodeBlockInfosForResponse(item);
|
|
411
|
-
const info = codeBlocks[codeBlockIndex];
|
|
412
|
-
if (info?.uri) {
|
|
413
|
-
return this.#modelService.getModel(info.uri) ?? undefined;
|
|
414
|
-
}
|
|
415
|
-
const markdown = item.response.getMarkdown();
|
|
416
|
-
let currentCodeBlockIndex = 0;
|
|
417
|
-
let foundText;
|
|
418
|
-
for (const line of markdown.split("\n")) {
|
|
419
|
-
if (line.startsWith("```") && foundText === undefined) {
|
|
420
|
-
foundText = "";
|
|
421
|
-
} else if (line.startsWith("```") && foundText !== undefined) {
|
|
422
|
-
if (currentCodeBlockIndex === codeBlockIndex) {
|
|
423
|
-
break;
|
|
424
|
-
}
|
|
425
|
-
currentCodeBlockIndex++;
|
|
426
|
-
foundText = undefined;
|
|
427
|
-
} else if (foundText !== undefined) {
|
|
428
|
-
foundText += (foundText ? "\n" : "") + line;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
if (foundText !== undefined && currentCodeBlockIndex === codeBlockIndex) {
|
|
432
|
-
return this.#modelService.createModel(foundText, null, undefined, true);
|
|
433
|
-
}
|
|
434
|
-
return undefined;
|
|
435
|
-
}
|
|
436
|
-
get responseContent() {
|
|
437
|
-
const requests = this.#chatWidget.viewModel?.model.getRequests();
|
|
438
|
-
return requests?.at(-1)?.response?.response.toString();
|
|
439
|
-
}
|
|
440
|
-
getChatModel() {
|
|
441
|
-
return this.#chatWidget.viewModel?.model;
|
|
442
|
-
}
|
|
443
|
-
setChatModel(chatModel) {
|
|
444
|
-
chatModel.inputModel.setState({
|
|
445
|
-
inputText: "",
|
|
446
|
-
selections: []
|
|
447
|
-
});
|
|
448
|
-
this.#chatWidget.setModel(chatModel);
|
|
449
|
-
}
|
|
450
365
|
updateInfo(message) {
|
|
451
366
|
this._elements.infoLabel.classList.toggle("hidden", !message);
|
|
452
367
|
const renderedMessage = renderLabelWithIcons(message);
|
|
@@ -484,8 +399,8 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
484
399
|
this._onDidChangeHeight.fire();
|
|
485
400
|
}
|
|
486
401
|
reset() {
|
|
487
|
-
this
|
|
488
|
-
this
|
|
402
|
+
this.chatWidget.attachmentModel.clear(true);
|
|
403
|
+
this.chatWidget.saveState();
|
|
489
404
|
reset(this._elements.statusLabel);
|
|
490
405
|
this._elements.statusLabel.classList.toggle("hidden", true);
|
|
491
406
|
this._elements.toolbar1.classList.add("hidden");
|
|
@@ -495,14 +410,14 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
495
410
|
this._onDidChangeHeight.fire();
|
|
496
411
|
}
|
|
497
412
|
focus() {
|
|
498
|
-
this
|
|
413
|
+
this.chatWidget.focusInput();
|
|
499
414
|
}
|
|
500
415
|
hasFocus() {
|
|
501
416
|
return this.domNode.contains(getActiveElement());
|
|
502
417
|
}
|
|
503
418
|
};
|
|
504
|
-
InlineChatWidget = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IContextKeyService)), ( __param(4, IKeybindingService)), ( __param(5, IAccessibilityService)), ( __param(6, IConfigurationService)), ( __param(7, IAccessibleViewService)), ( __param(8, ITextModelService)), ( __param(9,
|
|
505
|
-
const defaultAriaLabel = ( localize(
|
|
419
|
+
InlineChatWidget = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IContextKeyService)), ( __param(4, IKeybindingService)), ( __param(5, IAccessibilityService)), ( __param(6, IConfigurationService)), ( __param(7, IAccessibleViewService)), ( __param(8, ITextModelService)), ( __param(9, IChatService)), ( __param(10, IHoverService)), ( __param(11, IChatEntitlementService)), ( __param(12, IMarkdownRendererService))], InlineChatWidget));
|
|
420
|
+
const defaultAriaLabel = ( localize(10433, "Inline Chat Input"));
|
|
506
421
|
let EditorBasedInlineChatWidget = class EditorBasedInlineChatWidget extends InlineChatWidget {
|
|
507
422
|
constructor(
|
|
508
423
|
location,
|
|
@@ -515,7 +430,6 @@ let EditorBasedInlineChatWidget = class EditorBasedInlineChatWidget extends Inli
|
|
|
515
430
|
configurationService,
|
|
516
431
|
accessibleViewService,
|
|
517
432
|
textModelResolverService,
|
|
518
|
-
modelService,
|
|
519
433
|
chatService,
|
|
520
434
|
hoverService,
|
|
521
435
|
layoutService,
|
|
@@ -529,7 +443,7 @@ let EditorBasedInlineChatWidget = class EditorBasedInlineChatWidget extends Inli
|
|
|
529
443
|
...options.chatWidgetViewOptions,
|
|
530
444
|
editorOverflowWidgetsDomNode: overflowWidgetsNode
|
|
531
445
|
}
|
|
532
|
-
}, instantiationService, contextKeyService, keybindingService, accessibilityService, configurationService, accessibleViewService, textModelResolverService,
|
|
446
|
+
}, instantiationService, contextKeyService, keybindingService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService, hoverService, chatEntitlementService, markdownRendererService);
|
|
533
447
|
this._store.add(toDisposable(() => {
|
|
534
448
|
overflowWidgetsNode.remove();
|
|
535
449
|
}));
|
|
@@ -544,6 +458,6 @@ let EditorBasedInlineChatWidget = class EditorBasedInlineChatWidget extends Inli
|
|
|
544
458
|
super.reset();
|
|
545
459
|
}
|
|
546
460
|
};
|
|
547
|
-
EditorBasedInlineChatWidget = ( __decorate([( __param(3, IContextKeyService)), ( __param(4, IKeybindingService)), ( __param(5, IInstantiationService)), ( __param(6, IAccessibilityService)), ( __param(7, IConfigurationService)), ( __param(8, IAccessibleViewService)), ( __param(9, ITextModelService)), ( __param(10,
|
|
461
|
+
EditorBasedInlineChatWidget = ( __decorate([( __param(3, IContextKeyService)), ( __param(4, IKeybindingService)), ( __param(5, IInstantiationService)), ( __param(6, IAccessibilityService)), ( __param(7, IConfigurationService)), ( __param(8, IAccessibleViewService)), ( __param(9, ITextModelService)), ( __param(10, IChatService)), ( __param(11, IHoverService)), ( __param(12, ILayoutService)), ( __param(13, IChatEntitlementService)), ( __param(14, IMarkdownRendererService))], EditorBasedInlineChatWidget));
|
|
548
462
|
|
|
549
463
|
export { EditorBasedInlineChatWidget, InlineChatWidget };
|
|
@@ -6,6 +6,7 @@ import { ZoneWidget } from "@codingame/monaco-vscode-api/vscode/vs/editor/contri
|
|
|
6
6
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
7
7
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
8
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
9
|
+
import { IActionViewItemService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/actionViewItemService.service";
|
|
9
10
|
import { IChatWidgetViewOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
10
11
|
import { IChatWidgetLocationOptions } from "../../chat/browser/widget/chatWidget.js";
|
|
11
12
|
import { INotebookEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
|
|
@@ -13,13 +14,14 @@ import { EditorBasedInlineChatWidget } from "./inlineChatWidget.js";
|
|
|
13
14
|
export declare class InlineChatZoneWidget extends ZoneWidget {
|
|
14
15
|
#private;
|
|
15
16
|
readonly widget: EditorBasedInlineChatWidget;
|
|
17
|
+
readonly status: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").ISettableObservable<string, void>;
|
|
16
18
|
private notebookEditor?;
|
|
17
19
|
constructor(location: IChatWidgetLocationOptions, options: IChatWidgetViewOptions | undefined, editors: {
|
|
18
20
|
editor: ICodeEditor;
|
|
19
21
|
notebookEditor?: INotebookEditor;
|
|
20
22
|
},
|
|
21
23
|
/** @deprecated should go away with inline2 */
|
|
22
|
-
clearDelegate: () => Promise<void>, instaService: IInstantiationService, logService: ILogService, contextKeyService: IContextKeyService);
|
|
24
|
+
clearDelegate: () => Promise<void>, instaService: IInstantiationService, actionViewItemService: IActionViewItemService, logService: ILogService, contextKeyService: IContextKeyService);
|
|
23
25
|
protected _fillContainer(container: HTMLElement): void;
|
|
24
26
|
showTerminationCard(message: string | IMarkdownString, instaService: IInstantiationService): void;
|
|
25
27
|
hideTerminationCard(): void;
|