@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
|
@@ -6,15 +6,10 @@ import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/
|
|
|
6
6
|
import { renderLabelWithIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
7
7
|
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
8
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
9
|
-
import { DisposableStore, toDisposable
|
|
9
|
+
import { DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
10
10
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
11
11
|
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
12
|
-
import { AccessibleDiffViewer } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer';
|
|
13
|
-
import { EditorOption } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/editorOptions';
|
|
14
|
-
import { LineRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/lineRange';
|
|
15
12
|
import { Selection } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection';
|
|
16
|
-
import { RangeMapping, DetailedLineRangeMapping } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping';
|
|
17
|
-
import { ScrollType } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon';
|
|
18
13
|
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
19
14
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
20
15
|
import { IAccessibleViewService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView.service';
|
|
@@ -56,17 +51,29 @@ import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contr
|
|
|
56
51
|
import { ChatAgentVoteDirection } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
57
52
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
58
53
|
import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
54
|
+
import { walkTokens, lexer } from 'marked';
|
|
59
55
|
import { inlineChatBackground, inlineChatForeground, CTX_INLINE_CHAT_RESPONSE_FOCUSED, CTX_INLINE_CHAT_FOCUSED } from '../common/inlineChat.js';
|
|
60
56
|
import * as inlineChat from './media/inlineChat.css';
|
|
61
57
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
62
58
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
63
|
-
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
64
|
-
import { constObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/constObservable';
|
|
65
59
|
|
|
66
|
-
var HunkAccessibleDiffViewer_1;
|
|
67
60
|
registerCss(inlineChat);
|
|
68
61
|
let InlineChatWidget = class InlineChatWidget {
|
|
69
|
-
constructor(
|
|
62
|
+
constructor(
|
|
63
|
+
location,
|
|
64
|
+
_options,
|
|
65
|
+
_instantiationService,
|
|
66
|
+
_contextKeyService,
|
|
67
|
+
_keybindingService,
|
|
68
|
+
_accessibilityService,
|
|
69
|
+
_configurationService,
|
|
70
|
+
_accessibleViewService,
|
|
71
|
+
_textModelResolverService,
|
|
72
|
+
_chatService,
|
|
73
|
+
_hoverService,
|
|
74
|
+
_chatEntitlementService,
|
|
75
|
+
_markdownRendererService
|
|
76
|
+
) {
|
|
70
77
|
this._options = _options;
|
|
71
78
|
this._instantiationService = _instantiationService;
|
|
72
79
|
this._contextKeyService = _contextKeyService;
|
|
@@ -79,16 +86,16 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
79
86
|
this._hoverService = _hoverService;
|
|
80
87
|
this._chatEntitlementService = _chatEntitlementService;
|
|
81
88
|
this._markdownRendererService = _markdownRendererService;
|
|
82
|
-
this._elements = h(
|
|
83
|
-
h(
|
|
84
|
-
h(
|
|
85
|
-
h(
|
|
86
|
-
h(
|
|
87
|
-
h(
|
|
88
|
-
h(
|
|
89
|
-
h(
|
|
90
|
-
h(
|
|
91
|
-
])
|
|
89
|
+
this._elements = h("div.inline-chat@root", [
|
|
90
|
+
h("div.chat-widget@chatWidget"),
|
|
91
|
+
h("div.accessibleViewer@accessibleViewer"),
|
|
92
|
+
h("div.status@status", [
|
|
93
|
+
h("div.label.info.hidden@infoLabel"),
|
|
94
|
+
h("div.actions.hidden@toolbar1"),
|
|
95
|
+
h("div.label.status.hidden@statusLabel"),
|
|
96
|
+
h("div.actions.secondary.hidden@toolbar2"),
|
|
97
|
+
h("div.label.disclaimer.hidden@disclaimerLabel")
|
|
98
|
+
])
|
|
92
99
|
]);
|
|
93
100
|
this._store = ( new DisposableStore());
|
|
94
101
|
this._onDidChangeHeight = this._store.add(( new Emitter()));
|
|
@@ -97,14 +104,13 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
97
104
|
this.requestInProgress = this._requestInProgress;
|
|
98
105
|
this._isLayouting = false;
|
|
99
106
|
this.scopedContextKeyService = this._store.add(_contextKeyService.createScoped(this._elements.chatWidget));
|
|
100
|
-
const scopedInstaService = _instantiationService.createChild(( new ServiceCollection([
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this._chatWidget = scopedInstaService.createInstance(ChatWidget, location, { isInlineChat: true }, {
|
|
107
|
+
const scopedInstaService = _instantiationService.createChild(( new ServiceCollection([IContextKeyService, this.scopedContextKeyService])), this._store);
|
|
108
|
+
this._chatWidget = scopedInstaService.createInstance(ChatWidget, location, {
|
|
109
|
+
isInlineChat: true
|
|
110
|
+
}, {
|
|
105
111
|
autoScroll: true,
|
|
106
112
|
defaultElementHeight: 32,
|
|
107
|
-
renderStyle:
|
|
113
|
+
renderStyle: "minimal",
|
|
108
114
|
renderInputOnTop: false,
|
|
109
115
|
renderFollowups: true,
|
|
110
116
|
supportsFileReferences: true,
|
|
@@ -116,7 +122,9 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
116
122
|
if (emptyResponse) {
|
|
117
123
|
return false;
|
|
118
124
|
}
|
|
119
|
-
if (item.response.value.every(
|
|
125
|
+
if (item.response.value.every(
|
|
126
|
+
item => item.kind === "textEditGroup" && _options.chatWidgetViewOptions?.rendererOptions?.renderTextEditsAsSummary?.(item.uri)
|
|
127
|
+
)) {
|
|
120
128
|
return false;
|
|
121
129
|
}
|
|
122
130
|
return true;
|
|
@@ -131,9 +139,12 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
131
139
|
inputEditorBackground: inputBackground,
|
|
132
140
|
resultEditorBackground: editorBackground
|
|
133
141
|
});
|
|
134
|
-
this._elements.root.classList.toggle(
|
|
142
|
+
this._elements.root.classList.toggle("in-zone-widget", !!_options.inZoneWidget);
|
|
135
143
|
this._chatWidget.render(this._elements.chatWidget);
|
|
136
|
-
this._elements.chatWidget.style.setProperty(
|
|
144
|
+
this._elements.chatWidget.style.setProperty(
|
|
145
|
+
asCssVariableName(chatRequestBackground),
|
|
146
|
+
asCssVariable(inlineChatBackground)
|
|
147
|
+
);
|
|
137
148
|
this._chatWidget.setVisible(true);
|
|
138
149
|
this._store.add(this._chatWidget);
|
|
139
150
|
const ctxResponse = ChatContextKeys.isResponse.bindTo(this.scopedContextKeyService);
|
|
@@ -161,10 +172,14 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
161
172
|
const last = viewModel.getItems().at(-1);
|
|
162
173
|
toolbar2.context = last;
|
|
163
174
|
ctxResponse.set(isResponseVM(last));
|
|
164
|
-
ctxResponseVote.set(
|
|
175
|
+
ctxResponseVote.set(
|
|
176
|
+
isResponseVM(last) ? last.vote === ChatAgentVoteDirection.Down ? "down" : last.vote === ChatAgentVoteDirection.Up ? "up" : "" : ""
|
|
177
|
+
);
|
|
165
178
|
ctxResponseError.set(isResponseVM(last) && last.errorDetails !== undefined);
|
|
166
179
|
ctxResponseErrorFiltered.set((!!(isResponseVM(last) && last.errorDetails?.responseIsFiltered)));
|
|
167
|
-
ctxResponseSupportIssues.set(
|
|
180
|
+
ctxResponseSupportIssues.set(
|
|
181
|
+
isResponseVM(last) && (last.agent?.metadata.supportIssueReporting ?? false)
|
|
182
|
+
);
|
|
168
183
|
this._onDidChangeHeight.fire();
|
|
169
184
|
}));
|
|
170
185
|
this._onDidChangeHeight.fire();
|
|
@@ -177,28 +192,44 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
177
192
|
this._store.add(tracker.onDidBlur(() => this._ctxResponseFocused.set(false)));
|
|
178
193
|
this._store.add(tracker.onDidFocus(() => this._ctxResponseFocused.set(true)));
|
|
179
194
|
this._ctxInputEditorFocused = CTX_INLINE_CHAT_FOCUSED.bindTo(_contextKeyService);
|
|
180
|
-
this._store.add(
|
|
181
|
-
|
|
195
|
+
this._store.add(
|
|
196
|
+
this._chatWidget.inputEditor.onDidFocusEditorWidget(() => this._ctxInputEditorFocused.set(true))
|
|
197
|
+
);
|
|
198
|
+
this._store.add(
|
|
199
|
+
this._chatWidget.inputEditor.onDidBlurEditorWidget(() => this._ctxInputEditorFocused.set(false))
|
|
200
|
+
);
|
|
182
201
|
const statusMenuId = _options.statusMenuId instanceof MenuId ? _options.statusMenuId : _options.statusMenuId.menu;
|
|
183
202
|
const statusMenuOptions = _options.statusMenuId instanceof MenuId ? undefined : _options.statusMenuId.options;
|
|
184
203
|
const statusButtonBar = scopedInstaService.createInstance(MenuWorkbenchButtonBar, this._elements.toolbar1, statusMenuId, {
|
|
185
|
-
toolbarOptions: {
|
|
204
|
+
toolbarOptions: {
|
|
205
|
+
primaryGroup: "0_main"
|
|
206
|
+
},
|
|
186
207
|
telemetrySource: _options.chatWidgetViewOptions?.menus?.telemetrySource,
|
|
187
|
-
menuOptions: {
|
|
188
|
-
|
|
208
|
+
menuOptions: {
|
|
209
|
+
renderShortTitle: true
|
|
210
|
+
},
|
|
211
|
+
...statusMenuOptions
|
|
189
212
|
});
|
|
190
213
|
this._store.add(statusButtonBar.onDidChange(() => this._onDidChangeHeight.fire()));
|
|
191
214
|
this._store.add(statusButtonBar);
|
|
192
|
-
const toolbar2 = scopedInstaService.createInstance(
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
215
|
+
const toolbar2 = scopedInstaService.createInstance(
|
|
216
|
+
MenuWorkbenchToolBar,
|
|
217
|
+
this._elements.toolbar2,
|
|
218
|
+
_options.secondaryMenuId ?? MenuId.for(""),
|
|
219
|
+
{
|
|
220
|
+
telemetrySource: _options.chatWidgetViewOptions?.menus?.telemetrySource,
|
|
221
|
+
menuOptions: {
|
|
222
|
+
renderShortTitle: true,
|
|
223
|
+
shouldForwardArgs: true
|
|
224
|
+
},
|
|
225
|
+
actionViewItemProvider: (action, options) => {
|
|
226
|
+
if (action instanceof MenuItemAction && action.item.id === MarkUnhelpfulActionId) {
|
|
227
|
+
return scopedInstaService.createInstance(ChatVoteDownButton, action, options);
|
|
228
|
+
}
|
|
229
|
+
return createActionViewItem(scopedInstaService, action, options);
|
|
198
230
|
}
|
|
199
|
-
return createActionViewItem(scopedInstaService, action, options);
|
|
200
231
|
}
|
|
201
|
-
|
|
232
|
+
);
|
|
202
233
|
this._store.add(toolbar2.onDidChangeMenuItems(() => this._onDidChangeHeight.fire()));
|
|
203
234
|
this._store.add(toolbar2);
|
|
204
235
|
this._store.add(this._configurationService.onDidChangeConfiguration(e => {
|
|
@@ -210,12 +241,16 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
210
241
|
this._elements.statusLabel.tabIndex = 0;
|
|
211
242
|
this._updateAriaLabel();
|
|
212
243
|
this._setupDisclaimer();
|
|
213
|
-
this._store.add(
|
|
214
|
-
|
|
215
|
-
|
|
244
|
+
this._store.add(
|
|
245
|
+
this._hoverService.setupManagedHover(getDefaultHoverDelegate("element"), this._elements.statusLabel, () => {
|
|
246
|
+
return this._elements.statusLabel.dataset["title"];
|
|
247
|
+
})
|
|
248
|
+
);
|
|
216
249
|
this._store.add(this._chatService.onDidPerformUserAction(e => {
|
|
217
|
-
if (isEqual(e.sessionResource, this._chatWidget.viewModel?.model.sessionResource) && e.action.kind ===
|
|
218
|
-
this.updateStatus(( localize(
|
|
250
|
+
if (isEqual(e.sessionResource, this._chatWidget.viewModel?.model.sessionResource) && e.action.kind === "vote") {
|
|
251
|
+
this.updateStatus(( localize(8655, "Thank you for your feedback!")), {
|
|
252
|
+
resetAfter: 1250
|
|
253
|
+
});
|
|
219
254
|
}
|
|
220
255
|
}));
|
|
221
256
|
}
|
|
@@ -225,18 +260,18 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
225
260
|
let label = defaultAriaLabel;
|
|
226
261
|
if (this._configurationService.getValue(AccessibilityVerbositySettingId.InlineChat)) {
|
|
227
262
|
const kbLabel = this._keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibilityHelp)?.getLabel();
|
|
228
|
-
label = kbLabel
|
|
229
|
-
|
|
230
|
-
8351,
|
|
263
|
+
label = kbLabel ? ( localize(
|
|
264
|
+
8656,
|
|
231
265
|
"Inline Chat Input, Use {0} for Inline Chat Accessibility Help.",
|
|
232
266
|
kbLabel
|
|
233
|
-
))
|
|
234
|
-
|
|
235
|
-
8352,
|
|
267
|
+
)) : ( localize(
|
|
268
|
+
8657,
|
|
236
269
|
"Inline Chat Input, Run the Inline Chat Accessibility Help command for more information."
|
|
237
270
|
));
|
|
238
271
|
}
|
|
239
|
-
this._chatWidget.inputEditor.updateOptions({
|
|
272
|
+
this._chatWidget.inputEditor.updateOptions({
|
|
273
|
+
ariaLabel: label
|
|
274
|
+
});
|
|
240
275
|
}
|
|
241
276
|
}
|
|
242
277
|
_setupDisclaimer() {
|
|
@@ -248,16 +283,18 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
248
283
|
const anonymous = this._chatEntitlementService.anonymousObs.read(reader);
|
|
249
284
|
const requestInProgress = this._chatService.requestInProgressObs.read(reader);
|
|
250
285
|
const showDisclaimer = !sentiment.installed && anonymous && !requestInProgress;
|
|
251
|
-
this._elements.disclaimerLabel.classList.toggle(
|
|
286
|
+
this._elements.disclaimerLabel.classList.toggle("hidden", !showDisclaimer);
|
|
252
287
|
if (showDisclaimer) {
|
|
253
288
|
const renderedMarkdown = disposables.add(this._markdownRendererService.render(( new MarkdownString(( localize(
|
|
254
|
-
|
|
289
|
+
8658,
|
|
255
290
|
"By continuing with {0} Copilot, you agree to {1}'s [Terms]({2}) and [Privacy Statement]({3})",
|
|
256
|
-
product.defaultChatAgent?.provider?.default?.name ??
|
|
257
|
-
product.defaultChatAgent?.provider?.default?.name ??
|
|
258
|
-
product.defaultChatAgent?.termsStatementUrl ??
|
|
259
|
-
product.defaultChatAgent?.privacyStatementUrl ??
|
|
260
|
-
)), {
|
|
291
|
+
product.defaultChatAgent?.provider?.default?.name ?? "",
|
|
292
|
+
product.defaultChatAgent?.provider?.default?.name ?? "",
|
|
293
|
+
product.defaultChatAgent?.termsStatementUrl ?? "",
|
|
294
|
+
product.defaultChatAgent?.privacyStatementUrl ?? ""
|
|
295
|
+
)), {
|
|
296
|
+
isTrusted: true
|
|
297
|
+
}))));
|
|
261
298
|
this._elements.disclaimerLabel.appendChild(renderedMarkdown.element);
|
|
262
299
|
}
|
|
263
300
|
this._onDidChangeHeight.fire();
|
|
@@ -280,8 +317,7 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
280
317
|
this._isLayouting = true;
|
|
281
318
|
try {
|
|
282
319
|
this._doLayout(widgetDim);
|
|
283
|
-
}
|
|
284
|
-
finally {
|
|
320
|
+
} finally {
|
|
285
321
|
this._isLayouting = false;
|
|
286
322
|
if (this.contentHeight !== contentHeight) {
|
|
287
323
|
this._onDidChangeHeight.fire();
|
|
@@ -307,18 +343,21 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
307
343
|
get minHeight() {
|
|
308
344
|
let maxWidgetOutputHeight = 100;
|
|
309
345
|
for (const item of this._chatWidget.viewModel?.getItems() ?? []) {
|
|
310
|
-
if (isResponseVM(item) && ( item.response.value.some(r => r.kind ===
|
|
346
|
+
if (isResponseVM(item) && ( item.response.value.some(r => r.kind === "textEditGroup" && !r.state?.applied))) {
|
|
311
347
|
maxWidgetOutputHeight = 270;
|
|
312
348
|
break;
|
|
313
349
|
}
|
|
314
350
|
}
|
|
315
351
|
let value = this.contentHeight;
|
|
316
352
|
value -= this._chatWidget.contentHeight;
|
|
317
|
-
value += Math.min(
|
|
353
|
+
value += Math.min(
|
|
354
|
+
this._chatWidget.input.height.get() + maxWidgetOutputHeight,
|
|
355
|
+
this._chatWidget.contentHeight
|
|
356
|
+
);
|
|
318
357
|
return value;
|
|
319
358
|
}
|
|
320
359
|
_getExtraHeight() {
|
|
321
|
-
return this._options.inZoneWidget ? 1 : (
|
|
360
|
+
return this._options.inZoneWidget ? 1 : (2 + 4) ;
|
|
322
361
|
}
|
|
323
362
|
get value() {
|
|
324
363
|
return this._chatWidget.getInput();
|
|
@@ -333,22 +372,24 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
333
372
|
this._chatWidget.setInputPlaceholder(value);
|
|
334
373
|
}
|
|
335
374
|
toggleStatus(show) {
|
|
336
|
-
this._elements.toolbar1.classList.toggle(
|
|
337
|
-
this._elements.toolbar2.classList.toggle(
|
|
338
|
-
this._elements.status.classList.toggle(
|
|
339
|
-
this._elements.infoLabel.classList.toggle(
|
|
375
|
+
this._elements.toolbar1.classList.toggle("hidden", !show);
|
|
376
|
+
this._elements.toolbar2.classList.toggle("hidden", !show);
|
|
377
|
+
this._elements.status.classList.toggle("hidden", !show);
|
|
378
|
+
this._elements.infoLabel.classList.toggle("hidden", !show);
|
|
340
379
|
this._onDidChangeHeight.fire();
|
|
341
380
|
}
|
|
342
381
|
updateToolbar(show) {
|
|
343
|
-
this._elements.root.classList.toggle(
|
|
344
|
-
this._elements.toolbar1.classList.toggle(
|
|
345
|
-
this._elements.toolbar2.classList.toggle(
|
|
346
|
-
this._elements.status.classList.toggle(
|
|
347
|
-
this._elements.infoLabel.classList.toggle(
|
|
382
|
+
this._elements.root.classList.toggle("toolbar", show);
|
|
383
|
+
this._elements.toolbar1.classList.toggle("hidden", !show);
|
|
384
|
+
this._elements.toolbar2.classList.toggle("hidden", !show);
|
|
385
|
+
this._elements.status.classList.toggle("actions", show);
|
|
386
|
+
this._elements.infoLabel.classList.toggle("hidden", show);
|
|
348
387
|
this._onDidChangeHeight.fire();
|
|
349
388
|
}
|
|
350
389
|
async getCodeBlockInfo(codeBlockIndex) {
|
|
351
|
-
const {
|
|
390
|
+
const {
|
|
391
|
+
viewModel
|
|
392
|
+
} = this._chatWidget;
|
|
352
393
|
if (!viewModel) {
|
|
353
394
|
return undefined;
|
|
354
395
|
}
|
|
@@ -357,7 +398,33 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
357
398
|
if (!item) {
|
|
358
399
|
return;
|
|
359
400
|
}
|
|
360
|
-
|
|
401
|
+
const existingEntry = viewModel.codeBlockModelCollection.get(viewModel.sessionResource, item, codeBlockIndex);
|
|
402
|
+
if (existingEntry) {
|
|
403
|
+
return existingEntry.model;
|
|
404
|
+
}
|
|
405
|
+
const markdown = item.response.getMarkdown();
|
|
406
|
+
let currentCodeBlockIndex = 0;
|
|
407
|
+
let foundCodeBlock;
|
|
408
|
+
walkTokens(lexer(markdown), token => {
|
|
409
|
+
if (token.type === "code") {
|
|
410
|
+
if (currentCodeBlockIndex === codeBlockIndex) {
|
|
411
|
+
foundCodeBlock = {
|
|
412
|
+
text: token.text,
|
|
413
|
+
lang: token.lang || ""
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
currentCodeBlockIndex++;
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
if (!foundCodeBlock) {
|
|
420
|
+
return undefined;
|
|
421
|
+
}
|
|
422
|
+
const entry = viewModel.codeBlockModelCollection.updateSync(viewModel.sessionResource, item, codeBlockIndex, {
|
|
423
|
+
text: foundCodeBlock.text,
|
|
424
|
+
languageId: foundCodeBlock.lang,
|
|
425
|
+
isComplete: true
|
|
426
|
+
});
|
|
427
|
+
return entry.model;
|
|
361
428
|
}
|
|
362
429
|
get responseContent() {
|
|
363
430
|
const requests = this._chatWidget.viewModel?.model.getRequests();
|
|
@@ -367,40 +434,45 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
367
434
|
return this._chatWidget.viewModel?.model;
|
|
368
435
|
}
|
|
369
436
|
setChatModel(chatModel) {
|
|
370
|
-
chatModel.inputModel.setState({
|
|
437
|
+
chatModel.inputModel.setState({
|
|
438
|
+
inputText: "",
|
|
439
|
+
selections: []
|
|
440
|
+
});
|
|
371
441
|
this._chatWidget.setModel(chatModel);
|
|
372
442
|
}
|
|
373
443
|
updateInfo(message) {
|
|
374
|
-
this._elements.infoLabel.classList.toggle(
|
|
444
|
+
this._elements.infoLabel.classList.toggle("hidden", !message);
|
|
375
445
|
const renderedMessage = renderLabelWithIcons(message);
|
|
376
446
|
reset(this._elements.infoLabel, ...renderedMessage);
|
|
377
447
|
this._onDidChangeHeight.fire();
|
|
378
448
|
}
|
|
379
449
|
updateStatus(message, ops = {}) {
|
|
380
|
-
const isTempMessage = typeof ops.resetAfter ===
|
|
381
|
-
if (isTempMessage && !this._elements.statusLabel.dataset[
|
|
450
|
+
const isTempMessage = typeof ops.resetAfter === "number";
|
|
451
|
+
if (isTempMessage && !this._elements.statusLabel.dataset["state"]) {
|
|
382
452
|
const statusLabel = this._elements.statusLabel.innerText;
|
|
383
|
-
const title = this._elements.statusLabel.dataset[
|
|
453
|
+
const title = this._elements.statusLabel.dataset["title"];
|
|
384
454
|
const classes = Array.from(( this._elements.statusLabel.classList.values()));
|
|
385
455
|
setTimeout(() => {
|
|
386
|
-
this.updateStatus(statusLabel, {
|
|
456
|
+
this.updateStatus(statusLabel, {
|
|
457
|
+
classes,
|
|
458
|
+
keepMessage: true,
|
|
459
|
+
title
|
|
460
|
+
});
|
|
387
461
|
}, ops.resetAfter);
|
|
388
462
|
}
|
|
389
463
|
const renderedMessage = renderLabelWithIcons(message);
|
|
390
464
|
reset(this._elements.statusLabel, ...renderedMessage);
|
|
391
|
-
this._elements.statusLabel.className = `label status ${(ops.classes ?? []).join(
|
|
392
|
-
this._elements.statusLabel.classList.toggle(
|
|
465
|
+
this._elements.statusLabel.className = `label status ${(ops.classes ?? []).join(" ")}`;
|
|
466
|
+
this._elements.statusLabel.classList.toggle("hidden", !message);
|
|
393
467
|
if (isTempMessage) {
|
|
394
|
-
this._elements.statusLabel.dataset[
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
delete this._elements.statusLabel.dataset['state'];
|
|
468
|
+
this._elements.statusLabel.dataset["state"] = "temp";
|
|
469
|
+
} else {
|
|
470
|
+
delete this._elements.statusLabel.dataset["state"];
|
|
398
471
|
}
|
|
399
472
|
if (ops.title) {
|
|
400
|
-
this._elements.statusLabel.dataset[
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
delete this._elements.statusLabel.dataset['title'];
|
|
473
|
+
this._elements.statusLabel.dataset["title"] = ops.title;
|
|
474
|
+
} else {
|
|
475
|
+
delete this._elements.statusLabel.dataset["title"];
|
|
404
476
|
}
|
|
405
477
|
this._onDidChangeHeight.fire();
|
|
406
478
|
}
|
|
@@ -408,11 +480,11 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
408
480
|
this._chatWidget.attachmentModel.clear(true);
|
|
409
481
|
this._chatWidget.saveState();
|
|
410
482
|
reset(this._elements.statusLabel);
|
|
411
|
-
this._elements.statusLabel.classList.toggle(
|
|
412
|
-
this._elements.toolbar1.classList.add(
|
|
413
|
-
this._elements.toolbar2.classList.add(
|
|
414
|
-
this.updateInfo(
|
|
415
|
-
this._elements.accessibleViewer.classList.toggle(
|
|
483
|
+
this._elements.statusLabel.classList.toggle("hidden", true);
|
|
484
|
+
this._elements.toolbar1.classList.add("hidden");
|
|
485
|
+
this._elements.toolbar2.classList.add("hidden");
|
|
486
|
+
this.updateInfo("");
|
|
487
|
+
this._elements.accessibleViewer.classList.toggle("hidden", true);
|
|
416
488
|
this._onDidChangeHeight.fire();
|
|
417
489
|
}
|
|
418
490
|
focus() {
|
|
@@ -422,23 +494,27 @@ let InlineChatWidget = class InlineChatWidget {
|
|
|
422
494
|
return this.domNode.contains(getActiveElement());
|
|
423
495
|
}
|
|
424
496
|
};
|
|
425
|
-
InlineChatWidget = ( __decorate([
|
|
426
|
-
|
|
427
|
-
( __param(3, IContextKeyService)),
|
|
428
|
-
( __param(4, IKeybindingService)),
|
|
429
|
-
( __param(5, IAccessibilityService)),
|
|
430
|
-
( __param(6, IConfigurationService)),
|
|
431
|
-
( __param(7, IAccessibleViewService)),
|
|
432
|
-
( __param(8, ITextModelService)),
|
|
433
|
-
( __param(9, IChatService)),
|
|
434
|
-
( __param(10, IHoverService)),
|
|
435
|
-
( __param(11, IChatEntitlementService)),
|
|
436
|
-
( __param(12, IMarkdownRendererService))
|
|
437
|
-
], InlineChatWidget));
|
|
438
|
-
const defaultAriaLabel = ( localize(8354, "Inline Chat Input"));
|
|
497
|
+
InlineChatWidget = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IContextKeyService)), ( __param(4, IKeybindingService)), ( __param(5, IAccessibilityService)), ( __param(6, IConfigurationService)), ( __param(7, IAccessibleViewService)), ( __param(8, ITextModelService)), ( __param(9, IChatService)), ( __param(10, IHoverService)), ( __param(11, IChatEntitlementService)), ( __param(12, IMarkdownRendererService))], InlineChatWidget));
|
|
498
|
+
const defaultAriaLabel = ( localize(8659, "Inline Chat Input"));
|
|
439
499
|
let EditorBasedInlineChatWidget = class EditorBasedInlineChatWidget extends InlineChatWidget {
|
|
440
|
-
constructor(
|
|
441
|
-
|
|
500
|
+
constructor(
|
|
501
|
+
location,
|
|
502
|
+
parentEditor,
|
|
503
|
+
options,
|
|
504
|
+
contextKeyService,
|
|
505
|
+
keybindingService,
|
|
506
|
+
instantiationService,
|
|
507
|
+
accessibilityService,
|
|
508
|
+
configurationService,
|
|
509
|
+
accessibleViewService,
|
|
510
|
+
textModelResolverService,
|
|
511
|
+
chatService,
|
|
512
|
+
hoverService,
|
|
513
|
+
layoutService,
|
|
514
|
+
chatEntitlementService,
|
|
515
|
+
markdownRendererService
|
|
516
|
+
) {
|
|
517
|
+
const overflowWidgetsNode = layoutService.getContainer(getWindow(parentEditor.getContainerDomNode())).appendChild($(".inline-chat-overflow.monaco-editor"));
|
|
442
518
|
super(location, {
|
|
443
519
|
...options,
|
|
444
520
|
chatWidgetViewOptions: {
|
|
@@ -446,117 +522,20 @@ let EditorBasedInlineChatWidget = class EditorBasedInlineChatWidget extends Inli
|
|
|
446
522
|
editorOverflowWidgetsDomNode: overflowWidgetsNode
|
|
447
523
|
}
|
|
448
524
|
}, instantiationService, contextKeyService, keybindingService, accessibilityService, configurationService, accessibleViewService, textModelResolverService, chatService, hoverService, chatEntitlementService, markdownRendererService);
|
|
449
|
-
this._parentEditor = _parentEditor;
|
|
450
|
-
this._accessibleViewer = this._store.add(( new MutableDisposable()));
|
|
451
525
|
this._store.add(toDisposable(() => {
|
|
452
526
|
overflowWidgetsNode.remove();
|
|
453
527
|
}));
|
|
454
528
|
}
|
|
455
|
-
get contentHeight() {
|
|
456
|
-
let result = super.contentHeight;
|
|
457
|
-
if (this._accessibleViewer.value) {
|
|
458
|
-
result += this._accessibleViewer.value.height + 8 ;
|
|
459
|
-
}
|
|
460
|
-
return result;
|
|
461
|
-
}
|
|
462
529
|
_doLayout(dimension) {
|
|
463
|
-
|
|
464
|
-
if (this._accessibleViewer.value) {
|
|
465
|
-
this._accessibleViewer.value.width = dimension.width - 12;
|
|
466
|
-
newHeight -= this._accessibleViewer.value.height + 8;
|
|
467
|
-
}
|
|
530
|
+
const newHeight = dimension.height;
|
|
468
531
|
super._doLayout(dimension.with(undefined, newHeight));
|
|
469
532
|
this._elements.root.style.height = `${dimension.height - this._getExtraHeight()}px`;
|
|
470
533
|
}
|
|
471
534
|
reset() {
|
|
472
|
-
this._accessibleViewer.clear();
|
|
473
535
|
this.chatWidget.setInput();
|
|
474
536
|
super.reset();
|
|
475
537
|
}
|
|
476
|
-
showAccessibleHunk(session, hunkData) {
|
|
477
|
-
this._elements.accessibleViewer.classList.remove('hidden');
|
|
478
|
-
this._accessibleViewer.clear();
|
|
479
|
-
this._accessibleViewer.value = this._instantiationService.createInstance(HunkAccessibleDiffViewer, this._elements.accessibleViewer, session, hunkData, ( new AccessibleHunk(this._parentEditor, session, hunkData)));
|
|
480
|
-
this._onDidChangeHeight.fire();
|
|
481
|
-
}
|
|
482
|
-
};
|
|
483
|
-
EditorBasedInlineChatWidget = ( __decorate([
|
|
484
|
-
( __param(3, IContextKeyService)),
|
|
485
|
-
( __param(4, IKeybindingService)),
|
|
486
|
-
( __param(5, IInstantiationService)),
|
|
487
|
-
( __param(6, IAccessibilityService)),
|
|
488
|
-
( __param(7, IConfigurationService)),
|
|
489
|
-
( __param(8, IAccessibleViewService)),
|
|
490
|
-
( __param(9, ITextModelService)),
|
|
491
|
-
( __param(10, IChatService)),
|
|
492
|
-
( __param(11, IHoverService)),
|
|
493
|
-
( __param(12, ILayoutService)),
|
|
494
|
-
( __param(13, IChatEntitlementService)),
|
|
495
|
-
( __param(14, IMarkdownRendererService))
|
|
496
|
-
], EditorBasedInlineChatWidget));
|
|
497
|
-
let HunkAccessibleDiffViewer = HunkAccessibleDiffViewer_1 = class HunkAccessibleDiffViewer extends AccessibleDiffViewer {
|
|
498
|
-
set width(value) {
|
|
499
|
-
this._width2.set(value, undefined);
|
|
500
|
-
}
|
|
501
|
-
constructor(parentNode, session, hunk, models, instantiationService) {
|
|
502
|
-
const width = observableValue('width', 0);
|
|
503
|
-
const diff = observableValue('diff', HunkAccessibleDiffViewer_1._asMapping(hunk));
|
|
504
|
-
const diffs = derived(r => [diff.read(r)]);
|
|
505
|
-
const lines = Math.min(10, 8 + diff.get().changedLineCount);
|
|
506
|
-
const height = models.getModifiedOptions().get(EditorOption.lineHeight) * lines;
|
|
507
|
-
super(parentNode, constObservable(true), () => { }, constObservable(false), width, constObservable(height), diffs, models, instantiationService);
|
|
508
|
-
this.height = height;
|
|
509
|
-
this._width2 = width;
|
|
510
|
-
this._store.add(session.textModelN.onDidChangeContent(() => {
|
|
511
|
-
diff.set(HunkAccessibleDiffViewer_1._asMapping(hunk), undefined);
|
|
512
|
-
}));
|
|
513
|
-
}
|
|
514
|
-
static _asMapping(hunk) {
|
|
515
|
-
const ranges0 = hunk.getRanges0();
|
|
516
|
-
const rangesN = hunk.getRangesN();
|
|
517
|
-
const originalLineRange = LineRange.fromRangeInclusive(ranges0[0]);
|
|
518
|
-
const modifiedLineRange = LineRange.fromRangeInclusive(rangesN[0]);
|
|
519
|
-
const innerChanges = [];
|
|
520
|
-
for (let i = 1; i < ranges0.length; i++) {
|
|
521
|
-
innerChanges.push(( new RangeMapping(ranges0[i], rangesN[i])));
|
|
522
|
-
}
|
|
523
|
-
return ( new DetailedLineRangeMapping(originalLineRange, modifiedLineRange, innerChanges));
|
|
524
|
-
}
|
|
525
538
|
};
|
|
526
|
-
|
|
527
|
-
( __param(4, IInstantiationService))
|
|
528
|
-
], HunkAccessibleDiffViewer));
|
|
529
|
-
class AccessibleHunk {
|
|
530
|
-
constructor(_editor, _session, _hunk) {
|
|
531
|
-
this._editor = _editor;
|
|
532
|
-
this._session = _session;
|
|
533
|
-
this._hunk = _hunk;
|
|
534
|
-
}
|
|
535
|
-
getOriginalModel() {
|
|
536
|
-
return this._session.textModel0;
|
|
537
|
-
}
|
|
538
|
-
getModifiedModel() {
|
|
539
|
-
return this._session.textModelN;
|
|
540
|
-
}
|
|
541
|
-
getOriginalOptions() {
|
|
542
|
-
return this._editor.getOptions();
|
|
543
|
-
}
|
|
544
|
-
getModifiedOptions() {
|
|
545
|
-
return this._editor.getOptions();
|
|
546
|
-
}
|
|
547
|
-
originalReveal(range) {
|
|
548
|
-
}
|
|
549
|
-
modifiedReveal(range) {
|
|
550
|
-
this._editor.revealRangeInCenterIfOutsideViewport(range || this._hunk.getRangesN()[0], ScrollType.Smooth);
|
|
551
|
-
}
|
|
552
|
-
modifiedSetSelection(range) {
|
|
553
|
-
}
|
|
554
|
-
modifiedFocus() {
|
|
555
|
-
this._editor.focus();
|
|
556
|
-
}
|
|
557
|
-
getModifiedPosition() {
|
|
558
|
-
return this._hunk.getRangesN()[0].getStartPosition();
|
|
559
|
-
}
|
|
560
|
-
}
|
|
539
|
+
EditorBasedInlineChatWidget = ( __decorate([( __param(3, IContextKeyService)), ( __param(4, IKeybindingService)), ( __param(5, IInstantiationService)), ( __param(6, IAccessibilityService)), ( __param(7, IConfigurationService)), ( __param(8, IAccessibleViewService)), ( __param(9, ITextModelService)), ( __param(10, IChatService)), ( __param(11, IHoverService)), ( __param(12, ILayoutService)), ( __param(13, IChatEntitlementService)), ( __param(14, IMarkdownRendererService))], EditorBasedInlineChatWidget));
|
|
561
540
|
|
|
562
541
|
export { EditorBasedInlineChatWidget, InlineChatWidget };
|
|
@@ -14,7 +14,6 @@ export declare class InlineChatZoneWidget extends ZoneWidget {
|
|
|
14
14
|
private _logService;
|
|
15
15
|
private static readonly _options;
|
|
16
16
|
readonly widget: EditorBasedInlineChatWidget;
|
|
17
|
-
private readonly _scrollUp;
|
|
18
17
|
private readonly _ctxCursorPosition;
|
|
19
18
|
private _dimension?;
|
|
20
19
|
private notebookEditor?;
|