@codingame/monaco-vscode-katex-common 24.1.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/empty.js +1 -0
- package/package.json +45 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +37 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +127 -0
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +27 -0
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +81 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +44 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +172 -0
- package/vscode/src/vs/platform/editor/browser/editor.d.ts +12 -0
- package/vscode/src/vs/platform/editor/browser/editor.js +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +295 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +650 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +364 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +207 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.js +216 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +114 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentModel.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentModel.js +141 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.d.ts +169 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.js +951 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer.js +109 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAgentCommandContentPart.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAgentCommandContentPart.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAnonymousRateLimitedPart.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAnonymousRateLimitedPart.js +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatChangesSummaryPart.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatChangesSummaryPart.js +286 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.js +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollapsibleContentPart.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollapsibleContentPart.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.d.ts +116 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.js +417 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentCodePools.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentCodePools.js +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatElicitationContentPart.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatElicitationContentPart.js +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorConfirmationPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorConfirmationPart.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorContentPart.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorContentPart.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatExtensionsContentPart.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatExtensionsContentPart.js +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.d.ts +94 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.js +567 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMcpServersInteractionContentPart.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMcpServersInteractionContentPart.js +224 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.js +259 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatPullRequestContentPart.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatPullRequestContentPart.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatQuotaExceededPart.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatQuotaExceededPart.js +117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +528 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.js +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +91 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.js +429 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.js +347 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInputOutputContentPart.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInputOutputContentPart.js +164 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolOutputContentSubPart.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolOutputContentSubPart.js +224 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +173 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatConfirmationWidget.css +341 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatExtensionsContent.css +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatMarkdownPart.css +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatMcpServersInteractionContent.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatPullRequestContent.css +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatTerminalToolProgressPart.css +221 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatThinkingContent.css +162 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +94 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +96 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +147 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatResultListSubPart.js +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +353 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +100 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +1085 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +275 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +119 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolOutputPart.js +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +225 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolProgressPart.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDiffBlockPart.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDiffBlockPart.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.js +388 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +721 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.js +409 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.d.ts +334 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +2008 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPartWidgets.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPartWidgets.js +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.d.ts +217 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1573 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +249 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSelectedTools.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSelectedTools.js +174 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionAction.css +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.d.ts +292 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +2014 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.d.ts +173 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +797 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.js +345 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.js +1069 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +139 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css +2880 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css +87 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatCodeBlockPill.css +139 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatInlineAnchorWidget.css +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewWelcome.css +209 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modePickerActionItem.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modePickerActionItem.js +135 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.js +147 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +279 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +28 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +176 -0
- package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +207 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +373 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +171 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +1442 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +199 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +482 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +37 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +95 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +497 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +76 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +464 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +124 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +562 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +279 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +411 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +66 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +154 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +201 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +372 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +594 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1746 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +269 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +806 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +116 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +62 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +295 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +241 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +146 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +90 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +42 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +77 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +823 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +567 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +189 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +439 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +263 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +89 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +108 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +145 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
2
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
3
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
4
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
6
|
+
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
7
|
+
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
8
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
|
+
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
10
|
+
import { IMarkdownRenderer } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer";
|
|
11
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
12
|
+
import { IPreferencesService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/preferences/common/preferences.service";
|
|
13
|
+
import { ITerminalChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
14
|
+
import { IChatToolInvocation, type IChatTerminalToolInvocationData, type ILegacyChatTerminalToolInvocationData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
15
|
+
import type { CodeBlockModelCollection } from "../../../common/codeBlockModelCollection.js";
|
|
16
|
+
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
17
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
18
|
+
import { EditorPool } from "../chatContentCodePools.js";
|
|
19
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
20
|
+
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
21
|
+
export declare enum TerminalToolConfirmationStorageKeys {
|
|
22
|
+
TerminalAutoApproveWarningAccepted = "chat.tools.terminal.autoApprove.warningAccepted"
|
|
23
|
+
}
|
|
24
|
+
export interface ITerminalNewAutoApproveRule {
|
|
25
|
+
key: string;
|
|
26
|
+
value: boolean | {
|
|
27
|
+
approve: boolean;
|
|
28
|
+
matchCommandLine?: boolean;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export type TerminalNewAutoApproveButtonData = ({
|
|
32
|
+
type: "enable";
|
|
33
|
+
} | {
|
|
34
|
+
type: "configure";
|
|
35
|
+
} | {
|
|
36
|
+
type: "skip";
|
|
37
|
+
} | {
|
|
38
|
+
type: "newRule";
|
|
39
|
+
rule: ITerminalNewAutoApproveRule | ITerminalNewAutoApproveRule[];
|
|
40
|
+
} | {
|
|
41
|
+
type: "sessionApproval";
|
|
42
|
+
});
|
|
43
|
+
export declare class ChatTerminalToolConfirmationSubPart extends BaseChatToolInvocationSubPart {
|
|
44
|
+
private readonly context;
|
|
45
|
+
private readonly renderer;
|
|
46
|
+
private readonly editorPool;
|
|
47
|
+
private readonly currentWidthDelegate;
|
|
48
|
+
private readonly codeBlockModelCollection;
|
|
49
|
+
private readonly codeBlockStartIndex;
|
|
50
|
+
private readonly instantiationService;
|
|
51
|
+
private readonly dialogService;
|
|
52
|
+
private readonly keybindingService;
|
|
53
|
+
private readonly modelService;
|
|
54
|
+
private readonly languageService;
|
|
55
|
+
private readonly configurationService;
|
|
56
|
+
private readonly contextKeyService;
|
|
57
|
+
private readonly chatWidgetService;
|
|
58
|
+
private readonly preferencesService;
|
|
59
|
+
private readonly storageService;
|
|
60
|
+
private readonly terminalChatService;
|
|
61
|
+
readonly domNode: HTMLElement;
|
|
62
|
+
readonly codeblocks: IChatCodeBlockInfo[];
|
|
63
|
+
constructor(toolInvocation: IChatToolInvocation, terminalData: IChatTerminalToolInvocationData | ILegacyChatTerminalToolInvocationData, context: IChatContentPartRenderContext, renderer: IMarkdownRenderer, editorPool: EditorPool, currentWidthDelegate: () => number, codeBlockModelCollection: CodeBlockModelCollection, codeBlockStartIndex: number, instantiationService: IInstantiationService, dialogService: IDialogService, keybindingService: IKeybindingService, modelService: IModelService, languageService: ILanguageService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, chatWidgetService: IChatWidgetService, preferencesService: IPreferencesService, storageService: IStorageService, terminalChatService: ITerminalChatService, textModelService: ITextModelService, hoverService: IHoverService);
|
|
64
|
+
private _createButtons;
|
|
65
|
+
private _showAutoApproveWarning;
|
|
66
|
+
private _getUniqueCodeBlockUri;
|
|
67
|
+
private _appendMarkdownPart;
|
|
68
|
+
}
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { h, append } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { HoverStyle } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hover';
|
|
5
|
+
import { HoverPosition } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverWidget';
|
|
6
|
+
import { Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
7
|
+
import { asArray } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
8
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
9
|
+
import { ErrorNoTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
10
|
+
import { createCommandUri, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
11
|
+
import { thenRegisterOrDispose, thenIfNotDisposed, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
12
|
+
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
13
|
+
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
14
|
+
import { isObject } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
15
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
16
|
+
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
17
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
18
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
19
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
20
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
21
|
+
import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
|
|
22
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
23
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
24
|
+
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
25
|
+
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
26
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
27
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
28
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
29
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
30
|
+
import { IPreferencesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/preferences/common/preferences.service';
|
|
31
|
+
import { ITerminalChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
|
|
32
|
+
import { TerminalContribSettingId, TerminalContribCommandId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/terminalContribExports';
|
|
33
|
+
import { migrateLegacyTerminalToolSpecificData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
34
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
35
|
+
import { ToolConfirmKind, IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
36
|
+
import { AcceptToolConfirmationActionId, SkipToolConfirmationActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
37
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
38
|
+
import { ChatCustomConfirmationWidget } from '../chatConfirmationWidget.js';
|
|
39
|
+
import { ChatMarkdownContentPart } from '../chatMarkdownContentPart.js';
|
|
40
|
+
import { BaseChatToolInvocationSubPart } from './chatToolInvocationSubPart.js';
|
|
41
|
+
|
|
42
|
+
var TerminalToolConfirmationStorageKeys;
|
|
43
|
+
(function (TerminalToolConfirmationStorageKeys) {
|
|
44
|
+
TerminalToolConfirmationStorageKeys["TerminalAutoApproveWarningAccepted"] = "chat.tools.terminal.autoApprove.warningAccepted";
|
|
45
|
+
})(TerminalToolConfirmationStorageKeys || (TerminalToolConfirmationStorageKeys = {}));
|
|
46
|
+
let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubPart extends BaseChatToolInvocationSubPart {
|
|
47
|
+
constructor(toolInvocation, terminalData, context, renderer, editorPool, currentWidthDelegate, codeBlockModelCollection, codeBlockStartIndex, instantiationService, dialogService, keybindingService, modelService, languageService, configurationService, contextKeyService, chatWidgetService, preferencesService, storageService, terminalChatService, textModelService, hoverService) {
|
|
48
|
+
super(toolInvocation);
|
|
49
|
+
this.context = context;
|
|
50
|
+
this.renderer = renderer;
|
|
51
|
+
this.editorPool = editorPool;
|
|
52
|
+
this.currentWidthDelegate = currentWidthDelegate;
|
|
53
|
+
this.codeBlockModelCollection = codeBlockModelCollection;
|
|
54
|
+
this.codeBlockStartIndex = codeBlockStartIndex;
|
|
55
|
+
this.instantiationService = instantiationService;
|
|
56
|
+
this.dialogService = dialogService;
|
|
57
|
+
this.keybindingService = keybindingService;
|
|
58
|
+
this.modelService = modelService;
|
|
59
|
+
this.languageService = languageService;
|
|
60
|
+
this.configurationService = configurationService;
|
|
61
|
+
this.contextKeyService = contextKeyService;
|
|
62
|
+
this.chatWidgetService = chatWidgetService;
|
|
63
|
+
this.preferencesService = preferencesService;
|
|
64
|
+
this.storageService = storageService;
|
|
65
|
+
this.terminalChatService = terminalChatService;
|
|
66
|
+
this.codeblocks = [];
|
|
67
|
+
if (toolInvocation.fromSubAgent) {
|
|
68
|
+
context.container.classList.add('from-sub-agent');
|
|
69
|
+
}
|
|
70
|
+
if (!toolInvocation.confirmationMessages?.title) {
|
|
71
|
+
throw ( new Error('Confirmation messages are missing'));
|
|
72
|
+
}
|
|
73
|
+
terminalData = migrateLegacyTerminalToolSpecificData(terminalData);
|
|
74
|
+
const { title, message, disclaimer, terminalCustomActions } = toolInvocation.confirmationMessages;
|
|
75
|
+
const autoApproveEnabled = this.configurationService.getValue(TerminalContribSettingId.EnableAutoApprove) === true;
|
|
76
|
+
const autoApproveWarningAccepted = this.storageService.getBoolean(TerminalToolConfirmationStorageKeys.TerminalAutoApproveWarningAccepted, StorageScope.APPLICATION, false);
|
|
77
|
+
let moreActions = undefined;
|
|
78
|
+
if (autoApproveEnabled) {
|
|
79
|
+
moreActions = [];
|
|
80
|
+
if (!autoApproveWarningAccepted) {
|
|
81
|
+
moreActions.push({
|
|
82
|
+
label: ( localize(5137, 'Enable Auto Approve...')),
|
|
83
|
+
data: {
|
|
84
|
+
type: 'enable'
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
moreActions.push(( new Separator()));
|
|
88
|
+
if (terminalCustomActions) {
|
|
89
|
+
for (const action of terminalCustomActions) {
|
|
90
|
+
if (!(action instanceof Separator)) {
|
|
91
|
+
action.disabled = true;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (terminalCustomActions) {
|
|
97
|
+
moreActions.push(...terminalCustomActions);
|
|
98
|
+
}
|
|
99
|
+
if (moreActions.length === 0) {
|
|
100
|
+
moreActions = undefined;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const codeBlockRenderOptions = {
|
|
104
|
+
hideToolbar: true,
|
|
105
|
+
reserveWidth: 19,
|
|
106
|
+
verticalPadding: 5,
|
|
107
|
+
editorOptions: {
|
|
108
|
+
wordWrap: 'on',
|
|
109
|
+
readOnly: false,
|
|
110
|
+
tabFocusMode: true,
|
|
111
|
+
ariaLabel: typeof title === 'string' ? title : title.value
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const languageId = this.languageService.getLanguageIdByLanguageName(terminalData.language ?? 'sh') ?? 'shellscript';
|
|
115
|
+
const model = this._register(this.modelService.createModel(terminalData.commandLine.toolEdited ?? terminalData.commandLine.original, this.languageService.createById(languageId), this._getUniqueCodeBlockUri(), true));
|
|
116
|
+
thenRegisterOrDispose(textModelService.createModelReference(model.uri), this._store);
|
|
117
|
+
const editor = this._register(this.editorPool.get());
|
|
118
|
+
const renderPromise = editor.object.render({
|
|
119
|
+
codeBlockIndex: this.codeBlockStartIndex,
|
|
120
|
+
codeBlockPartIndex: 0,
|
|
121
|
+
element: this.context.element,
|
|
122
|
+
languageId,
|
|
123
|
+
renderOptions: codeBlockRenderOptions,
|
|
124
|
+
textModel: Promise.resolve(model),
|
|
125
|
+
chatSessionResource: this.context.element.sessionResource
|
|
126
|
+
}, this.currentWidthDelegate());
|
|
127
|
+
this._register(thenIfNotDisposed(renderPromise, () => this._onDidChangeHeight.fire()));
|
|
128
|
+
this.codeblocks.push({
|
|
129
|
+
codeBlockIndex: this.codeBlockStartIndex,
|
|
130
|
+
codemapperUri: undefined,
|
|
131
|
+
elementId: this.context.element.id,
|
|
132
|
+
focus: () => editor.object.focus(),
|
|
133
|
+
ownerMarkdownPartId: this.codeblocksPartId,
|
|
134
|
+
uri: model.uri,
|
|
135
|
+
uriPromise: Promise.resolve(model.uri),
|
|
136
|
+
chatSessionResource: this.context.element.sessionResource
|
|
137
|
+
});
|
|
138
|
+
this._register(editor.object.onDidChangeContentHeight(() => {
|
|
139
|
+
editor.object.layout(this.currentWidthDelegate());
|
|
140
|
+
this._onDidChangeHeight.fire();
|
|
141
|
+
}));
|
|
142
|
+
this._register(model.onDidChangeContent(e => {
|
|
143
|
+
terminalData.commandLine.userEdited = model.getValue();
|
|
144
|
+
}));
|
|
145
|
+
const elements = h('.chat-confirmation-message-terminal', [
|
|
146
|
+
h('.chat-confirmation-message-terminal-editor@editor'),
|
|
147
|
+
h('.chat-confirmation-message-terminal-disclaimer@disclaimer'),
|
|
148
|
+
]);
|
|
149
|
+
append(elements.editor, editor.object.element);
|
|
150
|
+
this._register(hoverService.setupDelayedHover(elements.editor, {
|
|
151
|
+
content: message || '',
|
|
152
|
+
style: HoverStyle.Pointer,
|
|
153
|
+
position: { hoverPosition: HoverPosition.LEFT },
|
|
154
|
+
}));
|
|
155
|
+
const confirmWidget = this._register(this.instantiationService.createInstance((ChatCustomConfirmationWidget), this.context, {
|
|
156
|
+
title,
|
|
157
|
+
icon: Codicon.terminal,
|
|
158
|
+
message: elements.root,
|
|
159
|
+
buttons: this._createButtons(moreActions)
|
|
160
|
+
}));
|
|
161
|
+
if (disclaimer) {
|
|
162
|
+
this._appendMarkdownPart(elements.disclaimer, disclaimer, codeBlockRenderOptions);
|
|
163
|
+
}
|
|
164
|
+
const hasToolConfirmationKey = ChatContextKeys.Editing.hasToolConfirmation.bindTo(this.contextKeyService);
|
|
165
|
+
hasToolConfirmationKey.set(true);
|
|
166
|
+
this._register(toDisposable(() => hasToolConfirmationKey.reset()));
|
|
167
|
+
this._register(confirmWidget.onDidClick(async (button) => {
|
|
168
|
+
let doComplete = true;
|
|
169
|
+
const data = button.data;
|
|
170
|
+
let toolConfirmKind = ToolConfirmKind.Denied;
|
|
171
|
+
if (typeof data === 'boolean') {
|
|
172
|
+
if (data) {
|
|
173
|
+
toolConfirmKind = ToolConfirmKind.UserAction;
|
|
174
|
+
if (terminalData.autoApproveInfo) {
|
|
175
|
+
terminalData.autoApproveInfo = undefined;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
else if (typeof data !== 'boolean') {
|
|
180
|
+
switch (data.type) {
|
|
181
|
+
case 'enable': {
|
|
182
|
+
const optedIn = await this._showAutoApproveWarning();
|
|
183
|
+
if (optedIn) {
|
|
184
|
+
this.storageService.store(TerminalToolConfirmationStorageKeys.TerminalAutoApproveWarningAccepted, true, StorageScope.APPLICATION, StorageTarget.USER);
|
|
185
|
+
if (!terminalCustomActions) {
|
|
186
|
+
toolConfirmKind = ToolConfirmKind.UserAction;
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
for (const action of terminalCustomActions) {
|
|
190
|
+
if (!(action instanceof Separator)) {
|
|
191
|
+
action.disabled = false;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
confirmWidget.updateButtons(this._createButtons(terminalCustomActions));
|
|
195
|
+
doComplete = false;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
doComplete = false;
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
case 'skip': {
|
|
204
|
+
toolConfirmKind = ToolConfirmKind.Skipped;
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
case 'newRule': {
|
|
208
|
+
const newRules = asArray(data.rule);
|
|
209
|
+
const inspect = this.configurationService.inspect(TerminalContribSettingId.AutoApprove);
|
|
210
|
+
const oldValue = inspect.user?.value ?? {};
|
|
211
|
+
let newValue;
|
|
212
|
+
if (isObject(oldValue)) {
|
|
213
|
+
newValue = { ...oldValue };
|
|
214
|
+
for (const newRule of newRules) {
|
|
215
|
+
newValue[newRule.key] = newRule.value;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
this.preferencesService.openSettings({
|
|
220
|
+
jsonEditor: true,
|
|
221
|
+
target: ConfigurationTarget.USER,
|
|
222
|
+
revealSetting: {
|
|
223
|
+
key: TerminalContribSettingId.AutoApprove
|
|
224
|
+
},
|
|
225
|
+
});
|
|
226
|
+
throw ( new ErrorNoTelemetry(`Cannot add new rule, existing setting is unexpected format`));
|
|
227
|
+
}
|
|
228
|
+
await this.configurationService.updateValue(TerminalContribSettingId.AutoApprove, newValue, ConfigurationTarget.USER);
|
|
229
|
+
function formatRuleLinks(newRules) {
|
|
230
|
+
return ( newRules.map(e => {
|
|
231
|
+
const settingsUri = createCommandUri(TerminalContribCommandId.OpenTerminalSettingsLink, ConfigurationTarget.USER);
|
|
232
|
+
return `[\`${e.key}\`](${( settingsUri.toString())} "${( localize(5138, 'View rule in settings'))}")`;
|
|
233
|
+
})).join(', ');
|
|
234
|
+
}
|
|
235
|
+
const mdTrustSettings = {
|
|
236
|
+
isTrusted: {
|
|
237
|
+
enabledCommands: [TerminalContribCommandId.OpenTerminalSettingsLink]
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
if (newRules.length === 1) {
|
|
241
|
+
terminalData.autoApproveInfo = ( new MarkdownString(( localize(5139, 'Auto approve rule {0} added', formatRuleLinks(newRules))), mdTrustSettings));
|
|
242
|
+
}
|
|
243
|
+
else if (newRules.length > 1) {
|
|
244
|
+
terminalData.autoApproveInfo = ( new MarkdownString(( localize(5140, 'Auto approve rules {0} added', formatRuleLinks(newRules))), mdTrustSettings));
|
|
245
|
+
}
|
|
246
|
+
toolConfirmKind = ToolConfirmKind.UserAction;
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
case 'configure': {
|
|
250
|
+
this.preferencesService.openSettings({
|
|
251
|
+
target: ConfigurationTarget.USER,
|
|
252
|
+
query: `@id:${TerminalContribSettingId.AutoApprove}`,
|
|
253
|
+
});
|
|
254
|
+
doComplete = false;
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
case 'sessionApproval': {
|
|
258
|
+
const sessionId = this.context.element.sessionId;
|
|
259
|
+
this.terminalChatService.setChatSessionAutoApproval(sessionId, true);
|
|
260
|
+
const disableUri = createCommandUri(TerminalContribCommandId.DisableSessionAutoApproval, sessionId);
|
|
261
|
+
const mdTrustSettings = {
|
|
262
|
+
isTrusted: {
|
|
263
|
+
enabledCommands: [TerminalContribCommandId.DisableSessionAutoApproval]
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
terminalData.autoApproveInfo = ( new MarkdownString(`${( localize(5141, 'All commands will be auto approved for this session'))} ([${( localize(5142, 'Disable'))}](${( disableUri.toString())}))`, mdTrustSettings));
|
|
267
|
+
toolConfirmKind = ToolConfirmKind.UserAction;
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
if (doComplete) {
|
|
273
|
+
IChatToolInvocation.confirmWith(toolInvocation, { type: toolConfirmKind });
|
|
274
|
+
this.chatWidgetService.getWidgetBySessionResource(this.context.element.sessionResource)?.focusInput();
|
|
275
|
+
}
|
|
276
|
+
}));
|
|
277
|
+
this._register(confirmWidget.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
278
|
+
this.domNode = confirmWidget.domNode;
|
|
279
|
+
}
|
|
280
|
+
_createButtons(moreActions) {
|
|
281
|
+
const getLabelAndTooltip = (label, actionId, tooltipDetail = label) => {
|
|
282
|
+
const keybinding = this.keybindingService.lookupKeybinding(actionId)?.getLabel();
|
|
283
|
+
const tooltip = keybinding ? `${tooltipDetail} (${keybinding})` : (tooltipDetail);
|
|
284
|
+
return { label, tooltip };
|
|
285
|
+
};
|
|
286
|
+
return [
|
|
287
|
+
{
|
|
288
|
+
...getLabelAndTooltip(( localize(5143, "Allow")), AcceptToolConfirmationActionId),
|
|
289
|
+
data: true,
|
|
290
|
+
moreActions,
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
...getLabelAndTooltip(( localize(5144, "Skip")), SkipToolConfirmationActionId, ( localize(5145, 'Proceed without executing this command'))),
|
|
294
|
+
data: { type: 'skip' },
|
|
295
|
+
isSecondary: true,
|
|
296
|
+
},
|
|
297
|
+
];
|
|
298
|
+
}
|
|
299
|
+
async _showAutoApproveWarning() {
|
|
300
|
+
const promptResult = await this.dialogService.prompt({
|
|
301
|
+
type: Severity.Info,
|
|
302
|
+
message: ( localize(5146, 'Enable terminal auto approve?')),
|
|
303
|
+
buttons: [{
|
|
304
|
+
label: ( localize(5147, 'Enable')),
|
|
305
|
+
run: () => true
|
|
306
|
+
}],
|
|
307
|
+
cancelButton: true,
|
|
308
|
+
custom: {
|
|
309
|
+
icon: Codicon.shield,
|
|
310
|
+
markdownDetails: [{
|
|
311
|
+
markdown: ( new MarkdownString(( localize(
|
|
312
|
+
5148,
|
|
313
|
+
'This will enable a configurable subset of commands to run in the terminal autonomously. It provides *best effort protections* and assumes the agent is not acting maliciously.'
|
|
314
|
+
)))),
|
|
315
|
+
}, {
|
|
316
|
+
markdown: ( new MarkdownString(`[${( localize(5149, 'Learn more about the potential risks and how to avoid them.'))}](https://code.visualstudio.com/docs/copilot/security#_security-considerations)`))
|
|
317
|
+
}],
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
return promptResult.result === true;
|
|
321
|
+
}
|
|
322
|
+
_getUniqueCodeBlockUri() {
|
|
323
|
+
return ( URI.from({
|
|
324
|
+
scheme: Schemas.vscodeChatCodeBlock,
|
|
325
|
+
path: generateUuid(),
|
|
326
|
+
}));
|
|
327
|
+
}
|
|
328
|
+
_appendMarkdownPart(container, message, codeBlockRenderOptions) {
|
|
329
|
+
const part = this._register(this.instantiationService.createInstance(ChatMarkdownContentPart, {
|
|
330
|
+
kind: 'markdownContent',
|
|
331
|
+
content: typeof message === 'string' ? ( new MarkdownString()).appendMarkdown(message) : message
|
|
332
|
+
}, this.context, this.editorPool, false, this.codeBlockStartIndex, this.renderer, undefined, this.currentWidthDelegate(), this.codeBlockModelCollection, { codeBlockRenderOptions }));
|
|
333
|
+
append(container, part.domNode);
|
|
334
|
+
this._register(part.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
ChatTerminalToolConfirmationSubPart = ( __decorate([
|
|
338
|
+
( __param(8, IInstantiationService)),
|
|
339
|
+
( __param(9, IDialogService)),
|
|
340
|
+
( __param(10, IKeybindingService)),
|
|
341
|
+
( __param(11, IModelService)),
|
|
342
|
+
( __param(12, ILanguageService)),
|
|
343
|
+
( __param(13, IConfigurationService)),
|
|
344
|
+
( __param(14, IContextKeyService)),
|
|
345
|
+
( __param(15, IChatWidgetService)),
|
|
346
|
+
( __param(16, IPreferencesService)),
|
|
347
|
+
( __param(17, IStorageService)),
|
|
348
|
+
( __param(18, ITerminalChatService)),
|
|
349
|
+
( __param(19, ITextModelService)),
|
|
350
|
+
( __param(20, IHoverService))
|
|
351
|
+
], ChatTerminalToolConfirmationSubPart));
|
|
352
|
+
|
|
353
|
+
export { ChatTerminalToolConfirmationSubPart, TerminalToolConfirmationStorageKeys };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { IChatToolInvocation, IChatToolInvocationSerialized, type IChatTerminalToolInvocationData, type ILegacyChatTerminalToolInvocationData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
3
|
+
import { CodeBlockModelCollection } from "../../../common/codeBlockModelCollection.js";
|
|
4
|
+
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
5
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
6
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
7
|
+
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
8
|
+
import { Action, IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
9
|
+
import { IChatTerminalToolProgressPart, ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
10
|
+
import { ITerminalChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
11
|
+
import { ITerminalGroupService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
12
|
+
import { ITerminalEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
13
|
+
import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
14
|
+
import { ITerminalCommand } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities";
|
|
15
|
+
import { IMarkdownRenderer } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer";
|
|
16
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
17
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
18
|
+
import { EditorPool } from "../chatContentCodePools.js";
|
|
19
|
+
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
20
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
21
|
+
export declare class ChatTerminalToolProgressPart extends BaseChatToolInvocationSubPart implements IChatTerminalToolProgressPart {
|
|
22
|
+
private readonly _instantiationService;
|
|
23
|
+
private readonly _terminalChatService;
|
|
24
|
+
private readonly _terminalService;
|
|
25
|
+
private readonly _contextKeyService;
|
|
26
|
+
private readonly _chatWidgetService;
|
|
27
|
+
private readonly _keybindingService;
|
|
28
|
+
readonly domNode: HTMLElement;
|
|
29
|
+
private readonly _actionBar;
|
|
30
|
+
private readonly _titleElement;
|
|
31
|
+
private readonly _outputView;
|
|
32
|
+
private readonly _terminalOutputContextKey;
|
|
33
|
+
private _terminalSessionRegistration;
|
|
34
|
+
private readonly _elementIndex;
|
|
35
|
+
private readonly _contentIndex;
|
|
36
|
+
private readonly _sessionResource;
|
|
37
|
+
private readonly _showOutputAction;
|
|
38
|
+
private _showOutputActionAdded;
|
|
39
|
+
private readonly _focusAction;
|
|
40
|
+
private readonly _terminalData;
|
|
41
|
+
private _terminalCommandUri;
|
|
42
|
+
private _storedCommandId;
|
|
43
|
+
private readonly _commandText;
|
|
44
|
+
private readonly _isSerializedInvocation;
|
|
45
|
+
private _terminalInstance;
|
|
46
|
+
private readonly _decoration;
|
|
47
|
+
private markdownPart;
|
|
48
|
+
get codeblocks(): IChatCodeBlockInfo[];
|
|
49
|
+
get elementIndex(): number;
|
|
50
|
+
get contentIndex(): number;
|
|
51
|
+
constructor(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, terminalData: IChatTerminalToolInvocationData | ILegacyChatTerminalToolInvocationData, context: IChatContentPartRenderContext, renderer: IMarkdownRenderer, editorPool: EditorPool, currentWidthDelegate: () => number, codeBlockStartIndex: number, codeBlockModelCollection: CodeBlockModelCollection, _instantiationService: IInstantiationService, _terminalChatService: ITerminalChatService, _terminalService: ITerminalService, _contextKeyService: IContextKeyService, _chatWidgetService: IChatWidgetService, _keybindingService: IKeybindingService);
|
|
52
|
+
private _initializeTerminalActions;
|
|
53
|
+
private _addActions;
|
|
54
|
+
private _getResolvedCommand;
|
|
55
|
+
private _ensureShowOutputAction;
|
|
56
|
+
private _clearCommandAssociation;
|
|
57
|
+
private _registerInstanceListener;
|
|
58
|
+
private _removeFocusAction;
|
|
59
|
+
private _toggleOutput;
|
|
60
|
+
private _ensureTerminalInstance;
|
|
61
|
+
private _handleOutputFocus;
|
|
62
|
+
private _handleOutputBlur;
|
|
63
|
+
private _handleDispose;
|
|
64
|
+
getCommandAndOutputAsText(): string | undefined;
|
|
65
|
+
focusOutput(): void;
|
|
66
|
+
private _focusChatInput;
|
|
67
|
+
focusTerminal(): Promise<void>;
|
|
68
|
+
toggleOutputFromKeyboard(): Promise<void>;
|
|
69
|
+
private _toggleOutputFromAction;
|
|
70
|
+
private _collapseOutputAndFocusInput;
|
|
71
|
+
private _resolveCommand;
|
|
72
|
+
}
|
|
73
|
+
export declare class ToggleChatTerminalOutputAction extends Action implements IAction {
|
|
74
|
+
private readonly _toggle;
|
|
75
|
+
private readonly _keybindingService;
|
|
76
|
+
private readonly _telemetryService;
|
|
77
|
+
private _expanded;
|
|
78
|
+
constructor(_toggle: () => Promise<void>, _keybindingService: IKeybindingService, _telemetryService: ITelemetryService);
|
|
79
|
+
run(): Promise<void>;
|
|
80
|
+
syncPresentation(expanded: boolean): void;
|
|
81
|
+
refreshKeybindingTooltip(): void;
|
|
82
|
+
private _updatePresentation;
|
|
83
|
+
private _updateTooltip;
|
|
84
|
+
}
|
|
85
|
+
export declare class FocusChatInstanceAction extends Action implements IAction {
|
|
86
|
+
private _instance;
|
|
87
|
+
private _command;
|
|
88
|
+
private readonly _commandUri;
|
|
89
|
+
private readonly _commandId;
|
|
90
|
+
private readonly _terminalService;
|
|
91
|
+
private readonly _terminalEditorService;
|
|
92
|
+
private readonly _terminalGroupService;
|
|
93
|
+
private readonly _keybindingService;
|
|
94
|
+
private readonly _telemetryService;
|
|
95
|
+
constructor(_instance: ITerminalInstance | undefined, _command: ITerminalCommand | undefined, _commandUri: URI | undefined, _commandId: string | undefined, isTerminalHidden: boolean, _terminalService: ITerminalService, _terminalEditorService: ITerminalEditorService, _terminalGroupService: ITerminalGroupService, _keybindingService: IKeybindingService, _telemetryService: ITelemetryService);
|
|
96
|
+
run(): Promise<void>;
|
|
97
|
+
refreshKeybindingTooltip(): void;
|
|
98
|
+
private _resolveCommand;
|
|
99
|
+
private _updateTooltip;
|
|
100
|
+
}
|