@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,130 @@
|
|
|
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 { renderMarkdown } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
|
|
5
|
+
import { decodeBase64 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
6
|
+
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
7
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
8
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
9
|
+
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
10
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
11
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
12
|
+
import { IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
13
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
14
|
+
import { IChatOutputRendererService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service';
|
|
15
|
+
import { ChatProgressSubPart } from '../chatProgressContentPart.js';
|
|
16
|
+
import { BaseChatToolInvocationSubPart } from './chatToolInvocationSubPart.js';
|
|
17
|
+
|
|
18
|
+
var ChatToolOutputSubPart_1;
|
|
19
|
+
let ChatToolOutputSubPart = class ChatToolOutputSubPart extends BaseChatToolInvocationSubPart {
|
|
20
|
+
static { ChatToolOutputSubPart_1 = this; }
|
|
21
|
+
static { this._cachedStates = ( new WeakMap()); }
|
|
22
|
+
constructor(toolInvocation, context, chatOutputItemRendererService, chatWidgetService, instantiationService) {
|
|
23
|
+
super(toolInvocation);
|
|
24
|
+
this.context = context;
|
|
25
|
+
this.chatOutputItemRendererService = chatOutputItemRendererService;
|
|
26
|
+
this.chatWidgetService = chatWidgetService;
|
|
27
|
+
this.instantiationService = instantiationService;
|
|
28
|
+
this.codeblocks = [];
|
|
29
|
+
this._disposeCts = this._register(( new CancellationTokenSource()));
|
|
30
|
+
const details = toolInvocation.kind === 'toolInvocation'
|
|
31
|
+
? IChatToolInvocation.resultDetails(toolInvocation)
|
|
32
|
+
: {
|
|
33
|
+
output: {
|
|
34
|
+
type: 'data',
|
|
35
|
+
mimeType: toolInvocation.resultDetails.output.mimeType,
|
|
36
|
+
value: decodeBase64(toolInvocation.resultDetails.output.base64Data),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
this.domNode = $('div.tool-output-part');
|
|
40
|
+
const titleEl = $('.output-title');
|
|
41
|
+
this.domNode.appendChild(titleEl);
|
|
42
|
+
if (typeof toolInvocation.invocationMessage === 'string') {
|
|
43
|
+
titleEl.textContent = toolInvocation.invocationMessage;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const md = this._register(renderMarkdown(toolInvocation.invocationMessage));
|
|
47
|
+
titleEl.appendChild(md.element);
|
|
48
|
+
}
|
|
49
|
+
this.domNode.appendChild(this.createOutputPart(toolInvocation, details));
|
|
50
|
+
}
|
|
51
|
+
dispose() {
|
|
52
|
+
this._disposeCts.dispose(true);
|
|
53
|
+
super.dispose();
|
|
54
|
+
}
|
|
55
|
+
createOutputPart(toolInvocation, details) {
|
|
56
|
+
const vm = this.chatWidgetService.getWidgetBySessionResource(this.context.element.sessionResource)?.viewModel;
|
|
57
|
+
const parent = $('div.webview-output');
|
|
58
|
+
parent.style.maxHeight = '80vh';
|
|
59
|
+
let partState = { height: 0, webviewOrigin: generateUuid() };
|
|
60
|
+
if (vm) {
|
|
61
|
+
let allStates = ChatToolOutputSubPart_1._cachedStates.get(vm);
|
|
62
|
+
if (!allStates) {
|
|
63
|
+
allStates = ( new Map());
|
|
64
|
+
ChatToolOutputSubPart_1._cachedStates.set(vm, allStates);
|
|
65
|
+
}
|
|
66
|
+
const cachedState = allStates.get(toolInvocation.toolCallId);
|
|
67
|
+
if (cachedState) {
|
|
68
|
+
partState = cachedState;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
allStates.set(toolInvocation.toolCallId, partState);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (partState.height) {
|
|
75
|
+
parent.style.height = `${partState.height}px`;
|
|
76
|
+
}
|
|
77
|
+
const progressMessage = $('span');
|
|
78
|
+
progressMessage.textContent = ( localize(5169, 'Rendering tool output...'));
|
|
79
|
+
const progressPart = this._register(this.instantiationService.createInstance(ChatProgressSubPart, progressMessage, ThemeIcon.modify(Codicon.loading, 'spin'), undefined));
|
|
80
|
+
parent.appendChild(progressPart.domNode);
|
|
81
|
+
this.chatOutputItemRendererService.renderOutputPart(details.output.mimeType, details.output.value.buffer, parent, { origin: partState.webviewOrigin }, this._disposeCts.token).then((renderedItem) => {
|
|
82
|
+
if (this._disposeCts.token.isCancellationRequested) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this._register(renderedItem);
|
|
86
|
+
progressPart.domNode.remove();
|
|
87
|
+
this._onDidChangeHeight.fire();
|
|
88
|
+
this._register(renderedItem.onDidChangeHeight(newHeight => {
|
|
89
|
+
this._onDidChangeHeight.fire();
|
|
90
|
+
partState.height = newHeight;
|
|
91
|
+
}));
|
|
92
|
+
this._register(renderedItem.webview.onDidWheel(e => {
|
|
93
|
+
this.chatWidgetService.getWidgetBySessionResource(this.context.element.sessionResource)?.delegateScrollFromMouseWheelEvent({
|
|
94
|
+
...e,
|
|
95
|
+
preventDefault: () => { },
|
|
96
|
+
stopPropagation: () => { }
|
|
97
|
+
});
|
|
98
|
+
}));
|
|
99
|
+
const widget = this.chatWidgetService.getWidgetBySessionResource(this.context.element.sessionResource);
|
|
100
|
+
if (widget) {
|
|
101
|
+
this._register(widget?.onDidShow(() => {
|
|
102
|
+
renderedItem.reinitialize();
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
}, (error) => {
|
|
106
|
+
console.error('Error rendering tool output:', error);
|
|
107
|
+
const errorNode = $('.output-error');
|
|
108
|
+
const errorHeaderNode = $('.output-error-header');
|
|
109
|
+
append(errorNode, errorHeaderNode);
|
|
110
|
+
const iconElement = $('div');
|
|
111
|
+
iconElement.classList.add(...ThemeIcon.asClassNameArray(Codicon.error));
|
|
112
|
+
errorHeaderNode.append(iconElement);
|
|
113
|
+
const errorTitleNode = $('.output-error-title');
|
|
114
|
+
errorTitleNode.textContent = ( localize(5170, "Error rendering the tool output"));
|
|
115
|
+
errorHeaderNode.append(errorTitleNode);
|
|
116
|
+
const errorMessageNode = $('.output-error-details');
|
|
117
|
+
errorMessageNode.textContent = error?.message || String(error);
|
|
118
|
+
errorNode.append(errorMessageNode);
|
|
119
|
+
progressPart.domNode.replaceWith(errorNode);
|
|
120
|
+
});
|
|
121
|
+
return parent;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
ChatToolOutputSubPart = ChatToolOutputSubPart_1 = ( __decorate([
|
|
125
|
+
( __param(2, IChatOutputRendererService)),
|
|
126
|
+
( __param(3, IChatWidgetService)),
|
|
127
|
+
( __param(4, IInstantiationService))
|
|
128
|
+
], ChatToolOutputSubPart));
|
|
129
|
+
|
|
130
|
+
export { ChatToolOutputSubPart };
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
5
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
7
|
+
import { IChatToolInvocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
8
|
+
import { ILanguageModelToolsConfirmationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsConfirmationService.service";
|
|
9
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service";
|
|
10
|
+
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
11
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
12
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
13
|
+
import { AbstractToolConfirmationSubPart } from "./abstractToolConfirmationSubPart.js";
|
|
14
|
+
export declare class ChatToolPostExecuteConfirmationPart extends AbstractToolConfirmationSubPart {
|
|
15
|
+
private readonly modelService;
|
|
16
|
+
private readonly languageService;
|
|
17
|
+
private readonly confirmationService;
|
|
18
|
+
private _codeblocks;
|
|
19
|
+
get codeblocks(): IChatCodeBlockInfo[];
|
|
20
|
+
constructor(toolInvocation: IChatToolInvocation, context: IChatContentPartRenderContext, instantiationService: IInstantiationService, keybindingService: IKeybindingService, modelService: IModelService, languageService: ILanguageService, contextKeyService: IContextKeyService, chatWidgetService: IChatWidgetService, languageModelToolsService: ILanguageModelToolsService, confirmationService: ILanguageModelToolsConfirmationService);
|
|
21
|
+
protected createContentElement(): HTMLElement;
|
|
22
|
+
protected getTitle(): string;
|
|
23
|
+
protected additionalPrimaryActions(): (Separator | import("../chatConfirmationWidget.js").IChatConfirmationButton<() => void>)[];
|
|
24
|
+
private createResultsDisplay;
|
|
25
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { $ } 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 { getExtensionForMimeType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/mime';
|
|
6
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
7
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
8
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
9
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
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 { ChatResponseResource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
13
|
+
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
14
|
+
import { ILanguageModelToolsConfirmationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsConfirmationService.service';
|
|
15
|
+
import { stringifyPromptTsxPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
|
|
16
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
17
|
+
import { SkipToolPostConfirmationActionId, AcceptToolPostConfirmationActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
18
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
19
|
+
import { ChatToolOutputContentSubPart } from '../chatToolOutputContentSubPart.js';
|
|
20
|
+
import { AbstractToolConfirmationSubPart } from './abstractToolConfirmationSubPart.js';
|
|
21
|
+
|
|
22
|
+
let ChatToolPostExecuteConfirmationPart = class ChatToolPostExecuteConfirmationPart extends AbstractToolConfirmationSubPart {
|
|
23
|
+
get codeblocks() {
|
|
24
|
+
return this._codeblocks;
|
|
25
|
+
}
|
|
26
|
+
constructor(toolInvocation, context, instantiationService, keybindingService, modelService, languageService, contextKeyService, chatWidgetService, languageModelToolsService, confirmationService) {
|
|
27
|
+
super(toolInvocation, context, instantiationService, keybindingService, contextKeyService, chatWidgetService, languageModelToolsService);
|
|
28
|
+
this.modelService = modelService;
|
|
29
|
+
this.languageService = languageService;
|
|
30
|
+
this.confirmationService = confirmationService;
|
|
31
|
+
this._codeblocks = [];
|
|
32
|
+
const subtitle = toolInvocation.pastTenseMessage || toolInvocation.invocationMessage;
|
|
33
|
+
this.render({
|
|
34
|
+
allowActionId: AcceptToolPostConfirmationActionId,
|
|
35
|
+
skipActionId: SkipToolPostConfirmationActionId,
|
|
36
|
+
allowLabel: ( localize(5171, "Allow")),
|
|
37
|
+
skipLabel: ( localize(5172, 'Skip Results')),
|
|
38
|
+
partType: 'chatToolPostConfirmation',
|
|
39
|
+
subtitle: typeof subtitle === 'string' ? subtitle : subtitle?.value,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
createContentElement() {
|
|
43
|
+
if (this.toolInvocation.kind !== 'toolInvocation') {
|
|
44
|
+
throw ( new Error('post-approval not supported for serialized data'));
|
|
45
|
+
}
|
|
46
|
+
const state = this.toolInvocation.state.get();
|
|
47
|
+
if (state.type !== IChatToolInvocation.StateKind.WaitingForPostApproval) {
|
|
48
|
+
throw ( new Error('Tool invocation is not waiting for post-approval'));
|
|
49
|
+
}
|
|
50
|
+
return this.createResultsDisplay(this.toolInvocation, state.contentForModel);
|
|
51
|
+
}
|
|
52
|
+
getTitle() {
|
|
53
|
+
return localize(5173, "Approve Tool Result");
|
|
54
|
+
}
|
|
55
|
+
additionalPrimaryActions() {
|
|
56
|
+
const actions = super.additionalPrimaryActions();
|
|
57
|
+
const confirmActions = this.confirmationService.getPostConfirmActions({
|
|
58
|
+
toolId: this.toolInvocation.toolId,
|
|
59
|
+
source: this.toolInvocation.source,
|
|
60
|
+
parameters: this.toolInvocation.parameters
|
|
61
|
+
});
|
|
62
|
+
for (const action of confirmActions) {
|
|
63
|
+
if (action.divider) {
|
|
64
|
+
actions.push(( new Separator()));
|
|
65
|
+
}
|
|
66
|
+
actions.push({
|
|
67
|
+
label: action.label,
|
|
68
|
+
tooltip: action.detail,
|
|
69
|
+
data: async () => {
|
|
70
|
+
const shouldConfirm = await action.select();
|
|
71
|
+
if (shouldConfirm) {
|
|
72
|
+
this.confirmWith(this.toolInvocation, { type: ToolConfirmKind.UserAction });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return actions;
|
|
78
|
+
}
|
|
79
|
+
createResultsDisplay(toolInvocation, contentForModel) {
|
|
80
|
+
const container = $('.tool-postconfirm-display');
|
|
81
|
+
if (!contentForModel || contentForModel.length === 0) {
|
|
82
|
+
container.textContent = ( localize(5174, 'No results to display'));
|
|
83
|
+
return container;
|
|
84
|
+
}
|
|
85
|
+
const parts = [];
|
|
86
|
+
for (const [i, part] of contentForModel.entries()) {
|
|
87
|
+
if (part.kind === 'text') {
|
|
88
|
+
const model = this._register(this.modelService.createModel(part.value, this.languageService.createById('plaintext'), undefined, true));
|
|
89
|
+
parts.push({
|
|
90
|
+
kind: 'code',
|
|
91
|
+
textModel: model,
|
|
92
|
+
languageId: model.getLanguageId(),
|
|
93
|
+
options: {
|
|
94
|
+
hideToolbar: true,
|
|
95
|
+
reserveWidth: 19,
|
|
96
|
+
maxHeightInLines: 13,
|
|
97
|
+
verticalPadding: 5,
|
|
98
|
+
editorOptions: { wordWrap: 'on', readOnly: true }
|
|
99
|
+
},
|
|
100
|
+
codeBlockInfo: {
|
|
101
|
+
codeBlockIndex: i,
|
|
102
|
+
codemapperUri: undefined,
|
|
103
|
+
elementId: this.context.element.id,
|
|
104
|
+
focus: () => { },
|
|
105
|
+
ownerMarkdownPartId: this.codeblocksPartId,
|
|
106
|
+
uri: model.uri,
|
|
107
|
+
chatSessionResource: this.context.element.sessionResource,
|
|
108
|
+
uriPromise: Promise.resolve(model.uri)
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
else if (part.kind === 'promptTsx') {
|
|
113
|
+
const stringified = stringifyPromptTsxPart(part);
|
|
114
|
+
const model = this._register(this.modelService.createModel(stringified, this.languageService.createById('json'), undefined, true));
|
|
115
|
+
parts.push({
|
|
116
|
+
kind: 'code',
|
|
117
|
+
textModel: model,
|
|
118
|
+
languageId: model.getLanguageId(),
|
|
119
|
+
options: {
|
|
120
|
+
hideToolbar: true,
|
|
121
|
+
reserveWidth: 19,
|
|
122
|
+
maxHeightInLines: 13,
|
|
123
|
+
verticalPadding: 5,
|
|
124
|
+
editorOptions: { wordWrap: 'on', readOnly: true }
|
|
125
|
+
},
|
|
126
|
+
codeBlockInfo: {
|
|
127
|
+
codeBlockIndex: i,
|
|
128
|
+
codemapperUri: undefined,
|
|
129
|
+
elementId: this.context.element.id,
|
|
130
|
+
focus: () => { },
|
|
131
|
+
ownerMarkdownPartId: this.codeblocksPartId,
|
|
132
|
+
uri: model.uri,
|
|
133
|
+
chatSessionResource: this.context.element.sessionResource,
|
|
134
|
+
uriPromise: Promise.resolve(model.uri)
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
else if (part.kind === 'data') {
|
|
139
|
+
const mimeType = part.value.mimeType;
|
|
140
|
+
const data = part.value.data;
|
|
141
|
+
if (mimeType?.startsWith('image/')) {
|
|
142
|
+
const permalinkBasename = getExtensionForMimeType(mimeType) ? `image${getExtensionForMimeType(mimeType)}` : 'image.bin';
|
|
143
|
+
const permalinkUri = ChatResponseResource.createUri(this.context.element.sessionResource, toolInvocation.toolCallId, i, permalinkBasename);
|
|
144
|
+
parts.push({ kind: 'data', value: data.buffer, mimeType, uri: permalinkUri, audience: part.audience });
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
const decoder = ( new TextDecoder('utf-8', { fatal: true }));
|
|
148
|
+
try {
|
|
149
|
+
const text = decoder.decode(data.buffer);
|
|
150
|
+
const model = this._register(this.modelService.createModel(text, this.languageService.createById('plaintext'), undefined, true));
|
|
151
|
+
parts.push({
|
|
152
|
+
kind: 'code',
|
|
153
|
+
textModel: model,
|
|
154
|
+
languageId: model.getLanguageId(),
|
|
155
|
+
options: {
|
|
156
|
+
hideToolbar: true,
|
|
157
|
+
reserveWidth: 19,
|
|
158
|
+
maxHeightInLines: 13,
|
|
159
|
+
verticalPadding: 5,
|
|
160
|
+
editorOptions: { wordWrap: 'on', readOnly: true }
|
|
161
|
+
},
|
|
162
|
+
codeBlockInfo: {
|
|
163
|
+
codeBlockIndex: i,
|
|
164
|
+
codemapperUri: undefined,
|
|
165
|
+
elementId: this.context.element.id,
|
|
166
|
+
focus: () => { },
|
|
167
|
+
ownerMarkdownPartId: this.codeblocksPartId,
|
|
168
|
+
uri: model.uri,
|
|
169
|
+
chatSessionResource: this.context.element.sessionResource,
|
|
170
|
+
uriPromise: Promise.resolve(model.uri)
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
const base64 = ( data.toString());
|
|
176
|
+
const model = this._register(this.modelService.createModel(base64, this.languageService.createById('plaintext'), undefined, true));
|
|
177
|
+
parts.push({
|
|
178
|
+
kind: 'code',
|
|
179
|
+
textModel: model,
|
|
180
|
+
languageId: model.getLanguageId(),
|
|
181
|
+
options: {
|
|
182
|
+
hideToolbar: true,
|
|
183
|
+
reserveWidth: 19,
|
|
184
|
+
maxHeightInLines: 13,
|
|
185
|
+
verticalPadding: 5,
|
|
186
|
+
editorOptions: { wordWrap: 'on', readOnly: true }
|
|
187
|
+
},
|
|
188
|
+
codeBlockInfo: {
|
|
189
|
+
codeBlockIndex: i,
|
|
190
|
+
codemapperUri: undefined,
|
|
191
|
+
elementId: this.context.element.id,
|
|
192
|
+
focus: () => { },
|
|
193
|
+
ownerMarkdownPartId: this.codeblocksPartId,
|
|
194
|
+
uri: model.uri,
|
|
195
|
+
chatSessionResource: this.context.element.sessionResource,
|
|
196
|
+
uriPromise: Promise.resolve(model.uri)
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (parts.length > 0) {
|
|
204
|
+
const outputSubPart = this._register(this.instantiationService.createInstance(ChatToolOutputContentSubPart, this.context, parts));
|
|
205
|
+
this._codeblocks.push(...outputSubPart.codeblocks);
|
|
206
|
+
this._register(outputSubPart.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
207
|
+
outputSubPart.domNode.classList.add('tool-postconfirm-display');
|
|
208
|
+
return outputSubPart.domNode;
|
|
209
|
+
}
|
|
210
|
+
container.textContent = ( localize(5175, 'No displayable results'));
|
|
211
|
+
return container;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
ChatToolPostExecuteConfirmationPart = ( __decorate([
|
|
215
|
+
( __param(2, IInstantiationService)),
|
|
216
|
+
( __param(3, IKeybindingService)),
|
|
217
|
+
( __param(4, IModelService)),
|
|
218
|
+
( __param(5, ILanguageService)),
|
|
219
|
+
( __param(6, IContextKeyService)),
|
|
220
|
+
( __param(7, IChatWidgetService)),
|
|
221
|
+
( __param(8, ILanguageModelToolsService)),
|
|
222
|
+
( __param(9, ILanguageModelToolsConfirmationService))
|
|
223
|
+
], ChatToolPostExecuteConfirmationPart));
|
|
224
|
+
|
|
225
|
+
export { ChatToolPostExecuteConfirmationPart };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IMarkdownRenderer } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer";
|
|
2
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
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
|
+
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 ChatToolProgressSubPart extends BaseChatToolInvocationSubPart {
|
|
9
|
+
private readonly context;
|
|
10
|
+
private readonly renderer;
|
|
11
|
+
private readonly announcedToolProgressKeys;
|
|
12
|
+
private readonly instantiationService;
|
|
13
|
+
private readonly configurationService;
|
|
14
|
+
readonly domNode: HTMLElement;
|
|
15
|
+
readonly codeblocks: IChatCodeBlockInfo[];
|
|
16
|
+
constructor(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, context: IChatContentPartRenderContext, renderer: IMarkdownRenderer, announcedToolProgressKeys: Set<string> | undefined, instantiationService: IInstantiationService, configurationService: IConfigurationService);
|
|
17
|
+
private createProgressPart;
|
|
18
|
+
private get toolIsConfirmed();
|
|
19
|
+
private renderProgressContent;
|
|
20
|
+
private getAnnouncementKey;
|
|
21
|
+
private computeShouldAnnounce;
|
|
22
|
+
private provideScreenReaderStatus;
|
|
23
|
+
private hasMeaningfulContent;
|
|
24
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { createElement, reset } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { status } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
|
|
5
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
7
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
|
+
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
10
|
+
import { AccessibilityWorkbenchSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
11
|
+
import { ChatProgressContentPart } from '../chatProgressContentPart.js';
|
|
12
|
+
import { BaseChatToolInvocationSubPart } from './chatToolInvocationSubPart.js';
|
|
13
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
14
|
+
|
|
15
|
+
let ChatToolProgressSubPart = class ChatToolProgressSubPart extends BaseChatToolInvocationSubPart {
|
|
16
|
+
constructor(toolInvocation, context, renderer, announcedToolProgressKeys, instantiationService, configurationService) {
|
|
17
|
+
super(toolInvocation);
|
|
18
|
+
this.context = context;
|
|
19
|
+
this.renderer = renderer;
|
|
20
|
+
this.announcedToolProgressKeys = announcedToolProgressKeys;
|
|
21
|
+
this.instantiationService = instantiationService;
|
|
22
|
+
this.configurationService = configurationService;
|
|
23
|
+
this.codeblocks = [];
|
|
24
|
+
this.domNode = this.createProgressPart();
|
|
25
|
+
}
|
|
26
|
+
createProgressPart() {
|
|
27
|
+
if (IChatToolInvocation.isComplete(this.toolInvocation) && this.toolIsConfirmed && this.toolInvocation.pastTenseMessage) {
|
|
28
|
+
const key = this.getAnnouncementKey('complete');
|
|
29
|
+
const completionContent = this.toolInvocation.pastTenseMessage ?? this.toolInvocation.invocationMessage;
|
|
30
|
+
const shouldAnnounce = this.toolInvocation.kind === 'toolInvocation' && this.hasMeaningfulContent(completionContent) ? this.computeShouldAnnounce(key) : false;
|
|
31
|
+
const part = this.renderProgressContent(completionContent, shouldAnnounce);
|
|
32
|
+
this._register(part);
|
|
33
|
+
return part.domNode;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const container = createElement('div');
|
|
37
|
+
const progressObservable = this.toolInvocation.kind === 'toolInvocation' ? ( this.toolInvocation.state.map(
|
|
38
|
+
(s, r) => s.type === IChatToolInvocation.StateKind.Executing ? s.progress.read(r) : undefined
|
|
39
|
+
)) : undefined;
|
|
40
|
+
this._register(autorun(reader => {
|
|
41
|
+
const progress = progressObservable?.read(reader);
|
|
42
|
+
const key = this.getAnnouncementKey('progress');
|
|
43
|
+
const progressContent = progress?.message ?? this.toolInvocation.invocationMessage;
|
|
44
|
+
const shouldAnnounce = this.toolInvocation.kind === 'toolInvocation' && this.hasMeaningfulContent(progressContent) ? this.computeShouldAnnounce(key) : false;
|
|
45
|
+
const part = reader.store.add(this.renderProgressContent(progressContent, shouldAnnounce));
|
|
46
|
+
reset(container, part.domNode);
|
|
47
|
+
}));
|
|
48
|
+
return container;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
get toolIsConfirmed() {
|
|
52
|
+
const c = IChatToolInvocation.executionConfirmedOrDenied(this.toolInvocation);
|
|
53
|
+
return !!c && c.type !== ToolConfirmKind.Denied;
|
|
54
|
+
}
|
|
55
|
+
renderProgressContent(content, shouldAnnounce) {
|
|
56
|
+
if (typeof content === 'string') {
|
|
57
|
+
content = ( new MarkdownString()).appendText(content);
|
|
58
|
+
}
|
|
59
|
+
const progressMessage = {
|
|
60
|
+
kind: 'progressMessage',
|
|
61
|
+
content
|
|
62
|
+
};
|
|
63
|
+
if (shouldAnnounce) {
|
|
64
|
+
this.provideScreenReaderStatus(content);
|
|
65
|
+
}
|
|
66
|
+
return this.instantiationService.createInstance(ChatProgressContentPart, progressMessage, this.renderer, this.context, undefined, true, this.getIcon(), this.toolInvocation);
|
|
67
|
+
}
|
|
68
|
+
getAnnouncementKey(kind) {
|
|
69
|
+
return `${kind}:${this.toolInvocation.toolCallId}`;
|
|
70
|
+
}
|
|
71
|
+
computeShouldAnnounce(key) {
|
|
72
|
+
if (!this.announcedToolProgressKeys) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (!this.configurationService.getValue(AccessibilityWorkbenchSettingId.VerboseChatProgressUpdates)) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
if (( this.announcedToolProgressKeys.has(key))) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
this.announcedToolProgressKeys.add(key);
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
provideScreenReaderStatus(content) {
|
|
85
|
+
const message = typeof content === 'string' ? content : content.value;
|
|
86
|
+
status(message);
|
|
87
|
+
}
|
|
88
|
+
hasMeaningfulContent(content) {
|
|
89
|
+
if (!content) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
const text = typeof content === 'string' ? content : content.value;
|
|
93
|
+
return text.trim().length > 0;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
ChatToolProgressSubPart = ( __decorate([
|
|
97
|
+
( __param(4, IInstantiationService)),
|
|
98
|
+
( __param(5, IConfigurationService))
|
|
99
|
+
], ChatToolProgressSubPart));
|
|
100
|
+
|
|
101
|
+
export { ChatToolProgressSubPart };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
4
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
5
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
6
|
+
import { IChatResponseViewModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel";
|
|
7
|
+
import { DiffEditorPool } from "./chatContentParts/chatContentCodePools.js";
|
|
8
|
+
/**
|
|
9
|
+
* Parses unified diff format into before/after content.
|
|
10
|
+
* Supports standard unified diff format with - and + prefixes.
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseUnifiedDiff(diffText: string): {
|
|
13
|
+
before: string;
|
|
14
|
+
after: string;
|
|
15
|
+
};
|
|
16
|
+
export interface IMarkdownDiffBlockData {
|
|
17
|
+
readonly element: IChatResponseViewModel;
|
|
18
|
+
readonly codeBlockIndex: number;
|
|
19
|
+
readonly languageId: string;
|
|
20
|
+
readonly beforeContent: string;
|
|
21
|
+
readonly afterContent: string;
|
|
22
|
+
readonly codeBlockResource?: URI;
|
|
23
|
+
readonly isReadOnly?: boolean;
|
|
24
|
+
readonly horizontalPadding?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Renders a diff block from markdown content.
|
|
28
|
+
* This is a lightweight wrapper that uses CodeCompareBlockPart for the actual rendering.
|
|
29
|
+
*/
|
|
30
|
+
export declare class MarkdownDiffBlockPart extends Disposable {
|
|
31
|
+
private readonly modelService;
|
|
32
|
+
private readonly textModelService;
|
|
33
|
+
private readonly languageService;
|
|
34
|
+
private readonly _onDidChangeContentHeight;
|
|
35
|
+
readonly onDidChangeContentHeight: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
36
|
+
readonly element: HTMLElement;
|
|
37
|
+
private readonly comparePart;
|
|
38
|
+
private readonly modelRef;
|
|
39
|
+
constructor(data: IMarkdownDiffBlockData, diffEditorPool: DiffEditorPool, currentWidth: number, modelService: IModelService, textModelService: ITextModelService, languageService: ILanguageService);
|
|
40
|
+
layout(width: number): void;
|
|
41
|
+
reset(): void;
|
|
42
|
+
}
|