@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,224 @@
|
|
|
1
|
+
|
|
2
|
+
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
|
+
import { $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
5
|
+
import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
6
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
7
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
|
+
import { createMarkdownCommandLink, escapeMarkdownSyntaxTokens, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
9
|
+
import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
10
|
+
import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
11
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
12
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
13
|
+
import { openLinkFromMarkdown } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer';
|
|
14
|
+
import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
|
|
15
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
16
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
17
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
18
|
+
import { McpCommandIds } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpCommandIds';
|
|
19
|
+
import { IMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
20
|
+
import { startServerAndWaitForLiveTools } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypesUtils';
|
|
21
|
+
import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel';
|
|
22
|
+
import { ChatProgressContentPart } from './chatProgressContentPart.js';
|
|
23
|
+
import * as chatMcpServersInteractionContent from './media/chatMcpServersInteractionContent.css';
|
|
24
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
25
|
+
|
|
26
|
+
registerCss(chatMcpServersInteractionContent);
|
|
27
|
+
let ChatMcpServersInteractionContentPart = class ChatMcpServersInteractionContentPart extends Disposable {
|
|
28
|
+
constructor(data, context, mcpService, instantiationService, _openerService, _markdownRendererService) {
|
|
29
|
+
super();
|
|
30
|
+
this.data = data;
|
|
31
|
+
this.context = context;
|
|
32
|
+
this.mcpService = mcpService;
|
|
33
|
+
this.instantiationService = instantiationService;
|
|
34
|
+
this._openerService = _openerService;
|
|
35
|
+
this._markdownRendererService = _markdownRendererService;
|
|
36
|
+
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
37
|
+
this.onDidChangeHeight = this._onDidChangeHeight.event;
|
|
38
|
+
this.interactionMd = this._register(( new MutableDisposable()));
|
|
39
|
+
this.showSpecificServersScheduler = this._register(( new RunOnceScheduler(() => this.updateDetailedProgress(this.data.state.get()), 2500)));
|
|
40
|
+
this.previousParts = ( new Lazy(() => {
|
|
41
|
+
if (!isResponseVM(this.context.element)) {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
return ( this.context.element.session.getItems()
|
|
45
|
+
.filter((r, i) => isResponseVM(r) && i < this.context.elementIndex)
|
|
46
|
+
.flatMap(i => i.response.value.filter(c => c.kind === 'mcpServersStarting'))
|
|
47
|
+
.map(p => p.state?.get()));
|
|
48
|
+
}));
|
|
49
|
+
this.domNode = $('.chat-mcp-servers-interaction');
|
|
50
|
+
if (data.state) {
|
|
51
|
+
this._register(autorun(reader => {
|
|
52
|
+
const state = data.state.read(reader);
|
|
53
|
+
this.updateForState(state);
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
updateForState(state) {
|
|
58
|
+
if (!state.working) {
|
|
59
|
+
this.workingProgressPart?.domNode.remove();
|
|
60
|
+
this.workingProgressPart = undefined;
|
|
61
|
+
this.showSpecificServersScheduler.cancel();
|
|
62
|
+
}
|
|
63
|
+
else if (!this.workingProgressPart) {
|
|
64
|
+
if (!this.showSpecificServersScheduler.isScheduled()) {
|
|
65
|
+
this.showSpecificServersScheduler.schedule();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else if (this.workingProgressPart) {
|
|
69
|
+
this.updateDetailedProgress(state);
|
|
70
|
+
}
|
|
71
|
+
const requiringInteraction = state.serversRequiringInteraction.filter(s => {
|
|
72
|
+
if (this.data.didStartServerIds?.includes(s.id)) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (( this.previousParts.value.some(p => p?.serversRequiringInteraction.some(s2 => s.id === s2.id)))) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
return true;
|
|
79
|
+
});
|
|
80
|
+
if (requiringInteraction.length > 0) {
|
|
81
|
+
if (!this.interactionMd.value) {
|
|
82
|
+
this.renderInteractionRequired(requiringInteraction);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
this.updateInteractionRequired(this.interactionMd.value.element, requiringInteraction);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else if (requiringInteraction.length === 0 && this.interactionContainer) {
|
|
89
|
+
this.interactionContainer.remove();
|
|
90
|
+
this.interactionContainer = undefined;
|
|
91
|
+
}
|
|
92
|
+
this._onDidChangeHeight.fire();
|
|
93
|
+
}
|
|
94
|
+
createServerCommandLinks(servers) {
|
|
95
|
+
return ( servers.map(s => createMarkdownCommandLink({
|
|
96
|
+
title: '`' + escapeMarkdownSyntaxTokens(s.label) + '`',
|
|
97
|
+
id: McpCommandIds.ServerOptions,
|
|
98
|
+
arguments: [s.id],
|
|
99
|
+
}, false))).join(', ');
|
|
100
|
+
}
|
|
101
|
+
updateDetailedProgress(state) {
|
|
102
|
+
const skipText = createMarkdownCommandLink({
|
|
103
|
+
title: ( localize(5066, 'Skip?')),
|
|
104
|
+
id: McpCommandIds.SkipCurrentAutostart,
|
|
105
|
+
});
|
|
106
|
+
let content;
|
|
107
|
+
if (state.starting.length === 0) {
|
|
108
|
+
content = ( new MarkdownString(undefined, { isTrusted: true })).appendText(( localize(5067, 'Activating MCP extensions...')) + ' ').appendMarkdown(skipText);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
const serverLinks = this.createServerCommandLinks(state.starting);
|
|
112
|
+
content = ( new MarkdownString(undefined, { isTrusted: true })).appendMarkdown(( localize(5068, 'Starting MCP servers {0}...', serverLinks)) + ' ').appendMarkdown(skipText);
|
|
113
|
+
}
|
|
114
|
+
if (this.workingProgressPart) {
|
|
115
|
+
this.workingProgressPart.updateMessage(content);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
this.workingProgressPart = this._register(this.instantiationService.createInstance(ChatProgressContentPart, { kind: 'progressMessage', content }, this._markdownRendererService, this.context, true,
|
|
119
|
+
true,
|
|
120
|
+
undefined,
|
|
121
|
+
undefined));
|
|
122
|
+
this.domNode.appendChild(this.workingProgressPart.domNode);
|
|
123
|
+
}
|
|
124
|
+
this._onDidChangeHeight.fire();
|
|
125
|
+
}
|
|
126
|
+
renderInteractionRequired(serversRequiringInteraction) {
|
|
127
|
+
this.interactionContainer = $('.chat-mcp-servers-interaction-hint');
|
|
128
|
+
const messageContainer = $('.chat-mcp-servers-message');
|
|
129
|
+
const icon = $('.chat-mcp-servers-icon');
|
|
130
|
+
icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.mcp));
|
|
131
|
+
const { messageMd } = this.createInteractionMessage(serversRequiringInteraction);
|
|
132
|
+
messageContainer.appendChild(icon);
|
|
133
|
+
messageContainer.appendChild(messageMd.element);
|
|
134
|
+
this.interactionContainer.appendChild(messageContainer);
|
|
135
|
+
this.domNode.prepend(this.interactionContainer);
|
|
136
|
+
}
|
|
137
|
+
updateInteractionRequired(oldElement, serversRequiringInteraction) {
|
|
138
|
+
const { messageMd } = this.createInteractionMessage(serversRequiringInteraction);
|
|
139
|
+
oldElement.replaceWith(messageMd.element);
|
|
140
|
+
}
|
|
141
|
+
createInteractionMessage(serversRequiringInteraction) {
|
|
142
|
+
const count = serversRequiringInteraction.length;
|
|
143
|
+
const links = this.createServerCommandLinks(serversRequiringInteraction);
|
|
144
|
+
const content = count === 1
|
|
145
|
+
? ( localize(
|
|
146
|
+
5069,
|
|
147
|
+
'The MCP server {0} may have new tools and requires interaction to start. [Start it now?]({1})',
|
|
148
|
+
links,
|
|
149
|
+
'#start'
|
|
150
|
+
))
|
|
151
|
+
: ( localize(
|
|
152
|
+
5070,
|
|
153
|
+
'The MCP servers {0} may have new tools and require interaction to start. [Start them now?]({1})',
|
|
154
|
+
links,
|
|
155
|
+
'#start'
|
|
156
|
+
));
|
|
157
|
+
const str = ( new MarkdownString(content, { isTrusted: true }));
|
|
158
|
+
const messageMd = this.interactionMd.value = this._markdownRendererService.render(str, {
|
|
159
|
+
asyncRenderCallback: () => this._onDidChangeHeight.fire(),
|
|
160
|
+
actionHandler: (content) => {
|
|
161
|
+
if (!content.startsWith('command:')) {
|
|
162
|
+
this._start(startLink);
|
|
163
|
+
return Promise.resolve(true);
|
|
164
|
+
}
|
|
165
|
+
return openLinkFromMarkdown(this._openerService, content, true);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
const startLink = [...messageMd.element.querySelectorAll('a')].find(a => !a.getAttribute('data-href')?.startsWith('command:'));
|
|
169
|
+
if (!startLink) {
|
|
170
|
+
return { messageMd, startLink: undefined };
|
|
171
|
+
}
|
|
172
|
+
startLink.setAttribute('role', 'button');
|
|
173
|
+
startLink.href = '';
|
|
174
|
+
return { messageMd, startLink };
|
|
175
|
+
}
|
|
176
|
+
async _start(startLink) {
|
|
177
|
+
startLink.style.pointerEvents = 'none';
|
|
178
|
+
startLink.style.opacity = '0.7';
|
|
179
|
+
try {
|
|
180
|
+
if (!this.data.state) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const state = this.data.state.get();
|
|
184
|
+
const serversToStart = state.serversRequiringInteraction;
|
|
185
|
+
for (let i = 0; i < serversToStart.length; i++) {
|
|
186
|
+
const serverInfo = serversToStart[i];
|
|
187
|
+
startLink.textContent = ( localize(5071, "Starting {0}...", serverInfo.label));
|
|
188
|
+
this._onDidChangeHeight.fire();
|
|
189
|
+
const server = this.mcpService.servers.get().find(s => s.definition.id === serverInfo.id);
|
|
190
|
+
if (server) {
|
|
191
|
+
await startServerAndWaitForLiveTools(server, { promptType: 'all-untrusted' });
|
|
192
|
+
this.data.didStartServerIds ??= [];
|
|
193
|
+
this.data.didStartServerIds.push(serverInfo.id);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (this.interactionContainer) {
|
|
197
|
+
this.interactionContainer.remove();
|
|
198
|
+
this.interactionContainer = undefined;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
startLink.style.pointerEvents = '';
|
|
203
|
+
startLink.style.opacity = '';
|
|
204
|
+
startLink.textContent = 'Start now?';
|
|
205
|
+
}
|
|
206
|
+
finally {
|
|
207
|
+
this._onDidChangeHeight.fire();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
hasSameContent(other) {
|
|
211
|
+
return other.kind === 'mcpServersStarting';
|
|
212
|
+
}
|
|
213
|
+
addDisposable(disposable) {
|
|
214
|
+
this._register(disposable);
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
ChatMcpServersInteractionContentPart = ( __decorate([
|
|
218
|
+
( __param(2, IMcpService)),
|
|
219
|
+
( __param(3, IInstantiationService)),
|
|
220
|
+
( __param(4, IOpenerService)),
|
|
221
|
+
( __param(5, IMarkdownRendererService))
|
|
222
|
+
], ChatMcpServersInteractionContentPart));
|
|
223
|
+
|
|
224
|
+
export { ChatMcpServersInteractionContentPart };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
+
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
4
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
5
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
7
|
+
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
8
|
+
import { IChatMultiDiffData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
9
|
+
import { IChatRendererContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel";
|
|
10
|
+
import { ChatTreeItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
11
|
+
import { IChatContentPart } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
12
|
+
export declare class ChatMultiDiffContentPart extends Disposable implements IChatContentPart {
|
|
13
|
+
private readonly content;
|
|
14
|
+
private readonly _element;
|
|
15
|
+
private readonly instantiationService;
|
|
16
|
+
private readonly editorService;
|
|
17
|
+
private readonly themeService;
|
|
18
|
+
private readonly menuService;
|
|
19
|
+
private readonly contextKeyService;
|
|
20
|
+
readonly domNode: HTMLElement;
|
|
21
|
+
private readonly _onDidChangeHeight;
|
|
22
|
+
readonly onDidChangeHeight: Event<void>;
|
|
23
|
+
private list;
|
|
24
|
+
private isCollapsed;
|
|
25
|
+
private readonly readOnly;
|
|
26
|
+
private readonly diffData;
|
|
27
|
+
constructor(content: IChatMultiDiffData, _element: ChatTreeItem, instantiationService: IInstantiationService, editorService: IEditorService, themeService: IThemeService, menuService: IMenuService, contextKeyService: IContextKeyService);
|
|
28
|
+
private renderHeader;
|
|
29
|
+
private renderViewAllFileChangesButton;
|
|
30
|
+
private renderContributedButtons;
|
|
31
|
+
private renderFilesList;
|
|
32
|
+
hasSameContent(other: IChatRendererContent): boolean;
|
|
33
|
+
addDisposable(disposable: IDisposable): void;
|
|
34
|
+
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.js
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { $ as $$1, addDisposableListener, EventHelper } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { ActionBar, ActionsOrientation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
5
|
+
import { ButtonWithIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
6
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
7
|
+
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
|
+
import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
|
+
import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
10
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
11
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
12
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
13
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
14
|
+
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
15
|
+
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
16
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
17
|
+
import { FileKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
18
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
19
|
+
import { WorkbenchList } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
20
|
+
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
21
|
+
import { ResourceLabels } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/labels';
|
|
22
|
+
import { SIDE_GROUP, ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
23
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
24
|
+
import { createFileIconThemableTreeContainerScope } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/views/explorerView';
|
|
25
|
+
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
26
|
+
import { MultiDiffEditorItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService';
|
|
27
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
28
|
+
import { getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatUri';
|
|
29
|
+
import { constObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/constObservable';
|
|
30
|
+
import { isObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/utils';
|
|
31
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
32
|
+
|
|
33
|
+
const $ = $$1;
|
|
34
|
+
const ELEMENT_HEIGHT = 22;
|
|
35
|
+
const MAX_ITEMS_SHOWN = 6;
|
|
36
|
+
let ChatMultiDiffContentPart = class ChatMultiDiffContentPart extends Disposable {
|
|
37
|
+
constructor(content, _element, instantiationService, editorService, themeService, menuService, contextKeyService) {
|
|
38
|
+
super();
|
|
39
|
+
this.content = content;
|
|
40
|
+
this._element = _element;
|
|
41
|
+
this.instantiationService = instantiationService;
|
|
42
|
+
this.editorService = editorService;
|
|
43
|
+
this.themeService = themeService;
|
|
44
|
+
this.menuService = menuService;
|
|
45
|
+
this.contextKeyService = contextKeyService;
|
|
46
|
+
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
47
|
+
this.onDidChangeHeight = this._onDidChangeHeight.event;
|
|
48
|
+
this.isCollapsed = false;
|
|
49
|
+
this.readOnly = content.readOnly ?? false;
|
|
50
|
+
this.diffData = isObservable(this.content.multiDiffData)
|
|
51
|
+
? ( this.content.multiDiffData.map(d => d))
|
|
52
|
+
: constObservable(this.content.multiDiffData);
|
|
53
|
+
const headerDomNode = $('.checkpoint-file-changes-summary-header');
|
|
54
|
+
this.domNode = $('.checkpoint-file-changes-summary', undefined, headerDomNode);
|
|
55
|
+
this.domNode.tabIndex = 0;
|
|
56
|
+
this.isCollapsed = content?.collapsed ?? false;
|
|
57
|
+
this._register(this.renderHeader(headerDomNode));
|
|
58
|
+
this._register(this.renderFilesList(this.domNode));
|
|
59
|
+
}
|
|
60
|
+
renderHeader(container) {
|
|
61
|
+
const viewListButtonContainer = container.appendChild($('.chat-file-changes-label'));
|
|
62
|
+
const viewListButton = ( new ButtonWithIcon(viewListButtonContainer, {}));
|
|
63
|
+
this._register(autorun(reader => {
|
|
64
|
+
const fileCount = this.diffData.read(reader).resources.length;
|
|
65
|
+
viewListButton.label = fileCount === 1
|
|
66
|
+
? ( localize(5072, 'Changed 1 file'))
|
|
67
|
+
: ( localize(5073, 'Changed {0} files', fileCount));
|
|
68
|
+
}));
|
|
69
|
+
const setExpansionState = () => {
|
|
70
|
+
viewListButton.icon = this.isCollapsed ? Codicon.chevronRight : Codicon.chevronDown;
|
|
71
|
+
this.domNode.classList.toggle('chat-file-changes-collapsed', this.isCollapsed);
|
|
72
|
+
this._onDidChangeHeight.fire();
|
|
73
|
+
};
|
|
74
|
+
setExpansionState();
|
|
75
|
+
const disposables = ( new DisposableStore());
|
|
76
|
+
disposables.add(viewListButton);
|
|
77
|
+
disposables.add(viewListButton.onDidClick(() => {
|
|
78
|
+
this.isCollapsed = !this.isCollapsed;
|
|
79
|
+
setExpansionState();
|
|
80
|
+
}));
|
|
81
|
+
if (!this.readOnly) {
|
|
82
|
+
disposables.add(this.renderViewAllFileChangesButton(viewListButton.element));
|
|
83
|
+
}
|
|
84
|
+
disposables.add(this.renderContributedButtons(viewListButton.element));
|
|
85
|
+
return toDisposable(() => disposables.dispose());
|
|
86
|
+
}
|
|
87
|
+
renderViewAllFileChangesButton(container) {
|
|
88
|
+
const button = container.appendChild($('.chat-view-changes-icon'));
|
|
89
|
+
button.classList.add(...ThemeIcon.asClassNameArray(Codicon.diffMultiple));
|
|
90
|
+
button.title = ( localize(5074, 'Open Changes'));
|
|
91
|
+
return addDisposableListener(button, 'click', (e) => {
|
|
92
|
+
const source = ( URI.parse(`multi-diff-editor:${( ( new Date()).getMilliseconds().toString()) + ( Math.random().toString())}`));
|
|
93
|
+
const { title, resources } = this.diffData.get();
|
|
94
|
+
const input = this.instantiationService.createInstance(MultiDiffEditorInput, source, title || 'Multi-Diff', ( resources.map(resource => ( new MultiDiffEditorItem(resource.originalUri, resource.modifiedUri, resource.goToFileUri)))), false);
|
|
95
|
+
const sideBySide = e.altKey;
|
|
96
|
+
this.editorService.openEditor(input, sideBySide ? SIDE_GROUP : ACTIVE_GROUP);
|
|
97
|
+
EventHelper.stop(e, true);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
renderContributedButtons(container) {
|
|
101
|
+
const buttonsContainer = container.appendChild($('.chat-multidiff-contributed-buttons'));
|
|
102
|
+
const disposables = ( new DisposableStore());
|
|
103
|
+
const actionBar = disposables.add(( new ActionBar(buttonsContainer, {
|
|
104
|
+
orientation: ActionsOrientation.HORIZONTAL
|
|
105
|
+
})));
|
|
106
|
+
const setupActionBar = () => {
|
|
107
|
+
actionBar.clear();
|
|
108
|
+
const type = getChatSessionType(this._element.sessionResource);
|
|
109
|
+
let marshalledUri = undefined;
|
|
110
|
+
let contextKeyService = this.contextKeyService;
|
|
111
|
+
contextKeyService = this.contextKeyService.createOverlay([
|
|
112
|
+
[ChatContextKeys.agentSessionType.key, type]
|
|
113
|
+
]);
|
|
114
|
+
marshalledUri = {
|
|
115
|
+
...this._element.sessionResource,
|
|
116
|
+
$mid: MarshalledId.Uri
|
|
117
|
+
};
|
|
118
|
+
const actions = this.menuService.getMenuActions(MenuId.ChatMultiDiffContext, contextKeyService, { arg: marshalledUri, shouldForwardArgs: true });
|
|
119
|
+
const allActions = actions.flatMap(([, actions]) => actions);
|
|
120
|
+
if (allActions.length > 0) {
|
|
121
|
+
actionBar.push(allActions, { icon: true, label: false });
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
setupActionBar();
|
|
125
|
+
return disposables;
|
|
126
|
+
}
|
|
127
|
+
renderFilesList(container) {
|
|
128
|
+
const store = ( new DisposableStore());
|
|
129
|
+
const listContainer = container.appendChild($('.chat-summary-list'));
|
|
130
|
+
store.add(createFileIconThemableTreeContainerScope(listContainer, this.themeService));
|
|
131
|
+
const resourceLabels = store.add(this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: Event.None }));
|
|
132
|
+
this.list = store.add(this.instantiationService.createInstance((WorkbenchList), 'ChatMultiDiffList', listContainer, ( new ChatMultiDiffListDelegate()), [this.instantiationService.createInstance(ChatMultiDiffListRenderer, resourceLabels)], {
|
|
133
|
+
identityProvider: {
|
|
134
|
+
getId: (element) => ( element.uri.toString())
|
|
135
|
+
},
|
|
136
|
+
setRowLineHeight: true,
|
|
137
|
+
horizontalScrolling: false,
|
|
138
|
+
supportDynamicHeights: false,
|
|
139
|
+
mouseSupport: !this.readOnly,
|
|
140
|
+
alwaysConsumeMouseWheel: false,
|
|
141
|
+
accessibilityProvider: {
|
|
142
|
+
getAriaLabel: (element) => element.uri.path,
|
|
143
|
+
getWidgetAriaLabel: () => ( localize(5075, "File Changes"))
|
|
144
|
+
}
|
|
145
|
+
}));
|
|
146
|
+
this._register(autorun(reader => {
|
|
147
|
+
const { resources } = this.diffData.read(reader);
|
|
148
|
+
const items = [];
|
|
149
|
+
for (const resource of resources) {
|
|
150
|
+
const uri = resource.modifiedUri || resource.originalUri || resource.goToFileUri;
|
|
151
|
+
if (!uri) {
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
const item = { uri };
|
|
155
|
+
if (resource.originalUri && resource.modifiedUri) {
|
|
156
|
+
item.diff = {
|
|
157
|
+
originalURI: resource.originalUri,
|
|
158
|
+
modifiedURI: resource.modifiedUri,
|
|
159
|
+
isFinal: true,
|
|
160
|
+
quitEarly: false,
|
|
161
|
+
identical: false,
|
|
162
|
+
added: resource.added || 0,
|
|
163
|
+
removed: resource.removed || 0,
|
|
164
|
+
isBusy: false,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
items.push(item);
|
|
168
|
+
}
|
|
169
|
+
this.list.splice(0, this.list.length, items);
|
|
170
|
+
const height = Math.min(items.length, MAX_ITEMS_SHOWN) * ELEMENT_HEIGHT;
|
|
171
|
+
this.list.layout(height);
|
|
172
|
+
listContainer.style.height = `${height}px`;
|
|
173
|
+
this._onDidChangeHeight.fire();
|
|
174
|
+
}));
|
|
175
|
+
if (!this.readOnly) {
|
|
176
|
+
store.add(this.list.onDidOpen((e) => {
|
|
177
|
+
if (!e.element) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
if (e.element.diff) {
|
|
181
|
+
this.editorService.openEditor({
|
|
182
|
+
original: { resource: e.element.diff.originalURI },
|
|
183
|
+
modified: { resource: e.element.diff.modifiedURI },
|
|
184
|
+
options: { preserveFocus: true }
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
this.editorService.openEditor({
|
|
189
|
+
resource: e.element.uri,
|
|
190
|
+
options: { preserveFocus: true }
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}));
|
|
194
|
+
}
|
|
195
|
+
return store;
|
|
196
|
+
}
|
|
197
|
+
hasSameContent(other) {
|
|
198
|
+
return other.kind === 'multiDiffData' && this.diffData.get().resources.length === (isObservable(other.multiDiffData) ? other.multiDiffData.get().resources.length : other.multiDiffData.resources.length);
|
|
199
|
+
}
|
|
200
|
+
addDisposable(disposable) {
|
|
201
|
+
this._register(disposable);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
ChatMultiDiffContentPart = ( __decorate([
|
|
205
|
+
( __param(2, IInstantiationService)),
|
|
206
|
+
( __param(3, IEditorService)),
|
|
207
|
+
( __param(4, IThemeService)),
|
|
208
|
+
( __param(5, IMenuService)),
|
|
209
|
+
( __param(6, IContextKeyService))
|
|
210
|
+
], ChatMultiDiffContentPart));
|
|
211
|
+
class ChatMultiDiffListDelegate {
|
|
212
|
+
getHeight() {
|
|
213
|
+
return 22;
|
|
214
|
+
}
|
|
215
|
+
getTemplateId() {
|
|
216
|
+
return 'chatMultiDiffItem';
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
class ChatMultiDiffListRenderer {
|
|
220
|
+
static { this.TEMPLATE_ID = 'chatMultiDiffItem'; }
|
|
221
|
+
static { this.CHANGES_SUMMARY_CLASS_NAME = 'insertions-and-deletions'; }
|
|
222
|
+
constructor(labels) {
|
|
223
|
+
this.labels = labels;
|
|
224
|
+
this.templateId = ChatMultiDiffListRenderer.TEMPLATE_ID;
|
|
225
|
+
}
|
|
226
|
+
renderTemplate(container) {
|
|
227
|
+
const label = this.labels.create(container, { supportHighlights: true, supportIcons: true });
|
|
228
|
+
return {
|
|
229
|
+
label,
|
|
230
|
+
dispose: () => label.dispose()
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
renderElement(element, _index, templateData) {
|
|
234
|
+
templateData.label.setFile(element.uri, {
|
|
235
|
+
fileKind: FileKind.FILE,
|
|
236
|
+
title: element.uri.path
|
|
237
|
+
});
|
|
238
|
+
const labelElement = templateData.label.element;
|
|
239
|
+
labelElement.querySelector(`.${ChatMultiDiffListRenderer.CHANGES_SUMMARY_CLASS_NAME}`)?.remove();
|
|
240
|
+
if (element.diff?.added || element.diff?.removed) {
|
|
241
|
+
const changesSummary = labelElement.appendChild($(`.${ChatMultiDiffListRenderer.CHANGES_SUMMARY_CLASS_NAME}`));
|
|
242
|
+
const addedElement = changesSummary.appendChild($('.insertions'));
|
|
243
|
+
addedElement.textContent = `+${element.diff.added}`;
|
|
244
|
+
const removedElement = changesSummary.appendChild($('.deletions'));
|
|
245
|
+
removedElement.textContent = `-${element.diff.removed}`;
|
|
246
|
+
changesSummary.setAttribute('aria-label', ( localize(
|
|
247
|
+
5076,
|
|
248
|
+
'{0} lines added, {1} lines removed',
|
|
249
|
+
element.diff.added,
|
|
250
|
+
element.diff.removed
|
|
251
|
+
)));
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
disposeTemplate(templateData) {
|
|
255
|
+
templateData.dispose();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export { ChatMultiDiffContentPart };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { MarkdownString, type IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
2
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
|
|
4
|
+
import { IMarkdownRenderer } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer";
|
|
5
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { IChatProgressMessage, IChatTask, IChatTaskSerialized, IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
7
|
+
import { IChatRendererContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel";
|
|
8
|
+
import { ChatTreeItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
9
|
+
import { IChatContentPart, IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
10
|
+
import { IChatMarkdownAnchorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service";
|
|
11
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
12
|
+
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
13
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service";
|
|
14
|
+
export declare class ChatProgressContentPart extends Disposable implements IChatContentPart {
|
|
15
|
+
private readonly chatContentMarkdownRenderer;
|
|
16
|
+
private readonly toolInvocation;
|
|
17
|
+
private readonly instantiationService;
|
|
18
|
+
private readonly chatMarkdownAnchorService;
|
|
19
|
+
private readonly configurationService;
|
|
20
|
+
readonly domNode: HTMLElement;
|
|
21
|
+
private readonly showSpinner;
|
|
22
|
+
private readonly isHidden;
|
|
23
|
+
private readonly renderedMessage;
|
|
24
|
+
constructor(progress: IChatProgressMessage | IChatTask | IChatTaskSerialized, chatContentMarkdownRenderer: IMarkdownRenderer, context: IChatContentPartRenderContext, forceShowSpinner: boolean | undefined, forceShowMessage: boolean | undefined, icon: ThemeIcon | undefined, toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized | undefined, instantiationService: IInstantiationService, chatMarkdownAnchorService: IChatMarkdownAnchorService, configurationService: IConfigurationService);
|
|
25
|
+
updateMessage(content: MarkdownString): void;
|
|
26
|
+
hasSameContent(other: IChatRendererContent, followingContent: IChatRendererContent[], element: ChatTreeItem): boolean;
|
|
27
|
+
private createApprovalMessage;
|
|
28
|
+
}
|
|
29
|
+
export declare class ChatProgressSubPart extends Disposable {
|
|
30
|
+
readonly domNode: HTMLElement;
|
|
31
|
+
constructor(messageElement: HTMLElement, icon: ThemeIcon, tooltip: IMarkdownString | string | undefined, hoverService: IHoverService);
|
|
32
|
+
}
|
|
33
|
+
export declare class ChatWorkingProgressContentPart extends ChatProgressContentPart implements IChatContentPart {
|
|
34
|
+
constructor(_workingProgress: {
|
|
35
|
+
kind: "working";
|
|
36
|
+
}, chatContentMarkdownRenderer: IMarkdownRenderer, context: IChatContentPartRenderContext, instantiationService: IInstantiationService, chatMarkdownAnchorService: IChatMarkdownAnchorService, configurationService: IConfigurationService, languageModelToolsService: ILanguageModelToolsService);
|
|
37
|
+
hasSameContent(other: IChatRendererContent, followingContent: IChatRendererContent[], element: ChatTreeItem): boolean;
|
|
38
|
+
}
|