@codingame/monaco-vscode-katex-common 24.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/empty.js +1 -0
- package/package.json +45 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +37 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +127 -0
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +27 -0
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +81 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +44 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +172 -0
- package/vscode/src/vs/platform/editor/browser/editor.d.ts +12 -0
- package/vscode/src/vs/platform/editor/browser/editor.js +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +295 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +650 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +364 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +207 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.js +216 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +114 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentModel.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentModel.js +141 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.d.ts +169 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.js +951 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer.js +109 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAgentCommandContentPart.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAgentCommandContentPart.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAnonymousRateLimitedPart.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAnonymousRateLimitedPart.js +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatChangesSummaryPart.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatChangesSummaryPart.js +286 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.js +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollapsibleContentPart.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollapsibleContentPart.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.d.ts +116 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.js +417 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentCodePools.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentCodePools.js +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatElicitationContentPart.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatElicitationContentPart.js +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorConfirmationPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorConfirmationPart.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorContentPart.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorContentPart.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatExtensionsContentPart.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatExtensionsContentPart.js +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.d.ts +94 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.js +567 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMcpServersInteractionContentPart.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMcpServersInteractionContentPart.js +224 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.js +259 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatPullRequestContentPart.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatPullRequestContentPart.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatQuotaExceededPart.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatQuotaExceededPart.js +117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +528 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.js +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +91 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.js +429 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.js +347 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInputOutputContentPart.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInputOutputContentPart.js +164 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolOutputContentSubPart.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolOutputContentSubPart.js +224 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +173 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatConfirmationWidget.css +341 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatExtensionsContent.css +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatMarkdownPart.css +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatMcpServersInteractionContent.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatPullRequestContent.css +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatTerminalToolProgressPart.css +221 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatThinkingContent.css +162 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +94 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +96 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +147 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatResultListSubPart.js +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +353 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +100 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +1085 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +275 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +119 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolOutputPart.js +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +225 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolProgressPart.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDiffBlockPart.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDiffBlockPart.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.js +388 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +721 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.js +409 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.d.ts +334 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +2008 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPartWidgets.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPartWidgets.js +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.d.ts +217 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1573 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +249 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSelectedTools.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSelectedTools.js +174 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionAction.css +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.d.ts +292 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +2014 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.d.ts +173 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +797 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.js +345 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.js +1069 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +139 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css +2880 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css +87 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatCodeBlockPill.css +139 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatInlineAnchorWidget.css +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewWelcome.css +209 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modePickerActionItem.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modePickerActionItem.js +135 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.js +147 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +279 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +28 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +176 -0
- package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +207 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +373 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +171 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +1442 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +199 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +482 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +37 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +95 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +497 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +76 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +464 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +124 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +562 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +279 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +411 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +66 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +154 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +201 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +372 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +594 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1746 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +269 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +806 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +116 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +62 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +295 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +241 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +146 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +90 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +42 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +77 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +823 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +567 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +189 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +439 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +263 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +89 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +108 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +145 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Separator } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
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 { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
5
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
6
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
7
|
+
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
8
|
+
import { IMarkdownRenderer } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer";
|
|
9
|
+
import { IMarkerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers.service";
|
|
10
|
+
import { IChatToolInvocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
11
|
+
import { CodeBlockModelCollection } from "../../../common/codeBlockModelCollection.js";
|
|
12
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service";
|
|
13
|
+
import { ILanguageModelToolsConfirmationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsConfirmationService.service";
|
|
14
|
+
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
15
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
16
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
17
|
+
import { IChatMarkdownAnchorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service";
|
|
18
|
+
import { AbstractToolConfirmationSubPart } from "./abstractToolConfirmationSubPart.js";
|
|
19
|
+
import { EditorPool } from "../chatContentCodePools.js";
|
|
20
|
+
export declare class ToolConfirmationSubPart extends AbstractToolConfirmationSubPart {
|
|
21
|
+
private readonly renderer;
|
|
22
|
+
private readonly editorPool;
|
|
23
|
+
private readonly currentWidthDelegate;
|
|
24
|
+
private readonly codeBlockModelCollection;
|
|
25
|
+
private readonly codeBlockStartIndex;
|
|
26
|
+
private readonly modelService;
|
|
27
|
+
private readonly languageService;
|
|
28
|
+
private readonly commandService;
|
|
29
|
+
private readonly markerService;
|
|
30
|
+
private readonly chatMarkdownAnchorService;
|
|
31
|
+
private readonly confirmationService;
|
|
32
|
+
private markdownParts;
|
|
33
|
+
get codeblocks(): IChatCodeBlockInfo[];
|
|
34
|
+
constructor(toolInvocation: IChatToolInvocation, context: IChatContentPartRenderContext, renderer: IMarkdownRenderer, editorPool: EditorPool, currentWidthDelegate: () => number, codeBlockModelCollection: CodeBlockModelCollection, codeBlockStartIndex: number, instantiationService: IInstantiationService, keybindingService: IKeybindingService, modelService: IModelService, languageService: ILanguageService, contextKeyService: IContextKeyService, chatWidgetService: IChatWidgetService, commandService: ICommandService, markerService: IMarkerService, languageModelToolsService: ILanguageModelToolsService, chatMarkdownAnchorService: IChatMarkdownAnchorService, confirmationService: ILanguageModelToolsConfirmationService);
|
|
35
|
+
protected additionalPrimaryActions(): (Separator | import("../chatConfirmationWidget.js").IChatConfirmationButton<() => void>)[];
|
|
36
|
+
protected createContentElement(): HTMLElement | string;
|
|
37
|
+
protected getTitle(): string;
|
|
38
|
+
private _makeMarkdownPart;
|
|
39
|
+
}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { h, createElement, addDisposableGenericMouseDownListener, addDisposableListener } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
5
|
+
import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
6
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
7
|
+
import { toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import { count } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
9
|
+
import { isEmptyObject } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
10
|
+
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
11
|
+
import { ElementSizeObserver } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/config/elementSizeObserver';
|
|
12
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
13
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
14
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
15
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
16
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
17
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
18
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
19
|
+
import { MarkerSeverity } from '@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers';
|
|
20
|
+
import { IMarkerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers.service';
|
|
21
|
+
import { ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
22
|
+
import { createToolInputUri, createToolSchemaUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
|
|
23
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
24
|
+
import { ILanguageModelToolsConfirmationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsConfirmationService.service';
|
|
25
|
+
import { SkipToolConfirmationActionId, AcceptToolConfirmationActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
26
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
27
|
+
import { renderFileWidgets } from '../../chatInlineAnchorWidget.js';
|
|
28
|
+
import { IChatMarkdownAnchorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service';
|
|
29
|
+
import { ChatMarkdownContentPart } from '../chatMarkdownContentPart.js';
|
|
30
|
+
import { AbstractToolConfirmationSubPart } from './abstractToolConfirmationSubPart.js';
|
|
31
|
+
|
|
32
|
+
const SHOW_MORE_MESSAGE_HEIGHT_TRIGGER = 45;
|
|
33
|
+
let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractToolConfirmationSubPart {
|
|
34
|
+
get codeblocks() {
|
|
35
|
+
return this.markdownParts.flatMap(part => part.codeblocks);
|
|
36
|
+
}
|
|
37
|
+
constructor(toolInvocation, context, renderer, editorPool, currentWidthDelegate, codeBlockModelCollection, codeBlockStartIndex, instantiationService, keybindingService, modelService, languageService, contextKeyService, chatWidgetService, commandService, markerService, languageModelToolsService, chatMarkdownAnchorService, confirmationService) {
|
|
38
|
+
if (!toolInvocation.confirmationMessages?.title) {
|
|
39
|
+
throw ( new Error('Confirmation messages are missing'));
|
|
40
|
+
}
|
|
41
|
+
super(toolInvocation, context, instantiationService, keybindingService, contextKeyService, chatWidgetService, languageModelToolsService);
|
|
42
|
+
this.renderer = renderer;
|
|
43
|
+
this.editorPool = editorPool;
|
|
44
|
+
this.currentWidthDelegate = currentWidthDelegate;
|
|
45
|
+
this.codeBlockModelCollection = codeBlockModelCollection;
|
|
46
|
+
this.codeBlockStartIndex = codeBlockStartIndex;
|
|
47
|
+
this.modelService = modelService;
|
|
48
|
+
this.languageService = languageService;
|
|
49
|
+
this.commandService = commandService;
|
|
50
|
+
this.markerService = markerService;
|
|
51
|
+
this.chatMarkdownAnchorService = chatMarkdownAnchorService;
|
|
52
|
+
this.confirmationService = confirmationService;
|
|
53
|
+
this.markdownParts = [];
|
|
54
|
+
this.render({
|
|
55
|
+
allowActionId: AcceptToolConfirmationActionId,
|
|
56
|
+
skipActionId: SkipToolConfirmationActionId,
|
|
57
|
+
allowLabel: toolInvocation.confirmationMessages.confirmResults ? ( localize(5162, "Allow and Review")) : ( localize(5163, "Allow")),
|
|
58
|
+
skipLabel: ( localize(5164, 'Proceed without running this tool')),
|
|
59
|
+
partType: 'chatToolConfirmation',
|
|
60
|
+
subtitle: typeof toolInvocation.originMessage === 'string' ? toolInvocation.originMessage : toolInvocation.originMessage?.value,
|
|
61
|
+
});
|
|
62
|
+
if (toolInvocation.fromSubAgent) {
|
|
63
|
+
context.container.classList.add('from-sub-agent');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
additionalPrimaryActions() {
|
|
67
|
+
const actions = super.additionalPrimaryActions();
|
|
68
|
+
if (this.toolInvocation.confirmationMessages?.allowAutoConfirm !== false) {
|
|
69
|
+
const confirmActions = this.confirmationService.getPreConfirmActions({
|
|
70
|
+
toolId: this.toolInvocation.toolId,
|
|
71
|
+
source: this.toolInvocation.source,
|
|
72
|
+
parameters: this.toolInvocation.parameters
|
|
73
|
+
});
|
|
74
|
+
for (const action of confirmActions) {
|
|
75
|
+
if (action.divider) {
|
|
76
|
+
actions.push(( new Separator()));
|
|
77
|
+
}
|
|
78
|
+
actions.push({
|
|
79
|
+
label: action.label,
|
|
80
|
+
tooltip: action.detail,
|
|
81
|
+
data: async () => {
|
|
82
|
+
const shouldConfirm = await action.select();
|
|
83
|
+
if (shouldConfirm) {
|
|
84
|
+
this.confirmWith(this.toolInvocation, { type: ToolConfirmKind.UserAction });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (this.toolInvocation.confirmationMessages?.confirmResults) {
|
|
91
|
+
actions.unshift({
|
|
92
|
+
label: ( localize(5165, 'Allow and Skip Reviewing Result')),
|
|
93
|
+
data: () => {
|
|
94
|
+
this.toolInvocation.confirmationMessages.confirmResults = undefined;
|
|
95
|
+
this.confirmWith(this.toolInvocation, { type: ToolConfirmKind.UserAction });
|
|
96
|
+
}
|
|
97
|
+
}, ( new Separator()));
|
|
98
|
+
}
|
|
99
|
+
return actions;
|
|
100
|
+
}
|
|
101
|
+
createContentElement() {
|
|
102
|
+
const { message, disclaimer } = this.toolInvocation.confirmationMessages;
|
|
103
|
+
const toolInvocation = this.toolInvocation;
|
|
104
|
+
if (typeof message === 'string' && !disclaimer) {
|
|
105
|
+
return message;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const codeBlockRenderOptions = {
|
|
109
|
+
hideToolbar: true,
|
|
110
|
+
reserveWidth: 19,
|
|
111
|
+
verticalPadding: 5,
|
|
112
|
+
editorOptions: {
|
|
113
|
+
tabFocusMode: true,
|
|
114
|
+
ariaLabel: this.getTitle(),
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
const elements = h('div', [
|
|
118
|
+
h('.message@messageContainer', [
|
|
119
|
+
h('.message-wrapper@message'),
|
|
120
|
+
h('.see-more@showMore', [
|
|
121
|
+
h('a', [( localize(5166, "Show More"))])
|
|
122
|
+
]),
|
|
123
|
+
]),
|
|
124
|
+
h('.editor@editor'),
|
|
125
|
+
h('.disclaimer@disclaimer'),
|
|
126
|
+
]);
|
|
127
|
+
if (toolInvocation.toolSpecificData?.kind === 'input' && toolInvocation.toolSpecificData.rawInput && !isEmptyObject(toolInvocation.toolSpecificData.rawInput)) {
|
|
128
|
+
const titleEl = createElement('h3');
|
|
129
|
+
titleEl.textContent = ( localize(5167, "Input"));
|
|
130
|
+
elements.editor.appendChild(titleEl);
|
|
131
|
+
const inputData = toolInvocation.toolSpecificData;
|
|
132
|
+
const codeBlockRenderOptions = {
|
|
133
|
+
hideToolbar: true,
|
|
134
|
+
reserveWidth: 19,
|
|
135
|
+
maxHeightInLines: 13,
|
|
136
|
+
verticalPadding: 5,
|
|
137
|
+
editorOptions: {
|
|
138
|
+
wordWrap: 'off',
|
|
139
|
+
readOnly: false,
|
|
140
|
+
ariaLabel: this.getTitle(),
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
const langId = this.languageService.getLanguageIdByLanguageName('json');
|
|
144
|
+
const rawJsonInput = JSON.stringify(inputData.rawInput ?? {}, null, 1);
|
|
145
|
+
const canSeeMore = count(rawJsonInput, '\n') > 2;
|
|
146
|
+
const model = this._register(this.modelService.createModel(
|
|
147
|
+
rawJsonInput.replace(/\n */g, ' '), this.languageService.createById(langId), createToolInputUri(toolInvocation.toolCallId), true));
|
|
148
|
+
const markerOwner = generateUuid();
|
|
149
|
+
const schemaUri = createToolSchemaUri(toolInvocation.toolId);
|
|
150
|
+
const validator = ( new RunOnceScheduler(async () => {
|
|
151
|
+
const newMarker = [];
|
|
152
|
+
const result = await this.commandService.executeCommand('json.validate', schemaUri, model.getValue());
|
|
153
|
+
for (const item of result ?? []) {
|
|
154
|
+
if (item.range && item.message) {
|
|
155
|
+
newMarker.push({
|
|
156
|
+
severity: item.severity === 'Error' ? MarkerSeverity.Error : MarkerSeverity.Warning,
|
|
157
|
+
message: item.message,
|
|
158
|
+
startLineNumber: item.range[0].line + 1,
|
|
159
|
+
startColumn: item.range[0].character + 1,
|
|
160
|
+
endLineNumber: item.range[1].line + 1,
|
|
161
|
+
endColumn: item.range[1].character + 1,
|
|
162
|
+
code: item.code ? String(item.code) : undefined
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
this.markerService.changeOne(markerOwner, model.uri, newMarker);
|
|
167
|
+
}, 500));
|
|
168
|
+
validator.schedule();
|
|
169
|
+
this._register(model.onDidChangeContent(() => validator.schedule()));
|
|
170
|
+
this._register(toDisposable(() => this.markerService.remove(markerOwner, [model.uri])));
|
|
171
|
+
this._register(validator);
|
|
172
|
+
const editor = this._register(this.editorPool.get());
|
|
173
|
+
editor.object.render({
|
|
174
|
+
codeBlockIndex: this.codeBlockStartIndex,
|
|
175
|
+
codeBlockPartIndex: 0,
|
|
176
|
+
element: this.context.element,
|
|
177
|
+
languageId: langId ?? 'json',
|
|
178
|
+
renderOptions: codeBlockRenderOptions,
|
|
179
|
+
textModel: Promise.resolve(model),
|
|
180
|
+
chatSessionResource: this.context.element.sessionResource
|
|
181
|
+
}, this.currentWidthDelegate());
|
|
182
|
+
this.codeblocks.push({
|
|
183
|
+
codeBlockIndex: this.codeBlockStartIndex,
|
|
184
|
+
codemapperUri: undefined,
|
|
185
|
+
elementId: this.context.element.id,
|
|
186
|
+
focus: () => editor.object.focus(),
|
|
187
|
+
ownerMarkdownPartId: this.codeblocksPartId,
|
|
188
|
+
uri: model.uri,
|
|
189
|
+
uriPromise: Promise.resolve(model.uri),
|
|
190
|
+
chatSessionResource: this.context.element.sessionResource
|
|
191
|
+
});
|
|
192
|
+
this._register(editor.object.onDidChangeContentHeight(() => {
|
|
193
|
+
editor.object.layout(this.currentWidthDelegate());
|
|
194
|
+
this._onDidChangeHeight.fire();
|
|
195
|
+
}));
|
|
196
|
+
this._register(model.onDidChangeContent(e => {
|
|
197
|
+
try {
|
|
198
|
+
inputData.rawInput = JSON.parse(model.getValue());
|
|
199
|
+
}
|
|
200
|
+
catch {
|
|
201
|
+
}
|
|
202
|
+
}));
|
|
203
|
+
elements.editor.append(editor.object.element);
|
|
204
|
+
if (canSeeMore) {
|
|
205
|
+
const seeMore = h('div.see-more', [h('a@link')]);
|
|
206
|
+
seeMore.link.textContent = ( localize(5168, "See more"));
|
|
207
|
+
this._register(addDisposableGenericMouseDownListener(seeMore.link, () => {
|
|
208
|
+
try {
|
|
209
|
+
const parsed = JSON.parse(model.getValue());
|
|
210
|
+
model.setValue(JSON.stringify(parsed, null, 2));
|
|
211
|
+
editor.object.editor.updateOptions({ tabFocusMode: false });
|
|
212
|
+
editor.object.editor.updateOptions({ wordWrap: 'on' });
|
|
213
|
+
}
|
|
214
|
+
catch {
|
|
215
|
+
}
|
|
216
|
+
seeMore.root.remove();
|
|
217
|
+
}));
|
|
218
|
+
elements.editor.append(seeMore.root);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
const mdPart = this._makeMarkdownPart(elements.message, message, codeBlockRenderOptions);
|
|
222
|
+
const messageSeeMoreObserver = this._register(( new ElementSizeObserver(mdPart.domNode, undefined)));
|
|
223
|
+
const updateSeeMoreDisplayed = () => {
|
|
224
|
+
const show = messageSeeMoreObserver.getHeight() > SHOW_MORE_MESSAGE_HEIGHT_TRIGGER;
|
|
225
|
+
if (elements.messageContainer.classList.contains('can-see-more') !== show) {
|
|
226
|
+
elements.messageContainer.classList.toggle('can-see-more', show);
|
|
227
|
+
this._onDidChangeHeight.fire();
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
this._register(addDisposableListener(elements.showMore, 'click', () => {
|
|
231
|
+
elements.messageContainer.classList.toggle('can-see-more', false);
|
|
232
|
+
this._onDidChangeHeight.fire();
|
|
233
|
+
messageSeeMoreObserver.dispose();
|
|
234
|
+
}));
|
|
235
|
+
this._register(messageSeeMoreObserver.onDidChange(updateSeeMoreDisplayed));
|
|
236
|
+
messageSeeMoreObserver.startObserving();
|
|
237
|
+
if (disclaimer) {
|
|
238
|
+
this._makeMarkdownPart(elements.disclaimer, disclaimer, codeBlockRenderOptions);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
elements.disclaimer.remove();
|
|
242
|
+
}
|
|
243
|
+
return elements.root;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
getTitle() {
|
|
247
|
+
const { title } = this.toolInvocation.confirmationMessages;
|
|
248
|
+
return typeof title === 'string' ? title : title.value;
|
|
249
|
+
}
|
|
250
|
+
_makeMarkdownPart(container, message, codeBlockRenderOptions) {
|
|
251
|
+
const part = this._register(this.instantiationService.createInstance(ChatMarkdownContentPart, {
|
|
252
|
+
kind: 'markdownContent',
|
|
253
|
+
content: typeof message === 'string' ? ( new MarkdownString()).appendMarkdown(message) : message
|
|
254
|
+
}, this.context, this.editorPool, false, this.codeBlockStartIndex, this.renderer, undefined, this.currentWidthDelegate(), this.codeBlockModelCollection, { codeBlockRenderOptions }));
|
|
255
|
+
renderFileWidgets(part.domNode, this.instantiationService, this.chatMarkdownAnchorService, this._store);
|
|
256
|
+
container.append(part.domNode);
|
|
257
|
+
this._register(part.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
258
|
+
return part;
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
ToolConfirmationSubPart = ( __decorate([
|
|
262
|
+
( __param(7, IInstantiationService)),
|
|
263
|
+
( __param(8, IKeybindingService)),
|
|
264
|
+
( __param(9, IModelService)),
|
|
265
|
+
( __param(10, ILanguageService)),
|
|
266
|
+
( __param(11, IContextKeyService)),
|
|
267
|
+
( __param(12, IChatWidgetService)),
|
|
268
|
+
( __param(13, ICommandService)),
|
|
269
|
+
( __param(14, IMarkerService)),
|
|
270
|
+
( __param(15, ILanguageModelToolsService)),
|
|
271
|
+
( __param(16, IChatMarkdownAnchorService)),
|
|
272
|
+
( __param(17, ILanguageModelToolsConfirmationService))
|
|
273
|
+
], ToolConfirmationSubPart));
|
|
274
|
+
|
|
275
|
+
export { ToolConfirmationSubPart };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
3
|
+
import { IMarkdownRenderer } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer";
|
|
4
|
+
import { IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
5
|
+
import { IChatRendererContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel";
|
|
6
|
+
import { CodeBlockModelCollection } from "../../../common/codeBlockModelCollection.js";
|
|
7
|
+
import { ChatTreeItem, IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
8
|
+
import { EditorPool } from "../chatContentCodePools.js";
|
|
9
|
+
import { IChatContentPart, IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
10
|
+
import { CollapsibleListPool } from "../chatReferencesContentPart.js";
|
|
11
|
+
export declare class ChatToolInvocationPart extends Disposable implements IChatContentPart {
|
|
12
|
+
private readonly toolInvocation;
|
|
13
|
+
private readonly context;
|
|
14
|
+
private readonly renderer;
|
|
15
|
+
private readonly listPool;
|
|
16
|
+
private readonly editorPool;
|
|
17
|
+
private readonly currentWidthDelegate;
|
|
18
|
+
private readonly codeBlockModelCollection;
|
|
19
|
+
private readonly announcedToolProgressKeys;
|
|
20
|
+
private readonly codeBlockStartIndex;
|
|
21
|
+
private readonly instantiationService;
|
|
22
|
+
readonly domNode: HTMLElement;
|
|
23
|
+
private _onDidChangeHeight;
|
|
24
|
+
readonly onDidChangeHeight: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
25
|
+
get codeblocks(): IChatCodeBlockInfo[];
|
|
26
|
+
get codeblocksPartId(): string | undefined;
|
|
27
|
+
private subPart;
|
|
28
|
+
constructor(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, context: IChatContentPartRenderContext, renderer: IMarkdownRenderer, listPool: CollapsibleListPool, editorPool: EditorPool, currentWidthDelegate: () => number, codeBlockModelCollection: CodeBlockModelCollection, announcedToolProgressKeys: Set<string> | undefined, codeBlockStartIndex: number, instantiationService: IInstantiationService);
|
|
29
|
+
private createToolInvocationSubPart;
|
|
30
|
+
hasSameContent(other: IChatRendererContent, followingContent: IChatRendererContent[], element: ChatTreeItem): boolean;
|
|
31
|
+
addDisposable(disposable: IDisposable): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { $, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
+
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
7
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
+
import { IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
9
|
+
import { ToolInvocationPresentation, isToolResultOutputDetails, isToolResultInputOutputDetails } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
|
|
10
|
+
import { ExtensionsInstallConfirmationWidgetSubPart } from './chatExtensionsInstallToolSubPart.js';
|
|
11
|
+
import { ChatInputOutputMarkdownProgressPart } from './chatInputOutputMarkdownProgressPart.js';
|
|
12
|
+
import { ChatResultListSubPart } from './chatResultListSubPart.js';
|
|
13
|
+
import { ChatTerminalToolConfirmationSubPart } from './chatTerminalToolConfirmationSubPart.js';
|
|
14
|
+
import { ChatTerminalToolProgressPart } from './chatTerminalToolProgressPart.js';
|
|
15
|
+
import { ToolConfirmationSubPart } from './chatToolConfirmationSubPart.js';
|
|
16
|
+
import { ChatToolOutputSubPart } from './chatToolOutputPart.js';
|
|
17
|
+
import { ChatToolPostExecuteConfirmationPart } from './chatToolPostExecuteConfirmationPart.js';
|
|
18
|
+
import { ChatToolProgressSubPart } from './chatToolProgressPart.js';
|
|
19
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
20
|
+
|
|
21
|
+
let ChatToolInvocationPart = class ChatToolInvocationPart extends Disposable {
|
|
22
|
+
get codeblocks() {
|
|
23
|
+
return this.subPart?.codeblocks ?? [];
|
|
24
|
+
}
|
|
25
|
+
get codeblocksPartId() {
|
|
26
|
+
return this.subPart?.codeblocksPartId;
|
|
27
|
+
}
|
|
28
|
+
constructor(toolInvocation, context, renderer, listPool, editorPool, currentWidthDelegate, codeBlockModelCollection, announcedToolProgressKeys, codeBlockStartIndex, instantiationService) {
|
|
29
|
+
super();
|
|
30
|
+
this.toolInvocation = toolInvocation;
|
|
31
|
+
this.context = context;
|
|
32
|
+
this.renderer = renderer;
|
|
33
|
+
this.listPool = listPool;
|
|
34
|
+
this.editorPool = editorPool;
|
|
35
|
+
this.currentWidthDelegate = currentWidthDelegate;
|
|
36
|
+
this.codeBlockModelCollection = codeBlockModelCollection;
|
|
37
|
+
this.announcedToolProgressKeys = announcedToolProgressKeys;
|
|
38
|
+
this.codeBlockStartIndex = codeBlockStartIndex;
|
|
39
|
+
this.instantiationService = instantiationService;
|
|
40
|
+
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
41
|
+
this.onDidChangeHeight = this._onDidChangeHeight.event;
|
|
42
|
+
this.domNode = $('.chat-tool-invocation-part');
|
|
43
|
+
if (toolInvocation.fromSubAgent) {
|
|
44
|
+
this.domNode.classList.add('from-sub-agent');
|
|
45
|
+
}
|
|
46
|
+
if (toolInvocation.presentation === 'hidden') {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (toolInvocation.kind === 'toolInvocation') {
|
|
50
|
+
const initialState = toolInvocation.state.get().type;
|
|
51
|
+
this._register(autorun(reader => {
|
|
52
|
+
if (toolInvocation.state.read(reader).type !== initialState) {
|
|
53
|
+
render();
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
const partStore = this._register(( new DisposableStore()));
|
|
58
|
+
const render = () => {
|
|
59
|
+
clearNode(this.domNode);
|
|
60
|
+
partStore.clear();
|
|
61
|
+
if (toolInvocation.presentation === ToolInvocationPresentation.HiddenAfterComplete && IChatToolInvocation.isComplete(toolInvocation)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
this.subPart = partStore.add(this.createToolInvocationSubPart());
|
|
65
|
+
this.domNode.appendChild(this.subPart.domNode);
|
|
66
|
+
partStore.add(this.subPart.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
67
|
+
partStore.add(this.subPart.onNeedsRerender(render));
|
|
68
|
+
this._onDidChangeHeight.fire();
|
|
69
|
+
};
|
|
70
|
+
render();
|
|
71
|
+
}
|
|
72
|
+
createToolInvocationSubPart() {
|
|
73
|
+
if (this.toolInvocation.kind === 'toolInvocation') {
|
|
74
|
+
if (this.toolInvocation.toolSpecificData?.kind === 'extensions') {
|
|
75
|
+
return this.instantiationService.createInstance(ExtensionsInstallConfirmationWidgetSubPart, this.toolInvocation, this.context);
|
|
76
|
+
}
|
|
77
|
+
const state = this.toolInvocation.state.get();
|
|
78
|
+
if (state.type === IChatToolInvocation.StateKind.WaitingForConfirmation) {
|
|
79
|
+
if (this.toolInvocation.toolSpecificData?.kind === 'terminal') {
|
|
80
|
+
return this.instantiationService.createInstance(ChatTerminalToolConfirmationSubPart, this.toolInvocation, this.toolInvocation.toolSpecificData, this.context, this.renderer, this.editorPool, this.currentWidthDelegate, this.codeBlockModelCollection, this.codeBlockStartIndex);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return this.instantiationService.createInstance(ToolConfirmationSubPart, this.toolInvocation, this.context, this.renderer, this.editorPool, this.currentWidthDelegate, this.codeBlockModelCollection, this.codeBlockStartIndex);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (state.type === IChatToolInvocation.StateKind.WaitingForPostApproval) {
|
|
87
|
+
return this.instantiationService.createInstance(ChatToolPostExecuteConfirmationPart, this.toolInvocation, this.context);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (this.toolInvocation.toolSpecificData?.kind === 'terminal') {
|
|
91
|
+
return this.instantiationService.createInstance(ChatTerminalToolProgressPart, this.toolInvocation, this.toolInvocation.toolSpecificData, this.context, this.renderer, this.editorPool, this.currentWidthDelegate, this.codeBlockStartIndex, this.codeBlockModelCollection);
|
|
92
|
+
}
|
|
93
|
+
const resultDetails = IChatToolInvocation.resultDetails(this.toolInvocation);
|
|
94
|
+
if (Array.isArray(resultDetails) && resultDetails.length) {
|
|
95
|
+
return this.instantiationService.createInstance(ChatResultListSubPart, this.toolInvocation, this.context, this.toolInvocation.pastTenseMessage ?? this.toolInvocation.invocationMessage, resultDetails, this.listPool);
|
|
96
|
+
}
|
|
97
|
+
if (isToolResultOutputDetails(resultDetails)) {
|
|
98
|
+
return this.instantiationService.createInstance(ChatToolOutputSubPart, this.toolInvocation, this.context);
|
|
99
|
+
}
|
|
100
|
+
if (isToolResultInputOutputDetails(resultDetails)) {
|
|
101
|
+
return this.instantiationService.createInstance(ChatInputOutputMarkdownProgressPart, this.toolInvocation, this.context, this.codeBlockStartIndex, this.toolInvocation.pastTenseMessage ?? this.toolInvocation.invocationMessage, this.toolInvocation.originMessage, resultDetails.input, resultDetails.output, !!resultDetails.isError);
|
|
102
|
+
}
|
|
103
|
+
if (this.toolInvocation.kind === 'toolInvocation' && this.toolInvocation.toolSpecificData?.kind === 'input' && !IChatToolInvocation.isComplete(this.toolInvocation)) {
|
|
104
|
+
return this.instantiationService.createInstance(ChatInputOutputMarkdownProgressPart, this.toolInvocation, this.context, this.codeBlockStartIndex, this.toolInvocation.invocationMessage, this.toolInvocation.originMessage, typeof this.toolInvocation.toolSpecificData.rawInput === 'string' ? this.toolInvocation.toolSpecificData.rawInput : JSON.stringify(this.toolInvocation.toolSpecificData.rawInput, null, 2), undefined, false);
|
|
105
|
+
}
|
|
106
|
+
return this.instantiationService.createInstance(ChatToolProgressSubPart, this.toolInvocation, this.context, this.renderer, this.announcedToolProgressKeys);
|
|
107
|
+
}
|
|
108
|
+
hasSameContent(other, followingContent, element) {
|
|
109
|
+
return (other.kind === 'toolInvocation' || other.kind === 'toolInvocationSerialized') && this.toolInvocation.toolCallId === other.toolCallId;
|
|
110
|
+
}
|
|
111
|
+
addDisposable(disposable) {
|
|
112
|
+
this._register(disposable);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
ChatToolInvocationPart = ( __decorate([
|
|
116
|
+
( __param(9, IInstantiationService))
|
|
117
|
+
], ChatToolInvocationPart));
|
|
118
|
+
|
|
119
|
+
export { ChatToolInvocationPart };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Emitter } 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 { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
|
|
4
|
+
import { IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
5
|
+
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
6
|
+
export declare abstract class BaseChatToolInvocationSubPart extends Disposable {
|
|
7
|
+
protected readonly toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized;
|
|
8
|
+
protected static idPool: number;
|
|
9
|
+
abstract readonly domNode: HTMLElement;
|
|
10
|
+
protected _onNeedsRerender: Emitter<void>;
|
|
11
|
+
readonly onNeedsRerender: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
12
|
+
protected _onDidChangeHeight: Emitter<void>;
|
|
13
|
+
readonly onDidChangeHeight: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
14
|
+
abstract codeblocks: IChatCodeBlockInfo[];
|
|
15
|
+
private readonly _codeBlocksPartId;
|
|
16
|
+
get codeblocksPartId(): string;
|
|
17
|
+
constructor(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized);
|
|
18
|
+
protected getIcon(): ThemeIcon;
|
|
19
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
6
|
+
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
7
|
+
|
|
8
|
+
class BaseChatToolInvocationSubPart extends Disposable {
|
|
9
|
+
static { this.idPool = 0; }
|
|
10
|
+
get codeblocksPartId() {
|
|
11
|
+
return this._codeBlocksPartId;
|
|
12
|
+
}
|
|
13
|
+
constructor(toolInvocation) {
|
|
14
|
+
super();
|
|
15
|
+
this.toolInvocation = toolInvocation;
|
|
16
|
+
this._onNeedsRerender = this._register(( new Emitter()));
|
|
17
|
+
this.onNeedsRerender = this._onNeedsRerender.event;
|
|
18
|
+
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
19
|
+
this.onDidChangeHeight = this._onDidChangeHeight.event;
|
|
20
|
+
this._codeBlocksPartId = 'tool-' + (BaseChatToolInvocationSubPart.idPool++);
|
|
21
|
+
}
|
|
22
|
+
getIcon() {
|
|
23
|
+
const toolInvocation = this.toolInvocation;
|
|
24
|
+
const confirmState = IChatToolInvocation.executionConfirmedOrDenied(toolInvocation);
|
|
25
|
+
const isSkipped = confirmState?.type === ToolConfirmKind.Skipped;
|
|
26
|
+
if (isSkipped) {
|
|
27
|
+
return Codicon.circleSlash;
|
|
28
|
+
}
|
|
29
|
+
return confirmState?.type === ToolConfirmKind.Denied ?
|
|
30
|
+
Codicon.error :
|
|
31
|
+
IChatToolInvocation.isComplete(toolInvocation) ?
|
|
32
|
+
Codicon.check : ThemeIcon.modify(Codicon.loading, 'spin');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { BaseChatToolInvocationSubPart };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
3
|
+
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
4
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
5
|
+
import { IChatOutputRendererService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service";
|
|
6
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
7
|
+
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
8
|
+
export declare class ChatToolOutputSubPart extends BaseChatToolInvocationSubPart {
|
|
9
|
+
private readonly context;
|
|
10
|
+
private readonly chatOutputItemRendererService;
|
|
11
|
+
private readonly chatWidgetService;
|
|
12
|
+
private readonly instantiationService;
|
|
13
|
+
/** Remembers cached state on re-render */
|
|
14
|
+
private static readonly _cachedStates;
|
|
15
|
+
readonly domNode: HTMLElement;
|
|
16
|
+
readonly codeblocks: IChatCodeBlockInfo[];
|
|
17
|
+
private readonly _disposeCts;
|
|
18
|
+
constructor(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, context: IChatContentPartRenderContext, chatOutputItemRendererService: IChatOutputRendererService, chatWidgetService: IChatWidgetService, instantiationService: IInstantiationService);
|
|
19
|
+
dispose(): void;
|
|
20
|
+
private createOutputPart;
|
|
21
|
+
}
|