@codingame/monaco-vscode-katex-common 25.1.2 → 26.0.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/package.json +2 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +23 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +64 -27
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +3 -1
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +31 -28
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +2 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +71 -50
- package/vscode/src/vs/platform/editor/browser/editor.js +17 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +112 -129
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +110 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +21 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +308 -216
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +153 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +247 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +347 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +287 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +89 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +188 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +677 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentSessionHoverWidget.css +98 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +34 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +19 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +762 -359
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +188 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +166 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +12 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +279 -213
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +382 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +128 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +153 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +1218 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +93 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +42 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +58 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +18 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +132 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +68 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +36 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +22 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +34 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +198 -135
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +38 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +29 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +41 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +23 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +20 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +291 -152
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +227 -162
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.js +68 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +76 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +96 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +74 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +107 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +814 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +34 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +8 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +236 -197
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +492 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +75 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +31 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +42 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +55 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +714 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +2 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +143 -153
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +79 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +10 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +209 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +71 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +248 -190
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +1 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPullRequestContent.css +5 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +493 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +121 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +51 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +46 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +99 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +634 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +132 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.js +15 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +196 -149
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +577 -193
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +119 -86
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +165 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +5 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +75 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +30 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +102 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +44 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +67 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +122 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +39 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +1110 -597
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +291 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +485 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +38 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +650 -689
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +21 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +102 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +1253 -790
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +51 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +102 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +16 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +192 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +11 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +99 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +188 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +129 -167
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +16 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +143 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +206 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +152 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +67 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +80 -19
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +20 -28
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +22 -19
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +122 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +19 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -1040
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +162 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +98 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +416 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +194 -215
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +74 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +45 -91
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +22 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +98 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +96 -68
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +11 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +150 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +141 -147
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +200 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +548 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.js +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +338 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +364 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +21 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +36 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +110 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +692 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +158 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +80 -21
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +440 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.js +0 -139
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +0 -1081
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +0 -199
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +0 -482
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -37
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +0 -94
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +0 -495
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +0 -454
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +0 -66
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +0 -372
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -594
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1746
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -269
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -806
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -116
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -62
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -295
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -241
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -146
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -90
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -42
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -823
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -567
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -189
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -439
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +0 -263
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +0 -48
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -89
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -108
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
-
import { Emitter, Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
-
import { DisposableStore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
|
-
import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
|
|
5
|
-
import { ISingleEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editOperation";
|
|
6
|
-
import { Position } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/position";
|
|
7
|
-
import { IModelDeltaDecoration, IValidEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
8
|
-
import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service";
|
|
9
|
-
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
10
|
-
import { HunkInformation, Session } from "./inlineChatSession.js";
|
|
11
|
-
import { InlineChatZoneWidget } from "./inlineChatZoneWidget.js";
|
|
12
|
-
import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
|
|
13
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
14
|
-
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
15
|
-
import { VersionedExtensionId } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
16
|
-
export interface IEditObserver {
|
|
17
|
-
start(): void;
|
|
18
|
-
stop(): void;
|
|
19
|
-
}
|
|
20
|
-
export declare enum HunkAction {
|
|
21
|
-
Accept = 0,
|
|
22
|
-
Discard = 1,
|
|
23
|
-
MoveNext = 2,
|
|
24
|
-
MovePrev = 3,
|
|
25
|
-
ToggleDiff = 4
|
|
26
|
-
}
|
|
27
|
-
export declare class LiveStrategy {
|
|
28
|
-
protected readonly _session: Session;
|
|
29
|
-
protected readonly _editor: ICodeEditor;
|
|
30
|
-
protected readonly _zone: InlineChatZoneWidget;
|
|
31
|
-
private readonly _showOverlayToolbar;
|
|
32
|
-
protected readonly _editorWorkerService: IEditorWorkerService;
|
|
33
|
-
private readonly _menuService;
|
|
34
|
-
private readonly _contextService;
|
|
35
|
-
private readonly _textFileService;
|
|
36
|
-
protected readonly _instaService: IInstantiationService;
|
|
37
|
-
private readonly _decoInsertedText;
|
|
38
|
-
private readonly _decoInsertedTextRange;
|
|
39
|
-
protected readonly _store: DisposableStore;
|
|
40
|
-
protected readonly _onDidAccept: Emitter<void>;
|
|
41
|
-
protected readonly _onDidDiscard: Emitter<void>;
|
|
42
|
-
private readonly _ctxCurrentChangeHasDiff;
|
|
43
|
-
private readonly _ctxCurrentChangeShowsDiff;
|
|
44
|
-
private readonly _progressiveEditingDecorations;
|
|
45
|
-
private readonly _lensActionsFactory;
|
|
46
|
-
private _editCount;
|
|
47
|
-
private readonly _hunkData;
|
|
48
|
-
readonly onDidAccept: Event<void>;
|
|
49
|
-
readonly onDidDiscard: Event<void>;
|
|
50
|
-
constructor(_session: Session, _editor: ICodeEditor, _zone: InlineChatZoneWidget, _showOverlayToolbar: boolean, contextKeyService: IContextKeyService, _editorWorkerService: IEditorWorkerService, _menuService: IMenuService, _contextService: IContextKeyService, _textFileService: ITextFileService, _instaService: IInstantiationService);
|
|
51
|
-
dispose(): void;
|
|
52
|
-
private _resetDiff;
|
|
53
|
-
apply(): Promise<void>;
|
|
54
|
-
cancel(): IValidEditOperation[];
|
|
55
|
-
makeChanges(edits: ISingleEditOperation[], obs: IEditObserver, undoStopBefore: boolean, metadata: IInlineChatMetadata): Promise<void>;
|
|
56
|
-
makeProgressiveChanges(edits: ISingleEditOperation[], obs: IEditObserver, opts: ProgressingEditsOptions, undoStopBefore: boolean, metadata: IInlineChatMetadata): Promise<void>;
|
|
57
|
-
private _makeChanges;
|
|
58
|
-
performHunkAction(hunk: HunkInformation | undefined, action: HunkAction): void;
|
|
59
|
-
private _findDisplayData;
|
|
60
|
-
renderChanges(): Promise<Position | undefined>;
|
|
61
|
-
getWholeRangeDecoration(): IModelDeltaDecoration[];
|
|
62
|
-
private _doApplyChanges;
|
|
63
|
-
}
|
|
64
|
-
export interface ProgressingEditsOptions {
|
|
65
|
-
duration: number;
|
|
66
|
-
token: CancellationToken;
|
|
67
|
-
}
|
|
68
|
-
export interface IInlineChatMetadata {
|
|
69
|
-
modelId: string | undefined;
|
|
70
|
-
extensionId: VersionedExtensionId | undefined;
|
|
71
|
-
requestId: string | undefined;
|
|
72
|
-
}
|
|
@@ -1,454 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { WindowIntervalTimer, createElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
-
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
-
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
-
import { themeColorFromId, ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
7
|
-
import { StableEditorScrollState } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/stableEditorScroll';
|
|
8
|
-
import { RenderOptions, LineSource, renderLines } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines';
|
|
9
|
-
import { LineRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/lineRange';
|
|
10
|
-
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
11
|
-
import { MinimapPosition, OverviewRulerLane, TrackedRangeStickiness } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model';
|
|
12
|
-
import { ModelDecorationOptions } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/textModel';
|
|
13
|
-
import { IEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service';
|
|
14
|
-
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
15
|
-
import { Progress } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
|
|
16
|
-
import { SaveReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
17
|
-
import { countWords } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatWordCounter';
|
|
18
|
-
import { HunkState } from './inlineChatSession.js';
|
|
19
|
-
import { minimapInlineChatDiffInserted, overviewRulerInlineChatDiffInserted, CTX_INLINE_CHAT_CHANGE_HAS_DIFF, CTX_INLINE_CHAT_CHANGE_SHOWS_DIFF, MENU_INLINE_CHAT_ZONE, ACTION_TOGGLE_DIFF } from '../common/inlineChat.js';
|
|
20
|
-
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
21
|
-
import { asProgressiveEdit, performAsyncTextEdit } from './utils.js';
|
|
22
|
-
import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
23
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
24
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
25
|
-
import { DefaultChatTextEditor } from '../../chat/browser/widget/chatContentParts/codeBlockPart.js';
|
|
26
|
-
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
27
|
-
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
28
|
-
import { ConflictActionsFactory } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mergeEditor/browser/view/conflictActions';
|
|
29
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
30
|
-
import { MenuItemAction } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
31
|
-
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
32
|
-
import { InlineDecoration, InlineDecorationType } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/viewModel/inlineDecorations';
|
|
33
|
-
import { EditSources } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/textModelEditSource';
|
|
34
|
-
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
35
|
-
|
|
36
|
-
var HunkAction;
|
|
37
|
-
(function (HunkAction) {
|
|
38
|
-
HunkAction[HunkAction["Accept"] = 0] = "Accept";
|
|
39
|
-
HunkAction[HunkAction["Discard"] = 1] = "Discard";
|
|
40
|
-
HunkAction[HunkAction["MoveNext"] = 2] = "MoveNext";
|
|
41
|
-
HunkAction[HunkAction["MovePrev"] = 3] = "MovePrev";
|
|
42
|
-
HunkAction[HunkAction["ToggleDiff"] = 4] = "ToggleDiff";
|
|
43
|
-
})(HunkAction || (HunkAction = {}));
|
|
44
|
-
let LiveStrategy = class LiveStrategy {
|
|
45
|
-
constructor(_session, _editor, _zone, _showOverlayToolbar, contextKeyService, _editorWorkerService, _menuService, _contextService, _textFileService, _instaService) {
|
|
46
|
-
this._session = _session;
|
|
47
|
-
this._editor = _editor;
|
|
48
|
-
this._zone = _zone;
|
|
49
|
-
this._showOverlayToolbar = _showOverlayToolbar;
|
|
50
|
-
this._editorWorkerService = _editorWorkerService;
|
|
51
|
-
this._menuService = _menuService;
|
|
52
|
-
this._contextService = _contextService;
|
|
53
|
-
this._textFileService = _textFileService;
|
|
54
|
-
this._instaService = _instaService;
|
|
55
|
-
this._decoInsertedText = ModelDecorationOptions.register({
|
|
56
|
-
description: 'inline-modified-line',
|
|
57
|
-
className: 'inline-chat-inserted-range-linehighlight',
|
|
58
|
-
isWholeLine: true,
|
|
59
|
-
overviewRuler: {
|
|
60
|
-
position: OverviewRulerLane.Full,
|
|
61
|
-
color: themeColorFromId(overviewRulerInlineChatDiffInserted),
|
|
62
|
-
},
|
|
63
|
-
minimap: {
|
|
64
|
-
position: MinimapPosition.Inline,
|
|
65
|
-
color: themeColorFromId(minimapInlineChatDiffInserted),
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
this._decoInsertedTextRange = ModelDecorationOptions.register({
|
|
69
|
-
description: 'inline-chat-inserted-range-linehighlight',
|
|
70
|
-
className: 'inline-chat-inserted-range',
|
|
71
|
-
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
|
|
72
|
-
});
|
|
73
|
-
this._store = ( new DisposableStore());
|
|
74
|
-
this._onDidAccept = this._store.add(( new Emitter()));
|
|
75
|
-
this._onDidDiscard = this._store.add(( new Emitter()));
|
|
76
|
-
this._editCount = 0;
|
|
77
|
-
this._hunkData = ( new Map());
|
|
78
|
-
this.onDidAccept = this._onDidAccept.event;
|
|
79
|
-
this.onDidDiscard = this._onDidDiscard.event;
|
|
80
|
-
this._ctxCurrentChangeHasDiff = CTX_INLINE_CHAT_CHANGE_HAS_DIFF.bindTo(contextKeyService);
|
|
81
|
-
this._ctxCurrentChangeShowsDiff = CTX_INLINE_CHAT_CHANGE_SHOWS_DIFF.bindTo(contextKeyService);
|
|
82
|
-
this._progressiveEditingDecorations = this._editor.createDecorationsCollection();
|
|
83
|
-
this._lensActionsFactory = this._store.add(( new ConflictActionsFactory(this._editor)));
|
|
84
|
-
}
|
|
85
|
-
dispose() {
|
|
86
|
-
this._resetDiff();
|
|
87
|
-
this._store.dispose();
|
|
88
|
-
}
|
|
89
|
-
_resetDiff() {
|
|
90
|
-
this._ctxCurrentChangeHasDiff.reset();
|
|
91
|
-
this._ctxCurrentChangeShowsDiff.reset();
|
|
92
|
-
this._zone.widget.updateStatus('');
|
|
93
|
-
this._progressiveEditingDecorations.clear();
|
|
94
|
-
for (const data of ( this._hunkData.values())) {
|
|
95
|
-
data.remove();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
async apply() {
|
|
99
|
-
this._resetDiff();
|
|
100
|
-
if (this._editCount > 0) {
|
|
101
|
-
this._editor.pushUndoStop();
|
|
102
|
-
}
|
|
103
|
-
await this._doApplyChanges(true);
|
|
104
|
-
}
|
|
105
|
-
cancel() {
|
|
106
|
-
this._resetDiff();
|
|
107
|
-
return this._session.hunkData.discardAll();
|
|
108
|
-
}
|
|
109
|
-
async makeChanges(edits, obs, undoStopBefore, metadata) {
|
|
110
|
-
return this._makeChanges(edits, obs, undefined, undefined, undoStopBefore, metadata);
|
|
111
|
-
}
|
|
112
|
-
async makeProgressiveChanges(edits, obs, opts, undoStopBefore, metadata) {
|
|
113
|
-
const progress = ( new Progress(edits => {
|
|
114
|
-
const newLines = ( new Set());
|
|
115
|
-
for (const edit of edits) {
|
|
116
|
-
LineRange.fromRange(edit.range).forEach(line => newLines.add(line));
|
|
117
|
-
}
|
|
118
|
-
const existingRanges = ( this._progressiveEditingDecorations.getRanges().map(LineRange.fromRange));
|
|
119
|
-
for (const existingRange of existingRanges) {
|
|
120
|
-
existingRange.forEach(line => newLines.delete(line));
|
|
121
|
-
}
|
|
122
|
-
const newDecorations = [];
|
|
123
|
-
for (const line of newLines) {
|
|
124
|
-
newDecorations.push({ range: ( new Range(line, 1, line, Number.MAX_VALUE)), options: this._decoInsertedText });
|
|
125
|
-
}
|
|
126
|
-
this._progressiveEditingDecorations.append(newDecorations);
|
|
127
|
-
}));
|
|
128
|
-
return this._makeChanges(edits, obs, opts, progress, undoStopBefore, metadata);
|
|
129
|
-
}
|
|
130
|
-
async _makeChanges(edits, obs, opts, progress, undoStopBefore, metadata) {
|
|
131
|
-
if (undoStopBefore) {
|
|
132
|
-
this._editor.pushUndoStop();
|
|
133
|
-
}
|
|
134
|
-
this._editCount++;
|
|
135
|
-
const editSource = EditSources.inlineChatApplyEdit({
|
|
136
|
-
modelId: metadata.modelId,
|
|
137
|
-
extensionId: metadata.extensionId,
|
|
138
|
-
requestId: metadata.requestId,
|
|
139
|
-
sessionId: undefined,
|
|
140
|
-
languageId: this._session.textModelN.getLanguageId(),
|
|
141
|
-
});
|
|
142
|
-
if (opts) {
|
|
143
|
-
const durationInSec = opts.duration / 1000;
|
|
144
|
-
for (const edit of edits) {
|
|
145
|
-
const wordCount = countWords(edit.text ?? '');
|
|
146
|
-
const speed = wordCount / durationInSec;
|
|
147
|
-
const asyncEdit = asProgressiveEdit(( new WindowIntervalTimer(this._zone.domNode)), edit, speed, opts.token);
|
|
148
|
-
await performAsyncTextEdit(this._session.textModelN, asyncEdit, progress, obs, editSource);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
obs.start();
|
|
153
|
-
this._session.textModelN.pushEditOperations(null, edits, (undoEdits) => {
|
|
154
|
-
progress?.report(undoEdits);
|
|
155
|
-
return null;
|
|
156
|
-
}, undefined, editSource);
|
|
157
|
-
obs.stop();
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
performHunkAction(hunk, action) {
|
|
161
|
-
const displayData = this._findDisplayData(hunk);
|
|
162
|
-
if (!displayData) {
|
|
163
|
-
if (action === HunkAction.Accept) {
|
|
164
|
-
this._onDidAccept.fire();
|
|
165
|
-
}
|
|
166
|
-
else if (action === HunkAction.Discard) {
|
|
167
|
-
this._onDidDiscard.fire();
|
|
168
|
-
}
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
if (action === HunkAction.Accept) {
|
|
172
|
-
displayData.acceptHunk();
|
|
173
|
-
}
|
|
174
|
-
else if (action === HunkAction.Discard) {
|
|
175
|
-
displayData.discardHunk();
|
|
176
|
-
}
|
|
177
|
-
else if (action === HunkAction.MoveNext) {
|
|
178
|
-
displayData.move(true);
|
|
179
|
-
}
|
|
180
|
-
else if (action === HunkAction.MovePrev) {
|
|
181
|
-
displayData.move(false);
|
|
182
|
-
}
|
|
183
|
-
else if (action === HunkAction.ToggleDiff) {
|
|
184
|
-
displayData.toggleDiff?.();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
_findDisplayData(hunkInfo) {
|
|
188
|
-
let result;
|
|
189
|
-
if (hunkInfo) {
|
|
190
|
-
result = this._hunkData.get(hunkInfo);
|
|
191
|
-
}
|
|
192
|
-
if (!result && this._zone.position) {
|
|
193
|
-
const zoneLine = this._zone.position.lineNumber;
|
|
194
|
-
let distance = Number.MAX_SAFE_INTEGER;
|
|
195
|
-
for (const candidate of ( this._hunkData.values())) {
|
|
196
|
-
if (candidate.hunk.getState() !== HunkState.Pending) {
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
const hunkRanges = candidate.hunk.getRangesN();
|
|
200
|
-
if (hunkRanges.length === 0) {
|
|
201
|
-
continue;
|
|
202
|
-
}
|
|
203
|
-
const myDistance = zoneLine <= hunkRanges[0].startLineNumber
|
|
204
|
-
? hunkRanges[0].startLineNumber - zoneLine
|
|
205
|
-
: zoneLine - hunkRanges[0].endLineNumber;
|
|
206
|
-
if (myDistance < distance) {
|
|
207
|
-
distance = myDistance;
|
|
208
|
-
result = candidate;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (!result) {
|
|
213
|
-
result = Iterable.first(Iterable.filter(( this._hunkData.values()), candidate => candidate.hunk.getState() === HunkState.Pending));
|
|
214
|
-
}
|
|
215
|
-
return result;
|
|
216
|
-
}
|
|
217
|
-
async renderChanges() {
|
|
218
|
-
this._progressiveEditingDecorations.clear();
|
|
219
|
-
const renderHunks = () => {
|
|
220
|
-
let widgetData;
|
|
221
|
-
changeDecorationsAndViewZones(this._editor, (decorationsAccessor, viewZoneAccessor) => {
|
|
222
|
-
const keysNow = ( new Set(( this._hunkData.keys())));
|
|
223
|
-
widgetData = undefined;
|
|
224
|
-
for (const hunkData of this._session.hunkData.getInfo()) {
|
|
225
|
-
keysNow.delete(hunkData);
|
|
226
|
-
const hunkRanges = hunkData.getRangesN();
|
|
227
|
-
let data = this._hunkData.get(hunkData);
|
|
228
|
-
if (!data) {
|
|
229
|
-
const decorationIds = [];
|
|
230
|
-
for (let i = 0; i < hunkRanges.length; i++) {
|
|
231
|
-
decorationIds.push(decorationsAccessor.addDecoration(hunkRanges[i], i === 0
|
|
232
|
-
? this._decoInsertedText
|
|
233
|
-
: this._decoInsertedTextRange));
|
|
234
|
-
}
|
|
235
|
-
const acceptHunk = () => {
|
|
236
|
-
hunkData.acceptChanges();
|
|
237
|
-
renderHunks();
|
|
238
|
-
};
|
|
239
|
-
const discardHunk = () => {
|
|
240
|
-
hunkData.discardChanges();
|
|
241
|
-
renderHunks();
|
|
242
|
-
};
|
|
243
|
-
const mightContainNonBasicASCII = this._session.textModel0.mightContainNonBasicASCII();
|
|
244
|
-
const mightContainRTL = this._session.textModel0.mightContainRTL();
|
|
245
|
-
const renderOptions = RenderOptions.fromEditor(this._editor);
|
|
246
|
-
const originalRange = hunkData.getRanges0()[0];
|
|
247
|
-
const source = ( new LineSource(
|
|
248
|
-
LineRange.fromRangeInclusive(originalRange).mapToLineArray(l => this._session.textModel0.tokenization.getLineTokens(l)),
|
|
249
|
-
[],
|
|
250
|
-
mightContainNonBasicASCII,
|
|
251
|
-
mightContainRTL
|
|
252
|
-
));
|
|
253
|
-
const domNode = createElement('div');
|
|
254
|
-
domNode.className = 'inline-chat-original-zone2';
|
|
255
|
-
const result = renderLines(source, renderOptions, [( new InlineDecoration(( new Range(originalRange.startLineNumber, 1, originalRange.startLineNumber, 1)), '', InlineDecorationType.Regular))], domNode);
|
|
256
|
-
const viewZoneData = {
|
|
257
|
-
afterLineNumber: -1,
|
|
258
|
-
heightInLines: result.heightInLines,
|
|
259
|
-
domNode,
|
|
260
|
-
ordinal: 50000 + 2
|
|
261
|
-
};
|
|
262
|
-
const toggleDiff = () => {
|
|
263
|
-
const scrollState = StableEditorScrollState.capture(this._editor);
|
|
264
|
-
changeDecorationsAndViewZones(this._editor, (_decorationsAccessor, viewZoneAccessor) => {
|
|
265
|
-
assertType(data);
|
|
266
|
-
if (!data.diffViewZoneId) {
|
|
267
|
-
const [hunkRange] = hunkData.getRangesN();
|
|
268
|
-
viewZoneData.afterLineNumber = hunkRange.startLineNumber - 1;
|
|
269
|
-
data.diffViewZoneId = viewZoneAccessor.addZone(viewZoneData);
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
viewZoneAccessor.removeZone(data.diffViewZoneId);
|
|
273
|
-
data.diffViewZoneId = undefined;
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
this._ctxCurrentChangeShowsDiff.set(typeof data?.diffViewZoneId === 'string');
|
|
277
|
-
scrollState.restore(this._editor);
|
|
278
|
-
};
|
|
279
|
-
let lensActions;
|
|
280
|
-
const lensActionsViewZoneIds = [];
|
|
281
|
-
if (this._showOverlayToolbar && hunkData.getState() === HunkState.Pending) {
|
|
282
|
-
lensActions = ( new DisposableStore());
|
|
283
|
-
const menu = this._menuService.createMenu(MENU_INLINE_CHAT_ZONE, this._contextService);
|
|
284
|
-
const makeActions = () => {
|
|
285
|
-
const actions = [];
|
|
286
|
-
const tuples = menu.getActions({ arg: hunkData });
|
|
287
|
-
for (const [, group] of tuples) {
|
|
288
|
-
for (const item of group) {
|
|
289
|
-
if (item instanceof MenuItemAction) {
|
|
290
|
-
let text = item.label;
|
|
291
|
-
if (item.id === ACTION_TOGGLE_DIFF) {
|
|
292
|
-
text = item.checked ? 'Hide Changes' : 'Show Changes';
|
|
293
|
-
}
|
|
294
|
-
else if (ThemeIcon.isThemeIcon(item.item.icon)) {
|
|
295
|
-
text = `$(${item.item.icon.id}) ${text}`;
|
|
296
|
-
}
|
|
297
|
-
actions.push({
|
|
298
|
-
text,
|
|
299
|
-
tooltip: item.tooltip,
|
|
300
|
-
action: async () => item.run(),
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
return actions;
|
|
306
|
-
};
|
|
307
|
-
const obs = observableValue(this, makeActions());
|
|
308
|
-
lensActions.add(menu.onDidChange(() => obs.set(makeActions(), undefined)));
|
|
309
|
-
lensActions.add(menu);
|
|
310
|
-
lensActions.add(this._lensActionsFactory.createWidget(viewZoneAccessor, hunkRanges[0].startLineNumber - 1, obs, lensActionsViewZoneIds));
|
|
311
|
-
}
|
|
312
|
-
const remove = () => {
|
|
313
|
-
changeDecorationsAndViewZones(this._editor, (decorationsAccessor, viewZoneAccessor) => {
|
|
314
|
-
assertType(data);
|
|
315
|
-
for (const decorationId of data.decorationIds) {
|
|
316
|
-
decorationsAccessor.removeDecoration(decorationId);
|
|
317
|
-
}
|
|
318
|
-
if (data.diffViewZoneId) {
|
|
319
|
-
viewZoneAccessor.removeZone(data.diffViewZoneId);
|
|
320
|
-
}
|
|
321
|
-
data.decorationIds = [];
|
|
322
|
-
data.diffViewZoneId = undefined;
|
|
323
|
-
data.lensActionsViewZoneIds?.forEach(viewZoneAccessor.removeZone);
|
|
324
|
-
data.lensActionsViewZoneIds = undefined;
|
|
325
|
-
});
|
|
326
|
-
lensActions?.dispose();
|
|
327
|
-
};
|
|
328
|
-
const move = (next) => {
|
|
329
|
-
const keys = Array.from(( this._hunkData.keys()));
|
|
330
|
-
const idx = keys.indexOf(hunkData);
|
|
331
|
-
const nextIdx = (idx + (next ? 1 : -1) + keys.length) % keys.length;
|
|
332
|
-
if (nextIdx !== idx) {
|
|
333
|
-
const nextData = this._hunkData.get(keys[nextIdx]);
|
|
334
|
-
this._zone.updatePositionAndHeight(nextData?.position);
|
|
335
|
-
renderHunks();
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
const zoneLineNumber = this._zone.position?.lineNumber ?? this._editor.getPosition().lineNumber;
|
|
339
|
-
const myDistance = zoneLineNumber <= hunkRanges[0].startLineNumber
|
|
340
|
-
? hunkRanges[0].startLineNumber - zoneLineNumber
|
|
341
|
-
: zoneLineNumber - hunkRanges[0].endLineNumber;
|
|
342
|
-
data = {
|
|
343
|
-
hunk: hunkData,
|
|
344
|
-
decorationIds,
|
|
345
|
-
diffViewZoneId: '',
|
|
346
|
-
diffViewZone: viewZoneData,
|
|
347
|
-
lensActionsViewZoneIds,
|
|
348
|
-
distance: myDistance,
|
|
349
|
-
position: hunkRanges[0].getStartPosition().delta(-1),
|
|
350
|
-
acceptHunk,
|
|
351
|
-
discardHunk,
|
|
352
|
-
toggleDiff: !hunkData.isInsertion() ? toggleDiff : undefined,
|
|
353
|
-
remove,
|
|
354
|
-
move,
|
|
355
|
-
};
|
|
356
|
-
this._hunkData.set(hunkData, data);
|
|
357
|
-
}
|
|
358
|
-
else if (hunkData.getState() !== HunkState.Pending) {
|
|
359
|
-
data.remove();
|
|
360
|
-
}
|
|
361
|
-
else {
|
|
362
|
-
const zoneLineNumber = this._zone.position?.lineNumber ?? this._editor.getPosition().lineNumber;
|
|
363
|
-
const modifiedRangeNow = hunkRanges[0];
|
|
364
|
-
data.position = modifiedRangeNow.getStartPosition().delta(-1);
|
|
365
|
-
data.distance = zoneLineNumber <= modifiedRangeNow.startLineNumber
|
|
366
|
-
? modifiedRangeNow.startLineNumber - zoneLineNumber
|
|
367
|
-
: zoneLineNumber - modifiedRangeNow.endLineNumber;
|
|
368
|
-
}
|
|
369
|
-
if (hunkData.getState() === HunkState.Pending && (!widgetData || data.distance < widgetData.distance)) {
|
|
370
|
-
widgetData = data;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
for (const key of keysNow) {
|
|
374
|
-
const data = this._hunkData.get(key);
|
|
375
|
-
if (data) {
|
|
376
|
-
this._hunkData.delete(key);
|
|
377
|
-
data.remove();
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
if (widgetData) {
|
|
382
|
-
this._zone.reveal(widgetData.position);
|
|
383
|
-
this._ctxCurrentChangeHasDiff.set(Boolean(widgetData.toggleDiff));
|
|
384
|
-
}
|
|
385
|
-
else if (this._hunkData.size > 0) {
|
|
386
|
-
let oneAccepted = false;
|
|
387
|
-
for (const hunkData of this._session.hunkData.getInfo()) {
|
|
388
|
-
if (hunkData.getState() === HunkState.Accepted) {
|
|
389
|
-
oneAccepted = true;
|
|
390
|
-
break;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
if (oneAccepted) {
|
|
394
|
-
this._onDidAccept.fire();
|
|
395
|
-
}
|
|
396
|
-
else {
|
|
397
|
-
this._onDidDiscard.fire();
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
return widgetData;
|
|
401
|
-
};
|
|
402
|
-
return renderHunks()?.position;
|
|
403
|
-
}
|
|
404
|
-
getWholeRangeDecoration() {
|
|
405
|
-
return [];
|
|
406
|
-
}
|
|
407
|
-
async _doApplyChanges(ignoreLocal) {
|
|
408
|
-
const untitledModels = [];
|
|
409
|
-
const editor = this._instaService.createInstance(DefaultChatTextEditor);
|
|
410
|
-
for (const request of this._session.chatModel.getRequests()) {
|
|
411
|
-
if (!request.response?.response) {
|
|
412
|
-
continue;
|
|
413
|
-
}
|
|
414
|
-
for (const item of request.response.response.value) {
|
|
415
|
-
if (item.kind !== 'textEditGroup') {
|
|
416
|
-
continue;
|
|
417
|
-
}
|
|
418
|
-
if (ignoreLocal && isEqual(item.uri, this._session.textModelN.uri)) {
|
|
419
|
-
continue;
|
|
420
|
-
}
|
|
421
|
-
await editor.apply(request.response, item, undefined);
|
|
422
|
-
if (item.uri.scheme === Schemas.untitled) {
|
|
423
|
-
const untitled = this._textFileService.untitled.get(item.uri);
|
|
424
|
-
if (untitled) {
|
|
425
|
-
untitledModels.push(untitled);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
for (const untitledModel of untitledModels) {
|
|
431
|
-
if (!untitledModel.isDisposed()) {
|
|
432
|
-
await untitledModel.resolve();
|
|
433
|
-
await untitledModel.save({ reason: SaveReason.EXPLICIT });
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
};
|
|
438
|
-
LiveStrategy = ( __decorate([
|
|
439
|
-
( __param(4, IContextKeyService)),
|
|
440
|
-
( __param(5, IEditorWorkerService)),
|
|
441
|
-
( __param(6, IMenuService)),
|
|
442
|
-
( __param(7, IContextKeyService)),
|
|
443
|
-
( __param(8, ITextFileService)),
|
|
444
|
-
( __param(9, IInstantiationService))
|
|
445
|
-
], LiveStrategy));
|
|
446
|
-
function changeDecorationsAndViewZones(editor, callback) {
|
|
447
|
-
editor.changeDecorations(decorationsAccessor => {
|
|
448
|
-
editor.changeViewZones(viewZoneAccessor => {
|
|
449
|
-
callback(decorationsAccessor, viewZoneAccessor);
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
export { HunkAction, LiveStrategy };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
2
|
-
import { IIdentifiedSingleEditOperation, ITextModel, IValidEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
3
|
-
import { IEditObserver } from "./inlineChatStrategies.js";
|
|
4
|
-
import { IProgress } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress";
|
|
5
|
-
import { IntervalTimer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/async";
|
|
6
|
-
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
7
|
-
import { TextModelEditSource } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/textModelEditSource";
|
|
8
|
-
export interface AsyncTextEdit {
|
|
9
|
-
readonly range: IRange;
|
|
10
|
-
readonly newText: AsyncIterable<string>;
|
|
11
|
-
}
|
|
12
|
-
export declare function performAsyncTextEdit(model: ITextModel, edit: AsyncTextEdit, progress?: IProgress<IValidEditOperation[]>, obs?: IEditObserver, editSource?: TextModelEditSource): Promise<void>;
|
|
13
|
-
export declare function asProgressiveEdit(interval: IntervalTimer, edit: IIdentifiedSingleEditOperation, wordsPerSec: number, token: CancellationToken): AsyncTextEdit;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { EditOperation } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editOperation';
|
|
3
|
-
import { TrackedRangeStickiness } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model';
|
|
4
|
-
import { AsyncIterableSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
5
|
-
import { getNWords } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatWordCounter';
|
|
6
|
-
|
|
7
|
-
async function performAsyncTextEdit(model, edit, progress, obs, editSource) {
|
|
8
|
-
const [id] = model.deltaDecorations([], [{
|
|
9
|
-
range: edit.range,
|
|
10
|
-
options: {
|
|
11
|
-
description: 'asyncTextEdit',
|
|
12
|
-
stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges
|
|
13
|
-
}
|
|
14
|
-
}]);
|
|
15
|
-
let first = true;
|
|
16
|
-
for await (const part of edit.newText) {
|
|
17
|
-
if (model.isDisposed()) {
|
|
18
|
-
break;
|
|
19
|
-
}
|
|
20
|
-
const range = model.getDecorationRange(id);
|
|
21
|
-
if (!range) {
|
|
22
|
-
throw ( new Error(
|
|
23
|
-
'FAILED to perform async replace edit because the anchor decoration was removed'
|
|
24
|
-
));
|
|
25
|
-
}
|
|
26
|
-
const edit = first
|
|
27
|
-
? EditOperation.replace(range, part)
|
|
28
|
-
: EditOperation.insert(range.getEndPosition(), part);
|
|
29
|
-
obs?.start();
|
|
30
|
-
model.pushEditOperations(null, [edit], (undoEdits) => {
|
|
31
|
-
progress?.report(undoEdits);
|
|
32
|
-
return null;
|
|
33
|
-
}, undefined, editSource);
|
|
34
|
-
obs?.stop();
|
|
35
|
-
first = false;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function asProgressiveEdit(interval, edit, wordsPerSec, token) {
|
|
39
|
-
wordsPerSec = Math.max(30, wordsPerSec);
|
|
40
|
-
const stream = ( new AsyncIterableSource());
|
|
41
|
-
let newText = edit.text ?? '';
|
|
42
|
-
interval.cancelAndSet(() => {
|
|
43
|
-
if (token.isCancellationRequested) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const r = getNWords(newText, 1);
|
|
47
|
-
stream.emitOne(r.value);
|
|
48
|
-
newText = newText.substring(r.value.length);
|
|
49
|
-
if (r.isFullString) {
|
|
50
|
-
interval.cancel();
|
|
51
|
-
stream.resolve();
|
|
52
|
-
d.dispose();
|
|
53
|
-
}
|
|
54
|
-
}, 1000 / wordsPerSec);
|
|
55
|
-
const d = token.onCancellationRequested(() => {
|
|
56
|
-
interval.cancel();
|
|
57
|
-
stream.resolve();
|
|
58
|
-
d.dispose();
|
|
59
|
-
});
|
|
60
|
-
return {
|
|
61
|
-
range: edit.range,
|
|
62
|
-
newText: stream.asyncIterable
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { asProgressiveEdit, performAsyncTextEdit };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { ICodeEditorService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service";
|
|
4
|
-
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
5
|
-
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
6
|
-
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
7
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
|
-
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
9
|
-
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
10
|
-
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
11
|
-
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
12
|
-
import { ISearchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/search/common/search.service";
|
|
13
|
-
import { ITerminalGroupService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
14
|
-
import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
15
|
-
import { IMcpPrompt } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
|
|
16
|
-
export declare class McpPromptArgumentPick extends Disposable {
|
|
17
|
-
private readonly prompt;
|
|
18
|
-
private readonly _quickInputService;
|
|
19
|
-
private readonly _terminalService;
|
|
20
|
-
private readonly _searchService;
|
|
21
|
-
private readonly _workspaceContextService;
|
|
22
|
-
private readonly _labelService;
|
|
23
|
-
private readonly _fileService;
|
|
24
|
-
private readonly _modelService;
|
|
25
|
-
private readonly _languageService;
|
|
26
|
-
private readonly _terminalGroupService;
|
|
27
|
-
private readonly _instantiationService;
|
|
28
|
-
private readonly _codeEditorService;
|
|
29
|
-
private readonly _editorService;
|
|
30
|
-
private readonly quickPick;
|
|
31
|
-
private _terminal?;
|
|
32
|
-
constructor(prompt: IMcpPrompt, _quickInputService: IQuickInputService, _terminalService: ITerminalService, _searchService: ISearchService, _workspaceContextService: IWorkspaceContextService, _labelService: ILabelService, _fileService: IFileService, _modelService: IModelService, _languageService: ILanguageService, _terminalGroupService: ITerminalGroupService, _instantiationService: IInstantiationService, _codeEditorService: ICodeEditorService, _editorService: IEditorService);
|
|
33
|
-
createArgs(token?: CancellationToken): Promise<Record<string, string | undefined> | undefined>;
|
|
34
|
-
private _getArg;
|
|
35
|
-
private _promptCompletions;
|
|
36
|
-
private _fileCompletions;
|
|
37
|
-
private _activeFileCompletions;
|
|
38
|
-
private _asyncCompletions;
|
|
39
|
-
private _getTerminalOutput;
|
|
40
|
-
private _getTerminalOutputInner;
|
|
41
|
-
}
|