@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,199 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
+
import { ITextModel, IValidEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
4
|
+
import { IRange, Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
5
|
+
import { DetailedLineRangeMapping, LineRangeMapping } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping";
|
|
6
|
+
import { IInlineChatSessionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service";
|
|
7
|
+
import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service";
|
|
8
|
+
import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
|
|
9
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
10
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
11
|
+
import { IChatModel, IChatRequestModel, IChatTextEditGroupState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
|
|
12
|
+
import { IChatAgent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents";
|
|
13
|
+
import { IDocumentDiff } from "@codingame/monaco-vscode-chat-service-override/vscode/vs/editor/common/diff/documentDiffProvider";
|
|
14
|
+
export type TelemetryData = {
|
|
15
|
+
extension: string;
|
|
16
|
+
rounds: string;
|
|
17
|
+
undos: string;
|
|
18
|
+
unstashed: number;
|
|
19
|
+
edits: number;
|
|
20
|
+
finishedByEdit: boolean;
|
|
21
|
+
startTime: string;
|
|
22
|
+
endTime: string;
|
|
23
|
+
acceptedHunks: number;
|
|
24
|
+
discardedHunks: number;
|
|
25
|
+
responseTypes: string;
|
|
26
|
+
};
|
|
27
|
+
export type TelemetryDataClassification = {
|
|
28
|
+
owner: "jrieken";
|
|
29
|
+
comment: "Data about an interaction editor session";
|
|
30
|
+
extension: {
|
|
31
|
+
classification: "SystemMetaData";
|
|
32
|
+
purpose: "FeatureInsight";
|
|
33
|
+
comment: "The extension providing the data";
|
|
34
|
+
};
|
|
35
|
+
rounds: {
|
|
36
|
+
classification: "SystemMetaData";
|
|
37
|
+
purpose: "FeatureInsight";
|
|
38
|
+
comment: "Number of request that were made";
|
|
39
|
+
};
|
|
40
|
+
undos: {
|
|
41
|
+
classification: "SystemMetaData";
|
|
42
|
+
purpose: "FeatureInsight";
|
|
43
|
+
comment: "Requests that have been undone";
|
|
44
|
+
};
|
|
45
|
+
edits: {
|
|
46
|
+
classification: "SystemMetaData";
|
|
47
|
+
purpose: "FeatureInsight";
|
|
48
|
+
comment: "Did edits happen while the session was active";
|
|
49
|
+
};
|
|
50
|
+
unstashed: {
|
|
51
|
+
classification: "SystemMetaData";
|
|
52
|
+
purpose: "FeatureInsight";
|
|
53
|
+
comment: "How often did this session become stashed and resumed";
|
|
54
|
+
};
|
|
55
|
+
finishedByEdit: {
|
|
56
|
+
classification: "SystemMetaData";
|
|
57
|
+
purpose: "FeatureInsight";
|
|
58
|
+
comment: "Did edits cause the session to terminate";
|
|
59
|
+
};
|
|
60
|
+
startTime: {
|
|
61
|
+
classification: "SystemMetaData";
|
|
62
|
+
purpose: "FeatureInsight";
|
|
63
|
+
comment: "When the session started";
|
|
64
|
+
};
|
|
65
|
+
endTime: {
|
|
66
|
+
classification: "SystemMetaData";
|
|
67
|
+
purpose: "FeatureInsight";
|
|
68
|
+
comment: "When the session ended";
|
|
69
|
+
};
|
|
70
|
+
acceptedHunks: {
|
|
71
|
+
classification: "SystemMetaData";
|
|
72
|
+
purpose: "FeatureInsight";
|
|
73
|
+
comment: "Number of accepted hunks";
|
|
74
|
+
};
|
|
75
|
+
discardedHunks: {
|
|
76
|
+
classification: "SystemMetaData";
|
|
77
|
+
purpose: "FeatureInsight";
|
|
78
|
+
comment: "Number of discarded hunks";
|
|
79
|
+
};
|
|
80
|
+
responseTypes: {
|
|
81
|
+
classification: "SystemMetaData";
|
|
82
|
+
purpose: "FeatureInsight";
|
|
83
|
+
comment: "Comma separated list of response types like edits, message, mixed";
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export declare class SessionWholeRange {
|
|
87
|
+
private readonly _textModel;
|
|
88
|
+
private static readonly _options;
|
|
89
|
+
private readonly _onDidChange;
|
|
90
|
+
readonly onDidChange: Event<this>;
|
|
91
|
+
private _decorationIds;
|
|
92
|
+
constructor(_textModel: ITextModel, wholeRange: IRange);
|
|
93
|
+
dispose(): void;
|
|
94
|
+
fixup(changes: readonly DetailedLineRangeMapping[]): void;
|
|
95
|
+
get trackedInitialRange(): Range;
|
|
96
|
+
get value(): Range;
|
|
97
|
+
}
|
|
98
|
+
export declare class Session {
|
|
99
|
+
readonly headless: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* The URI of the document which is being EditorEdit
|
|
102
|
+
*/
|
|
103
|
+
readonly targetUri: URI;
|
|
104
|
+
/**
|
|
105
|
+
* A copy of the document at the time the session was started
|
|
106
|
+
*/
|
|
107
|
+
readonly textModel0: ITextModel;
|
|
108
|
+
/**
|
|
109
|
+
* The model of the editor
|
|
110
|
+
*/
|
|
111
|
+
readonly textModelN: ITextModel;
|
|
112
|
+
readonly agent: IChatAgent;
|
|
113
|
+
readonly wholeRange: SessionWholeRange;
|
|
114
|
+
readonly hunkData: HunkData;
|
|
115
|
+
readonly chatModel: IChatModel;
|
|
116
|
+
private _isUnstashed;
|
|
117
|
+
private readonly _startTime;
|
|
118
|
+
private readonly _teldata;
|
|
119
|
+
private readonly _versionByRequest;
|
|
120
|
+
constructor(headless: boolean,
|
|
121
|
+
/**
|
|
122
|
+
* The URI of the document which is being EditorEdit
|
|
123
|
+
*/
|
|
124
|
+
targetUri: URI,
|
|
125
|
+
/**
|
|
126
|
+
* A copy of the document at the time the session was started
|
|
127
|
+
*/
|
|
128
|
+
textModel0: ITextModel,
|
|
129
|
+
/**
|
|
130
|
+
* The model of the editor
|
|
131
|
+
*/
|
|
132
|
+
textModelN: ITextModel, agent: IChatAgent, wholeRange: SessionWholeRange, hunkData: HunkData, chatModel: IChatModel, versionsByRequest?: [
|
|
133
|
+
string,
|
|
134
|
+
number
|
|
135
|
+
][]);
|
|
136
|
+
get isUnstashed(): boolean;
|
|
137
|
+
markUnstashed(): void;
|
|
138
|
+
markModelVersion(request: IChatRequestModel): void;
|
|
139
|
+
get versionsByRequest(): [
|
|
140
|
+
string,
|
|
141
|
+
number
|
|
142
|
+
][];
|
|
143
|
+
undoChangesUntil(requestId: string): Promise<boolean>;
|
|
144
|
+
get hasChangedText(): boolean;
|
|
145
|
+
asChangedText(changes: readonly LineRangeMapping[]): string | undefined;
|
|
146
|
+
recordExternalEditOccurred(didFinish: boolean): void;
|
|
147
|
+
asTelemetryData(): TelemetryData;
|
|
148
|
+
}
|
|
149
|
+
export declare class StashedSession {
|
|
150
|
+
private readonly _undoCancelEdits;
|
|
151
|
+
private readonly _sessionService;
|
|
152
|
+
private readonly _logService;
|
|
153
|
+
private readonly _listener;
|
|
154
|
+
private readonly _ctxHasStashedSession;
|
|
155
|
+
private _session;
|
|
156
|
+
constructor(editor: ICodeEditor, session: Session, _undoCancelEdits: IValidEditOperation[], contextKeyService: IContextKeyService, _sessionService: IInlineChatSessionService, _logService: ILogService);
|
|
157
|
+
dispose(): void;
|
|
158
|
+
unstash(): Session | undefined;
|
|
159
|
+
}
|
|
160
|
+
export declare class HunkData {
|
|
161
|
+
private readonly _editorWorkerService;
|
|
162
|
+
private readonly _textModel0;
|
|
163
|
+
private readonly _textModelN;
|
|
164
|
+
private static readonly _HUNK_TRACKED_RANGE;
|
|
165
|
+
private static readonly _HUNK_THRESHOLD;
|
|
166
|
+
private readonly _store;
|
|
167
|
+
private readonly _data;
|
|
168
|
+
private _ignoreChanges;
|
|
169
|
+
constructor(_editorWorkerService: IEditorWorkerService, _textModel0: ITextModel, _textModelN: ITextModel);
|
|
170
|
+
dispose(): void;
|
|
171
|
+
set ignoreTextModelNChanges(value: boolean);
|
|
172
|
+
get ignoreTextModelNChanges(): boolean;
|
|
173
|
+
private _mirrorChanges;
|
|
174
|
+
recompute(editState: IChatTextEditGroupState, diff?: IDocumentDiff | null): Promise<void>;
|
|
175
|
+
get size(): number;
|
|
176
|
+
get pending(): number;
|
|
177
|
+
private _discardEdits;
|
|
178
|
+
discardAll(): IValidEditOperation[];
|
|
179
|
+
getInfo(): HunkInformation[];
|
|
180
|
+
}
|
|
181
|
+
export declare enum HunkState {
|
|
182
|
+
Pending = 0,
|
|
183
|
+
Accepted = 1,
|
|
184
|
+
Rejected = 2
|
|
185
|
+
}
|
|
186
|
+
export interface HunkInformation {
|
|
187
|
+
/**
|
|
188
|
+
* The first element [0] is the whole modified range and subsequent elements are word-level changes
|
|
189
|
+
*/
|
|
190
|
+
getRangesN(): Range[];
|
|
191
|
+
getRanges0(): Range[];
|
|
192
|
+
isInsertion(): boolean;
|
|
193
|
+
discardChanges(): void;
|
|
194
|
+
/**
|
|
195
|
+
* Accept the hunk. Applies the corresponding edits into textModel0
|
|
196
|
+
*/
|
|
197
|
+
acceptChanges(): void;
|
|
198
|
+
getState(): HunkState;
|
|
199
|
+
}
|
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
+
import { TrackedRangeStickiness } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model';
|
|
5
|
+
import { CTX_INLINE_CHAT_HAS_STASHED_SESSION } from '../common/inlineChat.js';
|
|
6
|
+
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
7
|
+
import { ModelDecorationOptions } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/textModel';
|
|
8
|
+
import { EditOperation } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editOperation';
|
|
9
|
+
import { DetailedLineRangeMapping } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping';
|
|
10
|
+
import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
|
|
11
|
+
import { IEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service';
|
|
12
|
+
import { coalesceInPlace } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
13
|
+
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
14
|
+
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
15
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
16
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
17
|
+
import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
18
|
+
|
|
19
|
+
var HunkData_1;
|
|
20
|
+
class SessionWholeRange {
|
|
21
|
+
static { this._options = ModelDecorationOptions.register({ description: 'inlineChat/session/wholeRange' }); }
|
|
22
|
+
constructor(_textModel, wholeRange) {
|
|
23
|
+
this._textModel = _textModel;
|
|
24
|
+
this._onDidChange = ( new Emitter());
|
|
25
|
+
this.onDidChange = this._onDidChange.event;
|
|
26
|
+
this._decorationIds = [];
|
|
27
|
+
this._decorationIds = _textModel.deltaDecorations([], [{ range: wholeRange, options: SessionWholeRange._options }]);
|
|
28
|
+
}
|
|
29
|
+
dispose() {
|
|
30
|
+
this._onDidChange.dispose();
|
|
31
|
+
if (!this._textModel.isDisposed()) {
|
|
32
|
+
this._textModel.deltaDecorations(this._decorationIds, []);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
fixup(changes) {
|
|
36
|
+
const newDeco = [];
|
|
37
|
+
for (const { modified } of changes) {
|
|
38
|
+
const modifiedRange = this._textModel.validateRange(modified.isEmpty
|
|
39
|
+
? ( new Range(
|
|
40
|
+
modified.startLineNumber,
|
|
41
|
+
1,
|
|
42
|
+
modified.startLineNumber,
|
|
43
|
+
Number.MAX_SAFE_INTEGER
|
|
44
|
+
))
|
|
45
|
+
: ( new Range(
|
|
46
|
+
modified.startLineNumber,
|
|
47
|
+
1,
|
|
48
|
+
modified.endLineNumberExclusive - 1,
|
|
49
|
+
Number.MAX_SAFE_INTEGER
|
|
50
|
+
)));
|
|
51
|
+
newDeco.push({ range: modifiedRange, options: SessionWholeRange._options });
|
|
52
|
+
}
|
|
53
|
+
const [first, ...rest] = this._decorationIds;
|
|
54
|
+
const newIds = this._textModel.deltaDecorations(rest, newDeco);
|
|
55
|
+
this._decorationIds = [first].concat(newIds);
|
|
56
|
+
this._onDidChange.fire(this);
|
|
57
|
+
}
|
|
58
|
+
get trackedInitialRange() {
|
|
59
|
+
const [first] = this._decorationIds;
|
|
60
|
+
return this._textModel.getDecorationRange(first) ?? ( new Range(1, 1, 1, 1));
|
|
61
|
+
}
|
|
62
|
+
get value() {
|
|
63
|
+
let result;
|
|
64
|
+
for (const id of this._decorationIds) {
|
|
65
|
+
const range = this._textModel.getDecorationRange(id);
|
|
66
|
+
if (range) {
|
|
67
|
+
if (!result) {
|
|
68
|
+
result = range;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
result = Range.plusRange(result, range);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
class Session {
|
|
79
|
+
constructor(headless,
|
|
80
|
+
targetUri,
|
|
81
|
+
textModel0,
|
|
82
|
+
textModelN, agent, wholeRange, hunkData, chatModel, versionsByRequest) {
|
|
83
|
+
this.headless = headless;
|
|
84
|
+
this.targetUri = targetUri;
|
|
85
|
+
this.textModel0 = textModel0;
|
|
86
|
+
this.textModelN = textModelN;
|
|
87
|
+
this.agent = agent;
|
|
88
|
+
this.wholeRange = wholeRange;
|
|
89
|
+
this.hunkData = hunkData;
|
|
90
|
+
this.chatModel = chatModel;
|
|
91
|
+
this._isUnstashed = false;
|
|
92
|
+
this._startTime = ( new Date());
|
|
93
|
+
this._versionByRequest = ( new Map());
|
|
94
|
+
this._teldata = {
|
|
95
|
+
extension: ExtensionIdentifier.toKey(agent.extensionId),
|
|
96
|
+
startTime: this._startTime.toISOString(),
|
|
97
|
+
endTime: this._startTime.toISOString(),
|
|
98
|
+
edits: 0,
|
|
99
|
+
finishedByEdit: false,
|
|
100
|
+
rounds: '',
|
|
101
|
+
undos: '',
|
|
102
|
+
unstashed: 0,
|
|
103
|
+
acceptedHunks: 0,
|
|
104
|
+
discardedHunks: 0,
|
|
105
|
+
responseTypes: ''
|
|
106
|
+
};
|
|
107
|
+
if (versionsByRequest) {
|
|
108
|
+
this._versionByRequest = ( new Map(versionsByRequest));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
get isUnstashed() {
|
|
112
|
+
return this._isUnstashed;
|
|
113
|
+
}
|
|
114
|
+
markUnstashed() {
|
|
115
|
+
this._teldata.unstashed += 1;
|
|
116
|
+
this._isUnstashed = true;
|
|
117
|
+
}
|
|
118
|
+
markModelVersion(request) {
|
|
119
|
+
this._versionByRequest.set(request.id, this.textModelN.getAlternativeVersionId());
|
|
120
|
+
}
|
|
121
|
+
get versionsByRequest() {
|
|
122
|
+
return Array.from(this._versionByRequest);
|
|
123
|
+
}
|
|
124
|
+
async undoChangesUntil(requestId) {
|
|
125
|
+
const targetAltVersion = this._versionByRequest.get(requestId);
|
|
126
|
+
if (targetAltVersion === undefined) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
this.hunkData.ignoreTextModelNChanges = true;
|
|
130
|
+
try {
|
|
131
|
+
while (targetAltVersion < this.textModelN.getAlternativeVersionId() && this.textModelN.canUndo()) {
|
|
132
|
+
await this.textModelN.undo();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
finally {
|
|
136
|
+
this.hunkData.ignoreTextModelNChanges = false;
|
|
137
|
+
}
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
get hasChangedText() {
|
|
141
|
+
return !this.textModel0.equalsTextBuffer(this.textModelN.getTextBuffer());
|
|
142
|
+
}
|
|
143
|
+
asChangedText(changes) {
|
|
144
|
+
if (changes.length === 0) {
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
let startLine = Number.MAX_VALUE;
|
|
148
|
+
let endLine = Number.MIN_VALUE;
|
|
149
|
+
for (const change of changes) {
|
|
150
|
+
startLine = Math.min(startLine, change.modified.startLineNumber);
|
|
151
|
+
endLine = Math.max(endLine, change.modified.endLineNumberExclusive);
|
|
152
|
+
}
|
|
153
|
+
return this.textModelN.getValueInRange(( new Range(startLine, 1, endLine, Number.MAX_VALUE)));
|
|
154
|
+
}
|
|
155
|
+
recordExternalEditOccurred(didFinish) {
|
|
156
|
+
this._teldata.edits += 1;
|
|
157
|
+
this._teldata.finishedByEdit = didFinish;
|
|
158
|
+
}
|
|
159
|
+
asTelemetryData() {
|
|
160
|
+
for (const item of this.hunkData.getInfo()) {
|
|
161
|
+
switch (item.getState()) {
|
|
162
|
+
case HunkState.Accepted:
|
|
163
|
+
this._teldata.acceptedHunks += 1;
|
|
164
|
+
break;
|
|
165
|
+
case HunkState.Rejected:
|
|
166
|
+
this._teldata.discardedHunks += 1;
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
this._teldata.endTime = ( new Date()).toISOString();
|
|
171
|
+
return this._teldata;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
let StashedSession = class StashedSession {
|
|
175
|
+
constructor(editor, session, _undoCancelEdits, contextKeyService, _sessionService, _logService) {
|
|
176
|
+
this._undoCancelEdits = _undoCancelEdits;
|
|
177
|
+
this._sessionService = _sessionService;
|
|
178
|
+
this._logService = _logService;
|
|
179
|
+
this._ctxHasStashedSession = CTX_INLINE_CHAT_HAS_STASHED_SESSION.bindTo(contextKeyService);
|
|
180
|
+
this._session = session;
|
|
181
|
+
this._ctxHasStashedSession.set(true);
|
|
182
|
+
this._listener = Event.once(Event.any(editor.onDidChangeCursorSelection, editor.onDidChangeModelContent, editor.onDidChangeModel, editor.onDidBlurEditorWidget))(() => {
|
|
183
|
+
this._session = undefined;
|
|
184
|
+
this._sessionService.releaseSession(session);
|
|
185
|
+
this._ctxHasStashedSession.reset();
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
dispose() {
|
|
189
|
+
this._listener.dispose();
|
|
190
|
+
this._ctxHasStashedSession.reset();
|
|
191
|
+
if (this._session) {
|
|
192
|
+
this._sessionService.releaseSession(this._session);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
unstash() {
|
|
196
|
+
if (!this._session) {
|
|
197
|
+
return undefined;
|
|
198
|
+
}
|
|
199
|
+
this._listener.dispose();
|
|
200
|
+
const result = this._session;
|
|
201
|
+
result.markUnstashed();
|
|
202
|
+
result.hunkData.ignoreTextModelNChanges = true;
|
|
203
|
+
result.textModelN.pushEditOperations(null, this._undoCancelEdits, () => null);
|
|
204
|
+
result.hunkData.ignoreTextModelNChanges = false;
|
|
205
|
+
this._session = undefined;
|
|
206
|
+
this._logService.debug('[IE] Unstashed session');
|
|
207
|
+
return result;
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
StashedSession = ( __decorate([
|
|
211
|
+
( __param(3, IContextKeyService)),
|
|
212
|
+
( __param(4, IInlineChatSessionService)),
|
|
213
|
+
( __param(5, ILogService))
|
|
214
|
+
], StashedSession));
|
|
215
|
+
function lineRangeAsRange(lineRange, model) {
|
|
216
|
+
return lineRange.isEmpty
|
|
217
|
+
? ( new Range(
|
|
218
|
+
lineRange.startLineNumber,
|
|
219
|
+
1,
|
|
220
|
+
lineRange.startLineNumber,
|
|
221
|
+
Number.MAX_SAFE_INTEGER
|
|
222
|
+
))
|
|
223
|
+
: ( new Range(
|
|
224
|
+
lineRange.startLineNumber,
|
|
225
|
+
1,
|
|
226
|
+
lineRange.endLineNumberExclusive - 1,
|
|
227
|
+
Number.MAX_SAFE_INTEGER
|
|
228
|
+
));
|
|
229
|
+
}
|
|
230
|
+
let HunkData = class HunkData {
|
|
231
|
+
static { HunkData_1 = this; }
|
|
232
|
+
static { this._HUNK_TRACKED_RANGE = ModelDecorationOptions.register({
|
|
233
|
+
description: 'inline-chat-hunk-tracked-range',
|
|
234
|
+
stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges
|
|
235
|
+
}); }
|
|
236
|
+
static { this._HUNK_THRESHOLD = 8; }
|
|
237
|
+
constructor(_editorWorkerService, _textModel0, _textModelN) {
|
|
238
|
+
this._editorWorkerService = _editorWorkerService;
|
|
239
|
+
this._textModel0 = _textModel0;
|
|
240
|
+
this._textModelN = _textModelN;
|
|
241
|
+
this._store = ( new DisposableStore());
|
|
242
|
+
this._data = ( new Map());
|
|
243
|
+
this._ignoreChanges = false;
|
|
244
|
+
this._store.add(_textModelN.onDidChangeContent(e => {
|
|
245
|
+
if (!this._ignoreChanges) {
|
|
246
|
+
this._mirrorChanges(e);
|
|
247
|
+
}
|
|
248
|
+
}));
|
|
249
|
+
}
|
|
250
|
+
dispose() {
|
|
251
|
+
if (!this._textModelN.isDisposed()) {
|
|
252
|
+
this._textModelN.changeDecorations(accessor => {
|
|
253
|
+
for (const { textModelNDecorations } of ( this._data.values())) {
|
|
254
|
+
textModelNDecorations.forEach(accessor.removeDecoration, accessor);
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
if (!this._textModel0.isDisposed()) {
|
|
259
|
+
this._textModel0.changeDecorations(accessor => {
|
|
260
|
+
for (const { textModel0Decorations } of ( this._data.values())) {
|
|
261
|
+
textModel0Decorations.forEach(accessor.removeDecoration, accessor);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
this._data.clear();
|
|
266
|
+
this._store.dispose();
|
|
267
|
+
}
|
|
268
|
+
set ignoreTextModelNChanges(value) {
|
|
269
|
+
this._ignoreChanges = value;
|
|
270
|
+
}
|
|
271
|
+
get ignoreTextModelNChanges() {
|
|
272
|
+
return this._ignoreChanges;
|
|
273
|
+
}
|
|
274
|
+
_mirrorChanges(event) {
|
|
275
|
+
const hunkRanges = [];
|
|
276
|
+
const ranges0 = [];
|
|
277
|
+
for (const entry of ( this._data.values())) {
|
|
278
|
+
if (entry.state === HunkState.Pending) {
|
|
279
|
+
for (let i = 1; i < entry.textModelNDecorations.length; i++) {
|
|
280
|
+
const rangeN = this._textModelN.getDecorationRange(entry.textModelNDecorations[i]);
|
|
281
|
+
const range0 = this._textModel0.getDecorationRange(entry.textModel0Decorations[i]);
|
|
282
|
+
if (rangeN && range0) {
|
|
283
|
+
hunkRanges.push({
|
|
284
|
+
rangeN, range0,
|
|
285
|
+
markAccepted: () => entry.state = HunkState.Accepted
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
else if (entry.state === HunkState.Accepted) {
|
|
291
|
+
for (let i = 1; i < entry.textModel0Decorations.length; i++) {
|
|
292
|
+
const range = this._textModel0.getDecorationRange(entry.textModel0Decorations[i]);
|
|
293
|
+
if (range) {
|
|
294
|
+
ranges0.push(range);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
hunkRanges.sort((a, b) => Range.compareRangesUsingStarts(a.rangeN, b.rangeN));
|
|
300
|
+
ranges0.sort(Range.compareRangesUsingStarts);
|
|
301
|
+
const edits = [];
|
|
302
|
+
for (const change of event.changes) {
|
|
303
|
+
let isOverlapping = false;
|
|
304
|
+
let pendingChangesLen = 0;
|
|
305
|
+
for (const entry of hunkRanges) {
|
|
306
|
+
if (entry.rangeN.getEndPosition().isBefore(Range.getStartPosition(change.range))) {
|
|
307
|
+
pendingChangesLen += this._textModelN.getValueLengthInRange(entry.rangeN);
|
|
308
|
+
pendingChangesLen -= this._textModel0.getValueLengthInRange(entry.range0);
|
|
309
|
+
}
|
|
310
|
+
else if (Range.areIntersectingOrTouching(entry.rangeN, change.range)) {
|
|
311
|
+
entry.markAccepted();
|
|
312
|
+
isOverlapping = true;
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (isOverlapping) {
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
const offset0 = change.rangeOffset - pendingChangesLen;
|
|
323
|
+
const start0 = this._textModel0.getPositionAt(offset0);
|
|
324
|
+
let acceptedChangesLen = 0;
|
|
325
|
+
for (const range of ranges0) {
|
|
326
|
+
if (range.getEndPosition().isBefore(start0)) {
|
|
327
|
+
acceptedChangesLen += this._textModel0.getValueLengthInRange(range);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
const start = this._textModel0.getPositionAt(offset0 + acceptedChangesLen);
|
|
331
|
+
const end = this._textModel0.getPositionAt(offset0 + acceptedChangesLen + change.rangeLength);
|
|
332
|
+
edits.push(EditOperation.replace(Range.fromPositions(start, end), change.text));
|
|
333
|
+
}
|
|
334
|
+
this._textModel0.pushEditOperations(null, edits, () => null);
|
|
335
|
+
}
|
|
336
|
+
async recompute(editState, diff) {
|
|
337
|
+
diff ??= await this._editorWorkerService.computeDiff(this._textModel0.uri, this._textModelN.uri, { ignoreTrimWhitespace: false, maxComputationTimeMs: Number.MAX_SAFE_INTEGER, computeMoves: false }, 'advanced');
|
|
338
|
+
let mergedChanges = [];
|
|
339
|
+
if (diff && diff.changes.length > 0) {
|
|
340
|
+
mergedChanges = [diff.changes[0]];
|
|
341
|
+
for (let i = 1; i < diff.changes.length; i++) {
|
|
342
|
+
const lastChange = mergedChanges[mergedChanges.length - 1];
|
|
343
|
+
const thisChange = diff.changes[i];
|
|
344
|
+
if (thisChange.modified.startLineNumber - lastChange.modified.endLineNumberExclusive <= HunkData_1._HUNK_THRESHOLD) {
|
|
345
|
+
mergedChanges[mergedChanges.length - 1] = ( new DetailedLineRangeMapping(
|
|
346
|
+
lastChange.original.join(thisChange.original),
|
|
347
|
+
lastChange.modified.join(thisChange.modified),
|
|
348
|
+
(lastChange.innerChanges ?? []).concat(thisChange.innerChanges ?? [])
|
|
349
|
+
));
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
mergedChanges.push(thisChange);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
const hunks = ( mergedChanges.map(change => ( new RawHunk(change.original, change.modified, change.innerChanges ?? []))));
|
|
357
|
+
editState.applied = hunks.length;
|
|
358
|
+
this._textModelN.changeDecorations(accessorN => {
|
|
359
|
+
this._textModel0.changeDecorations(accessor0 => {
|
|
360
|
+
for (const { textModelNDecorations, textModel0Decorations } of ( this._data.values())) {
|
|
361
|
+
textModelNDecorations.forEach(accessorN.removeDecoration, accessorN);
|
|
362
|
+
textModel0Decorations.forEach(accessor0.removeDecoration, accessor0);
|
|
363
|
+
}
|
|
364
|
+
this._data.clear();
|
|
365
|
+
for (const hunk of hunks) {
|
|
366
|
+
const textModelNDecorations = [];
|
|
367
|
+
const textModel0Decorations = [];
|
|
368
|
+
textModelNDecorations.push(accessorN.addDecoration(lineRangeAsRange(hunk.modified), HunkData_1._HUNK_TRACKED_RANGE));
|
|
369
|
+
textModel0Decorations.push(accessor0.addDecoration(lineRangeAsRange(hunk.original), HunkData_1._HUNK_TRACKED_RANGE));
|
|
370
|
+
for (const change of hunk.changes) {
|
|
371
|
+
textModelNDecorations.push(accessorN.addDecoration(change.modifiedRange, HunkData_1._HUNK_TRACKED_RANGE));
|
|
372
|
+
textModel0Decorations.push(accessor0.addDecoration(change.originalRange, HunkData_1._HUNK_TRACKED_RANGE));
|
|
373
|
+
}
|
|
374
|
+
this._data.set(hunk, {
|
|
375
|
+
editState,
|
|
376
|
+
textModelNDecorations,
|
|
377
|
+
textModel0Decorations,
|
|
378
|
+
state: HunkState.Pending
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
get size() {
|
|
385
|
+
return this._data.size;
|
|
386
|
+
}
|
|
387
|
+
get pending() {
|
|
388
|
+
return Iterable.reduce(( this._data.values()), (r, { state }) => r + (state === HunkState.Pending ? 1 : 0), 0);
|
|
389
|
+
}
|
|
390
|
+
_discardEdits(item) {
|
|
391
|
+
const edits = [];
|
|
392
|
+
const rangesN = item.getRangesN();
|
|
393
|
+
const ranges0 = item.getRanges0();
|
|
394
|
+
for (let i = 1; i < rangesN.length; i++) {
|
|
395
|
+
const modifiedRange = rangesN[i];
|
|
396
|
+
const originalValue = this._textModel0.getValueInRange(ranges0[i]);
|
|
397
|
+
edits.push(EditOperation.replace(modifiedRange, originalValue));
|
|
398
|
+
}
|
|
399
|
+
return edits;
|
|
400
|
+
}
|
|
401
|
+
discardAll() {
|
|
402
|
+
const edits = [];
|
|
403
|
+
for (const item of this.getInfo()) {
|
|
404
|
+
if (item.getState() === HunkState.Pending) {
|
|
405
|
+
edits.push(this._discardEdits(item));
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
const undoEdits = [];
|
|
409
|
+
this._textModelN.pushEditOperations(null, edits.flat(), (_undoEdits) => {
|
|
410
|
+
undoEdits.push(_undoEdits);
|
|
411
|
+
return null;
|
|
412
|
+
});
|
|
413
|
+
return undoEdits.flat();
|
|
414
|
+
}
|
|
415
|
+
getInfo() {
|
|
416
|
+
const result = [];
|
|
417
|
+
for (const [hunk, data] of this._data.entries()) {
|
|
418
|
+
const item = {
|
|
419
|
+
getState: () => {
|
|
420
|
+
return data.state;
|
|
421
|
+
},
|
|
422
|
+
isInsertion: () => {
|
|
423
|
+
return hunk.original.isEmpty;
|
|
424
|
+
},
|
|
425
|
+
getRangesN: () => {
|
|
426
|
+
const ranges = ( data.textModelNDecorations.map(id => this._textModelN.getDecorationRange(id)));
|
|
427
|
+
coalesceInPlace(ranges);
|
|
428
|
+
return ranges;
|
|
429
|
+
},
|
|
430
|
+
getRanges0: () => {
|
|
431
|
+
const ranges = ( data.textModel0Decorations.map(id => this._textModel0.getDecorationRange(id)));
|
|
432
|
+
coalesceInPlace(ranges);
|
|
433
|
+
return ranges;
|
|
434
|
+
},
|
|
435
|
+
discardChanges: () => {
|
|
436
|
+
if (data.state === HunkState.Pending) {
|
|
437
|
+
const edits = this._discardEdits(item);
|
|
438
|
+
this._textModelN.pushEditOperations(null, edits, () => null);
|
|
439
|
+
data.state = HunkState.Rejected;
|
|
440
|
+
if (data.editState.applied > 0) {
|
|
441
|
+
data.editState.applied -= 1;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
acceptChanges: () => {
|
|
446
|
+
if (data.state === HunkState.Pending) {
|
|
447
|
+
const edits = [];
|
|
448
|
+
const rangesN = item.getRangesN();
|
|
449
|
+
const ranges0 = item.getRanges0();
|
|
450
|
+
for (let i = 1; i < ranges0.length; i++) {
|
|
451
|
+
const originalRange = ranges0[i];
|
|
452
|
+
const modifiedValue = this._textModelN.getValueInRange(rangesN[i]);
|
|
453
|
+
edits.push(EditOperation.replace(originalRange, modifiedValue));
|
|
454
|
+
}
|
|
455
|
+
this._textModel0.pushEditOperations(null, edits, () => null);
|
|
456
|
+
data.state = HunkState.Accepted;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
result.push(item);
|
|
461
|
+
}
|
|
462
|
+
return result;
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
HunkData = HunkData_1 = ( __decorate([
|
|
466
|
+
( __param(0, IEditorWorkerService))
|
|
467
|
+
], HunkData));
|
|
468
|
+
class RawHunk {
|
|
469
|
+
constructor(original, modified, changes) {
|
|
470
|
+
this.original = original;
|
|
471
|
+
this.modified = modified;
|
|
472
|
+
this.changes = changes;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
var HunkState;
|
|
476
|
+
(function (HunkState) {
|
|
477
|
+
HunkState[HunkState["Pending"] = 0] = "Pending";
|
|
478
|
+
HunkState[HunkState["Accepted"] = 1] = "Accepted";
|
|
479
|
+
HunkState[HunkState["Rejected"] = 2] = "Rejected";
|
|
480
|
+
})(HunkState || (HunkState = {}));
|
|
481
|
+
|
|
482
|
+
export { HunkData, HunkState, Session, SessionWholeRange, StashedSession };
|