@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
package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js
ADDED
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { $ as $$1, EventHelper, hide, append, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
5
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
6
|
+
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { matchesSomeScheme, Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
8
|
+
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
9
|
+
import { basenameOrAuthority, isEqualAuthority } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
10
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
11
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
12
|
+
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
13
|
+
import { getFlatContextMenuActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
14
|
+
import { MenuWorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
15
|
+
import { MenuId, registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
16
|
+
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
17
|
+
import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
18
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
19
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
20
|
+
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
21
|
+
import { FileKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
22
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
23
|
+
import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
24
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
25
|
+
import { WorkbenchList } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
26
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
27
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
28
|
+
import { isDark } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/theme';
|
|
29
|
+
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
30
|
+
import { fillEditorsDragData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/dnd';
|
|
31
|
+
import { ResourceLabels } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/labels';
|
|
32
|
+
import { ResourceContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
33
|
+
import { SETTINGS_AUTHORITY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/preferences/common/preferences';
|
|
34
|
+
import { createFileIconThemableTreeContainerScope } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/views/explorerView';
|
|
35
|
+
import { ExplorerFolderContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/common/files';
|
|
36
|
+
import { chatEditingWidgetFileStateContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
37
|
+
import { ChatResponseReferencePartStatusKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
38
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
39
|
+
import { ChatCollapsibleContentPart } from './chatCollapsibleContentPart.js';
|
|
40
|
+
import { ResourcePool } from './chatCollections.js';
|
|
41
|
+
|
|
42
|
+
var CollapsibleListRenderer_1, DividerRenderer_1;
|
|
43
|
+
const $ = $$1;
|
|
44
|
+
let ChatCollapsibleListContentPart = class ChatCollapsibleListContentPart extends ChatCollapsibleContentPart {
|
|
45
|
+
constructor(data, labelOverride, context, contentReferencesListPool, openerService, menuService, instantiationService, contextMenuService) {
|
|
46
|
+
super(labelOverride ?? (data.length > 1 ?
|
|
47
|
+
( localize(5089, "Used {0} references", data.length)) :
|
|
48
|
+
( localize(5090, "Used {0} reference", 1))), context);
|
|
49
|
+
this.data = data;
|
|
50
|
+
this.contentReferencesListPool = contentReferencesListPool;
|
|
51
|
+
this.openerService = openerService;
|
|
52
|
+
this.menuService = menuService;
|
|
53
|
+
this.instantiationService = instantiationService;
|
|
54
|
+
this.contextMenuService = contextMenuService;
|
|
55
|
+
}
|
|
56
|
+
initContent() {
|
|
57
|
+
const ref = this._register(this.contentReferencesListPool.get());
|
|
58
|
+
const list = ref.object;
|
|
59
|
+
this._register(list.onDidOpen((e) => {
|
|
60
|
+
if (e.element && 'reference' in e.element && typeof e.element.reference === 'object') {
|
|
61
|
+
const uriOrLocation = 'variableName' in e.element.reference ? e.element.reference.value : e.element.reference;
|
|
62
|
+
const uri = URI.isUri(uriOrLocation) ? uriOrLocation :
|
|
63
|
+
uriOrLocation?.uri;
|
|
64
|
+
if (uri) {
|
|
65
|
+
this.openerService.open(uri, {
|
|
66
|
+
fromUserGesture: true,
|
|
67
|
+
editorOptions: {
|
|
68
|
+
...e.editorOptions,
|
|
69
|
+
...{
|
|
70
|
+
selection: uriOrLocation && 'range' in uriOrLocation ? uriOrLocation.range : undefined
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
77
|
+
this._register(list.onContextMenu(e => {
|
|
78
|
+
EventHelper.stop(e.browserEvent, true);
|
|
79
|
+
const uri = e.element && getResourceForElement(e.element);
|
|
80
|
+
if (!uri) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this.contextMenuService.showContextMenu({
|
|
84
|
+
getAnchor: () => e.anchor,
|
|
85
|
+
getActions: () => {
|
|
86
|
+
const menu = this.menuService.getMenuActions(MenuId.ChatAttachmentsContext, list.contextKeyService, { shouldForwardArgs: true, arg: uri });
|
|
87
|
+
return getFlatContextMenuActions(menu);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}));
|
|
91
|
+
const resourceContextKey = this._register(this.instantiationService.createInstance(ResourceContextKey));
|
|
92
|
+
this._register(list.onDidChangeFocus(e => {
|
|
93
|
+
resourceContextKey.reset();
|
|
94
|
+
const element = e.elements.length ? e.elements[0] : undefined;
|
|
95
|
+
const uri = element && getResourceForElement(element);
|
|
96
|
+
resourceContextKey.set(uri ?? null);
|
|
97
|
+
}));
|
|
98
|
+
const maxItemsShown = 6;
|
|
99
|
+
const itemsShown = Math.min(this.data.length, maxItemsShown);
|
|
100
|
+
const height = itemsShown * 22;
|
|
101
|
+
list.layout(height);
|
|
102
|
+
list.getHTMLElement().style.height = `${height}px`;
|
|
103
|
+
list.splice(0, list.length, this.data);
|
|
104
|
+
return list.getHTMLElement().parentElement;
|
|
105
|
+
}
|
|
106
|
+
hasSameContent(other, followingContent, element) {
|
|
107
|
+
return other.kind === 'references' && other.references.length === this.data.length && (!!followingContent.length === this.hasFollowingContent);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
ChatCollapsibleListContentPart = ( __decorate([
|
|
111
|
+
( __param(4, IOpenerService)),
|
|
112
|
+
( __param(5, IMenuService)),
|
|
113
|
+
( __param(6, IInstantiationService)),
|
|
114
|
+
( __param(7, IContextMenuService))
|
|
115
|
+
], ChatCollapsibleListContentPart));
|
|
116
|
+
let ChatUsedReferencesListContentPart = class ChatUsedReferencesListContentPart extends ChatCollapsibleListContentPart {
|
|
117
|
+
constructor(data, labelOverride, context, contentReferencesListPool, options, openerService, menuService, instantiationService, contextMenuService) {
|
|
118
|
+
super(data, labelOverride, context, contentReferencesListPool, openerService, menuService, instantiationService, contextMenuService);
|
|
119
|
+
this.options = options;
|
|
120
|
+
if (data.length === 0) {
|
|
121
|
+
hide(this.domNode);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
isExpanded() {
|
|
125
|
+
const element = this.context.element;
|
|
126
|
+
return element.usedReferencesExpanded ?? !!(this.options.expandedWhenEmptyResponse && element.response.value.length === 0);
|
|
127
|
+
}
|
|
128
|
+
setExpanded(value) {
|
|
129
|
+
const element = this.context.element;
|
|
130
|
+
element.usedReferencesExpanded = !this.isExpanded();
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
ChatUsedReferencesListContentPart = ( __decorate([
|
|
134
|
+
( __param(5, IOpenerService)),
|
|
135
|
+
( __param(6, IMenuService)),
|
|
136
|
+
( __param(7, IInstantiationService)),
|
|
137
|
+
( __param(8, IContextMenuService))
|
|
138
|
+
], ChatUsedReferencesListContentPart));
|
|
139
|
+
let CollapsibleListPool = class CollapsibleListPool extends Disposable {
|
|
140
|
+
get inUse() {
|
|
141
|
+
return this._pool.inUse;
|
|
142
|
+
}
|
|
143
|
+
constructor(_onDidChangeVisibility, menuId, listOptions, instantiationService, themeService, labelService) {
|
|
144
|
+
super();
|
|
145
|
+
this._onDidChangeVisibility = _onDidChangeVisibility;
|
|
146
|
+
this.menuId = menuId;
|
|
147
|
+
this.listOptions = listOptions;
|
|
148
|
+
this.instantiationService = instantiationService;
|
|
149
|
+
this.themeService = themeService;
|
|
150
|
+
this.labelService = labelService;
|
|
151
|
+
this._pool = this._register(( new ResourcePool(() => this.listFactory())));
|
|
152
|
+
}
|
|
153
|
+
listFactory() {
|
|
154
|
+
const resourceLabels = this._register(this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this._onDidChangeVisibility }));
|
|
155
|
+
const container = $('.chat-used-context-list');
|
|
156
|
+
this._register(createFileIconThemableTreeContainerScope(container, this.themeService));
|
|
157
|
+
const list = this.instantiationService.createInstance((WorkbenchList), 'ChatListRenderer', container, ( new CollapsibleListDelegate()), [this.instantiationService.createInstance(CollapsibleListRenderer, resourceLabels, this.menuId), this.instantiationService.createInstance(DividerRenderer)], {
|
|
158
|
+
...this.listOptions,
|
|
159
|
+
alwaysConsumeMouseWheel: false,
|
|
160
|
+
accessibilityProvider: {
|
|
161
|
+
getAriaLabel: (element) => {
|
|
162
|
+
if (element.kind === 'warning') {
|
|
163
|
+
return element.content.value;
|
|
164
|
+
}
|
|
165
|
+
if (element.kind === 'divider') {
|
|
166
|
+
return element.label;
|
|
167
|
+
}
|
|
168
|
+
const reference = element.reference;
|
|
169
|
+
if (typeof reference === 'string') {
|
|
170
|
+
return reference;
|
|
171
|
+
}
|
|
172
|
+
else if ('variableName' in reference) {
|
|
173
|
+
return reference.variableName;
|
|
174
|
+
}
|
|
175
|
+
else if (URI.isUri(reference)) {
|
|
176
|
+
return basename(reference.path);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
return basename(reference.uri.path);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
getWidgetAriaLabel: () => ( localize(5091, "Collapsible Chat References List"))
|
|
183
|
+
},
|
|
184
|
+
dnd: {
|
|
185
|
+
getDragURI: (element) => getResourceForElement(element)?.toString() ?? null,
|
|
186
|
+
getDragLabel: (elements, originalEvent) => {
|
|
187
|
+
const uris = coalesce(( elements.map(getResourceForElement)));
|
|
188
|
+
if (!uris.length) {
|
|
189
|
+
return undefined;
|
|
190
|
+
}
|
|
191
|
+
else if (uris.length === 1) {
|
|
192
|
+
return this.labelService.getUriLabel(uris[0], { relative: true });
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
return `${uris.length}`;
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
dispose: () => { },
|
|
199
|
+
onDragOver: () => false,
|
|
200
|
+
drop: () => { },
|
|
201
|
+
onDragStart: (data, originalEvent) => {
|
|
202
|
+
try {
|
|
203
|
+
const elements = data.getData();
|
|
204
|
+
const uris = coalesce(( elements.map(getResourceForElement)));
|
|
205
|
+
this.instantiationService.invokeFunction(accessor => fillEditorsDragData(accessor, uris, originalEvent));
|
|
206
|
+
}
|
|
207
|
+
catch {
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
return list;
|
|
213
|
+
}
|
|
214
|
+
get() {
|
|
215
|
+
const object = this._pool.get();
|
|
216
|
+
let stale = false;
|
|
217
|
+
return {
|
|
218
|
+
object,
|
|
219
|
+
isStale: () => stale,
|
|
220
|
+
dispose: () => {
|
|
221
|
+
stale = true;
|
|
222
|
+
this._pool.release(object);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
CollapsibleListPool = ( __decorate([
|
|
228
|
+
( __param(3, IInstantiationService)),
|
|
229
|
+
( __param(4, IThemeService)),
|
|
230
|
+
( __param(5, ILabelService))
|
|
231
|
+
], CollapsibleListPool));
|
|
232
|
+
class CollapsibleListDelegate {
|
|
233
|
+
getHeight(element) {
|
|
234
|
+
return 22;
|
|
235
|
+
}
|
|
236
|
+
getTemplateId(element) {
|
|
237
|
+
if (element.kind === 'divider') {
|
|
238
|
+
return DividerRenderer.TEMPLATE_ID;
|
|
239
|
+
}
|
|
240
|
+
return CollapsibleListRenderer.TEMPLATE_ID;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
let CollapsibleListRenderer = class CollapsibleListRenderer {
|
|
244
|
+
static { CollapsibleListRenderer_1 = this; }
|
|
245
|
+
static { this.TEMPLATE_ID = 'chatCollapsibleListRenderer'; }
|
|
246
|
+
constructor(labels, menuId, themeService, productService, instantiationService, contextKeyService) {
|
|
247
|
+
this.labels = labels;
|
|
248
|
+
this.menuId = menuId;
|
|
249
|
+
this.themeService = themeService;
|
|
250
|
+
this.productService = productService;
|
|
251
|
+
this.instantiationService = instantiationService;
|
|
252
|
+
this.contextKeyService = contextKeyService;
|
|
253
|
+
this.templateId = CollapsibleListRenderer_1.TEMPLATE_ID;
|
|
254
|
+
}
|
|
255
|
+
renderTemplate(container) {
|
|
256
|
+
const templateDisposables = ( new DisposableStore());
|
|
257
|
+
const label = templateDisposables.add(this.labels.create(container, { supportHighlights: true, supportIcons: true }));
|
|
258
|
+
const fileDiffsContainer = $('.working-set-line-counts');
|
|
259
|
+
const addedSpan = $$1('.working-set-lines-added');
|
|
260
|
+
const removedSpan = $$1('.working-set-lines-removed');
|
|
261
|
+
fileDiffsContainer.appendChild(addedSpan);
|
|
262
|
+
fileDiffsContainer.appendChild(removedSpan);
|
|
263
|
+
label.element.appendChild(fileDiffsContainer);
|
|
264
|
+
let toolbar;
|
|
265
|
+
let actionBarContainer;
|
|
266
|
+
let contextKeyService;
|
|
267
|
+
if (this.menuId) {
|
|
268
|
+
actionBarContainer = $('.chat-collapsible-list-action-bar');
|
|
269
|
+
contextKeyService = templateDisposables.add(this.contextKeyService.createScoped(actionBarContainer));
|
|
270
|
+
const scopedInstantiationService = templateDisposables.add(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyService]))));
|
|
271
|
+
toolbar = templateDisposables.add(scopedInstantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, this.menuId, { menuOptions: { shouldForwardArgs: true, arg: undefined } }));
|
|
272
|
+
label.element.appendChild(actionBarContainer);
|
|
273
|
+
}
|
|
274
|
+
return { templateDisposables, label, toolbar, actionBarContainer, contextKeyService, fileDiffsContainer, addedSpan, removedSpan };
|
|
275
|
+
}
|
|
276
|
+
getReferenceIcon(data) {
|
|
277
|
+
if (ThemeIcon.isThemeIcon(data.iconPath)) {
|
|
278
|
+
return data.iconPath;
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
return isDark(this.themeService.getColorTheme().type) && data.iconPath?.dark
|
|
282
|
+
? data.iconPath?.dark
|
|
283
|
+
: data.iconPath?.light;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
renderElement(data, index, templateData) {
|
|
287
|
+
if (data.kind === 'warning') {
|
|
288
|
+
templateData.label.setResource({ name: data.content.value }, { icon: Codicon.warning });
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
if (data.kind === 'divider') {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
const reference = data.reference;
|
|
295
|
+
const icon = this.getReferenceIcon(data);
|
|
296
|
+
templateData.label.element.style.display = 'flex';
|
|
297
|
+
let arg;
|
|
298
|
+
if (typeof reference === 'object' && 'variableName' in reference) {
|
|
299
|
+
if (reference.value) {
|
|
300
|
+
const uri = URI.isUri(reference.value) ? reference.value : reference.value.uri;
|
|
301
|
+
templateData.label.setResource({
|
|
302
|
+
resource: uri,
|
|
303
|
+
name: basenameOrAuthority(uri),
|
|
304
|
+
description: `#${reference.variableName}`,
|
|
305
|
+
range: 'range' in reference.value ? reference.value.range : undefined,
|
|
306
|
+
}, { icon, title: data.options?.status?.description ?? data.title });
|
|
307
|
+
}
|
|
308
|
+
else if (reference.variableName.startsWith('kernelVariable')) {
|
|
309
|
+
const variable = reference.variableName.split(':')[1];
|
|
310
|
+
const asVariableName = `${variable}`;
|
|
311
|
+
const label = `Kernel variable`;
|
|
312
|
+
templateData.label.setLabel(label, asVariableName, { title: data.options?.status?.description });
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
templateData.label.setLabel('Unknown variable type');
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
else if (typeof reference === 'string') {
|
|
319
|
+
templateData.label.setLabel(reference, undefined, { iconPath: URI.isUri(icon) ? icon : undefined, title: data.options?.status?.description ?? data.title });
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
const uri = 'uri' in reference ? reference.uri : reference;
|
|
323
|
+
arg = uri;
|
|
324
|
+
const extraClasses = data.excluded ? ['excluded'] : [];
|
|
325
|
+
if (uri.scheme === 'https' && isEqualAuthority(uri.authority, 'github.com') && uri.path.includes('/tree/')) {
|
|
326
|
+
templateData.label.setResource(getResourceLabelForGithubUri(uri), { icon: Codicon.github, title: data.title, strikethrough: data.excluded, extraClasses });
|
|
327
|
+
}
|
|
328
|
+
else if (uri.scheme === this.productService.urlProtocol && isEqualAuthority(uri.authority, SETTINGS_AUTHORITY)) {
|
|
329
|
+
const settingId = uri.path.substring(1);
|
|
330
|
+
templateData.label.setResource({ resource: uri, name: settingId }, { icon: Codicon.settingsGear, title: ( localize(5092, "Open setting '{0}'", settingId)), strikethrough: data.excluded, extraClasses });
|
|
331
|
+
}
|
|
332
|
+
else if (matchesSomeScheme(uri, Schemas.mailto, Schemas.http, Schemas.https)) {
|
|
333
|
+
templateData.label.setResource({ resource: uri, name: ( uri.toString(true)) }, { icon: icon ?? Codicon.globe, title: data.options?.status?.description ?? data.title ?? ( uri.toString(true)), strikethrough: data.excluded, extraClasses });
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
templateData.label.setFile(uri, {
|
|
337
|
+
fileKind: FileKind.FILE,
|
|
338
|
+
fileDecorations: undefined,
|
|
339
|
+
range: 'range' in reference ? reference.range : undefined,
|
|
340
|
+
title: data.options?.status?.description ?? data.title,
|
|
341
|
+
strikethrough: data.excluded,
|
|
342
|
+
extraClasses
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
for (const selector of ['.monaco-icon-suffix-container', '.monaco-icon-name-container']) {
|
|
347
|
+
const element = templateData.label.element.querySelector(selector);
|
|
348
|
+
if (element) {
|
|
349
|
+
if (data.options?.status?.kind === ChatResponseReferencePartStatusKind.Omitted || data.options?.status?.kind === ChatResponseReferencePartStatusKind.Partial) {
|
|
350
|
+
element.classList.add('warning');
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
element.classList.remove('warning');
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
if (data.state !== undefined) {
|
|
358
|
+
if (templateData.actionBarContainer) {
|
|
359
|
+
const diffMeta = data?.options?.diffMeta;
|
|
360
|
+
if (diffMeta) {
|
|
361
|
+
if (!templateData.fileDiffsContainer || !templateData.addedSpan || !templateData.removedSpan) {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
templateData.addedSpan.textContent = `+${diffMeta.added}`;
|
|
365
|
+
templateData.removedSpan.textContent = `-${diffMeta.removed}`;
|
|
366
|
+
templateData.fileDiffsContainer.setAttribute('aria-label', ( localize(
|
|
367
|
+
5093,
|
|
368
|
+
'{0} lines added, {1} lines removed',
|
|
369
|
+
diffMeta.added,
|
|
370
|
+
diffMeta.removed
|
|
371
|
+
)));
|
|
372
|
+
}
|
|
373
|
+
templateData.label.element.querySelector('.monaco-icon-name-container')?.classList.add('modified');
|
|
374
|
+
}
|
|
375
|
+
if (templateData.toolbar) {
|
|
376
|
+
templateData.toolbar.context = arg;
|
|
377
|
+
}
|
|
378
|
+
if (templateData.contextKeyService) {
|
|
379
|
+
if (data.state !== undefined) {
|
|
380
|
+
chatEditingWidgetFileStateContextKey.bindTo(templateData.contextKeyService).set(data.state);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
disposeTemplate(templateData) {
|
|
386
|
+
templateData.templateDisposables.dispose();
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
CollapsibleListRenderer = CollapsibleListRenderer_1 = ( __decorate([
|
|
390
|
+
( __param(2, IThemeService)),
|
|
391
|
+
( __param(3, IProductService)),
|
|
392
|
+
( __param(4, IInstantiationService)),
|
|
393
|
+
( __param(5, IContextKeyService))
|
|
394
|
+
], CollapsibleListRenderer));
|
|
395
|
+
let DividerRenderer = class DividerRenderer {
|
|
396
|
+
static { DividerRenderer_1 = this; }
|
|
397
|
+
static { this.TEMPLATE_ID = 'chatListDividerRenderer'; }
|
|
398
|
+
constructor(instantiationService) {
|
|
399
|
+
this.instantiationService = instantiationService;
|
|
400
|
+
this.templateId = DividerRenderer_1.TEMPLATE_ID;
|
|
401
|
+
}
|
|
402
|
+
renderTemplate(container) {
|
|
403
|
+
const templateDisposables = ( new DisposableStore());
|
|
404
|
+
const elementDisposables = templateDisposables.add(( new DisposableStore()));
|
|
405
|
+
container.classList.add('chat-list-divider');
|
|
406
|
+
const label = append(container, $$1('span.chat-list-divider-label'));
|
|
407
|
+
const line = append(container, $$1('div.chat-list-divider-line'));
|
|
408
|
+
const toolbarContainer = append(container, $$1('.chat-list-divider-toolbar'));
|
|
409
|
+
return { container, label, line, toolbarContainer, templateDisposables, elementDisposables, toolbar: undefined };
|
|
410
|
+
}
|
|
411
|
+
renderElement(data, index, templateData) {
|
|
412
|
+
templateData.label.textContent = data.label;
|
|
413
|
+
templateData.elementDisposables.clear();
|
|
414
|
+
templateData.toolbar = undefined;
|
|
415
|
+
clearNode(templateData.toolbarContainer);
|
|
416
|
+
if (data.menuId) {
|
|
417
|
+
const instantiationService = data.scopedInstantiationService || this.instantiationService;
|
|
418
|
+
templateData.toolbar = templateData.elementDisposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, templateData.toolbarContainer, data.menuId, { menuOptions: { arg: data.menuArg } }));
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
disposeTemplate(templateData) {
|
|
422
|
+
templateData.templateDisposables.dispose();
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
DividerRenderer = DividerRenderer_1 = ( __decorate([
|
|
426
|
+
( __param(0, IInstantiationService))
|
|
427
|
+
], DividerRenderer));
|
|
428
|
+
function getResourceLabelForGithubUri(uri) {
|
|
429
|
+
const repoPath = uri.path.split('/').slice(1, 3).join('/');
|
|
430
|
+
const filePath = uri.path.split('/').slice(5);
|
|
431
|
+
const fileName = filePath.at(-1);
|
|
432
|
+
const range = getLineRangeFromGithubUri(uri);
|
|
433
|
+
return {
|
|
434
|
+
resource: uri,
|
|
435
|
+
name: fileName ?? filePath.join('/'),
|
|
436
|
+
description: [repoPath, ...filePath.slice(0, -1)].join('/'),
|
|
437
|
+
range
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
function getLineRangeFromGithubUri(uri) {
|
|
441
|
+
if (!uri.fragment) {
|
|
442
|
+
return undefined;
|
|
443
|
+
}
|
|
444
|
+
const match = uri.fragment.match(/\bL(\d+)(?:-L(\d+))?/);
|
|
445
|
+
if (!match) {
|
|
446
|
+
return undefined;
|
|
447
|
+
}
|
|
448
|
+
const startLine = parseInt(match[1]);
|
|
449
|
+
if (isNaN(startLine)) {
|
|
450
|
+
return undefined;
|
|
451
|
+
}
|
|
452
|
+
const endLine = match[2] ? parseInt(match[2]) : startLine;
|
|
453
|
+
if (isNaN(endLine)) {
|
|
454
|
+
return undefined;
|
|
455
|
+
}
|
|
456
|
+
return {
|
|
457
|
+
startLineNumber: startLine,
|
|
458
|
+
startColumn: 1,
|
|
459
|
+
endLineNumber: endLine,
|
|
460
|
+
endColumn: 1
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
function getResourceForElement(element) {
|
|
464
|
+
if (element.kind === 'warning' || element.kind === 'divider') {
|
|
465
|
+
return null;
|
|
466
|
+
}
|
|
467
|
+
const { reference } = element;
|
|
468
|
+
if (typeof reference === 'string' || 'variableName' in reference) {
|
|
469
|
+
return null;
|
|
470
|
+
}
|
|
471
|
+
else if (URI.isUri(reference)) {
|
|
472
|
+
return reference;
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
return reference.uri;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
registerAction2(class AddToChatAction extends Action2 {
|
|
479
|
+
static { this.id = 'workbench.action.chat.addToChatAction'; }
|
|
480
|
+
constructor() {
|
|
481
|
+
super({
|
|
482
|
+
id: AddToChatAction.id,
|
|
483
|
+
title: {
|
|
484
|
+
...( localize2(5094, "Add File to Chat")),
|
|
485
|
+
},
|
|
486
|
+
f1: false,
|
|
487
|
+
menu: [{
|
|
488
|
+
id: MenuId.ChatAttachmentsContext,
|
|
489
|
+
group: 'chat',
|
|
490
|
+
order: 1,
|
|
491
|
+
when: ( ContextKeyExpr.and(ResourceContextKey.IsFileSystemResource, ( ExplorerFolderContext.negate()))),
|
|
492
|
+
}]
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
async run(accessor, resource) {
|
|
496
|
+
const chatWidgetService = accessor.get(IChatWidgetService);
|
|
497
|
+
if (!resource) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
const widget = chatWidgetService.lastFocusedWidget;
|
|
501
|
+
if (widget) {
|
|
502
|
+
widget.attachmentModel.addFile(resource);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
});
|
|
506
|
+
registerAction2(class OpenChatReferenceLinkAction extends Action2 {
|
|
507
|
+
static { this.id = 'workbench.action.chat.copyLink'; }
|
|
508
|
+
constructor() {
|
|
509
|
+
super({
|
|
510
|
+
id: OpenChatReferenceLinkAction.id,
|
|
511
|
+
title: {
|
|
512
|
+
...( localize2(5095, "Copy Link")),
|
|
513
|
+
},
|
|
514
|
+
f1: false,
|
|
515
|
+
menu: [{
|
|
516
|
+
id: MenuId.ChatAttachmentsContext,
|
|
517
|
+
group: 'chat',
|
|
518
|
+
order: 0,
|
|
519
|
+
when: ( ContextKeyExpr.or(( ResourceContextKey.Scheme.isEqualTo(Schemas.http)), ( ResourceContextKey.Scheme.isEqualTo(Schemas.https)))),
|
|
520
|
+
}]
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
async run(accessor, resource) {
|
|
524
|
+
await accessor.get(IClipboardService).writeResources([resource]);
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
export { ChatCollapsibleListContentPart, ChatUsedReferencesListContentPart, CollapsibleListPool };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
|
|
4
|
+
import { IChatMode } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes";
|
|
5
|
+
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
6
|
+
import { IHandOff } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser";
|
|
7
|
+
export interface INextPromptSelection {
|
|
8
|
+
readonly handoff: IHandOff;
|
|
9
|
+
readonly agentId?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class ChatSuggestNextWidget extends Disposable {
|
|
12
|
+
private readonly contextMenuService;
|
|
13
|
+
private readonly chatSessionsService;
|
|
14
|
+
readonly domNode: HTMLElement;
|
|
15
|
+
private readonly _onDidChangeHeight;
|
|
16
|
+
readonly onDidChangeHeight: Event<void>;
|
|
17
|
+
private readonly _onDidSelectPrompt;
|
|
18
|
+
readonly onDidSelectPrompt: Event<INextPromptSelection>;
|
|
19
|
+
private promptsContainer;
|
|
20
|
+
private titleElement;
|
|
21
|
+
private _currentMode;
|
|
22
|
+
private buttonDisposables;
|
|
23
|
+
constructor(contextMenuService: IContextMenuService, chatSessionsService: IChatSessionsService);
|
|
24
|
+
get height(): number;
|
|
25
|
+
getCurrentMode(): IChatMode | undefined;
|
|
26
|
+
private createSuggestNextWidget;
|
|
27
|
+
render(mode: IChatMode): void;
|
|
28
|
+
private createPromptButton;
|
|
29
|
+
hide(): void;
|
|
30
|
+
dispose(): void;
|
|
31
|
+
}
|