@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/media/chatThinkingContent.css
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
.interactive-session .interactive-response .chat-used-context-list.chat-thinking-items {
|
|
7
|
+
color: var(--vscode-descriptionForeground);
|
|
8
|
+
padding-top: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.interactive-session .interactive-response .value .chat-thinking-box {
|
|
12
|
+
outline: none;
|
|
13
|
+
position: relative;
|
|
14
|
+
color: var(--vscode-descriptionForeground);
|
|
15
|
+
|
|
16
|
+
.chat-used-context {
|
|
17
|
+
margin: 0px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.monaco-button.hidden,
|
|
21
|
+
.chat-pinned-preview.hidden {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.chat-used-context-list.chat-thinking-collapsible {
|
|
26
|
+
border: 1px solid var(--vscode-chat-requestBorder);
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
margin-bottom: 0;
|
|
29
|
+
position: relative;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
|
|
32
|
+
.chat-tool-invocation-part {
|
|
33
|
+
padding: 3px 12px 4px 18px;
|
|
34
|
+
position: relative;
|
|
35
|
+
|
|
36
|
+
.chat-used-context {
|
|
37
|
+
margin-bottom: 0px;
|
|
38
|
+
margin-left: 2px;
|
|
39
|
+
padding-left: 2px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.progress-container {
|
|
43
|
+
margin: 0 0 2px 6px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.codicon {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.chat-thinking-item.markdown-content {
|
|
52
|
+
padding: 5px 12px 6px 24px;
|
|
53
|
+
position: relative;
|
|
54
|
+
font-size: var(--vscode-chat-font-size-body-s);
|
|
55
|
+
|
|
56
|
+
.progress-container {
|
|
57
|
+
margin-bottom: 0px;
|
|
58
|
+
padding-top: 0px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
[data-code] {
|
|
62
|
+
background-color: var(--vscode-textPreformat-background);
|
|
63
|
+
padding: 1px 3px;
|
|
64
|
+
border-radius: 4px;
|
|
65
|
+
white-space: pre-wrap;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* chain of thought lines */
|
|
70
|
+
.chat-tool-invocation-part,
|
|
71
|
+
.chat-thinking-item.markdown-content {
|
|
72
|
+
|
|
73
|
+
&::before {
|
|
74
|
+
content: '';
|
|
75
|
+
position: absolute;
|
|
76
|
+
left: 10.5px;
|
|
77
|
+
top: 0px;
|
|
78
|
+
bottom: 0px;
|
|
79
|
+
width: 1px;
|
|
80
|
+
border-radius: 0;
|
|
81
|
+
background-color: var(--vscode-chat-requestBorder);
|
|
82
|
+
mask-image: linear-gradient(to bottom, #000 0 9px, transparent 9px 21px, #000 21px 100%);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:first-child::before {
|
|
86
|
+
mask-image: linear-gradient(to bottom, transparent 0 21px, #000 21px 100%);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:last-child::before {
|
|
90
|
+
mask-image: linear-gradient(to bottom, #000 0 9px, transparent 9px 100%);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:only-child::before {
|
|
94
|
+
background: none;
|
|
95
|
+
mask-image: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&::after {
|
|
99
|
+
content: '';
|
|
100
|
+
position: absolute;
|
|
101
|
+
left: 8px;
|
|
102
|
+
top: 12px;
|
|
103
|
+
width: 6px;
|
|
104
|
+
height: 6px;
|
|
105
|
+
border-radius: 50%;
|
|
106
|
+
background-color: var(--vscode-chat-requestBorder);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.chat-thinking-item {
|
|
113
|
+
padding: 6px 12px;
|
|
114
|
+
position: relative;
|
|
115
|
+
|
|
116
|
+
.progress-container {
|
|
117
|
+
margin-bottom: 0px;
|
|
118
|
+
padding-top: 0px;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.chat-thinking-text {
|
|
123
|
+
font-size: var(--vscode-chat-font-size-body-s);
|
|
124
|
+
padding: 0 10px;
|
|
125
|
+
display: block;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.rendered-markdown > p {
|
|
129
|
+
margin: 0;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.interactive-session .interactive-response .value .chat-thinking-fixed-mode {
|
|
134
|
+
outline: none;
|
|
135
|
+
|
|
136
|
+
&.chat-used-context-collapsed .chat-used-context-list.chat-thinking-collapsible.chat-thinking-streaming {
|
|
137
|
+
max-height: 200px;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
display: block;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&:not(.chat-used-context-collapsed) .chat-used-context-list.chat-thinking-collapsible.chat-thinking-streaming {
|
|
143
|
+
max-height: none;
|
|
144
|
+
overflow: visible;
|
|
145
|
+
display: block;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.chat-used-context-list.chat-thinking-collapsible:not(.chat-thinking-streaming) {
|
|
149
|
+
max-height: none;
|
|
150
|
+
overflow: visible;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.editor-instance .interactive-session .interactive-response .value .chat-thinking-box .chat-thinking-item ::before {
|
|
155
|
+
background: var(--vscode-editor-background);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.interactive-session .interactive-response .value .chat-thinking-box .chat-used-context-label code {
|
|
159
|
+
display: inline;
|
|
160
|
+
line-height: inherit;
|
|
161
|
+
padding: 0 4px;
|
|
162
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Separator } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
2
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
3
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
|
+
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
5
|
+
import { ConfirmedReason, IChatToolInvocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
6
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service";
|
|
7
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
8
|
+
import { IChatConfirmationButton } from "../chatConfirmationWidget.js";
|
|
9
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
10
|
+
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
11
|
+
export interface IToolConfirmationConfig {
|
|
12
|
+
allowActionId: string;
|
|
13
|
+
skipActionId: string;
|
|
14
|
+
allowLabel: string;
|
|
15
|
+
skipLabel: string;
|
|
16
|
+
partType: string;
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
}
|
|
19
|
+
type AbstractToolPrimaryAction = IChatConfirmationButton<(() => void)> | Separator;
|
|
20
|
+
/**
|
|
21
|
+
* Base class for a tool confirmation.
|
|
22
|
+
*
|
|
23
|
+
* note that implementors MUST call render() after they construct.
|
|
24
|
+
*/
|
|
25
|
+
export declare abstract class AbstractToolConfirmationSubPart extends BaseChatToolInvocationSubPart {
|
|
26
|
+
protected readonly toolInvocation: IChatToolInvocation;
|
|
27
|
+
protected readonly context: IChatContentPartRenderContext;
|
|
28
|
+
protected readonly instantiationService: IInstantiationService;
|
|
29
|
+
protected readonly keybindingService: IKeybindingService;
|
|
30
|
+
protected readonly contextKeyService: IContextKeyService;
|
|
31
|
+
protected readonly chatWidgetService: IChatWidgetService;
|
|
32
|
+
protected readonly languageModelToolsService: ILanguageModelToolsService;
|
|
33
|
+
domNode: HTMLElement;
|
|
34
|
+
constructor(toolInvocation: IChatToolInvocation, context: IChatContentPartRenderContext, instantiationService: IInstantiationService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, chatWidgetService: IChatWidgetService, languageModelToolsService: ILanguageModelToolsService);
|
|
35
|
+
protected render(config: IToolConfirmationConfig): void;
|
|
36
|
+
protected confirmWith(toolInvocation: IChatToolInvocation, reason: ConfirmedReason): void;
|
|
37
|
+
protected additionalPrimaryActions(): AbstractToolPrimaryAction[];
|
|
38
|
+
protected abstract createContentElement(): HTMLElement | string;
|
|
39
|
+
protected abstract getTitle(): string;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
4
|
+
import { toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
7
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
9
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
10
|
+
import { ToolConfirmKind, IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
11
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
12
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
13
|
+
import { ChatCustomConfirmationWidget } from '../chatConfirmationWidget.js';
|
|
14
|
+
import { BaseChatToolInvocationSubPart } from './chatToolInvocationSubPart.js';
|
|
15
|
+
|
|
16
|
+
let AbstractToolConfirmationSubPart = class AbstractToolConfirmationSubPart extends BaseChatToolInvocationSubPart {
|
|
17
|
+
constructor(toolInvocation, context, instantiationService, keybindingService, contextKeyService, chatWidgetService, languageModelToolsService) {
|
|
18
|
+
super(toolInvocation);
|
|
19
|
+
this.toolInvocation = toolInvocation;
|
|
20
|
+
this.context = context;
|
|
21
|
+
this.instantiationService = instantiationService;
|
|
22
|
+
this.keybindingService = keybindingService;
|
|
23
|
+
this.contextKeyService = contextKeyService;
|
|
24
|
+
this.chatWidgetService = chatWidgetService;
|
|
25
|
+
this.languageModelToolsService = languageModelToolsService;
|
|
26
|
+
if (toolInvocation.kind !== 'toolInvocation') {
|
|
27
|
+
throw ( new Error('Confirmation only works with live tool invocations'));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
render(config) {
|
|
31
|
+
const { keybindingService, languageModelToolsService, toolInvocation } = this;
|
|
32
|
+
const allowKeybinding = keybindingService.lookupKeybinding(config.allowActionId)?.getLabel();
|
|
33
|
+
const allowTooltip = allowKeybinding ? `${config.allowLabel} (${allowKeybinding})` : config.allowLabel;
|
|
34
|
+
const skipKeybinding = keybindingService.lookupKeybinding(config.skipActionId)?.getLabel();
|
|
35
|
+
const skipTooltip = skipKeybinding ? `${config.skipLabel} (${skipKeybinding})` : config.skipLabel;
|
|
36
|
+
const additionalActions = this.additionalPrimaryActions();
|
|
37
|
+
const buttons = [
|
|
38
|
+
{
|
|
39
|
+
label: config.allowLabel,
|
|
40
|
+
tooltip: allowTooltip,
|
|
41
|
+
data: () => {
|
|
42
|
+
this.confirmWith(toolInvocation, { type: ToolConfirmKind.UserAction });
|
|
43
|
+
},
|
|
44
|
+
moreActions: additionalActions.length > 0 ? additionalActions : undefined,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: ( localize(5127, "Skip")),
|
|
48
|
+
tooltip: skipTooltip,
|
|
49
|
+
data: () => {
|
|
50
|
+
this.confirmWith(toolInvocation, { type: ToolConfirmKind.Skipped });
|
|
51
|
+
},
|
|
52
|
+
isSecondary: true,
|
|
53
|
+
}
|
|
54
|
+
];
|
|
55
|
+
const contentElement = this.createContentElement();
|
|
56
|
+
const tool = languageModelToolsService.getTool(toolInvocation.toolId);
|
|
57
|
+
const confirmWidget = this._register(this.instantiationService.createInstance((ChatCustomConfirmationWidget), this.context, {
|
|
58
|
+
title: this.getTitle(),
|
|
59
|
+
icon: tool?.icon && 'id' in tool.icon ? tool.icon : Codicon.tools,
|
|
60
|
+
subtitle: config.subtitle,
|
|
61
|
+
buttons,
|
|
62
|
+
message: contentElement,
|
|
63
|
+
toolbarData: {
|
|
64
|
+
arg: toolInvocation,
|
|
65
|
+
partType: config.partType,
|
|
66
|
+
partSource: toolInvocation.source.type
|
|
67
|
+
}
|
|
68
|
+
}));
|
|
69
|
+
const hasToolConfirmation = ChatContextKeys.Editing.hasToolConfirmation.bindTo(this.contextKeyService);
|
|
70
|
+
hasToolConfirmation.set(true);
|
|
71
|
+
this._register(confirmWidget.onDidClick(button => {
|
|
72
|
+
button.data();
|
|
73
|
+
this.chatWidgetService.getWidgetBySessionResource(this.context.element.sessionResource)?.focusInput();
|
|
74
|
+
}));
|
|
75
|
+
this._register(confirmWidget.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
76
|
+
this._register(toDisposable(() => hasToolConfirmation.reset()));
|
|
77
|
+
this.domNode = confirmWidget.domNode;
|
|
78
|
+
}
|
|
79
|
+
confirmWith(toolInvocation, reason) {
|
|
80
|
+
IChatToolInvocation.confirmWith(toolInvocation, reason);
|
|
81
|
+
}
|
|
82
|
+
additionalPrimaryActions() {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
AbstractToolConfirmationSubPart = ( __decorate([
|
|
87
|
+
( __param(2, IInstantiationService)),
|
|
88
|
+
( __param(3, IKeybindingService)),
|
|
89
|
+
( __param(4, IContextKeyService)),
|
|
90
|
+
( __param(5, IChatWidgetService)),
|
|
91
|
+
( __param(6, ILanguageModelToolsService))
|
|
92
|
+
], AbstractToolConfirmationSubPart));
|
|
93
|
+
|
|
94
|
+
export { AbstractToolConfirmationSubPart };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
2
|
+
import { IExtensionManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service";
|
|
3
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
|
+
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
5
|
+
import { IChatToolInvocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
6
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
7
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
8
|
+
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
9
|
+
export declare class ExtensionsInstallConfirmationWidgetSubPart extends BaseChatToolInvocationSubPart {
|
|
10
|
+
readonly domNode: HTMLElement;
|
|
11
|
+
private readonly _confirmWidget?;
|
|
12
|
+
get codeblocks(): import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat").IChatCodeBlockInfo[];
|
|
13
|
+
get codeblocksPartId(): string;
|
|
14
|
+
constructor(toolInvocation: IChatToolInvocation, context: IChatContentPartRenderContext, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, chatWidgetService: IChatWidgetService, extensionManagementService: IExtensionManagementService, instantiationService: IInstantiationService);
|
|
15
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { $, append } 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 { toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
7
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
8
|
+
import { IExtensionManagementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
9
|
+
import { areSameExtensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
10
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
12
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
13
|
+
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
14
|
+
import { AcceptToolConfirmationActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
15
|
+
import { CancelChatActionId } from '../../actions/chatExecuteActions.js';
|
|
16
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
17
|
+
import { ChatConfirmationWidget } from '../chatConfirmationWidget.js';
|
|
18
|
+
import { ChatExtensionsContentPart } from '../chatExtensionsContentPart.js';
|
|
19
|
+
import { BaseChatToolInvocationSubPart } from './chatToolInvocationSubPart.js';
|
|
20
|
+
|
|
21
|
+
let ExtensionsInstallConfirmationWidgetSubPart = class ExtensionsInstallConfirmationWidgetSubPart extends BaseChatToolInvocationSubPart {
|
|
22
|
+
get codeblocks() {
|
|
23
|
+
return this._confirmWidget?.codeblocks || [];
|
|
24
|
+
}
|
|
25
|
+
get codeblocksPartId() {
|
|
26
|
+
return this._confirmWidget?.codeblocksPartId || '<none>';
|
|
27
|
+
}
|
|
28
|
+
constructor(toolInvocation, context, keybindingService, contextKeyService, chatWidgetService, extensionManagementService, instantiationService) {
|
|
29
|
+
super(toolInvocation);
|
|
30
|
+
if (toolInvocation.toolSpecificData?.kind !== 'extensions') {
|
|
31
|
+
throw ( new Error('Tool specific data is missing or not of kind extensions'));
|
|
32
|
+
}
|
|
33
|
+
const extensionsContent = toolInvocation.toolSpecificData;
|
|
34
|
+
this.domNode = $('');
|
|
35
|
+
const chatExtensionsContentPart = this._register(instantiationService.createInstance(ChatExtensionsContentPart, extensionsContent));
|
|
36
|
+
this._register(chatExtensionsContentPart.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
37
|
+
append(this.domNode, chatExtensionsContentPart.domNode);
|
|
38
|
+
if (toolInvocation.state.get().type === IChatToolInvocation.StateKind.WaitingForConfirmation) {
|
|
39
|
+
const allowLabel = ( localize(5128, "Allow"));
|
|
40
|
+
const allowKeybinding = keybindingService.lookupKeybinding(AcceptToolConfirmationActionId)?.getLabel();
|
|
41
|
+
const allowTooltip = allowKeybinding ? `${allowLabel} (${allowKeybinding})` : allowLabel;
|
|
42
|
+
const cancelLabel = ( localize(5129, "Cancel"));
|
|
43
|
+
const cancelKeybinding = keybindingService.lookupKeybinding(CancelChatActionId)?.getLabel();
|
|
44
|
+
const cancelTooltip = cancelKeybinding ? `${cancelLabel} (${cancelKeybinding})` : cancelLabel;
|
|
45
|
+
const enableAllowButtonEvent = this._register(( new Emitter()));
|
|
46
|
+
const buttons = [
|
|
47
|
+
{
|
|
48
|
+
label: allowLabel,
|
|
49
|
+
data: { type: ToolConfirmKind.UserAction },
|
|
50
|
+
tooltip: allowTooltip,
|
|
51
|
+
disabled: true,
|
|
52
|
+
onDidChangeDisablement: enableAllowButtonEvent.event
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: cancelLabel,
|
|
56
|
+
data: { type: ToolConfirmKind.Denied },
|
|
57
|
+
isSecondary: true,
|
|
58
|
+
tooltip: cancelTooltip
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
const confirmWidget = this._register(instantiationService.createInstance((ChatConfirmationWidget), context, {
|
|
62
|
+
title: toolInvocation.confirmationMessages?.title ?? ( localize(5130, "Install Extensions")),
|
|
63
|
+
message: toolInvocation.confirmationMessages?.message ?? ( localize(
|
|
64
|
+
5131,
|
|
65
|
+
"Click the Install button on the extension and then press Allow when finished."
|
|
66
|
+
)),
|
|
67
|
+
buttons,
|
|
68
|
+
}));
|
|
69
|
+
this._confirmWidget = confirmWidget;
|
|
70
|
+
this._register(confirmWidget.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
71
|
+
append(this.domNode, confirmWidget.domNode);
|
|
72
|
+
this._register(confirmWidget.onDidClick(button => {
|
|
73
|
+
IChatToolInvocation.confirmWith(toolInvocation, button.data);
|
|
74
|
+
chatWidgetService.getWidgetBySessionResource(context.element.sessionResource)?.focusInput();
|
|
75
|
+
}));
|
|
76
|
+
const hasToolConfirmationKey = ChatContextKeys.Editing.hasToolConfirmation.bindTo(contextKeyService);
|
|
77
|
+
hasToolConfirmationKey.set(true);
|
|
78
|
+
this._register(toDisposable(() => hasToolConfirmationKey.reset()));
|
|
79
|
+
const disposable = this._register(extensionManagementService.onInstallExtension(e => {
|
|
80
|
+
if (( extensionsContent.extensions.some(id => areSameExtensions({ id }, e.identifier)))) {
|
|
81
|
+
disposable.dispose();
|
|
82
|
+
enableAllowButtonEvent.fire(false);
|
|
83
|
+
}
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
ExtensionsInstallConfirmationWidgetSubPart = ( __decorate([
|
|
89
|
+
( __param(2, IKeybindingService)),
|
|
90
|
+
( __param(3, IContextKeyService)),
|
|
91
|
+
( __param(4, IChatWidgetService)),
|
|
92
|
+
( __param(5, IExtensionManagementService)),
|
|
93
|
+
( __param(6, IInstantiationService))
|
|
94
|
+
], ExtensionsInstallConfirmationWidgetSubPart));
|
|
95
|
+
|
|
96
|
+
export { ExtensionsInstallConfirmationWidgetSubPart };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
2
|
+
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
3
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
4
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
6
|
+
import { IToolResultInputOutputDetails } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService";
|
|
7
|
+
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
8
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
9
|
+
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
10
|
+
export declare class ChatInputOutputMarkdownProgressPart extends BaseChatToolInvocationSubPart {
|
|
11
|
+
/** Remembers expanded tool parts on re-render */
|
|
12
|
+
private static readonly _expandedByDefault;
|
|
13
|
+
readonly domNode: HTMLElement;
|
|
14
|
+
private _codeblocks;
|
|
15
|
+
get codeblocks(): IChatCodeBlockInfo[];
|
|
16
|
+
constructor(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, context: IChatContentPartRenderContext, codeBlockStartIndex: number, message: string | IMarkdownString, subtitle: string | IMarkdownString | undefined, input: string, output: IToolResultInputOutputDetails["output"] | undefined, isError: boolean, instantiationService: IInstantiationService, modelService: IModelService, languageService: ILanguageService);
|
|
17
|
+
private getAutoApproveMessageContent;
|
|
18
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { ProgressBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/progressbar/progressbar';
|
|
4
|
+
import { decodeBase64 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
5
|
+
import { createMarkdownCommandLink, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
6
|
+
import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
7
|
+
import { toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import { getExtensionForMimeType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/mime';
|
|
9
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
10
|
+
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
11
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
12
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
13
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
14
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
15
|
+
import { ChatResponseResource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
16
|
+
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
17
|
+
import { ChatCollapsibleInputOutputContentPart } from '../chatToolInputOutputContentPart.js';
|
|
18
|
+
import { BaseChatToolInvocationSubPart } from './chatToolInvocationSubPart.js';
|
|
19
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
20
|
+
|
|
21
|
+
var ChatInputOutputMarkdownProgressPart_1;
|
|
22
|
+
let ChatInputOutputMarkdownProgressPart = class ChatInputOutputMarkdownProgressPart extends BaseChatToolInvocationSubPart {
|
|
23
|
+
static { ChatInputOutputMarkdownProgressPart_1 = this; }
|
|
24
|
+
static { this._expandedByDefault = ( new WeakMap()); }
|
|
25
|
+
get codeblocks() {
|
|
26
|
+
return this._codeblocks;
|
|
27
|
+
}
|
|
28
|
+
constructor(toolInvocation, context, codeBlockStartIndex, message, subtitle, input, output, isError, instantiationService, modelService, languageService) {
|
|
29
|
+
super(toolInvocation);
|
|
30
|
+
this._codeblocks = [];
|
|
31
|
+
let codeBlockIndex = codeBlockStartIndex;
|
|
32
|
+
const toCodePart = (data) => {
|
|
33
|
+
const model = this._register(modelService.createModel(data, languageService.createById('json'), undefined, true));
|
|
34
|
+
return {
|
|
35
|
+
kind: 'code',
|
|
36
|
+
textModel: model,
|
|
37
|
+
languageId: model.getLanguageId(),
|
|
38
|
+
options: {
|
|
39
|
+
hideToolbar: true,
|
|
40
|
+
reserveWidth: 19,
|
|
41
|
+
maxHeightInLines: 13,
|
|
42
|
+
verticalPadding: 5,
|
|
43
|
+
editorOptions: {
|
|
44
|
+
wordWrap: 'on'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
codeBlockInfo: {
|
|
48
|
+
codeBlockIndex: codeBlockIndex++,
|
|
49
|
+
codemapperUri: undefined,
|
|
50
|
+
elementId: context.element.id,
|
|
51
|
+
focus: () => { },
|
|
52
|
+
ownerMarkdownPartId: this.codeblocksPartId,
|
|
53
|
+
uri: model.uri,
|
|
54
|
+
chatSessionResource: context.element.sessionResource,
|
|
55
|
+
uriPromise: Promise.resolve(model.uri)
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
let processedOutput = output;
|
|
60
|
+
if (typeof output === 'string') {
|
|
61
|
+
processedOutput = [{ type: 'embed', value: output, isText: true }];
|
|
62
|
+
}
|
|
63
|
+
const collapsibleListPart = this._register(instantiationService.createInstance(ChatCollapsibleInputOutputContentPart, message, subtitle, this.getAutoApproveMessageContent(), context, toCodePart(input), processedOutput && {
|
|
64
|
+
parts: ( processedOutput.map((o, i) => {
|
|
65
|
+
const permalinkBasename = o.type === 'ref' || o.uri
|
|
66
|
+
? basename(o.uri)
|
|
67
|
+
: o.mimeType && getExtensionForMimeType(o.mimeType)
|
|
68
|
+
? `file${getExtensionForMimeType(o.mimeType)}`
|
|
69
|
+
: 'file' + (o.isText ? '.txt' : '.bin');
|
|
70
|
+
if (o.type === 'ref') {
|
|
71
|
+
return { kind: 'data', uri: o.uri, mimeType: o.mimeType };
|
|
72
|
+
}
|
|
73
|
+
else if (o.isText && !o.asResource) {
|
|
74
|
+
return toCodePart(o.value);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
let decoded;
|
|
78
|
+
try {
|
|
79
|
+
if (!o.isText) {
|
|
80
|
+
decoded = decodeBase64(o.value).buffer;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
}
|
|
85
|
+
const permalinkUri = ChatResponseResource.createUri(context.element.sessionResource, toolInvocation.toolCallId, i, permalinkBasename);
|
|
86
|
+
return { kind: 'data', value: decoded || ( new TextEncoder()).encode(o.value), mimeType: o.mimeType, uri: permalinkUri, audience: o.audience };
|
|
87
|
+
}
|
|
88
|
+
})),
|
|
89
|
+
}, isError, ChatInputOutputMarkdownProgressPart_1._expandedByDefault.get(toolInvocation) ?? false));
|
|
90
|
+
this._codeblocks.push(...collapsibleListPart.codeblocks);
|
|
91
|
+
this._register(collapsibleListPart.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
92
|
+
this._register(toDisposable(() => ChatInputOutputMarkdownProgressPart_1._expandedByDefault.set(toolInvocation, collapsibleListPart.expanded)));
|
|
93
|
+
const progressObservable = toolInvocation.kind === 'toolInvocation' ? ( toolInvocation.state.map(
|
|
94
|
+
(s, r) => s.type === IChatToolInvocation.StateKind.Executing ? s.progress.read(r) : undefined
|
|
95
|
+
)) : undefined;
|
|
96
|
+
const progressBar = ( new Lazy(() => this._register(( new ProgressBar(collapsibleListPart.domNode)))));
|
|
97
|
+
if (progressObservable) {
|
|
98
|
+
this._register(autorun(reader => {
|
|
99
|
+
const progress = progressObservable?.read(reader);
|
|
100
|
+
if (progress?.message) {
|
|
101
|
+
collapsibleListPart.title = progress.message;
|
|
102
|
+
}
|
|
103
|
+
if (progress?.progress && !IChatToolInvocation.isComplete(toolInvocation, reader)) {
|
|
104
|
+
progressBar.value.setWorked(progress.progress * 100);
|
|
105
|
+
}
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
this.domNode = collapsibleListPart.domNode;
|
|
109
|
+
}
|
|
110
|
+
getAutoApproveMessageContent() {
|
|
111
|
+
const reason = IChatToolInvocation.executionConfirmedOrDenied(this.toolInvocation);
|
|
112
|
+
if (!reason || typeof reason === 'boolean') {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
let md;
|
|
116
|
+
switch (reason.type) {
|
|
117
|
+
case ToolConfirmKind.Setting:
|
|
118
|
+
md = ( localize(
|
|
119
|
+
5132,
|
|
120
|
+
'Auto approved by {0}',
|
|
121
|
+
createMarkdownCommandLink({ title: '`' + reason.id + '`', id: 'workbench.action.openSettings', arguments: [reason.id] }, false)
|
|
122
|
+
));
|
|
123
|
+
break;
|
|
124
|
+
case ToolConfirmKind.LmServicePerTool:
|
|
125
|
+
md = reason.scope === 'session'
|
|
126
|
+
? ( localize(5133, 'Auto approved for this session'))
|
|
127
|
+
: reason.scope === 'workspace'
|
|
128
|
+
? ( localize(5134, 'Auto approved for this workspace'))
|
|
129
|
+
: ( localize(5135, 'Auto approved for this profile'));
|
|
130
|
+
md += ' (' + createMarkdownCommandLink({ title: ( localize(5136, 'Edit')), id: 'workbench.action.chat.editToolApproval', arguments: [reason.scope] }) + ')';
|
|
131
|
+
break;
|
|
132
|
+
case ToolConfirmKind.UserAction:
|
|
133
|
+
case ToolConfirmKind.Denied:
|
|
134
|
+
case ToolConfirmKind.ConfirmationNotNeeded:
|
|
135
|
+
default:
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
return ( new MarkdownString(md, { isTrusted: true }));
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
ChatInputOutputMarkdownProgressPart = ChatInputOutputMarkdownProgressPart_1 = ( __decorate([
|
|
142
|
+
( __param(8, IInstantiationService)),
|
|
143
|
+
( __param(9, IModelService)),
|
|
144
|
+
( __param(10, ILanguageService))
|
|
145
|
+
], ChatInputOutputMarkdownProgressPart));
|
|
146
|
+
|
|
147
|
+
export { ChatInputOutputMarkdownProgressPart };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { Location } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
4
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
6
|
+
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
7
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
8
|
+
import { CollapsibleListPool } from "../chatReferencesContentPart.js";
|
|
9
|
+
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
10
|
+
export declare class ChatResultListSubPart extends BaseChatToolInvocationSubPart {
|
|
11
|
+
readonly domNode: HTMLElement;
|
|
12
|
+
readonly codeblocks: IChatCodeBlockInfo[];
|
|
13
|
+
constructor(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, context: IChatContentPartRenderContext, message: string | IMarkdownString, toolDetails: Array<URI | Location>, listPool: CollapsibleListPool, instantiationService: IInstantiationService);
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
|
+
import { ChatCollapsibleListContentPart } from '../chatReferencesContentPart.js';
|
|
5
|
+
import { BaseChatToolInvocationSubPart } from './chatToolInvocationSubPart.js';
|
|
6
|
+
|
|
7
|
+
let ChatResultListSubPart = class ChatResultListSubPart extends BaseChatToolInvocationSubPart {
|
|
8
|
+
constructor(toolInvocation, context, message, toolDetails, listPool, instantiationService) {
|
|
9
|
+
super(toolInvocation);
|
|
10
|
+
this.codeblocks = [];
|
|
11
|
+
const collapsibleListPart = this._register(instantiationService.createInstance(ChatCollapsibleListContentPart, ( toolDetails.map(detail => ({
|
|
12
|
+
kind: 'reference',
|
|
13
|
+
reference: detail,
|
|
14
|
+
}))), message, context, listPool));
|
|
15
|
+
this._register(collapsibleListPart.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
16
|
+
this.domNode = collapsibleListPart.domNode;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
ChatResultListSubPart = ( __decorate([
|
|
20
|
+
( __param(5, IInstantiationService))
|
|
21
|
+
], ChatResultListSubPart));
|
|
22
|
+
|
|
23
|
+
export { ChatResultListSubPart };
|