@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 { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { $, h } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { basename, joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
8
|
+
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
9
|
+
import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
|
+
import { MenuWorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
11
|
+
import { MenuId, Action2, registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
12
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
13
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
14
|
+
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
15
|
+
import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
16
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
17
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
18
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
19
|
+
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
20
|
+
import { ProgressLocation } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
|
|
21
|
+
import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
|
|
22
|
+
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
23
|
+
import { REVEAL_IN_EXPLORER_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/fileConstants';
|
|
24
|
+
import { getAttachableImageExtension } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
25
|
+
import { ChatAttachmentsContentPart } from './chatAttachmentsContentPart.js';
|
|
26
|
+
|
|
27
|
+
let ChatToolOutputContentSubPart = class ChatToolOutputContentSubPart extends Disposable {
|
|
28
|
+
constructor(context, parts, contextKeyService, _instantiationService, _contextMenuService, _fileService) {
|
|
29
|
+
super();
|
|
30
|
+
this.context = context;
|
|
31
|
+
this.parts = parts;
|
|
32
|
+
this.contextKeyService = contextKeyService;
|
|
33
|
+
this._instantiationService = _instantiationService;
|
|
34
|
+
this._contextMenuService = _contextMenuService;
|
|
35
|
+
this._fileService = _fileService;
|
|
36
|
+
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
37
|
+
this.onDidChangeHeight = this._onDidChangeHeight.event;
|
|
38
|
+
this._currentWidth = 0;
|
|
39
|
+
this._editorReferences = [];
|
|
40
|
+
this.codeblocks = [];
|
|
41
|
+
this.domNode = this.createOutputContents();
|
|
42
|
+
this._currentWidth = context.currentWidth();
|
|
43
|
+
}
|
|
44
|
+
createOutputContents() {
|
|
45
|
+
const container = $('div');
|
|
46
|
+
for (let i = 0; i < this.parts.length; i++) {
|
|
47
|
+
const part = this.parts[i];
|
|
48
|
+
if (part.kind === 'code') {
|
|
49
|
+
this.addCodeBlock(part, container);
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const group = [];
|
|
53
|
+
for (let k = i; k < this.parts.length; k++) {
|
|
54
|
+
const part = this.parts[k];
|
|
55
|
+
if (part.kind !== 'data') {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
group.push(part);
|
|
59
|
+
}
|
|
60
|
+
this.addResourceGroup(group, container);
|
|
61
|
+
i += group.length - 1;
|
|
62
|
+
}
|
|
63
|
+
return container;
|
|
64
|
+
}
|
|
65
|
+
addResourceGroup(parts, container) {
|
|
66
|
+
const el = h('.chat-collapsible-io-resource-group', [
|
|
67
|
+
h('.chat-collapsible-io-resource-items@items'),
|
|
68
|
+
h('.chat-collapsible-io-resource-actions@actions'),
|
|
69
|
+
]);
|
|
70
|
+
this.fillInResourceGroup(parts, el.items, el.actions).then(() => this._onDidChangeHeight.fire());
|
|
71
|
+
container.appendChild(el.root);
|
|
72
|
+
return el.root;
|
|
73
|
+
}
|
|
74
|
+
async fillInResourceGroup(parts, itemsContainer, actionsContainer) {
|
|
75
|
+
const entries = await Promise.all(( parts.map(async (part) => {
|
|
76
|
+
if (part.mimeType && getAttachableImageExtension(part.mimeType)) {
|
|
77
|
+
const value = part.value ?? (await this._fileService.readFile(part.uri).then(f => f.value.buffer, () => undefined));
|
|
78
|
+
return { kind: 'image', id: generateUuid(), name: basename(part.uri), value, mimeType: part.mimeType, isURL: false, references: [{ kind: 'reference', reference: part.uri }] };
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
return { kind: 'file', id: generateUuid(), name: basename(part.uri), fullName: part.uri.path, value: part.uri };
|
|
82
|
+
}
|
|
83
|
+
})));
|
|
84
|
+
const attachments = this._register(this._instantiationService.createInstance(ChatAttachmentsContentPart, {
|
|
85
|
+
variables: entries,
|
|
86
|
+
limit: 5,
|
|
87
|
+
contentReferences: undefined,
|
|
88
|
+
domNode: undefined
|
|
89
|
+
}));
|
|
90
|
+
attachments.contextMenuHandler = (attachment, event) => {
|
|
91
|
+
const index = entries.indexOf(attachment);
|
|
92
|
+
const part = parts[index];
|
|
93
|
+
if (part) {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
event.stopPropagation();
|
|
96
|
+
this._contextMenuService.showContextMenu({
|
|
97
|
+
menuId: MenuId.ChatToolOutputResourceContext,
|
|
98
|
+
menuActionOptions: { shouldForwardArgs: true },
|
|
99
|
+
getAnchor: () => ({ x: event.pageX, y: event.pageY }),
|
|
100
|
+
getActionsContext: () => ({ parts: [part] }),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
itemsContainer.appendChild(attachments.domNode);
|
|
105
|
+
const toolbar = this._register(this._instantiationService.createInstance(MenuWorkbenchToolBar, actionsContainer, MenuId.ChatToolOutputResourceToolbar, {
|
|
106
|
+
menuOptions: {
|
|
107
|
+
shouldForwardArgs: true,
|
|
108
|
+
},
|
|
109
|
+
}));
|
|
110
|
+
toolbar.context = { parts };
|
|
111
|
+
}
|
|
112
|
+
addCodeBlock(part, container) {
|
|
113
|
+
const data = {
|
|
114
|
+
languageId: part.languageId,
|
|
115
|
+
textModel: Promise.resolve(part.textModel),
|
|
116
|
+
codeBlockIndex: part.codeBlockInfo.codeBlockIndex,
|
|
117
|
+
codeBlockPartIndex: 0,
|
|
118
|
+
element: this.context.element,
|
|
119
|
+
parentContextKeyService: this.contextKeyService,
|
|
120
|
+
renderOptions: part.options,
|
|
121
|
+
chatSessionResource: this.context.element.sessionResource,
|
|
122
|
+
};
|
|
123
|
+
const editorReference = this._register(this.context.editorPool.get());
|
|
124
|
+
editorReference.object.render(data, this._currentWidth || 300);
|
|
125
|
+
this._register(editorReference.object.onDidChangeContentHeight(() => this._onDidChangeHeight.fire()));
|
|
126
|
+
container.appendChild(editorReference.object.element);
|
|
127
|
+
this._editorReferences.push(editorReference);
|
|
128
|
+
this.codeblocks.push(part.codeBlockInfo);
|
|
129
|
+
}
|
|
130
|
+
layout(width) {
|
|
131
|
+
this._currentWidth = width;
|
|
132
|
+
this._editorReferences.forEach(r => r.object.layout(width));
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
ChatToolOutputContentSubPart = ( __decorate([
|
|
136
|
+
( __param(2, IContextKeyService)),
|
|
137
|
+
( __param(3, IInstantiationService)),
|
|
138
|
+
( __param(4, IContextMenuService)),
|
|
139
|
+
( __param(5, IFileService))
|
|
140
|
+
], ChatToolOutputContentSubPart));
|
|
141
|
+
class SaveResourcesAction extends Action2 {
|
|
142
|
+
static { this.ID = 'chat.toolOutput.save'; }
|
|
143
|
+
constructor() {
|
|
144
|
+
super({
|
|
145
|
+
id: SaveResourcesAction.ID,
|
|
146
|
+
title: ( localize2(5121, "Save As...")),
|
|
147
|
+
icon: Codicon.cloudDownload,
|
|
148
|
+
menu: [{
|
|
149
|
+
id: MenuId.ChatToolOutputResourceToolbar,
|
|
150
|
+
group: 'navigation',
|
|
151
|
+
order: 1
|
|
152
|
+
}, {
|
|
153
|
+
id: MenuId.ChatToolOutputResourceContext,
|
|
154
|
+
}]
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
async run(accessor, context) {
|
|
158
|
+
const fileDialog = accessor.get(IFileDialogService);
|
|
159
|
+
const fileService = accessor.get(IFileService);
|
|
160
|
+
const notificationService = accessor.get(INotificationService);
|
|
161
|
+
const progressService = accessor.get(IProgressService);
|
|
162
|
+
const workspaceContextService = accessor.get(IWorkspaceContextService);
|
|
163
|
+
const commandService = accessor.get(ICommandService);
|
|
164
|
+
const labelService = accessor.get(ILabelService);
|
|
165
|
+
const defaultFilepath = await fileDialog.defaultFilePath();
|
|
166
|
+
const savePart = async (part, isFolder, uri) => {
|
|
167
|
+
const target = isFolder ? joinPath(uri, basename(part.uri)) : uri;
|
|
168
|
+
try {
|
|
169
|
+
if (part.kind === 'data') {
|
|
170
|
+
await fileService.copy(part.uri, target, true);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
const contents = await fileService.readFile(part.uri);
|
|
174
|
+
await fileService.writeFile(target, contents.value);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
catch (e) {
|
|
178
|
+
notificationService.error(( localize(5122, "Failed to save {0}: {1}", basename(part.uri), e)));
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
const withProgress = async (thenReveal, todo) => {
|
|
182
|
+
await progressService.withProgress({
|
|
183
|
+
location: ProgressLocation.Notification,
|
|
184
|
+
delay: 5_000,
|
|
185
|
+
title: ( localize(5123, "Saving resources...")),
|
|
186
|
+
}, async (report) => {
|
|
187
|
+
for (const task of todo) {
|
|
188
|
+
await task();
|
|
189
|
+
report.report({ increment: 1, total: todo.length });
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
if (workspaceContextService.isInsideWorkspace(thenReveal)) {
|
|
193
|
+
commandService.executeCommand(REVEAL_IN_EXPLORER_COMMAND_ID, thenReveal);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
notificationService.info(( localize(5124, "Saved resources to {0}", labelService.getUriLabel(thenReveal))));
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
if (context.parts.length === 1) {
|
|
200
|
+
const part = context.parts[0];
|
|
201
|
+
const uri = await fileDialog.pickFileToSave(joinPath(defaultFilepath, basename(part.uri)));
|
|
202
|
+
if (!uri) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
await withProgress(uri, [() => savePart(part, false, uri)]);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
const uris = await fileDialog.showOpenDialog({
|
|
209
|
+
title: ( localize(5125, "Pick folder to save resources")),
|
|
210
|
+
canSelectFiles: false,
|
|
211
|
+
canSelectFolders: true,
|
|
212
|
+
canSelectMany: false,
|
|
213
|
+
defaultUri: workspaceContextService.getWorkspace().folders[0]?.uri,
|
|
214
|
+
});
|
|
215
|
+
if (!uris?.length) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
await withProgress(uris[0], ( context.parts.map(part => () => savePart(part, true, uris[0]))));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
registerAction2(SaveResourcesAction);
|
|
223
|
+
|
|
224
|
+
export { ChatToolOutputContentSubPart };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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 { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { WorkbenchCompressibleAsyncDataTree } from "@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService";
|
|
6
|
+
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
7
|
+
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
8
|
+
import { ChatTreeItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
9
|
+
import { IDisposableReference } from "./chatCollections.js";
|
|
10
|
+
import { IChatContentPart } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
11
|
+
import { IChatProgressRenderableResponseContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
12
|
+
import { IChatResponseProgressFileTreeData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
13
|
+
export declare class ChatTreeContentPart extends Disposable implements IChatContentPart {
|
|
14
|
+
private readonly openerService;
|
|
15
|
+
readonly domNode: HTMLElement;
|
|
16
|
+
private readonly _onDidChangeHeight;
|
|
17
|
+
readonly onDidChangeHeight: Event<void>;
|
|
18
|
+
readonly onDidFocus: Event<void>;
|
|
19
|
+
private tree;
|
|
20
|
+
constructor(data: IChatResponseProgressFileTreeData, element: ChatTreeItem, treePool: TreePool, treeDataIndex: number, openerService: IOpenerService);
|
|
21
|
+
domFocus(): void;
|
|
22
|
+
hasSameContent(other: IChatProgressRenderableResponseContent): boolean;
|
|
23
|
+
addDisposable(disposable: IDisposable): void;
|
|
24
|
+
}
|
|
25
|
+
export declare class TreePool extends Disposable {
|
|
26
|
+
private _onDidChangeVisibility;
|
|
27
|
+
private readonly instantiationService;
|
|
28
|
+
private readonly configService;
|
|
29
|
+
private readonly themeService;
|
|
30
|
+
private _pool;
|
|
31
|
+
get inUse(): ReadonlySet<WorkbenchCompressibleAsyncDataTree<IChatResponseProgressFileTreeData, IChatResponseProgressFileTreeData, void>>;
|
|
32
|
+
constructor(_onDidChangeVisibility: Event<boolean>, instantiationService: IInstantiationService, configService: IConfigurationService, themeService: IThemeService);
|
|
33
|
+
private treeFactory;
|
|
34
|
+
get(): IDisposableReference<WorkbenchCompressibleAsyncDataTree<IChatResponseProgressFileTreeData, IChatResponseProgressFileTreeData, void>>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { $ as $$1 } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
+
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
7
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
|
+
import { FileKind, FileType } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
9
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
|
+
import { WorkbenchCompressibleAsyncDataTree } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
11
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
12
|
+
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
13
|
+
import { ResourceLabels } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/labels';
|
|
14
|
+
import { ResourcePool } from './chatCollections.js';
|
|
15
|
+
import { createFileIconThemableTreeContainerScope } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/views/explorerView';
|
|
16
|
+
|
|
17
|
+
const $ = $$1;
|
|
18
|
+
let ChatTreeContentPart = class ChatTreeContentPart extends Disposable {
|
|
19
|
+
constructor(data, element, treePool, treeDataIndex, openerService) {
|
|
20
|
+
super();
|
|
21
|
+
this.openerService = openerService;
|
|
22
|
+
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
23
|
+
this.onDidChangeHeight = this._onDidChangeHeight.event;
|
|
24
|
+
const ref = this._register(treePool.get());
|
|
25
|
+
this.tree = ref.object;
|
|
26
|
+
this.onDidFocus = this.tree.onDidFocus;
|
|
27
|
+
this._register(this.tree.onDidOpen((e) => {
|
|
28
|
+
if (e.element && !('children' in e.element)) {
|
|
29
|
+
this.openerService.open(e.element.uri);
|
|
30
|
+
}
|
|
31
|
+
}));
|
|
32
|
+
this._register(this.tree.onDidChangeCollapseState(() => {
|
|
33
|
+
this._onDidChangeHeight.fire();
|
|
34
|
+
}));
|
|
35
|
+
this._register(this.tree.onContextMenu((e) => {
|
|
36
|
+
e.browserEvent.preventDefault();
|
|
37
|
+
e.browserEvent.stopPropagation();
|
|
38
|
+
}));
|
|
39
|
+
this.tree.setInput(data).then(() => {
|
|
40
|
+
if (!ref.isStale()) {
|
|
41
|
+
this.tree.layout();
|
|
42
|
+
this._onDidChangeHeight.fire();
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
this.domNode = this.tree.getHTMLElement().parentElement;
|
|
46
|
+
}
|
|
47
|
+
domFocus() {
|
|
48
|
+
this.tree.domFocus();
|
|
49
|
+
}
|
|
50
|
+
hasSameContent(other) {
|
|
51
|
+
return other.kind === 'treeData';
|
|
52
|
+
}
|
|
53
|
+
addDisposable(disposable) {
|
|
54
|
+
this._register(disposable);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
ChatTreeContentPart = ( __decorate([
|
|
58
|
+
( __param(4, IOpenerService))
|
|
59
|
+
], ChatTreeContentPart));
|
|
60
|
+
let TreePool = class TreePool extends Disposable {
|
|
61
|
+
get inUse() {
|
|
62
|
+
return this._pool.inUse;
|
|
63
|
+
}
|
|
64
|
+
constructor(_onDidChangeVisibility, instantiationService, configService, themeService) {
|
|
65
|
+
super();
|
|
66
|
+
this._onDidChangeVisibility = _onDidChangeVisibility;
|
|
67
|
+
this.instantiationService = instantiationService;
|
|
68
|
+
this.configService = configService;
|
|
69
|
+
this.themeService = themeService;
|
|
70
|
+
this._pool = this._register(( new ResourcePool(() => this.treeFactory())));
|
|
71
|
+
}
|
|
72
|
+
treeFactory() {
|
|
73
|
+
const resourceLabels = this._register(this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this._onDidChangeVisibility }));
|
|
74
|
+
const container = $('.interactive-response-progress-tree');
|
|
75
|
+
this._register(createFileIconThemableTreeContainerScope(container, this.themeService));
|
|
76
|
+
const tree = this.instantiationService.createInstance((WorkbenchCompressibleAsyncDataTree), 'ChatListRenderer', container, ( new ChatListTreeDelegate()), ( new ChatListTreeCompressionDelegate()), [( new ChatListTreeRenderer(resourceLabels, this.configService.getValue('explorer.decorations')))], ( new ChatListTreeDataSource()), {
|
|
77
|
+
collapseByDefault: () => false,
|
|
78
|
+
expandOnlyOnTwistieClick: () => false,
|
|
79
|
+
identityProvider: {
|
|
80
|
+
getId: (e) => ( e.uri.toString())
|
|
81
|
+
},
|
|
82
|
+
accessibilityProvider: {
|
|
83
|
+
getAriaLabel: (element) => element.label,
|
|
84
|
+
getWidgetAriaLabel: () => ( localize(5126, "File Tree"))
|
|
85
|
+
},
|
|
86
|
+
alwaysConsumeMouseWheel: false
|
|
87
|
+
});
|
|
88
|
+
return tree;
|
|
89
|
+
}
|
|
90
|
+
get() {
|
|
91
|
+
const object = this._pool.get();
|
|
92
|
+
let stale = false;
|
|
93
|
+
return {
|
|
94
|
+
object,
|
|
95
|
+
isStale: () => stale,
|
|
96
|
+
dispose: () => {
|
|
97
|
+
stale = true;
|
|
98
|
+
this._pool.release(object);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
TreePool = ( __decorate([
|
|
104
|
+
( __param(1, IInstantiationService)),
|
|
105
|
+
( __param(2, IConfigurationService)),
|
|
106
|
+
( __param(3, IThemeService))
|
|
107
|
+
], TreePool));
|
|
108
|
+
class ChatListTreeDelegate {
|
|
109
|
+
static { this.ITEM_HEIGHT = 22; }
|
|
110
|
+
getHeight(element) {
|
|
111
|
+
return ChatListTreeDelegate.ITEM_HEIGHT;
|
|
112
|
+
}
|
|
113
|
+
getTemplateId(element) {
|
|
114
|
+
return 'chatListTreeTemplate';
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
class ChatListTreeCompressionDelegate {
|
|
118
|
+
isIncompressible(element) {
|
|
119
|
+
return !element.children;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
class ChatListTreeRenderer {
|
|
123
|
+
constructor(labels, decorations) {
|
|
124
|
+
this.labels = labels;
|
|
125
|
+
this.decorations = decorations;
|
|
126
|
+
this.templateId = 'chatListTreeTemplate';
|
|
127
|
+
}
|
|
128
|
+
renderCompressedElements(element, index, templateData) {
|
|
129
|
+
templateData.label.element.style.display = 'flex';
|
|
130
|
+
const label = ( element.element.elements.map((e) => e.label));
|
|
131
|
+
templateData.label.setResource({ resource: element.element.elements[0].uri, name: label }, {
|
|
132
|
+
title: element.element.elements[0].label,
|
|
133
|
+
fileKind: element.children ? FileKind.FOLDER : FileKind.FILE,
|
|
134
|
+
extraClasses: ['explorer-item'],
|
|
135
|
+
fileDecorations: this.decorations
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
renderTemplate(container) {
|
|
139
|
+
const templateDisposables = ( new DisposableStore());
|
|
140
|
+
const label = templateDisposables.add(this.labels.create(container, { supportHighlights: true }));
|
|
141
|
+
return { templateDisposables, label };
|
|
142
|
+
}
|
|
143
|
+
renderElement(element, index, templateData) {
|
|
144
|
+
templateData.label.element.style.display = 'flex';
|
|
145
|
+
if (!element.children.length && element.element.type !== FileType.Directory) {
|
|
146
|
+
templateData.label.setFile(element.element.uri, {
|
|
147
|
+
fileKind: FileKind.FILE,
|
|
148
|
+
hidePath: true,
|
|
149
|
+
fileDecorations: this.decorations,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
templateData.label.setResource({ resource: element.element.uri, name: element.element.label }, {
|
|
154
|
+
title: element.element.label,
|
|
155
|
+
fileKind: FileKind.FOLDER,
|
|
156
|
+
fileDecorations: this.decorations
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
disposeTemplate(templateData) {
|
|
161
|
+
templateData.templateDisposables.dispose();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
class ChatListTreeDataSource {
|
|
165
|
+
hasChildren(element) {
|
|
166
|
+
return !!element.children;
|
|
167
|
+
}
|
|
168
|
+
async getChildren(element) {
|
|
169
|
+
return element.children ?? [];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export { ChatTreeContentPart, TreePool };
|