@codingame/monaco-vscode-katex-common 25.1.1 → 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,11 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { $ as $$1, append, addDisposableListener, EventType, clearNode, addStandardDisposableListener, WindowIntervalTimer, getWindow, reset,
|
|
3
|
+
import { $ as $$1, append, addDisposableListener, EventType, createElement, DisposableResizeObserver, clearNode, addStandardDisposableListener, WindowIntervalTimer, getWindow, reset, findParentWithClass } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
4
|
import { renderFormattedText } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/formattedTextRenderer';
|
|
5
5
|
import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
|
|
6
6
|
import { alert } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
|
|
7
7
|
import { DropdownMenuActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/dropdown/dropdownActionViewItem';
|
|
8
8
|
import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
9
|
+
import { CachedListVirtualDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/list/list';
|
|
9
10
|
import { coalesce, distinct } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
10
11
|
import { findLast } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arraysFind';
|
|
11
12
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
@@ -38,11 +39,12 @@ import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/t
|
|
|
38
39
|
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
39
40
|
import { IWorkbenchIssueService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/issue/common/issue.service';
|
|
40
41
|
import { CodiconActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView';
|
|
41
|
-
import { annotateSpecialMarkdownContent } from '
|
|
42
|
+
import { annotateSpecialMarkdownContent, hasCodeblockUriTag, extractSubAgentInvocationIdFromText } from '../../common/widget/annotations.js';
|
|
42
43
|
import { checkModeOption } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
43
44
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
44
45
|
import { chatSubcommandLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
45
46
|
import { ChatAgentVoteDirection, IChatToolInvocation, isChatFollowup, ChatErrorLevel, ChatAgentVoteDownReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
47
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
46
48
|
import { localChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
47
49
|
import { getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
48
50
|
import { isResponseVM, isRequestVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
@@ -64,8 +66,9 @@ import { EditorPool, DiffEditorPool } from './chatContentParts/chatContentCodePo
|
|
|
64
66
|
import { ChatElicitationContentPart } from './chatContentParts/chatElicitationContentPart.js';
|
|
65
67
|
import { ChatErrorConfirmationContentPart } from './chatContentParts/chatErrorConfirmationPart.js';
|
|
66
68
|
import { ChatErrorContentPart } from './chatContentParts/chatErrorContentPart.js';
|
|
69
|
+
import { ChatQuestionCarouselPart } from './chatContentParts/chatQuestionCarouselPart.js';
|
|
67
70
|
import { ChatExtensionsContentPart } from './chatContentParts/chatExtensionsContentPart.js';
|
|
68
|
-
import { ChatMarkdownContentPart } from './chatContentParts/chatMarkdownContentPart.js';
|
|
71
|
+
import { codeblockHasClosingBackticks, ChatMarkdownContentPart } from './chatContentParts/chatMarkdownContentPart.js';
|
|
69
72
|
import { ChatMcpServersInteractionContentPart } from './chatContentParts/chatMcpServersInteractionContentPart.js';
|
|
70
73
|
import { ChatMultiDiffContentPart } from './chatContentParts/chatMultiDiffContentPart.js';
|
|
71
74
|
import { ChatWorkingProgressContentPart, ChatProgressContentPart } from './chatContentParts/chatProgressContentPart.js';
|
|
@@ -75,19 +78,50 @@ import { CollapsibleListPool, ChatUsedReferencesListContentPart } from './chatCo
|
|
|
75
78
|
import { ChatTaskContentPart } from './chatContentParts/chatTaskContentPart.js';
|
|
76
79
|
import { ChatTextEditContentPart } from './chatContentParts/chatTextEditContentPart.js';
|
|
77
80
|
import { ChatThinkingContentPart } from './chatContentParts/chatThinkingContentPart.js';
|
|
81
|
+
import { ChatSubagentContentPart } from './chatContentParts/chatSubagentContentPart.js';
|
|
82
|
+
import { ChatTipContentPart } from './chatContentParts/chatTipContentPart.js';
|
|
78
83
|
import { TreePool, ChatTreeContentPart } from './chatContentParts/chatTreeContentPart.js';
|
|
84
|
+
import { ChatWorkspaceEditContentPart } from './chatContentParts/chatWorkspaceEditContentPart.js';
|
|
79
85
|
import { ChatToolInvocationPart } from './chatContentParts/toolInvocationParts/chatToolInvocationPart.js';
|
|
80
86
|
import { ChatMarkdownDecorationsRenderer } from './chatContentParts/chatMarkdownDecorationsRenderer.js';
|
|
81
87
|
import { ChatCodeBlockContentProvider } from './chatContentParts/codeBlockPart.js';
|
|
88
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
89
|
+
import { RunSubagentTool } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool';
|
|
90
|
+
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
91
|
+
import { IChatTipService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatTipService.service';
|
|
92
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
93
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
82
94
|
|
|
83
95
|
var ChatListItemRenderer_1;
|
|
84
96
|
const $ = $$1;
|
|
85
|
-
const COPILOT_USERNAME =
|
|
86
|
-
const mostRecentResponseClassName =
|
|
97
|
+
const COPILOT_USERNAME = "GitHub Copilot";
|
|
98
|
+
const mostRecentResponseClassName = "chat-most-recent-response";
|
|
87
99
|
let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
88
|
-
static {
|
|
89
|
-
|
|
90
|
-
|
|
100
|
+
static {
|
|
101
|
+
ChatListItemRenderer_1 = this;
|
|
102
|
+
}
|
|
103
|
+
static {
|
|
104
|
+
this.ID = "item";
|
|
105
|
+
}
|
|
106
|
+
constructor(
|
|
107
|
+
editorOptions,
|
|
108
|
+
rendererOptions,
|
|
109
|
+
delegate,
|
|
110
|
+
codeBlockModelCollection,
|
|
111
|
+
overflowWidgetsDomNode,
|
|
112
|
+
viewModel,
|
|
113
|
+
instantiationService,
|
|
114
|
+
configService,
|
|
115
|
+
logService,
|
|
116
|
+
contextKeyService,
|
|
117
|
+
themeService,
|
|
118
|
+
commandService,
|
|
119
|
+
hoverService,
|
|
120
|
+
chatWidgetService,
|
|
121
|
+
chatEntitlementService,
|
|
122
|
+
chatService,
|
|
123
|
+
chatTipService
|
|
124
|
+
) {
|
|
91
125
|
super();
|
|
92
126
|
this.rendererOptions = rendererOptions;
|
|
93
127
|
this.delegate = delegate;
|
|
@@ -102,11 +136,14 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
102
136
|
this.hoverService = hoverService;
|
|
103
137
|
this.chatWidgetService = chatWidgetService;
|
|
104
138
|
this.chatEntitlementService = chatEntitlementService;
|
|
139
|
+
this.chatService = chatService;
|
|
140
|
+
this.chatTipService = chatTipService;
|
|
105
141
|
this.codeBlocksByResponseId = ( new Map());
|
|
106
142
|
this.codeBlocksByEditorUri = ( new ResourceMap());
|
|
107
143
|
this.fileTreesByResponseId = ( new Map());
|
|
108
144
|
this.focusedFileTreesByResponseId = ( new Map());
|
|
109
145
|
this.templateDataByRequestId = ( new Map());
|
|
146
|
+
this.pendingQuestionCarousels = ( new ResourceMap());
|
|
110
147
|
this._onDidClickFollowup = this._register(( new Emitter()));
|
|
111
148
|
this.onDidClickFollowup = this._onDidClickFollowup.event;
|
|
112
149
|
this._onDidClickRerunWithAgentOrCommandDetection = ( new Emitter());
|
|
@@ -121,22 +158,50 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
121
158
|
this.onDidFocusOutside = this._onDidFocusOutside.event;
|
|
122
159
|
this._onDidChangeItemHeight = this._register(( new Emitter()));
|
|
123
160
|
this.onDidChangeItemHeight = this._onDidChangeItemHeight.event;
|
|
124
|
-
this.
|
|
161
|
+
this._onDidUpdateViewModel = this._register(( new Emitter()));
|
|
162
|
+
this._currentLayoutWidth = observableValue(this, 0);
|
|
125
163
|
this._isVisible = true;
|
|
126
164
|
this._onDidChangeVisibility = this._register(( new Emitter()));
|
|
127
165
|
this._announcedToolProgressKeys = ( new Set());
|
|
128
166
|
this.chatContentMarkdownRenderer = this.instantiationService.createInstance(ChatContentMarkdownRenderer);
|
|
129
167
|
this.markdownDecorationsRenderer = this.instantiationService.createInstance(ChatMarkdownDecorationsRenderer);
|
|
130
|
-
this._editorPool = this._register(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
this.
|
|
134
|
-
|
|
168
|
+
this._editorPool = this._register(
|
|
169
|
+
this.instantiationService.createInstance(EditorPool, editorOptions, delegate, overflowWidgetsDomNode, false)
|
|
170
|
+
);
|
|
171
|
+
this._toolEditorPool = this._register(
|
|
172
|
+
this.instantiationService.createInstance(EditorPool, editorOptions, delegate, overflowWidgetsDomNode, true)
|
|
173
|
+
);
|
|
174
|
+
this._diffEditorPool = this._register(
|
|
175
|
+
this.instantiationService.createInstance(DiffEditorPool, editorOptions, delegate, overflowWidgetsDomNode, false)
|
|
176
|
+
);
|
|
177
|
+
this._treePool = this._register(
|
|
178
|
+
this.instantiationService.createInstance(TreePool, this._onDidChangeVisibility.event)
|
|
179
|
+
);
|
|
180
|
+
this._contentReferencesListPool = this._register(this.instantiationService.createInstance(
|
|
181
|
+
CollapsibleListPool,
|
|
182
|
+
this._onDidChangeVisibility.event,
|
|
183
|
+
undefined,
|
|
184
|
+
undefined
|
|
185
|
+
));
|
|
135
186
|
this._register(this.instantiationService.createInstance(ChatCodeBlockContentProvider));
|
|
136
|
-
this._toolInvocationCodeBlockCollection = this._register(
|
|
187
|
+
this._toolInvocationCodeBlockCollection = this._register(
|
|
188
|
+
this.instantiationService.createInstance(CodeBlockModelCollection, "tools")
|
|
189
|
+
);
|
|
190
|
+
this._register(this.chatService.onDidSubmitRequest(e => {
|
|
191
|
+
const carousels = this.pendingQuestionCarousels.get(e.chatSessionResource);
|
|
192
|
+
if (carousels) {
|
|
193
|
+
for (const carousel of carousels) {
|
|
194
|
+
carousel.skip();
|
|
195
|
+
}
|
|
196
|
+
carousels.clear();
|
|
197
|
+
}
|
|
198
|
+
}));
|
|
137
199
|
}
|
|
138
200
|
updateOptions(options) {
|
|
139
|
-
this.rendererOptions = {
|
|
201
|
+
this.rendererOptions = {
|
|
202
|
+
...this.rendererOptions,
|
|
203
|
+
...options
|
|
204
|
+
};
|
|
140
205
|
}
|
|
141
206
|
get templateId() {
|
|
142
207
|
return ChatListItemRenderer_1.ID;
|
|
@@ -151,21 +216,20 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
151
216
|
}
|
|
152
217
|
getProgressiveRenderRate(element) {
|
|
153
218
|
let Rate;
|
|
154
|
-
(function
|
|
219
|
+
(function(Rate) {
|
|
155
220
|
Rate[Rate["Min"] = 5] = "Min";
|
|
156
221
|
Rate[Rate["Max"] = 2000] = "Max";
|
|
157
222
|
})(Rate || (Rate = {}));
|
|
158
223
|
const minAfterComplete = 80;
|
|
159
224
|
const rate = element.contentUpdateTimings?.impliedWordLoadRate;
|
|
160
225
|
if (element.isComplete) {
|
|
161
|
-
if (typeof rate ===
|
|
226
|
+
if (typeof rate === "number") {
|
|
162
227
|
return clamp(rate, minAfterComplete, Rate.Max);
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
228
|
+
} else {
|
|
165
229
|
return minAfterComplete;
|
|
166
230
|
}
|
|
167
231
|
}
|
|
168
|
-
if (typeof rate ===
|
|
232
|
+
if (typeof rate === "number") {
|
|
169
233
|
return clamp(rate, Rate.Min, Rate.Max);
|
|
170
234
|
}
|
|
171
235
|
return 8;
|
|
@@ -177,6 +241,16 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
177
241
|
updateViewModel(viewModel) {
|
|
178
242
|
this.viewModel = viewModel;
|
|
179
243
|
this._announcedToolProgressKeys.clear();
|
|
244
|
+
this.codeBlocksByEditorUri.clear();
|
|
245
|
+
this.codeBlocksByResponseId.clear();
|
|
246
|
+
this.fileTreesByResponseId.clear();
|
|
247
|
+
this.focusedFileTreesByResponseId.clear();
|
|
248
|
+
this._editorPool.clear();
|
|
249
|
+
this._toolEditorPool.clear();
|
|
250
|
+
this._diffEditorPool.clear();
|
|
251
|
+
this._treePool.clear();
|
|
252
|
+
this._contentReferencesListPool.clear();
|
|
253
|
+
this._onDidUpdateViewModel.fire();
|
|
180
254
|
}
|
|
181
255
|
getCodeBlockInfoForEditor(uri) {
|
|
182
256
|
return this.codeBlocksByEditorUri.get(uri);
|
|
@@ -212,123 +286,142 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
212
286
|
}
|
|
213
287
|
layout(width) {
|
|
214
288
|
const newWidth = width - 40;
|
|
215
|
-
if (newWidth !== this._currentLayoutWidth) {
|
|
216
|
-
this._currentLayoutWidth
|
|
289
|
+
if (newWidth !== this._currentLayoutWidth.get()) {
|
|
290
|
+
this._currentLayoutWidth.set(newWidth, undefined);
|
|
217
291
|
for (const editor of this._editorPool.inUse()) {
|
|
218
|
-
editor.layout(
|
|
292
|
+
editor.layout(newWidth);
|
|
219
293
|
}
|
|
220
294
|
for (const toolEditor of this._toolEditorPool.inUse()) {
|
|
221
|
-
toolEditor.layout(
|
|
295
|
+
toolEditor.layout(newWidth);
|
|
222
296
|
}
|
|
223
297
|
for (const diffEditor of this._diffEditorPool.inUse()) {
|
|
224
|
-
diffEditor.layout(
|
|
298
|
+
diffEditor.layout(newWidth);
|
|
225
299
|
}
|
|
226
300
|
}
|
|
227
301
|
}
|
|
228
302
|
renderTemplate(container) {
|
|
229
303
|
const templateDisposables = ( new DisposableStore());
|
|
230
|
-
const disabledOverlay = append(container, $(
|
|
231
|
-
const rowContainer = append(container, $(
|
|
232
|
-
if (this.rendererOptions.renderStyle ===
|
|
233
|
-
rowContainer.classList.add(
|
|
304
|
+
const disabledOverlay = append(container, $(".chat-row-disabled-overlay"));
|
|
305
|
+
const rowContainer = append(container, $(".interactive-item-container"));
|
|
306
|
+
if (this.rendererOptions.renderStyle === "compact") {
|
|
307
|
+
rowContainer.classList.add("interactive-item-compact");
|
|
234
308
|
}
|
|
235
309
|
let headerParent = rowContainer;
|
|
236
310
|
let valueParent = rowContainer;
|
|
237
311
|
let detailContainerParent;
|
|
238
|
-
if (this.rendererOptions.renderStyle ===
|
|
239
|
-
rowContainer.classList.add(
|
|
240
|
-
rowContainer.classList.add(
|
|
241
|
-
const lhsContainer = append(rowContainer, $(
|
|
242
|
-
const rhsContainer = append(rowContainer, $(
|
|
312
|
+
if (this.rendererOptions.renderStyle === "minimal") {
|
|
313
|
+
rowContainer.classList.add("interactive-item-compact");
|
|
314
|
+
rowContainer.classList.add("minimal");
|
|
315
|
+
const lhsContainer = append(rowContainer, $(".column.left"));
|
|
316
|
+
const rhsContainer = append(rowContainer, $(".column.right"));
|
|
243
317
|
headerParent = lhsContainer;
|
|
244
318
|
detailContainerParent = rhsContainer;
|
|
245
319
|
valueParent = rhsContainer;
|
|
246
320
|
}
|
|
247
|
-
const header = append(headerParent, $(
|
|
321
|
+
const header = append(headerParent, $(".header"));
|
|
248
322
|
const contextKeyService = templateDisposables.add(this.contextKeyService.createScoped(rowContainer));
|
|
249
323
|
const scopedInstantiationService = templateDisposables.add(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyService]))));
|
|
250
|
-
const requestHover = append(rowContainer, $(
|
|
324
|
+
const requestHover = append(rowContainer, $(".request-hover"));
|
|
251
325
|
let titleToolbar;
|
|
252
326
|
if (this.rendererOptions.noHeader) {
|
|
253
|
-
header.classList.add(
|
|
327
|
+
header.classList.add("hidden");
|
|
328
|
+
} else {
|
|
329
|
+
titleToolbar = templateDisposables.add(
|
|
330
|
+
scopedInstantiationService.createInstance(MenuWorkbenchToolBar, requestHover, MenuId.ChatMessageTitle, {
|
|
331
|
+
menuOptions: {
|
|
332
|
+
shouldForwardArgs: true
|
|
333
|
+
},
|
|
334
|
+
toolbarOptions: {
|
|
335
|
+
shouldInlineSubmenu: submenu => submenu.actions.length <= 1
|
|
336
|
+
}
|
|
337
|
+
})
|
|
338
|
+
);
|
|
254
339
|
}
|
|
255
|
-
|
|
256
|
-
|
|
340
|
+
this.hoverHidden(requestHover);
|
|
341
|
+
const checkpointContainer = append(rowContainer, $(".checkpoint-container"));
|
|
342
|
+
const codiconContainer = append(checkpointContainer, $(".codicon-container"));
|
|
343
|
+
append(codiconContainer, $("span.codicon.codicon-bookmark"));
|
|
344
|
+
const checkpointToolbar = templateDisposables.add(
|
|
345
|
+
scopedInstantiationService.createInstance(MenuWorkbenchToolBar, checkpointContainer, MenuId.ChatMessageCheckpoint, {
|
|
346
|
+
actionViewItemProvider: (action, options) => {
|
|
347
|
+
if (action instanceof MenuItemAction) {
|
|
348
|
+
return this.instantiationService.createInstance(CodiconActionViewItem, action, {
|
|
349
|
+
hoverDelegate: options.hoverDelegate
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
return undefined;
|
|
353
|
+
},
|
|
354
|
+
renderDropdownAsChildElement: true,
|
|
257
355
|
menuOptions: {
|
|
258
356
|
shouldForwardArgs: true
|
|
259
357
|
},
|
|
260
358
|
toolbarOptions: {
|
|
261
359
|
shouldInlineSubmenu: submenu => submenu.actions.length <= 1
|
|
262
|
-
},
|
|
263
|
-
}));
|
|
264
|
-
}
|
|
265
|
-
this.hoverHidden(requestHover);
|
|
266
|
-
const checkpointContainer = append(rowContainer, $('.checkpoint-container'));
|
|
267
|
-
const codiconContainer = append(checkpointContainer, $('.codicon-container'));
|
|
268
|
-
append(codiconContainer, $('span.codicon.codicon-bookmark'));
|
|
269
|
-
const checkpointToolbar = templateDisposables.add(scopedInstantiationService.createInstance(MenuWorkbenchToolBar, checkpointContainer, MenuId.ChatMessageCheckpoint, {
|
|
270
|
-
actionViewItemProvider: (action, options) => {
|
|
271
|
-
if (action instanceof MenuItemAction) {
|
|
272
|
-
return this.instantiationService.createInstance(CodiconActionViewItem, action, { hoverDelegate: options.hoverDelegate });
|
|
273
360
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
toolbarOptions: {
|
|
281
|
-
shouldInlineSubmenu: submenu => submenu.actions.length <= 1
|
|
282
|
-
},
|
|
283
|
-
}));
|
|
284
|
-
append(checkpointContainer, $('.checkpoint-divider'));
|
|
285
|
-
const user = append(header, $('.user'));
|
|
286
|
-
const avatarContainer = append(user, $('.avatar-container'));
|
|
287
|
-
const username = append(user, $('h3.username'));
|
|
361
|
+
})
|
|
362
|
+
);
|
|
363
|
+
append(checkpointContainer, $(".checkpoint-divider"));
|
|
364
|
+
const user = append(header, $(".user"));
|
|
365
|
+
const avatarContainer = append(user, $(".avatar-container"));
|
|
366
|
+
const username = append(user, $("h3.username"));
|
|
288
367
|
username.tabIndex = 0;
|
|
289
|
-
const detailContainer = append(detailContainerParent ?? user, $(
|
|
290
|
-
const detail = append(detailContainer, $(
|
|
291
|
-
append(detailContainer, $(
|
|
292
|
-
const value = append(valueParent, $(
|
|
293
|
-
const elementDisposables = ( new DisposableStore());
|
|
294
|
-
const footerToolbarContainer = append(rowContainer, $(
|
|
368
|
+
const detailContainer = append(detailContainerParent ?? user, $("span.detail-container"));
|
|
369
|
+
const detail = append(detailContainer, $("span.detail"));
|
|
370
|
+
append(detailContainer, $("span.chat-animated-ellipsis"));
|
|
371
|
+
const value = append(valueParent, $(".value"));
|
|
372
|
+
const elementDisposables = templateDisposables.add(( new DisposableStore()));
|
|
373
|
+
const footerToolbarContainer = append(rowContainer, $(".chat-footer-toolbar"));
|
|
295
374
|
if (this.rendererOptions.noFooter) {
|
|
296
|
-
footerToolbarContainer.classList.add(
|
|
297
|
-
}
|
|
298
|
-
const footerToolbar = templateDisposables.add(
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
375
|
+
footerToolbarContainer.classList.add("hidden");
|
|
376
|
+
}
|
|
377
|
+
const footerToolbar = templateDisposables.add(
|
|
378
|
+
scopedInstantiationService.createInstance(MenuWorkbenchToolBar, footerToolbarContainer, MenuId.ChatMessageFooter, {
|
|
379
|
+
eventDebounceDelay: 0,
|
|
380
|
+
menuOptions: {
|
|
381
|
+
shouldForwardArgs: true,
|
|
382
|
+
renderShortTitle: true
|
|
383
|
+
},
|
|
384
|
+
toolbarOptions: {
|
|
385
|
+
shouldInlineSubmenu: submenu => submenu.actions.length <= 1
|
|
386
|
+
},
|
|
387
|
+
actionViewItemProvider: (action, options) => {
|
|
388
|
+
if (action instanceof MenuItemAction && action.item.id === MarkUnhelpfulActionId) {
|
|
389
|
+
return scopedInstantiationService.createInstance(ChatVoteDownButton, action, options);
|
|
390
|
+
}
|
|
391
|
+
return createActionViewItem(scopedInstantiationService, action, options);
|
|
305
392
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
const footerDetailsContainer = append(footerToolbar.getElement(), $('.chat-footer-details'));
|
|
393
|
+
})
|
|
394
|
+
);
|
|
395
|
+
const footerDetailsContainer = append(footerToolbar.getElement(), $(".chat-footer-details"));
|
|
310
396
|
footerDetailsContainer.tabIndex = 0;
|
|
311
|
-
const checkpointRestoreContainer = append(rowContainer, $(
|
|
312
|
-
const codiconRestoreContainer = append(checkpointRestoreContainer, $(
|
|
313
|
-
append(codiconRestoreContainer, $(
|
|
314
|
-
const label = append(checkpointRestoreContainer, $(
|
|
315
|
-
label.textContent = ( localize(
|
|
316
|
-
const checkpointRestoreToolbar = templateDisposables.add(scopedInstantiationService.createInstance(
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
397
|
+
const checkpointRestoreContainer = append(rowContainer, $(".checkpoint-restore-container"));
|
|
398
|
+
const codiconRestoreContainer = append(checkpointRestoreContainer, $(".codicon-container"));
|
|
399
|
+
append(codiconRestoreContainer, $("span.codicon.codicon-bookmark"));
|
|
400
|
+
const label = append(checkpointRestoreContainer, $("span.checkpoint-label-text"));
|
|
401
|
+
label.textContent = ( localize(6031, "Checkpoint Restored"));
|
|
402
|
+
const checkpointRestoreToolbar = templateDisposables.add(scopedInstantiationService.createInstance(
|
|
403
|
+
MenuWorkbenchToolBar,
|
|
404
|
+
checkpointRestoreContainer,
|
|
405
|
+
MenuId.ChatMessageRestoreCheckpoint,
|
|
406
|
+
{
|
|
407
|
+
actionViewItemProvider: (action, options) => {
|
|
408
|
+
if (action instanceof MenuItemAction) {
|
|
409
|
+
return this.instantiationService.createInstance(CodiconActionViewItem, action, {
|
|
410
|
+
hoverDelegate: options.hoverDelegate
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
return undefined;
|
|
414
|
+
},
|
|
415
|
+
renderDropdownAsChildElement: true,
|
|
416
|
+
menuOptions: {
|
|
417
|
+
shouldForwardArgs: true
|
|
418
|
+
},
|
|
419
|
+
toolbarOptions: {
|
|
420
|
+
shouldInlineSubmenu: submenu => submenu.actions.length <= 1
|
|
320
421
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
menuOptions: {
|
|
325
|
-
shouldForwardArgs: true
|
|
326
|
-
},
|
|
327
|
-
toolbarOptions: {
|
|
328
|
-
shouldInlineSubmenu: submenu => submenu.actions.length <= 1
|
|
329
|
-
},
|
|
330
|
-
}));
|
|
331
|
-
append(checkpointRestoreContainer, $('.checkpoint-divider'));
|
|
422
|
+
}
|
|
423
|
+
));
|
|
424
|
+
append(checkpointRestoreContainer, $(".checkpoint-divider"));
|
|
332
425
|
const agentHover = templateDisposables.add(this.instantiationService.createInstance(ChatAgentHover));
|
|
333
426
|
const hoverContent = () => {
|
|
334
427
|
if (isResponseVM(template.currentElement) && template.currentElement.agent && !template.currentElement.agent.isDefault) {
|
|
@@ -337,21 +430,61 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
337
430
|
}
|
|
338
431
|
return undefined;
|
|
339
432
|
};
|
|
340
|
-
const hoverOptions = getChatAgentHoverOptions(
|
|
341
|
-
|
|
433
|
+
const hoverOptions = getChatAgentHoverOptions(
|
|
434
|
+
() => isResponseVM(template.currentElement) ? template.currentElement.agent : undefined,
|
|
435
|
+
this.commandService
|
|
436
|
+
);
|
|
437
|
+
templateDisposables.add(
|
|
438
|
+
this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), user, hoverContent, hoverOptions)
|
|
439
|
+
);
|
|
342
440
|
templateDisposables.add(addDisposableListener(user, EventType.KEY_DOWN, e => {
|
|
343
441
|
const ev = ( new StandardKeyboardEvent(e));
|
|
344
442
|
if (ev.equals(KeyCode.Space) || ev.equals(KeyCode.Enter)) {
|
|
345
443
|
const content = hoverContent();
|
|
346
444
|
if (content) {
|
|
347
|
-
this.hoverService.showInstantHover({
|
|
445
|
+
this.hoverService.showInstantHover({
|
|
446
|
+
content,
|
|
447
|
+
target: user,
|
|
448
|
+
trapFocus: true,
|
|
449
|
+
actions: hoverOptions.actions
|
|
450
|
+
}, true);
|
|
348
451
|
}
|
|
349
|
-
}
|
|
350
|
-
else if (ev.equals(KeyCode.Escape)) {
|
|
452
|
+
} else if (ev.equals(KeyCode.Escape)) {
|
|
351
453
|
this.hoverService.hideHover();
|
|
352
454
|
}
|
|
353
455
|
}));
|
|
354
|
-
const
|
|
456
|
+
const connectionObserver = createElement("connection-observer");
|
|
457
|
+
append(container, connectionObserver);
|
|
458
|
+
const template = {
|
|
459
|
+
header,
|
|
460
|
+
avatarContainer,
|
|
461
|
+
requestHover,
|
|
462
|
+
username,
|
|
463
|
+
detail,
|
|
464
|
+
value,
|
|
465
|
+
rowContainer,
|
|
466
|
+
elementDisposables,
|
|
467
|
+
templateDisposables,
|
|
468
|
+
contextKeyService,
|
|
469
|
+
instantiationService: scopedInstantiationService,
|
|
470
|
+
agentHover,
|
|
471
|
+
titleToolbar,
|
|
472
|
+
footerToolbar,
|
|
473
|
+
footerDetailsContainer,
|
|
474
|
+
disabledOverlay,
|
|
475
|
+
checkpointToolbar,
|
|
476
|
+
checkpointRestoreToolbar,
|
|
477
|
+
checkpointContainer,
|
|
478
|
+
checkpointRestoreContainer
|
|
479
|
+
};
|
|
480
|
+
connectionObserver.onDidDisconnect = () => {
|
|
481
|
+
template.renderedPartsMounted = false;
|
|
482
|
+
};
|
|
483
|
+
templateDisposables.add(this._onDidUpdateViewModel.event(() => {
|
|
484
|
+
if (!template.currentElement || !this.viewModel?.sessionResource || !isEqual(template.currentElement.sessionResource, this.viewModel.sessionResource)) {
|
|
485
|
+
this.clearRenderedParts(template);
|
|
486
|
+
}
|
|
487
|
+
}));
|
|
355
488
|
templateDisposables.add(addDisposableListener(disabledOverlay, EventType.CLICK, e => {
|
|
356
489
|
if (!this.viewModel?.editing) {
|
|
357
490
|
return;
|
|
@@ -360,16 +493,42 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
360
493
|
if (!current || current.id === this.viewModel.editing.id) {
|
|
361
494
|
return;
|
|
362
495
|
}
|
|
363
|
-
if (disabledOverlay.classList.contains(
|
|
496
|
+
if (disabledOverlay.classList.contains("disabled")) {
|
|
364
497
|
e.preventDefault();
|
|
365
498
|
e.stopPropagation();
|
|
366
499
|
this._onDidFocusOutside.fire();
|
|
367
500
|
}
|
|
368
501
|
}));
|
|
502
|
+
const resizeObserver = templateDisposables.add(new DisposableResizeObserver(entries => {
|
|
503
|
+
if (!template.currentElement) {
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
const entry = entries[0];
|
|
507
|
+
if (entry) {
|
|
508
|
+
const height = entry.borderBoxSize.at(0)?.blockSize;
|
|
509
|
+
if (height === 0 || !height || !template.rowContainer.isConnected) {
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
const normalizedHeight = Math.ceil(height);
|
|
513
|
+
template.currentElement.currentRenderedHeight = normalizedHeight;
|
|
514
|
+
if (template.currentElement !== this._elementBeingRendered) {
|
|
515
|
+
this._onDidChangeItemHeight.fire({
|
|
516
|
+
element: template.currentElement,
|
|
517
|
+
height: normalizedHeight
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}));
|
|
522
|
+
templateDisposables.add(resizeObserver.observe(rowContainer));
|
|
369
523
|
return template;
|
|
370
524
|
}
|
|
371
525
|
renderElement(node, index, templateData) {
|
|
372
|
-
this.
|
|
526
|
+
this._elementBeingRendered = node.element;
|
|
527
|
+
try {
|
|
528
|
+
this.renderChatTreeItem(node.element, index, templateData);
|
|
529
|
+
} finally {
|
|
530
|
+
this._elementBeingRendered = undefined;
|
|
531
|
+
}
|
|
373
532
|
}
|
|
374
533
|
clearRenderedParts(templateData) {
|
|
375
534
|
if (templateData.renderedParts) {
|
|
@@ -377,32 +536,40 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
377
536
|
templateData.renderedParts = undefined;
|
|
378
537
|
clearNode(templateData.value);
|
|
379
538
|
}
|
|
539
|
+
if (templateData.titleToolbar) {
|
|
540
|
+
templateData.titleToolbar.context = undefined;
|
|
541
|
+
}
|
|
542
|
+
templateData.footerToolbar.context = undefined;
|
|
543
|
+
templateData.checkpointToolbar.context = undefined;
|
|
544
|
+
templateData.checkpointRestoreToolbar.context = undefined;
|
|
380
545
|
}
|
|
381
546
|
renderChatTreeItem(element, index, templateData) {
|
|
382
547
|
if (templateData.currentElement && templateData.currentElement.id !== element.id) {
|
|
383
|
-
this.traceLayout(
|
|
384
|
-
|
|
548
|
+
this.traceLayout(
|
|
549
|
+
"renderChatTreeItem",
|
|
550
|
+
`Rendering a different element into the template, index=${index}`
|
|
551
|
+
);
|
|
385
552
|
const mappedTemplateData = this.templateDataByRequestId.get(templateData.currentElement.id);
|
|
386
553
|
if (mappedTemplateData && (mappedTemplateData.currentElement?.id !== templateData.currentElement.id)) {
|
|
387
554
|
this.templateDataByRequestId.delete(templateData.currentElement.id);
|
|
388
555
|
}
|
|
556
|
+
this.clearRenderedParts(templateData);
|
|
389
557
|
}
|
|
390
558
|
templateData.currentElement = element;
|
|
391
559
|
this.templateDataByRequestId.set(element.id, templateData);
|
|
392
|
-
const kind = isRequestVM(element) ?
|
|
393
|
-
|
|
394
|
-
'welcome';
|
|
395
|
-
this.traceLayout('renderElement', `${kind}, index=${index}`);
|
|
560
|
+
const kind = isRequestVM(element) ? "request" : isResponseVM(element) ? "response" : "welcome";
|
|
561
|
+
this.traceLayout("renderElement", `${kind}, index=${index}`);
|
|
396
562
|
ChatContextKeys.isResponse.bindTo(templateData.contextKeyService).set(isResponseVM(element));
|
|
397
563
|
ChatContextKeys.itemId.bindTo(templateData.contextKeyService).set(element.id);
|
|
398
564
|
ChatContextKeys.isRequest.bindTo(templateData.contextKeyService).set(isRequestVM(element));
|
|
399
565
|
ChatContextKeys.responseDetectedAgentCommand.bindTo(templateData.contextKeyService).set(isResponseVM(element) && element.agentOrSlashCommandDetected);
|
|
400
566
|
if (isResponseVM(element)) {
|
|
401
567
|
ChatContextKeys.responseSupportsIssueReporting.bindTo(templateData.contextKeyService).set(!!element.agent?.metadata.supportIssueReporting);
|
|
402
|
-
ChatContextKeys.responseVote.bindTo(templateData.contextKeyService).set(
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
568
|
+
ChatContextKeys.responseVote.bindTo(templateData.contextKeyService).set(
|
|
569
|
+
element.vote === ChatAgentVoteDirection.Up ? "up" : element.vote === ChatAgentVoteDirection.Down ? "down" : ""
|
|
570
|
+
);
|
|
571
|
+
} else {
|
|
572
|
+
ChatContextKeys.responseVote.bindTo(templateData.contextKeyService).set("");
|
|
406
573
|
}
|
|
407
574
|
if (templateData.titleToolbar) {
|
|
408
575
|
templateData.titleToolbar.context = element;
|
|
@@ -410,166 +577,188 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
410
577
|
templateData.footerToolbar.context = element;
|
|
411
578
|
if (isResponseVM(element) && element.result?.details) {
|
|
412
579
|
templateData.footerDetailsContainer.textContent = element.result.details;
|
|
413
|
-
templateData.footerDetailsContainer.classList.remove(
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
templateData.footerDetailsContainer.classList.add('hidden');
|
|
580
|
+
templateData.footerDetailsContainer.classList.remove("hidden");
|
|
581
|
+
} else {
|
|
582
|
+
templateData.footerDetailsContainer.classList.add("hidden");
|
|
417
583
|
}
|
|
418
584
|
ChatContextKeys.responseHasError.bindTo(templateData.contextKeyService).set(isResponseVM(element) && !!element.errorDetails);
|
|
419
585
|
const isFiltered = !!(isResponseVM(element) && element.errorDetails?.responseIsFiltered);
|
|
420
586
|
ChatContextKeys.responseIsFiltered.bindTo(templateData.contextKeyService).set(isFiltered);
|
|
421
587
|
const location = this.chatWidgetService.getWidgetBySessionResource(element.sessionResource)?.location;
|
|
422
|
-
templateData.rowContainer.classList.toggle(
|
|
423
|
-
templateData.rowContainer.classList.toggle(
|
|
424
|
-
templateData.rowContainer.classList.toggle(
|
|
425
|
-
const progressMessageAtBottomOfResponse = checkModeOption(
|
|
426
|
-
|
|
588
|
+
templateData.rowContainer.classList.toggle("editing-session", location === ChatAgentLocation.Chat);
|
|
589
|
+
templateData.rowContainer.classList.toggle("interactive-request", isRequestVM(element));
|
|
590
|
+
templateData.rowContainer.classList.toggle("interactive-response", isResponseVM(element));
|
|
591
|
+
const progressMessageAtBottomOfResponse = checkModeOption(
|
|
592
|
+
this.delegate.currentChatMode(),
|
|
593
|
+
this.rendererOptions.progressMessageAtBottomOfResponse
|
|
594
|
+
);
|
|
595
|
+
templateData.rowContainer.classList.toggle(
|
|
596
|
+
"show-detail-progress",
|
|
597
|
+
isResponseVM(element) && !element.isComplete && !element.progressMessages.length && !progressMessageAtBottomOfResponse
|
|
598
|
+
);
|
|
427
599
|
if (!this.rendererOptions.noHeader) {
|
|
428
600
|
this.renderAvatar(element, templateData);
|
|
429
601
|
}
|
|
430
602
|
templateData.username.textContent = element.username;
|
|
431
|
-
templateData.username.classList.toggle(
|
|
432
|
-
templateData.avatarContainer.classList.toggle(
|
|
603
|
+
templateData.username.classList.toggle("hidden", element.username === COPILOT_USERNAME);
|
|
604
|
+
templateData.avatarContainer.classList.toggle("hidden", element.username === COPILOT_USERNAME);
|
|
433
605
|
this.hoverHidden(templateData.requestHover);
|
|
434
606
|
clearNode(templateData.detail);
|
|
435
607
|
if (isResponseVM(element)) {
|
|
436
608
|
this.renderDetail(element, templateData);
|
|
437
609
|
}
|
|
438
610
|
templateData.checkpointToolbar.context = element;
|
|
439
|
-
const checkpointEnabled = this.configService.getValue(ChatConfiguration.CheckpointsEnabled)
|
|
440
|
-
|
|
441
|
-
templateData.checkpointContainer.classList.toggle('hidden', isResponseVM(element) || !(checkpointEnabled));
|
|
611
|
+
const checkpointEnabled = this.configService.getValue(ChatConfiguration.CheckpointsEnabled) && (this.rendererOptions.restorable ?? true);
|
|
612
|
+
templateData.checkpointContainer.classList.toggle("hidden", isResponseVM(element) || !checkpointEnabled);
|
|
442
613
|
const shouldShowRestore = this.viewModel?.model.checkpoint && !this.viewModel?.editing && (index === this.delegate.getListLength() - 1);
|
|
443
|
-
templateData.checkpointRestoreContainer.classList.toggle(
|
|
614
|
+
templateData.checkpointRestoreContainer.classList.toggle("hidden", !(shouldShowRestore && checkpointEnabled));
|
|
444
615
|
const editing = element.id === this.viewModel?.editing?.id;
|
|
445
|
-
const isInput = this.configService.getValue(
|
|
446
|
-
templateData.
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
templateData.requestHover.classList.toggle('checkpoints-enabled', checkpointEnabled);
|
|
453
|
-
templateData.elementDisposables.add(addStandardDisposableListener(templateData.rowContainer, EventType.CLICK, (e) => {
|
|
454
|
-
const current = templateData.currentElement;
|
|
455
|
-
if (current && this.viewModel?.editing && current.id !== this.viewModel.editing.id) {
|
|
456
|
-
e.stopPropagation();
|
|
457
|
-
e.preventDefault();
|
|
458
|
-
this._onDidFocusOutside.fire();
|
|
459
|
-
}
|
|
616
|
+
const isInput = this.configService.getValue("chat.editRequests") === "input";
|
|
617
|
+
templateData.elementDisposables.add(autorun(r => {
|
|
618
|
+
const shouldBeBlocked = element.shouldBeBlocked.read(r);
|
|
619
|
+
templateData.disabledOverlay.classList.toggle(
|
|
620
|
+
"disabled",
|
|
621
|
+
shouldBeBlocked && !editing && this.viewModel?.editing !== undefined
|
|
622
|
+
);
|
|
460
623
|
}));
|
|
461
|
-
templateData.rowContainer.
|
|
624
|
+
templateData.rowContainer.classList.toggle("editing", editing && !isInput);
|
|
625
|
+
templateData.rowContainer.classList.toggle("editing-input", editing && isInput);
|
|
626
|
+
templateData.requestHover.classList.toggle("editing", editing && isInput);
|
|
627
|
+
templateData.requestHover.classList.toggle(
|
|
628
|
+
"hidden",
|
|
629
|
+
(!!this.viewModel?.editing && !editing) || isResponseVM(element) || !this.rendererOptions.editable
|
|
630
|
+
);
|
|
631
|
+
templateData.requestHover.classList.toggle("expanded", this.configService.getValue("chat.editRequests") === "hover");
|
|
632
|
+
templateData.requestHover.classList.toggle("checkpoints-enabled", checkpointEnabled);
|
|
633
|
+
templateData.elementDisposables.add(
|
|
634
|
+
addStandardDisposableListener(templateData.rowContainer, EventType.CLICK, e => {
|
|
635
|
+
const current = templateData.currentElement;
|
|
636
|
+
if (current && this.viewModel?.editing && current.id !== this.viewModel.editing.id) {
|
|
637
|
+
e.stopPropagation();
|
|
638
|
+
e.preventDefault();
|
|
639
|
+
this._onDidFocusOutside.fire();
|
|
640
|
+
}
|
|
641
|
+
})
|
|
642
|
+
);
|
|
643
|
+
templateData.rowContainer.parentElement?.parentElement?.parentElement?.classList.toggle("request", isRequestVM(element));
|
|
462
644
|
templateData.rowContainer.classList.toggle(mostRecentResponseClassName, index === this.delegate.getListLength() - 1);
|
|
463
|
-
templateData.rowContainer.classList.toggle(
|
|
645
|
+
templateData.rowContainer.classList.toggle("confirmation-message", isRequestVM(element) && !!element.confirmation);
|
|
464
646
|
const shouldShowHeader = isResponseVM(element) && !this.rendererOptions.noHeader;
|
|
465
|
-
templateData.header?.classList.toggle(
|
|
647
|
+
templateData.header?.classList.toggle("header-disabled", !shouldShowHeader);
|
|
466
648
|
if (isRequestVM(element) && element.confirmation) {
|
|
467
649
|
this.renderConfirmationAction(element, templateData);
|
|
468
650
|
}
|
|
469
651
|
if (isResponseVM(element) && index === this.delegate.getListLength() - 1 && (!element.isComplete || element.renderData)) {
|
|
470
|
-
this.traceLayout(
|
|
652
|
+
this.traceLayout("renderElement", `start progressive render, index=${index}`);
|
|
471
653
|
const timer = templateData.elementDisposables.add(new WindowIntervalTimer());
|
|
472
|
-
const runProgressiveRender =
|
|
654
|
+
const runProgressiveRender = initial => {
|
|
473
655
|
try {
|
|
474
656
|
if (this.doNextProgressiveRender(element, index, templateData, !!initial)) {
|
|
475
657
|
timer.cancel();
|
|
476
658
|
}
|
|
477
|
-
}
|
|
478
|
-
catch (err) {
|
|
659
|
+
} catch (err) {
|
|
479
660
|
timer.cancel();
|
|
480
661
|
this.logService.error(err);
|
|
481
662
|
}
|
|
482
663
|
};
|
|
483
664
|
timer.cancelAndSet(runProgressiveRender, 50, getWindow(templateData.rowContainer));
|
|
484
665
|
runProgressiveRender(true);
|
|
485
|
-
}
|
|
486
|
-
else {
|
|
666
|
+
} else {
|
|
487
667
|
if (isResponseVM(element)) {
|
|
488
668
|
this.renderChatResponseBasic(element, index, templateData);
|
|
489
|
-
}
|
|
490
|
-
else if (isRequestVM(element)) {
|
|
669
|
+
} else if (isRequestVM(element)) {
|
|
491
670
|
this.renderChatRequest(element, index, templateData);
|
|
492
671
|
}
|
|
493
672
|
}
|
|
673
|
+
templateData.renderedPartsMounted = true;
|
|
494
674
|
}
|
|
495
675
|
renderDetail(element, templateData) {
|
|
496
676
|
clearNode(templateData.detail);
|
|
497
677
|
if (element.agentOrSlashCommandDetected) {
|
|
498
678
|
const msg = element.slashCommand ? ( localize(
|
|
499
|
-
|
|
679
|
+
6032,
|
|
500
680
|
"used {0} [[(rerun without)]]",
|
|
501
681
|
`${chatSubcommandLeader}${element.slashCommand.name}`
|
|
502
|
-
)) : ( localize(
|
|
682
|
+
)) : ( localize(6033, "[[(rerun without)]]"));
|
|
503
683
|
reset(templateData.detail, renderFormattedText(msg, {
|
|
504
684
|
actionHandler: {
|
|
505
685
|
disposables: templateData.elementDisposables,
|
|
506
|
-
callback:
|
|
686
|
+
callback: content => {
|
|
507
687
|
this._onDidClickRerunWithAgentOrCommandDetection.fire(element);
|
|
508
|
-
}
|
|
688
|
+
}
|
|
509
689
|
}
|
|
510
|
-
}, $(
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
|
|
690
|
+
}, $("span.agentOrSlashCommandDetected")));
|
|
691
|
+
} else if (this.rendererOptions.renderStyle !== "minimal" && !element.isComplete && !checkModeOption(
|
|
692
|
+
this.delegate.currentChatMode(),
|
|
693
|
+
this.rendererOptions.progressMessageAtBottomOfResponse
|
|
694
|
+
)) {
|
|
695
|
+
templateData.detail.textContent = ( localize(6034, "Working"));
|
|
514
696
|
}
|
|
515
697
|
}
|
|
516
698
|
renderConfirmationAction(element, templateData) {
|
|
517
699
|
clearNode(templateData.detail);
|
|
518
700
|
if (element.confirmation) {
|
|
519
|
-
append(templateData.detail, $(
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
templateData.
|
|
701
|
+
append(templateData.detail, $("span.codicon.codicon-check", {
|
|
702
|
+
"aria-hidden": "true"
|
|
703
|
+
}));
|
|
704
|
+
append(templateData.detail, $("span.confirmation-text", undefined, ( localize(6035, "Selected \"{0}\"", element.confirmation))));
|
|
705
|
+
templateData.header?.classList.remove("header-disabled");
|
|
706
|
+
templateData.header?.classList.add("partially-disabled");
|
|
523
707
|
}
|
|
524
708
|
}
|
|
525
709
|
renderAvatar(element, templateData) {
|
|
526
|
-
const icon = isResponseVM(element) ?
|
|
527
|
-
this.getAgentIcon(element.agent?.metadata) :
|
|
528
|
-
(element.avatarIcon ?? Codicon.account);
|
|
710
|
+
const icon = isResponseVM(element) ? this.getAgentIcon(element.agent?.metadata) : (element.avatarIcon ?? Codicon.account);
|
|
529
711
|
if (icon instanceof URI) {
|
|
530
|
-
const avatarIcon = $$1(
|
|
712
|
+
const avatarIcon = $$1("img.icon");
|
|
531
713
|
avatarIcon.src = ( FileAccess.uriToBrowserUri(icon).toString(true));
|
|
532
|
-
templateData.avatarContainer.replaceChildren($$1(
|
|
533
|
-
}
|
|
534
|
-
else {
|
|
714
|
+
templateData.avatarContainer.replaceChildren($$1(".avatar", undefined, avatarIcon));
|
|
715
|
+
} else {
|
|
535
716
|
const avatarIcon = $$1(ThemeIcon.asCSSSelector(icon));
|
|
536
|
-
templateData.avatarContainer.replaceChildren($$1(
|
|
717
|
+
templateData.avatarContainer.replaceChildren($$1(".avatar.codicon-avatar", undefined, avatarIcon));
|
|
537
718
|
}
|
|
538
719
|
}
|
|
539
720
|
getAgentIcon(agent) {
|
|
540
721
|
if (agent?.themeIcon) {
|
|
541
722
|
return agent.themeIcon;
|
|
542
|
-
}
|
|
543
|
-
else if (agent?.iconDark && isDark(this.themeService.getColorTheme().type)) {
|
|
723
|
+
} else if (agent?.iconDark && isDark(this.themeService.getColorTheme().type)) {
|
|
544
724
|
return agent.iconDark;
|
|
545
|
-
}
|
|
546
|
-
else if (agent?.icon) {
|
|
725
|
+
} else if (agent?.icon) {
|
|
547
726
|
return agent.icon;
|
|
548
|
-
}
|
|
549
|
-
else {
|
|
727
|
+
} else {
|
|
550
728
|
return Codicon.chatSparkle;
|
|
551
729
|
}
|
|
552
730
|
}
|
|
553
731
|
renderChatResponseBasic(element, index, templateData) {
|
|
554
|
-
templateData.rowContainer.classList.toggle(
|
|
555
|
-
if (element.isCanceled) {
|
|
732
|
+
templateData.rowContainer.classList.toggle("chat-response-loading", (isResponseVM(element) && !element.isComplete));
|
|
733
|
+
if (element.isComplete || element.isCanceled) {
|
|
556
734
|
const lastThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
557
|
-
if (lastThinking?.domNode) {
|
|
735
|
+
if (lastThinking?.domNode && lastThinking.getIsActive()) {
|
|
558
736
|
lastThinking.finalizeTitleIfDefault();
|
|
559
737
|
lastThinking.markAsInactive();
|
|
560
738
|
}
|
|
739
|
+
this.finalizeAllSubagentParts(templateData);
|
|
561
740
|
}
|
|
562
741
|
const content = [];
|
|
563
742
|
const isFiltered = !!element.errorDetails?.responseIsFiltered;
|
|
564
743
|
if (!isFiltered) {
|
|
565
|
-
content.push({
|
|
744
|
+
content.push({
|
|
745
|
+
kind: "references",
|
|
746
|
+
references: element.contentReferences
|
|
747
|
+
});
|
|
566
748
|
content.push(...annotateSpecialMarkdownContent(element.response.value));
|
|
567
749
|
if (element.codeCitations.length) {
|
|
568
|
-
content.push({
|
|
750
|
+
content.push({
|
|
751
|
+
kind: "codeCitations",
|
|
752
|
+
citations: element.codeCitations
|
|
753
|
+
});
|
|
569
754
|
}
|
|
570
755
|
}
|
|
571
756
|
if (element.model.response === element.model.entireResponse && element.errorDetails?.message && element.errorDetails.message !== canceledName) {
|
|
572
|
-
content.push({
|
|
757
|
+
content.push({
|
|
758
|
+
kind: "errorDetails",
|
|
759
|
+
errorDetails: element.errorDetails,
|
|
760
|
+
isLast: index === this.delegate.getListLength() - 1
|
|
761
|
+
});
|
|
573
762
|
}
|
|
574
763
|
const fileChangesSummaryPart = this.getChatFileChangesSummaryPart(element);
|
|
575
764
|
if (fileChangesSummaryPart) {
|
|
@@ -577,30 +766,42 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
577
766
|
}
|
|
578
767
|
const diff = this.diff(templateData.renderedParts ?? [], content, element);
|
|
579
768
|
this.renderChatContentDiff(diff, content, element, index, templateData);
|
|
580
|
-
this.updateItemHeightOnRender(element, templateData);
|
|
581
769
|
}
|
|
582
770
|
shouldShowWorkingProgress(element, partsToRender, templateData) {
|
|
583
|
-
if (element.agentOrSlashCommandDetected || this.rendererOptions.renderStyle ===
|
|
771
|
+
if (element.agentOrSlashCommandDetected || this.rendererOptions.renderStyle === "minimal" || element.isComplete || !checkModeOption(
|
|
772
|
+
this.delegate.currentChatMode(),
|
|
773
|
+
this.rendererOptions.progressMessageAtBottomOfResponse
|
|
774
|
+
)) {
|
|
775
|
+
return false;
|
|
776
|
+
}
|
|
777
|
+
if (( partsToRender.some(
|
|
778
|
+
part => part.kind === "toolInvocation" && IChatToolInvocation.isStreaming(part)
|
|
779
|
+
))) {
|
|
780
|
+
return false;
|
|
781
|
+
}
|
|
782
|
+
const lastPart = findLast(
|
|
783
|
+
partsToRender,
|
|
784
|
+
part => part.kind !== "markdownContent" || part.content.value.trim().length > 0
|
|
785
|
+
);
|
|
786
|
+
if (( partsToRender.some(part => part.kind === "thinking"))) {
|
|
584
787
|
return false;
|
|
585
788
|
}
|
|
586
|
-
const lastPart = findLast(partsToRender, part => part.kind !== 'markdownContent' || part.content.value.trim().length > 0);
|
|
587
|
-
const collapsedToolsMode = this.configService.getValue('chat.agent.thinking.collapsedTools');
|
|
588
789
|
const lastThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
589
|
-
if (lastThinking
|
|
590
|
-
|
|
591
|
-
collapsedToolsMode === CollapsedToolsDisplayMode.WithThinking)) {
|
|
592
|
-
if (!lastPart || lastPart.kind === 'thinking' || lastPart.kind === 'toolInvocation' || lastPart.kind === 'prepareToolInvocation' || lastPart.kind === 'textEditGroup' || lastPart.kind === 'notebookEditGroup') {
|
|
593
|
-
return false;
|
|
594
|
-
}
|
|
790
|
+
if (lastThinking) {
|
|
791
|
+
return false;
|
|
595
792
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
(
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
793
|
+
const collapsedToolsMode = this.configService.getValue("chat.agent.thinking.collapsedTools");
|
|
794
|
+
if (collapsedToolsMode !== CollapsedToolsDisplayMode.Off && ( partsToRender.some(
|
|
795
|
+
part => (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.presentation !== "hidden" && this.shouldPinPart(part, element)
|
|
796
|
+
))) {
|
|
797
|
+
return false;
|
|
798
|
+
}
|
|
799
|
+
if (this.getSubagentPart(templateData.renderedParts)) {
|
|
800
|
+
return false;
|
|
801
|
+
}
|
|
802
|
+
if (!lastPart || lastPart.kind === "references" || ((lastPart.kind === "toolInvocation" || lastPart.kind === "toolInvocationSerialized") && (IChatToolInvocation.isComplete(lastPart) || lastPart.presentation === "hidden")) || ((lastPart.kind === "textEditGroup" || lastPart.kind === "notebookEditGroup") && lastPart.done && !( partsToRender.some(
|
|
803
|
+
part => part.kind === "toolInvocation" && !IChatToolInvocation.isComplete(part)
|
|
804
|
+
))) || (lastPart.kind === "progressTask" && lastPart.deferred.isSettled) || lastPart.kind === "mcpServersStarting") {
|
|
604
805
|
return true;
|
|
605
806
|
}
|
|
606
807
|
return false;
|
|
@@ -609,45 +810,62 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
609
810
|
if (!this.shouldShowFileChangesSummary(element)) {
|
|
610
811
|
return undefined;
|
|
611
812
|
}
|
|
612
|
-
if (!( element.model.entireResponse.value.some(part => part.kind ===
|
|
813
|
+
if (!( element.model.entireResponse.value.some(part => part.kind === "textEditGroup" || part.kind === "notebookEditGroup"))) {
|
|
613
814
|
return undefined;
|
|
614
815
|
}
|
|
615
|
-
return {
|
|
816
|
+
return {
|
|
817
|
+
kind: "changesSummary",
|
|
818
|
+
requestId: element.requestId,
|
|
819
|
+
sessionResource: element.sessionResource
|
|
820
|
+
};
|
|
616
821
|
}
|
|
617
822
|
renderChatRequest(element, index, templateData) {
|
|
618
|
-
templateData.rowContainer.classList.toggle(
|
|
823
|
+
templateData.rowContainer.classList.toggle("chat-response-loading", false);
|
|
619
824
|
if (element.id === this.viewModel?.editing?.id) {
|
|
620
825
|
this._onDidRerender.fire(templateData);
|
|
621
826
|
}
|
|
622
|
-
if (this.configService.getValue(
|
|
623
|
-
templateData.elementDisposables.add(
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
if (
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
827
|
+
if (this.configService.getValue("chat.editRequests") !== "none" && this.rendererOptions.editable) {
|
|
828
|
+
templateData.elementDisposables.add(
|
|
829
|
+
addDisposableListener(templateData.rowContainer, EventType.KEY_DOWN, e => {
|
|
830
|
+
const ev = ( new StandardKeyboardEvent(e));
|
|
831
|
+
if (ev.equals(KeyCode.Space) || ev.equals(KeyCode.Enter)) {
|
|
832
|
+
if (this.viewModel?.editing?.id !== element.id) {
|
|
833
|
+
ev.preventDefault();
|
|
834
|
+
ev.stopPropagation();
|
|
835
|
+
this._onDidClickRequest.fire(templateData);
|
|
836
|
+
}
|
|
630
837
|
}
|
|
631
|
-
}
|
|
632
|
-
|
|
838
|
+
})
|
|
839
|
+
);
|
|
633
840
|
}
|
|
634
841
|
let content = [];
|
|
635
842
|
if (!element.confirmation) {
|
|
636
|
-
const markdown = isChatFollowup(element.message) ?
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
templateData.
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
843
|
+
const markdown = isChatFollowup(element.message) ? element.message.message : this.markdownDecorationsRenderer.convertParsedRequestToMarkdown(element.sessionResource, element.message);
|
|
844
|
+
content = [{
|
|
845
|
+
content: ( new MarkdownString(markdown)),
|
|
846
|
+
kind: "markdownContent"
|
|
847
|
+
}];
|
|
848
|
+
if (this.rendererOptions.renderStyle === "minimal" && !element.isComplete) {
|
|
849
|
+
templateData.value.classList.add("inline-progress");
|
|
850
|
+
templateData.elementDisposables.add(toDisposable(() => templateData.value.classList.remove("inline-progress")));
|
|
851
|
+
content.push({
|
|
852
|
+
content: ( new MarkdownString("<span></span>", {
|
|
853
|
+
supportHtml: true
|
|
854
|
+
})),
|
|
855
|
+
kind: "markdownContent"
|
|
856
|
+
});
|
|
857
|
+
} else {
|
|
858
|
+
templateData.value.classList.remove("inline-progress");
|
|
647
859
|
}
|
|
648
860
|
}
|
|
649
861
|
clearNode(templateData.value);
|
|
650
862
|
const parts = [];
|
|
863
|
+
const tip = this.chatTipService.getNextTip(element.id, element.timestamp, this.contextKeyService);
|
|
864
|
+
if (tip) {
|
|
865
|
+
const tipPart = ( new ChatTipContentPart(tip, this.chatContentMarkdownRenderer));
|
|
866
|
+
templateData.value.appendChild(tipPart.domNode);
|
|
867
|
+
templateData.elementDisposables.add(tipPart);
|
|
868
|
+
}
|
|
651
869
|
let inlineSlashCommandRendered = false;
|
|
652
870
|
content.forEach((data, contentIndex) => {
|
|
653
871
|
const context = {
|
|
@@ -655,27 +873,34 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
655
873
|
elementIndex: index,
|
|
656
874
|
contentIndex: contentIndex,
|
|
657
875
|
content: content,
|
|
658
|
-
preceedingContentParts: parts,
|
|
659
876
|
container: templateData.rowContainer,
|
|
660
877
|
editorPool: this._editorPool,
|
|
661
878
|
diffEditorPool: this._diffEditorPool,
|
|
662
879
|
codeBlockModelCollection: this.codeBlockModelCollection,
|
|
663
|
-
currentWidth:
|
|
880
|
+
currentWidth: this._currentLayoutWidth,
|
|
881
|
+
onDidChangeVisibility: this._onDidChangeVisibility.event,
|
|
664
882
|
get codeBlockStartIndex() {
|
|
665
|
-
return
|
|
883
|
+
return parts.reduce((acc, part) => acc + (part.codeblocks?.length ?? 0), 0);
|
|
666
884
|
},
|
|
885
|
+
get treeStartIndex() {
|
|
886
|
+
return parts.filter(part => part instanceof ChatTreeContentPart).length;
|
|
887
|
+
}
|
|
667
888
|
};
|
|
668
889
|
const newPart = this.renderChatContentPart(data, templateData, context);
|
|
669
890
|
if (newPart) {
|
|
670
|
-
if (
|
|
671
|
-
|
|
672
|
-
&& element.agentOrSlashCommandDetected && element.slashCommand
|
|
673
|
-
&& data.kind === 'markdownContent'
|
|
674
|
-
) {
|
|
891
|
+
if (
|
|
892
|
+
this.rendererOptions.renderDetectedCommandsWithRequest && !inlineSlashCommandRendered && element.agentOrSlashCommandDetected && element.slashCommand && data.kind === "markdownContent") {
|
|
675
893
|
if (newPart.domNode) {
|
|
676
|
-
newPart.domNode.style.display =
|
|
894
|
+
newPart.domNode.style.display = "inline-flex";
|
|
677
895
|
}
|
|
678
|
-
const cmdPart = this.instantiationService.createInstance(
|
|
896
|
+
const cmdPart = this.instantiationService.createInstance(
|
|
897
|
+
ChatAgentCommandContentPart,
|
|
898
|
+
element.slashCommand,
|
|
899
|
+
() => this._onDidClickRerunWithAgentOrCommandDetection.fire({
|
|
900
|
+
sessionResource: element.sessionResource,
|
|
901
|
+
requestId: element.id
|
|
902
|
+
})
|
|
903
|
+
);
|
|
679
904
|
templateData.value.appendChild(cmdPart.domNode);
|
|
680
905
|
parts.push(cmdPart);
|
|
681
906
|
inlineSlashCommandRendered = true;
|
|
@@ -697,93 +922,71 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
697
922
|
}
|
|
698
923
|
templateData.elementDisposables.add(newPart);
|
|
699
924
|
}
|
|
700
|
-
this.updateItemHeightOnRender(element, templateData);
|
|
701
|
-
}
|
|
702
|
-
updateItemHeightOnRender(element, templateData) {
|
|
703
|
-
const newHeight = templateData.rowContainer.offsetHeight;
|
|
704
|
-
const fireEvent = !element.currentRenderedHeight || element.currentRenderedHeight !== newHeight;
|
|
705
|
-
element.currentRenderedHeight = newHeight;
|
|
706
|
-
if (fireEvent) {
|
|
707
|
-
const disposable = templateData.elementDisposables.add(scheduleAtNextAnimationFrame(getWindow(templateData.value), () => {
|
|
708
|
-
if (templateData.rowContainer.isConnected) {
|
|
709
|
-
element.currentRenderedHeight = templateData.rowContainer.offsetHeight;
|
|
710
|
-
this._onDidChangeItemHeight.fire({ element, height: element.currentRenderedHeight });
|
|
711
|
-
}
|
|
712
|
-
disposable.dispose();
|
|
713
|
-
}));
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
updateItemHeight(templateData) {
|
|
717
|
-
if (!templateData.currentElement) {
|
|
718
|
-
return;
|
|
719
|
-
}
|
|
720
|
-
if (templateData.rowContainer.isConnected) {
|
|
721
|
-
const newHeight = templateData.rowContainer.offsetHeight;
|
|
722
|
-
templateData.currentElement.currentRenderedHeight = newHeight;
|
|
723
|
-
this._onDidChangeItemHeight.fire({ element: templateData.currentElement, height: newHeight });
|
|
724
|
-
}
|
|
725
925
|
}
|
|
726
926
|
doNextProgressiveRender(element, index, templateData, isInRenderElement) {
|
|
727
927
|
if (!this._isVisible) {
|
|
728
928
|
return true;
|
|
729
929
|
}
|
|
730
930
|
if (element.isCanceled) {
|
|
731
|
-
this.traceLayout(
|
|
931
|
+
this.traceLayout("doNextProgressiveRender", `canceled, index=${index}`);
|
|
732
932
|
element.renderData = undefined;
|
|
733
933
|
this.renderChatResponseBasic(element, index, templateData);
|
|
734
934
|
return true;
|
|
735
935
|
}
|
|
736
|
-
templateData.rowContainer.classList.toggle(
|
|
737
|
-
this.traceLayout(
|
|
936
|
+
templateData.rowContainer.classList.toggle("chat-response-loading", true);
|
|
937
|
+
this.traceLayout("doNextProgressiveRender", `START progressive render, index=${index}`);
|
|
738
938
|
const contentForThisTurn = this.getNextProgressiveRenderContent(element, templateData);
|
|
739
939
|
const partsToRender = this.diff(templateData.renderedParts ?? [], contentForThisTurn.content, element);
|
|
740
940
|
const contentIsAlreadyRendered = partsToRender.every(part => part === null);
|
|
741
941
|
if (contentIsAlreadyRendered) {
|
|
742
942
|
if (contentForThisTurn.moreContentAvailable) {
|
|
743
|
-
this.traceLayout(
|
|
943
|
+
this.traceLayout(
|
|
944
|
+
"doNextProgressiveRender",
|
|
945
|
+
"not rendering any new content this tick, but more available"
|
|
946
|
+
);
|
|
744
947
|
return false;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
|
|
948
|
+
} else if (element.isComplete) {
|
|
949
|
+
this.traceLayout(
|
|
950
|
+
"doNextProgressiveRender",
|
|
951
|
+
`END progressive render, index=${index} and clearing renderData, response is complete`
|
|
952
|
+
);
|
|
748
953
|
element.renderData = undefined;
|
|
749
954
|
this.renderChatResponseBasic(element, index, templateData);
|
|
750
955
|
return true;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
element.currentRenderedHeight = height;
|
|
757
|
-
}
|
|
956
|
+
} else {
|
|
957
|
+
this.traceLayout(
|
|
958
|
+
"doNextProgressiveRender",
|
|
959
|
+
"caught up with the stream- no new content to render"
|
|
960
|
+
);
|
|
758
961
|
return true;
|
|
759
962
|
}
|
|
760
963
|
}
|
|
761
|
-
this.traceLayout(
|
|
964
|
+
this.traceLayout(
|
|
965
|
+
"doNextProgressiveRender",
|
|
966
|
+
`doing progressive render, ${partsToRender.length} parts to render`
|
|
967
|
+
);
|
|
762
968
|
this.renderChatContentDiff(partsToRender, contentForThisTurn.content, element, index, templateData);
|
|
763
|
-
const height = templateData.rowContainer.offsetHeight;
|
|
764
|
-
element.currentRenderedHeight = height;
|
|
765
|
-
if (!isInRenderElement) {
|
|
766
|
-
this._onDidChangeItemHeight.fire({ element, height });
|
|
767
|
-
}
|
|
768
969
|
return false;
|
|
769
970
|
}
|
|
770
971
|
renderChatContentDiff(partsToRender, contentForThisTurn, element, elementIndex, templateData) {
|
|
771
972
|
const renderedParts = templateData.renderedParts ?? [];
|
|
772
973
|
templateData.renderedParts = renderedParts;
|
|
773
974
|
partsToRender.forEach((partToRender, contentIndex) => {
|
|
975
|
+
const alreadyRenderedPart = templateData.renderedParts?.[contentIndex];
|
|
774
976
|
if (!partToRender) {
|
|
977
|
+
if (!templateData.renderedPartsMounted) {
|
|
978
|
+
alreadyRenderedPart?.onDidRemount?.();
|
|
979
|
+
}
|
|
775
980
|
return;
|
|
776
981
|
}
|
|
777
|
-
const alreadyRenderedPart = templateData.renderedParts?.[contentIndex];
|
|
778
982
|
if (alreadyRenderedPart) {
|
|
779
|
-
if (partToRender.kind ===
|
|
983
|
+
if (partToRender.kind === "thinking" && alreadyRenderedPart instanceof ChatThinkingContentPart) {
|
|
780
984
|
if (!Array.isArray(partToRender.value)) {
|
|
781
985
|
alreadyRenderedPart.updateThinking(partToRender);
|
|
782
986
|
}
|
|
783
987
|
renderedParts[contentIndex] = alreadyRenderedPart;
|
|
784
988
|
return;
|
|
785
|
-
}
|
|
786
|
-
else if (alreadyRenderedPart instanceof ChatThinkingContentPart && this.shouldPinPart(partToRender, element)) {
|
|
989
|
+
} else if (alreadyRenderedPart instanceof ChatThinkingContentPart && this.shouldPinPart(partToRender, element)) {
|
|
787
990
|
renderedParts[contentIndex] = alreadyRenderedPart;
|
|
788
991
|
return;
|
|
789
992
|
}
|
|
@@ -794,19 +997,22 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
794
997
|
element,
|
|
795
998
|
elementIndex: elementIndex,
|
|
796
999
|
content: contentForThisTurn,
|
|
797
|
-
preceedingContentParts,
|
|
798
1000
|
contentIndex: contentIndex,
|
|
799
1001
|
container: templateData.rowContainer,
|
|
800
1002
|
editorPool: this._editorPool,
|
|
801
1003
|
diffEditorPool: this._diffEditorPool,
|
|
802
1004
|
codeBlockModelCollection: this.codeBlockModelCollection,
|
|
803
|
-
currentWidth:
|
|
1005
|
+
currentWidth: this._currentLayoutWidth,
|
|
1006
|
+
onDidChangeVisibility: this._onDidChangeVisibility.event,
|
|
804
1007
|
get codeBlockStartIndex() {
|
|
805
|
-
return
|
|
1008
|
+
return preceedingContentParts.reduce((acc, part) => acc + (part.codeblocks?.length ?? 0), 0);
|
|
806
1009
|
},
|
|
1010
|
+
get treeStartIndex() {
|
|
1011
|
+
return preceedingContentParts.filter(part => part instanceof ChatTreeContentPart).length;
|
|
1012
|
+
}
|
|
807
1013
|
};
|
|
808
1014
|
const lastThinking = this.getLastThinkingPart(renderedParts);
|
|
809
|
-
if (lastThinking && (partToRender.kind ===
|
|
1015
|
+
if (lastThinking && (partToRender.kind === "toolInvocation" || partToRender.kind === "toolInvocationSerialized" || partToRender.kind === "markdownContent" || partToRender.kind === "textEditGroup") && this.shouldPinPart(partToRender, element)) {
|
|
810
1016
|
const newPart = this.renderChatContentPart(partToRender, templateData, context);
|
|
811
1017
|
if (newPart) {
|
|
812
1018
|
renderedParts[contentIndex] = newPart;
|
|
@@ -823,20 +1029,16 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
823
1029
|
if (alreadyRenderedPart?.domNode) {
|
|
824
1030
|
if (newPart.domNode) {
|
|
825
1031
|
alreadyRenderedPart.domNode.replaceWith(newPart.domNode);
|
|
826
|
-
}
|
|
827
|
-
else {
|
|
1032
|
+
} else {
|
|
828
1033
|
alreadyRenderedPart.domNode.remove();
|
|
829
1034
|
}
|
|
830
|
-
}
|
|
831
|
-
else if (newPart.domNode && !newPart.domNode.parentElement) {
|
|
1035
|
+
} else if (newPart.domNode && !newPart.domNode.parentElement) {
|
|
832
1036
|
templateData.value.appendChild(newPart.domNode);
|
|
833
1037
|
}
|
|
1038
|
+
} catch (err) {
|
|
1039
|
+
this.logService.error("ChatListItemRenderer#renderChatContentDiff: error replacing part", err);
|
|
834
1040
|
}
|
|
835
|
-
|
|
836
|
-
this.logService.error('ChatListItemRenderer#renderChatContentDiff: error replacing part', err);
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
else {
|
|
1041
|
+
} else {
|
|
840
1042
|
alreadyRenderedPart?.domNode?.remove();
|
|
841
1043
|
}
|
|
842
1044
|
});
|
|
@@ -851,69 +1053,90 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
851
1053
|
}
|
|
852
1054
|
getNextProgressiveRenderContent(element, templateData) {
|
|
853
1055
|
const data = this.getDataForProgressiveRender(element);
|
|
854
|
-
const renderImmediately = this.configService.getValue(
|
|
1056
|
+
const renderImmediately = this.configService.getValue("chat.experimental.renderMarkdownImmediately") === true;
|
|
855
1057
|
const renderableResponse = annotateSpecialMarkdownContent(element.response.value);
|
|
856
|
-
this.traceLayout(
|
|
1058
|
+
this.traceLayout(
|
|
1059
|
+
"getNextProgressiveRenderContent",
|
|
1060
|
+
`Want to render ${data.numWordsToRender} at ${data.rate} words/s, counting...`
|
|
1061
|
+
);
|
|
857
1062
|
let numNeededWords = data.numWordsToRender;
|
|
858
1063
|
const partsToRender = [];
|
|
859
|
-
partsToRender.push({
|
|
1064
|
+
partsToRender.push({
|
|
1065
|
+
kind: "references",
|
|
1066
|
+
references: element.contentReferences
|
|
1067
|
+
});
|
|
860
1068
|
let moreContentAvailable = false;
|
|
861
1069
|
for (let i = 0; i < renderableResponse.length; i++) {
|
|
862
1070
|
const part = renderableResponse[i];
|
|
863
|
-
if (part.kind ===
|
|
1071
|
+
if (part.kind === "markdownContent" && !renderImmediately) {
|
|
864
1072
|
const wordCountResult = getNWords(part.content.value, numNeededWords);
|
|
865
|
-
this.traceLayout(
|
|
1073
|
+
this.traceLayout(
|
|
1074
|
+
"getNextProgressiveRenderContent",
|
|
1075
|
+
` Chunk ${i}: Want to render ${numNeededWords} words and found ${wordCountResult.returnedWordCount} words. Total words in chunk: ${wordCountResult.totalWordCount}`
|
|
1076
|
+
);
|
|
866
1077
|
numNeededWords -= wordCountResult.returnedWordCount;
|
|
867
1078
|
if (wordCountResult.isFullString) {
|
|
868
1079
|
partsToRender.push(part);
|
|
869
1080
|
for (const nextPart of renderableResponse.slice(i + 1)) {
|
|
870
|
-
if (nextPart.kind !==
|
|
1081
|
+
if (nextPart.kind !== "markdownContent") {
|
|
871
1082
|
i++;
|
|
872
1083
|
partsToRender.push(nextPart);
|
|
873
|
-
}
|
|
874
|
-
else {
|
|
1084
|
+
} else {
|
|
875
1085
|
break;
|
|
876
1086
|
}
|
|
877
1087
|
}
|
|
878
|
-
}
|
|
879
|
-
else {
|
|
1088
|
+
} else {
|
|
880
1089
|
moreContentAvailable = true;
|
|
881
|
-
partsToRender.push({
|
|
1090
|
+
partsToRender.push({
|
|
1091
|
+
...part,
|
|
1092
|
+
content: ( new MarkdownString(wordCountResult.value, part.content))
|
|
1093
|
+
});
|
|
882
1094
|
}
|
|
883
1095
|
if (numNeededWords <= 0) {
|
|
884
|
-
if (( renderableResponse.slice(i + 1).some(part => part.kind ===
|
|
1096
|
+
if (( renderableResponse.slice(i + 1).some(part => part.kind === "markdownContent"))) {
|
|
885
1097
|
moreContentAvailable = true;
|
|
886
1098
|
}
|
|
887
1099
|
break;
|
|
888
1100
|
}
|
|
889
|
-
}
|
|
890
|
-
else {
|
|
1101
|
+
} else {
|
|
891
1102
|
partsToRender.push(part);
|
|
892
1103
|
}
|
|
893
1104
|
}
|
|
894
1105
|
const lastWordCount = element.contentUpdateTimings?.lastWordCount ?? 0;
|
|
895
1106
|
const newRenderedWordCount = data.numWordsToRender - numNeededWords;
|
|
896
1107
|
const bufferWords = lastWordCount - newRenderedWordCount;
|
|
897
|
-
this.traceLayout(
|
|
1108
|
+
this.traceLayout(
|
|
1109
|
+
"getNextProgressiveRenderContent",
|
|
1110
|
+
`Want to render ${data.numWordsToRender} words. Rendering ${newRenderedWordCount} words. Buffer: ${bufferWords} words`
|
|
1111
|
+
);
|
|
898
1112
|
if (newRenderedWordCount > 0 && newRenderedWordCount !== element.renderData?.renderedWordCount) {
|
|
899
|
-
element.renderData = {
|
|
1113
|
+
element.renderData = {
|
|
1114
|
+
lastRenderTime: Date.now(),
|
|
1115
|
+
renderedWordCount: newRenderedWordCount,
|
|
1116
|
+
renderedParts: partsToRender
|
|
1117
|
+
};
|
|
900
1118
|
}
|
|
901
1119
|
if (this.shouldShowWorkingProgress(element, partsToRender, templateData)) {
|
|
902
|
-
partsToRender.push({
|
|
1120
|
+
partsToRender.push({
|
|
1121
|
+
kind: "working"
|
|
1122
|
+
});
|
|
903
1123
|
}
|
|
904
1124
|
const fileChangesSummaryPart = this.getChatFileChangesSummaryPart(element);
|
|
905
1125
|
if (fileChangesSummaryPart) {
|
|
906
1126
|
partsToRender.push(fileChangesSummaryPart);
|
|
907
1127
|
}
|
|
908
|
-
return {
|
|
1128
|
+
return {
|
|
1129
|
+
content: partsToRender,
|
|
1130
|
+
moreContentAvailable
|
|
1131
|
+
};
|
|
909
1132
|
}
|
|
910
1133
|
shouldShowFileChangesSummary(element) {
|
|
911
1134
|
const isLocalSession = getChatSessionType(element.sessionResource) === localChatSessionType;
|
|
912
|
-
return element.isComplete && isLocalSession && this.configService.getValue(
|
|
1135
|
+
return element.isComplete && isLocalSession && this.configService.getValue("chat.checkpoints.showFileChanges");
|
|
913
1136
|
}
|
|
914
1137
|
getDataForProgressiveRender(element) {
|
|
915
1138
|
const hasMarkdownParts = ( element.response.value.some(
|
|
916
|
-
part => part.kind ===
|
|
1139
|
+
part => part.kind === "markdownContent" && part.content.value.trim().length > 0
|
|
917
1140
|
));
|
|
918
1141
|
if (!element.isComplete && hasMarkdownParts && (element.contentUpdateTimings ? element.contentUpdateTimings.lastWordCount : 0) === 0) {
|
|
919
1142
|
return {
|
|
@@ -921,12 +1144,13 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
921
1144
|
rate: Number.MAX_SAFE_INTEGER
|
|
922
1145
|
};
|
|
923
1146
|
}
|
|
924
|
-
const renderData = element.renderData ?? {
|
|
1147
|
+
const renderData = element.renderData ?? {
|
|
1148
|
+
lastRenderTime: 0,
|
|
1149
|
+
renderedWordCount: 0
|
|
1150
|
+
};
|
|
925
1151
|
const rate = this.getProgressiveRenderRate(element);
|
|
926
|
-
const numWordsToRender = renderData.lastRenderTime === 0 ?
|
|
927
|
-
|
|
928
|
-
renderData.renderedWordCount +
|
|
929
|
-
Math.floor((Date.now() - renderData.lastRenderTime) / 1000 * rate);
|
|
1152
|
+
const numWordsToRender = renderData.lastRenderTime === 0 ? 1 : renderData.renderedWordCount +
|
|
1153
|
+
Math.floor((Date.now() - renderData.lastRenderTime) / 1000 * rate);
|
|
930
1154
|
return {
|
|
931
1155
|
numWordsToRender,
|
|
932
1156
|
rate
|
|
@@ -939,56 +1163,78 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
939
1163
|
const renderedPart = renderedParts[i];
|
|
940
1164
|
if (!renderedPart || !renderedPart.hasSameContent(content, contentToRender.slice(i + 1), element)) {
|
|
941
1165
|
diff.push(content);
|
|
942
|
-
}
|
|
943
|
-
else {
|
|
1166
|
+
} else {
|
|
944
1167
|
diff.push(null);
|
|
945
1168
|
}
|
|
946
1169
|
}
|
|
947
1170
|
return diff;
|
|
948
1171
|
}
|
|
1172
|
+
hasCodeblockUri(part) {
|
|
1173
|
+
if (part.kind !== "markdownContent") {
|
|
1174
|
+
return false;
|
|
1175
|
+
}
|
|
1176
|
+
return hasCodeblockUriTag(part.content.value);
|
|
1177
|
+
}
|
|
1178
|
+
isCodeblockComplete(part, element) {
|
|
1179
|
+
if (part.kind !== "markdownContent") {
|
|
1180
|
+
return true;
|
|
1181
|
+
}
|
|
1182
|
+
return !isResponseVM(element) || element.isComplete || codeblockHasClosingBackticks(part.content.value);
|
|
1183
|
+
}
|
|
949
1184
|
shouldPinPart(part, element) {
|
|
950
|
-
const collapsedToolsMode = this.configService.getValue(
|
|
1185
|
+
const collapsedToolsMode = this.configService.getValue("chat.agent.thinking.collapsedTools");
|
|
1186
|
+
if (part.kind === "thinking" || part.kind === "working") {
|
|
1187
|
+
return true;
|
|
1188
|
+
}
|
|
1189
|
+
if (part.kind === "undoStop") {
|
|
1190
|
+
return true;
|
|
1191
|
+
}
|
|
951
1192
|
if (collapsedToolsMode === CollapsedToolsDisplayMode.Off) {
|
|
952
1193
|
return false;
|
|
953
1194
|
}
|
|
954
|
-
|
|
1195
|
+
if (this.hasCodeblockUri(part) || part.kind === "textEditGroup") {
|
|
1196
|
+
return true;
|
|
1197
|
+
}
|
|
1198
|
+
const isMcpTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.source?.type === "mcp";
|
|
955
1199
|
if (isMcpTool) {
|
|
956
1200
|
return false;
|
|
957
1201
|
}
|
|
958
|
-
const
|
|
959
|
-
if (
|
|
1202
|
+
const isMermaidTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.toolId.toLowerCase().includes("mermaid");
|
|
1203
|
+
if (isMermaidTool) {
|
|
960
1204
|
return false;
|
|
961
1205
|
}
|
|
962
|
-
const
|
|
963
|
-
|
|
964
|
-
&& (element.sessionResource.scheme !== Schemas.vscodeChatInput && element.sessionResource.scheme !== Schemas.vscodeLocalChatSession)
|
|
965
|
-
&& part.kind === 'toolInvocationSerialized' && part.toolSpecificData?.kind === 'terminal';
|
|
966
|
-
if (isTerminalTool && !isContributedTerminalToolInvocation) {
|
|
1206
|
+
const isAskQuestionsTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.toolId === "copilot_askQuestions";
|
|
1207
|
+
if (isAskQuestionsTool) {
|
|
967
1208
|
return false;
|
|
968
1209
|
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}
|
|
972
|
-
if (part.kind === 'toolInvocationSerialized') {
|
|
973
|
-
return true;
|
|
974
|
-
}
|
|
975
|
-
return part.kind === 'prepareToolInvocation';
|
|
976
|
-
}
|
|
977
|
-
isCreateToolInvocationContent(content) {
|
|
978
|
-
if (!content || (content.kind !== 'toolInvocation' && content.kind !== 'toolInvocationSerialized')) {
|
|
1210
|
+
const isSubagentTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && (part.subAgentInvocationId || part.toolId === RunSubagentTool.Id);
|
|
1211
|
+
if (isSubagentTool) {
|
|
979
1212
|
return false;
|
|
980
1213
|
}
|
|
981
|
-
const
|
|
982
|
-
|
|
1214
|
+
const isTerminalTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.toolSpecificData?.kind === "terminal";
|
|
1215
|
+
const isContributedTerminalToolInvocation =
|
|
1216
|
+
element && (element.sessionResource.scheme !== Schemas.vscodeChatInput && element.sessionResource.scheme !== Schemas.vscodeLocalChatSession) && part.kind === "toolInvocationSerialized" && part.toolSpecificData?.kind === "terminal";
|
|
1217
|
+
if (isTerminalTool && !isContributedTerminalToolInvocation) {
|
|
1218
|
+
if (part.kind === "toolInvocation" && IChatToolInvocation.getConfirmationMessages(part)) {
|
|
983
1219
|
return false;
|
|
984
1220
|
}
|
|
985
|
-
const
|
|
986
|
-
return
|
|
987
|
-
}
|
|
988
|
-
if (
|
|
1221
|
+
const terminalToolsInThinking = this.configService.getValue(ChatConfiguration.TerminalToolsInThinking);
|
|
1222
|
+
return !!terminalToolsInThinking;
|
|
1223
|
+
}
|
|
1224
|
+
if (part.kind === "toolInvocation") {
|
|
1225
|
+
if (IChatToolInvocation.isStreaming(part)) {
|
|
1226
|
+
return true;
|
|
1227
|
+
}
|
|
1228
|
+
const state = part.state.get();
|
|
1229
|
+
if (state.type === IChatToolInvocation.StateKind.WaitingForConfirmation || state.type === IChatToolInvocation.StateKind.WaitingForPostApproval) {
|
|
1230
|
+
return false;
|
|
1231
|
+
}
|
|
1232
|
+
return !IChatToolInvocation.getConfirmationMessages(part);
|
|
1233
|
+
}
|
|
1234
|
+
if (part.kind === "toolInvocationSerialized") {
|
|
989
1235
|
return true;
|
|
990
1236
|
}
|
|
991
|
-
return
|
|
1237
|
+
return false;
|
|
992
1238
|
}
|
|
993
1239
|
getLastThinkingPart(renderedParts) {
|
|
994
1240
|
if (!renderedParts || renderedParts.length === 0) {
|
|
@@ -1002,12 +1248,77 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1002
1248
|
}
|
|
1003
1249
|
return undefined;
|
|
1004
1250
|
}
|
|
1251
|
+
isThinkingLookAheadComplete(context, element) {
|
|
1252
|
+
if (element?.isComplete) {
|
|
1253
|
+
return true;
|
|
1254
|
+
}
|
|
1255
|
+
for (let i = context.contentIndex + 1; i < context.content.length; i++) {
|
|
1256
|
+
const nextPart = context.content[i];
|
|
1257
|
+
if (!this.shouldPinPart(nextPart, element)) {
|
|
1258
|
+
return true;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
return false;
|
|
1262
|
+
}
|
|
1263
|
+
getSubagentPart(renderedParts, subAgentInvocationId) {
|
|
1264
|
+
if (!renderedParts || renderedParts.length === 0) {
|
|
1265
|
+
return undefined;
|
|
1266
|
+
}
|
|
1267
|
+
for (let i = renderedParts.length - 1; i >= 0; i--) {
|
|
1268
|
+
const part = renderedParts[i];
|
|
1269
|
+
if (part instanceof ChatSubagentContentPart) {
|
|
1270
|
+
if (subAgentInvocationId && part.subAgentInvocationId === subAgentInvocationId) {
|
|
1271
|
+
return part;
|
|
1272
|
+
}
|
|
1273
|
+
if (!subAgentInvocationId && part.getIsActive()) {
|
|
1274
|
+
return part;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
return undefined;
|
|
1279
|
+
}
|
|
1280
|
+
finalizeAllSubagentParts(templateData) {
|
|
1281
|
+
if (!templateData.renderedParts) {
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
for (const part of templateData.renderedParts) {
|
|
1285
|
+
if (part instanceof ChatSubagentContentPart && part.getIsActive()) {
|
|
1286
|
+
part.markAsInactive();
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
handleSubagentToolGrouping(toolInvocation, subagentId, context, templateData, codeBlockStartIndex) {
|
|
1291
|
+
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1292
|
+
const lastSubagent = this.getSubagentPart(templateData.renderedParts, subagentId);
|
|
1293
|
+
if (lastSubagent) {
|
|
1294
|
+
if (toolInvocation.toolId !== RunSubagentTool.Id) {
|
|
1295
|
+
lastSubagent.appendToolInvocation(toolInvocation, codeBlockStartIndex);
|
|
1296
|
+
}
|
|
1297
|
+
return lastSubagent;
|
|
1298
|
+
}
|
|
1299
|
+
const subagentPart = this.instantiationService.createInstance(
|
|
1300
|
+
ChatSubagentContentPart,
|
|
1301
|
+
subagentId,
|
|
1302
|
+
toolInvocation,
|
|
1303
|
+
context,
|
|
1304
|
+
this.chatContentMarkdownRenderer,
|
|
1305
|
+
this._contentReferencesListPool,
|
|
1306
|
+
this._toolEditorPool,
|
|
1307
|
+
() => this._currentLayoutWidth.get(),
|
|
1308
|
+
this._toolInvocationCodeBlockCollection,
|
|
1309
|
+
this._announcedToolProgressKeys
|
|
1310
|
+
);
|
|
1311
|
+
if (toolInvocation.toolId !== RunSubagentTool.Id) {
|
|
1312
|
+
subagentPart.appendToolInvocation(toolInvocation, codeBlockStartIndex);
|
|
1313
|
+
}
|
|
1314
|
+
return subagentPart;
|
|
1315
|
+
}
|
|
1005
1316
|
finalizeCurrentThinkingPart(context, templateData) {
|
|
1006
1317
|
const lastThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
1007
1318
|
if (!lastThinking) {
|
|
1008
1319
|
return;
|
|
1009
1320
|
}
|
|
1010
|
-
const style = this.configService.getValue(
|
|
1321
|
+
const style = this.configService.getValue("chat.agent.thinkingStyle");
|
|
1011
1322
|
if (style === ThinkingDisplayMode.CollapsedPreview) {
|
|
1012
1323
|
lastThinking.collapseContent();
|
|
1013
1324
|
}
|
|
@@ -1017,110 +1328,113 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1017
1328
|
}
|
|
1018
1329
|
renderChatContentPart(content, templateData, context) {
|
|
1019
1330
|
try {
|
|
1020
|
-
|
|
1021
|
-
if (content.kind === 'thinking' && (Array.isArray(content.value) ? content.value.length === 0 : !content.value)) {
|
|
1331
|
+
if (content.kind === "thinking" && (Array.isArray(content.value) ? content.value.length === 0 : content.value === "")) {
|
|
1022
1332
|
const lastThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
1023
1333
|
lastThinking?.resetId();
|
|
1024
1334
|
return this.renderNoContent(other => content.kind === other.kind);
|
|
1025
1335
|
}
|
|
1026
|
-
const lastRenderedPart = context.preceedingContentParts.length ? context.preceedingContentParts[context.preceedingContentParts.length - 1] : undefined;
|
|
1027
|
-
const previousContent = context.contentIndex > 0 ? context.content[context.contentIndex - 1] : undefined;
|
|
1028
|
-
const shouldKeepThinkingForCreateTool = collapsedToolsMode !== CollapsedToolsDisplayMode.Off && lastRenderedPart instanceof ChatToolInvocationPart && this.isCreateToolInvocationContent(previousContent);
|
|
1029
|
-
const lastThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
1030
1336
|
const isResponseElement = isResponseVM(context.element);
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1033
|
-
if (!shouldKeepThinkingForCreateTool && lastThinking && lastThinking.getIsActive()) {
|
|
1034
|
-
if (!isThinkingContent && !isToolStreamingContent) {
|
|
1035
|
-
const followsThinkingPart = previousContent?.kind === 'thinking' || previousContent?.kind === 'toolInvocation' || previousContent?.kind === 'prepareToolInvocation' || previousContent?.kind === 'toolInvocationSerialized';
|
|
1036
|
-
if (content.kind !== 'textEditGroup' && (context.element.isComplete || followsThinkingPart)) {
|
|
1037
|
-
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
if (context.element.isComplete && !isThinkingContent && !this.shouldPinPart(content, isResponseElement ? context.element : undefined)) {
|
|
1337
|
+
const shouldPin = this.shouldPinPart(content, isResponseElement ? context.element : undefined);
|
|
1338
|
+
if (context.element.isComplete && !shouldPin) {
|
|
1042
1339
|
for (const templateData of ( this.templateDataByRequestId.values())) {
|
|
1043
1340
|
if (templateData.renderedParts) {
|
|
1044
1341
|
const lastThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
1045
|
-
if (
|
|
1342
|
+
if (lastThinking?.getIsActive()) {
|
|
1046
1343
|
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1047
1344
|
}
|
|
1048
1345
|
}
|
|
1049
1346
|
}
|
|
1050
1347
|
}
|
|
1051
|
-
|
|
1052
|
-
|
|
1348
|
+
const isSubagentContent = (content.kind === "toolInvocation" || content.kind === "toolInvocationSerialized") && (content.subAgentInvocationId || content.toolId === RunSubagentTool.Id);
|
|
1349
|
+
if (context.element.isComplete && !isSubagentContent) {
|
|
1350
|
+
for (const templateData of ( this.templateDataByRequestId.values())) {
|
|
1351
|
+
this.finalizeAllSubagentParts(templateData);
|
|
1352
|
+
}
|
|
1053
1353
|
}
|
|
1054
|
-
|
|
1354
|
+
if (content.kind === "treeData") {
|
|
1355
|
+
return this.renderTreeData(content, templateData, context);
|
|
1356
|
+
} else if (content.kind === "multiDiffData") {
|
|
1055
1357
|
return this.renderMultiDiffData(content, templateData, context);
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1358
|
+
} else if (content.kind === "progressMessage") {
|
|
1359
|
+
return this.instantiationService.createInstance(
|
|
1360
|
+
ChatProgressContentPart,
|
|
1361
|
+
content,
|
|
1362
|
+
this.chatContentMarkdownRenderer,
|
|
1363
|
+
context,
|
|
1364
|
+
undefined,
|
|
1365
|
+
undefined,
|
|
1366
|
+
undefined,
|
|
1367
|
+
undefined
|
|
1368
|
+
);
|
|
1369
|
+
} else if (content.kind === "working") {
|
|
1370
|
+
return this.instantiationService.createInstance(
|
|
1371
|
+
ChatWorkingProgressContentPart,
|
|
1372
|
+
content,
|
|
1373
|
+
this.chatContentMarkdownRenderer,
|
|
1374
|
+
context
|
|
1375
|
+
);
|
|
1376
|
+
} else if (content.kind === "progressTask" || content.kind === "progressTaskSerialized") {
|
|
1064
1377
|
return this.renderProgressTask(content, templateData, context);
|
|
1065
|
-
}
|
|
1066
|
-
else if (content.kind === 'command') {
|
|
1378
|
+
} else if (content.kind === "command") {
|
|
1067
1379
|
return this.instantiationService.createInstance(ChatCommandButtonContentPart, content, context);
|
|
1068
|
-
}
|
|
1069
|
-
else if (content.kind === 'textEditGroup') {
|
|
1380
|
+
} else if (content.kind === "textEditGroup") {
|
|
1070
1381
|
return this.renderTextEdit(context, content, templateData);
|
|
1071
|
-
}
|
|
1072
|
-
else if (content.kind === 'confirmation') {
|
|
1382
|
+
} else if (content.kind === "confirmation") {
|
|
1073
1383
|
return this.renderConfirmation(context, content, templateData);
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1384
|
+
} else if (content.kind === "warning") {
|
|
1385
|
+
return this.instantiationService.createInstance(
|
|
1386
|
+
ChatErrorContentPart,
|
|
1387
|
+
ChatErrorLevel.Warning,
|
|
1388
|
+
content.content,
|
|
1389
|
+
content,
|
|
1390
|
+
this.chatContentMarkdownRenderer
|
|
1391
|
+
);
|
|
1392
|
+
} else if (content.kind === "markdownContent") {
|
|
1079
1393
|
return this.renderMarkdown(content, templateData, context);
|
|
1080
|
-
}
|
|
1081
|
-
else if (content.kind === 'references') {
|
|
1394
|
+
} else if (content.kind === "references") {
|
|
1082
1395
|
return this.renderContentReferencesListData(content, undefined, context, templateData);
|
|
1083
|
-
}
|
|
1084
|
-
else if (content.kind === 'codeCitations') {
|
|
1396
|
+
} else if (content.kind === "codeCitations") {
|
|
1085
1397
|
return this.renderCodeCitations(content, context, templateData);
|
|
1086
|
-
}
|
|
1087
|
-
else if (content.kind === 'toolInvocation' || content.kind === 'toolInvocationSerialized') {
|
|
1398
|
+
} else if (content.kind === "toolInvocation" || content.kind === "toolInvocationSerialized") {
|
|
1088
1399
|
return this.renderToolInvocation(content, context, templateData);
|
|
1089
|
-
}
|
|
1090
|
-
else if (content.kind === 'extensions') {
|
|
1400
|
+
} else if (content.kind === "extensions") {
|
|
1091
1401
|
return this.renderExtensionsContent(content, context, templateData);
|
|
1092
|
-
}
|
|
1093
|
-
else if (content.kind === 'pullRequest') {
|
|
1402
|
+
} else if (content.kind === "pullRequest") {
|
|
1094
1403
|
return this.renderPullRequestContent(content, context, templateData);
|
|
1095
|
-
}
|
|
1096
|
-
else if (content.kind === 'undoStop') {
|
|
1404
|
+
} else if (content.kind === "undoStop") {
|
|
1097
1405
|
return this.renderUndoStop(content);
|
|
1098
|
-
}
|
|
1099
|
-
else if (content.kind === 'errorDetails') {
|
|
1406
|
+
} else if (content.kind === "errorDetails") {
|
|
1100
1407
|
return this.renderChatErrorDetails(context, content, templateData);
|
|
1101
|
-
}
|
|
1102
|
-
else if (content.kind === 'elicitation2' || content.kind === 'elicitationSerialized') {
|
|
1408
|
+
} else if (content.kind === "elicitation2" || content.kind === "elicitationSerialized") {
|
|
1103
1409
|
return this.renderElicitation(context, content, templateData);
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1410
|
+
} else if (content.kind === "questionCarousel") {
|
|
1411
|
+
return this.renderQuestionCarousel(context, content, templateData);
|
|
1412
|
+
} else if (content.kind === "changesSummary") {
|
|
1106
1413
|
return this.renderChangesSummary(content, context, templateData);
|
|
1107
|
-
}
|
|
1108
|
-
else if (content.kind === 'mcpServersStarting') {
|
|
1414
|
+
} else if (content.kind === "mcpServersStarting") {
|
|
1109
1415
|
return this.renderMcpServersInteractionRequired(content, context, templateData);
|
|
1110
|
-
}
|
|
1111
|
-
else if (content.kind === 'thinking') {
|
|
1416
|
+
} else if (content.kind === "thinking") {
|
|
1112
1417
|
return this.renderThinkingPart(content, context, templateData);
|
|
1418
|
+
} else if (content.kind === "workspaceEdit") {
|
|
1419
|
+
return this.instantiationService.createInstance(
|
|
1420
|
+
ChatWorkspaceEditContentPart,
|
|
1421
|
+
content,
|
|
1422
|
+
context,
|
|
1423
|
+
this.chatContentMarkdownRenderer
|
|
1424
|
+
);
|
|
1113
1425
|
}
|
|
1114
1426
|
return this.renderNoContent(other => content.kind === other.kind);
|
|
1115
|
-
}
|
|
1116
|
-
catch (err) {
|
|
1427
|
+
} catch (err) {
|
|
1117
1428
|
alert(`Chat error: ${toErrorMessage(err, false)}`);
|
|
1118
|
-
this.logService.error(
|
|
1119
|
-
|
|
1429
|
+
this.logService.error(
|
|
1430
|
+
"ChatListItemRenderer#renderChatContentPart: error rendering content",
|
|
1431
|
+
toErrorMessage(err, true)
|
|
1432
|
+
);
|
|
1433
|
+
const errorPart = this.instantiationService.createInstance(ChatErrorContentPart, ChatErrorLevel.Error, ( new MarkdownString(( localize(6036, "Failed to render content")) + `: ${toErrorMessage(err, false)}`)), content, this.chatContentMarkdownRenderer);
|
|
1120
1434
|
return {
|
|
1121
1435
|
dispose: () => errorPart.dispose(),
|
|
1122
1436
|
domNode: errorPart.domNode,
|
|
1123
|
-
hasSameContent: (other => content.kind === other.kind)
|
|
1437
|
+
hasSameContent: (other => content.kind === other.kind)
|
|
1124
1438
|
};
|
|
1125
1439
|
}
|
|
1126
1440
|
}
|
|
@@ -1134,21 +1448,21 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1134
1448
|
}
|
|
1135
1449
|
const isLast = context.elementIndex === this.delegate.getListLength() - 1;
|
|
1136
1450
|
if (content.errorDetails.isQuotaExceeded) {
|
|
1137
|
-
const renderedError = this.instantiationService.createInstance(
|
|
1138
|
-
|
|
1451
|
+
const renderedError = this.instantiationService.createInstance(
|
|
1452
|
+
ChatQuotaExceededPart,
|
|
1453
|
+
context.element,
|
|
1454
|
+
content,
|
|
1455
|
+
this.chatContentMarkdownRenderer
|
|
1456
|
+
);
|
|
1139
1457
|
return renderedError;
|
|
1140
|
-
}
|
|
1141
|
-
else if (content.errorDetails.isRateLimited && this.chatEntitlementService.anonymous) {
|
|
1458
|
+
} else if (content.errorDetails.isRateLimited && this.chatEntitlementService.anonymous) {
|
|
1142
1459
|
const renderedError = this.instantiationService.createInstance(ChatAnonymousRateLimitedPart, content);
|
|
1143
1460
|
return renderedError;
|
|
1144
|
-
}
|
|
1145
|
-
else if (content.errorDetails.confirmationButtons && isLast) {
|
|
1461
|
+
} else if (content.errorDetails.confirmationButtons && isLast) {
|
|
1146
1462
|
const level = content.errorDetails.level ?? ChatErrorLevel.Error;
|
|
1147
1463
|
const errorConfirmation = this.instantiationService.createInstance(ChatErrorConfirmationContentPart, level, ( new MarkdownString(content.errorDetails.message)), content, content.errorDetails.confirmationButtons, this.chatContentMarkdownRenderer, context);
|
|
1148
|
-
errorConfirmation.addDisposable(errorConfirmation.onDidChangeHeight(() => this.updateItemHeight(templateData)));
|
|
1149
1464
|
return errorConfirmation;
|
|
1150
|
-
}
|
|
1151
|
-
else {
|
|
1465
|
+
} else {
|
|
1152
1466
|
const level = content.errorDetails.level ?? ChatErrorLevel.Error;
|
|
1153
1467
|
return this.instantiationService.createInstance(ChatErrorContentPart, level, ( new MarkdownString(content.errorDetails.message)), content, this.chatContentMarkdownRenderer);
|
|
1154
1468
|
}
|
|
@@ -1158,22 +1472,18 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1158
1472
|
}
|
|
1159
1473
|
renderNoContent(equals) {
|
|
1160
1474
|
return {
|
|
1161
|
-
dispose: () => {
|
|
1475
|
+
dispose: () => {},
|
|
1162
1476
|
domNode: undefined,
|
|
1163
|
-
hasSameContent: equals
|
|
1477
|
+
hasSameContent: equals
|
|
1164
1478
|
};
|
|
1165
1479
|
}
|
|
1166
1480
|
renderTreeData(content, templateData, context) {
|
|
1167
1481
|
const data = content.treeData;
|
|
1168
|
-
const
|
|
1169
|
-
const treePart = this.instantiationService.createInstance(ChatTreeContentPart, data, context.element, this._treePool, treeDataIndex);
|
|
1170
|
-
treePart.addDisposable(treePart.onDidChangeHeight(() => {
|
|
1171
|
-
this.updateItemHeight(templateData);
|
|
1172
|
-
}));
|
|
1482
|
+
const treePart = this.instantiationService.createInstance(ChatTreeContentPart, data, this._treePool);
|
|
1173
1483
|
if (isResponseVM(context.element)) {
|
|
1174
1484
|
const fileTreeFocusInfo = {
|
|
1175
1485
|
treeDataId: ( data.uri.toString()),
|
|
1176
|
-
treeIndex:
|
|
1486
|
+
treeIndex: context.treeStartIndex,
|
|
1177
1487
|
focus() {
|
|
1178
1488
|
treePart.domFocus();
|
|
1179
1489
|
}
|
|
@@ -1183,23 +1493,31 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1183
1493
|
}));
|
|
1184
1494
|
const fileTrees = this.fileTreesByResponseId.get(context.element.id) ?? [];
|
|
1185
1495
|
fileTrees.push(fileTreeFocusInfo);
|
|
1186
|
-
this.fileTreesByResponseId.set(context.element.id, distinct(fileTrees,
|
|
1187
|
-
treePart.addDisposable(toDisposable(
|
|
1496
|
+
this.fileTreesByResponseId.set(context.element.id, distinct(fileTrees, v => v.treeDataId));
|
|
1497
|
+
treePart.addDisposable(toDisposable(
|
|
1498
|
+
() => this.fileTreesByResponseId.set(context.element.id, fileTrees.filter(v => v.treeDataId !== ( data.uri.toString())))
|
|
1499
|
+
));
|
|
1188
1500
|
}
|
|
1189
1501
|
return treePart;
|
|
1190
1502
|
}
|
|
1191
1503
|
renderMultiDiffData(content, templateData, context) {
|
|
1192
1504
|
const multiDiffPart = this.instantiationService.createInstance(ChatMultiDiffContentPart, content, context.element);
|
|
1193
|
-
multiDiffPart.addDisposable(multiDiffPart.onDidChangeHeight(() => {
|
|
1194
|
-
this.updateItemHeight(templateData);
|
|
1195
|
-
}));
|
|
1196
1505
|
return multiDiffPart;
|
|
1197
1506
|
}
|
|
1198
1507
|
renderContentReferencesListData(references, labelOverride, context, templateData) {
|
|
1199
|
-
const referencesPart = this.instantiationService.createInstance(
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1508
|
+
const referencesPart = this.instantiationService.createInstance(
|
|
1509
|
+
ChatUsedReferencesListContentPart,
|
|
1510
|
+
references.references,
|
|
1511
|
+
labelOverride,
|
|
1512
|
+
context,
|
|
1513
|
+
this._contentReferencesListPool,
|
|
1514
|
+
{
|
|
1515
|
+
expandedWhenEmptyResponse: checkModeOption(
|
|
1516
|
+
this.delegate.currentChatMode(),
|
|
1517
|
+
this.rendererOptions.referencesExpandedWhenEmptyResponse
|
|
1518
|
+
)
|
|
1519
|
+
}
|
|
1520
|
+
);
|
|
1203
1521
|
return referencesPart;
|
|
1204
1522
|
}
|
|
1205
1523
|
renderCodeCitations(citations, context, templateData) {
|
|
@@ -1240,76 +1558,206 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1240
1558
|
});
|
|
1241
1559
|
}
|
|
1242
1560
|
renderToolInvocation(toolInvocation, context, templateData) {
|
|
1561
|
+
if (this.configService.getValue("chat.agent.thinking.collapsedTools") === CollapsedToolsDisplayMode.Off) {
|
|
1562
|
+
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1563
|
+
}
|
|
1243
1564
|
const codeBlockStartIndex = context.codeBlockStartIndex;
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
this.
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1565
|
+
let lazilyCreatedPart = undefined;
|
|
1566
|
+
const createToolPart = () => {
|
|
1567
|
+
lazilyCreatedPart = this.instantiationService.createInstance(
|
|
1568
|
+
ChatToolInvocationPart,
|
|
1569
|
+
toolInvocation,
|
|
1570
|
+
context,
|
|
1571
|
+
this.chatContentMarkdownRenderer,
|
|
1572
|
+
this._contentReferencesListPool,
|
|
1573
|
+
this._toolEditorPool,
|
|
1574
|
+
() => this._currentLayoutWidth.get(),
|
|
1575
|
+
this._toolInvocationCodeBlockCollection,
|
|
1576
|
+
this._announcedToolProgressKeys,
|
|
1577
|
+
codeBlockStartIndex
|
|
1578
|
+
);
|
|
1579
|
+
this.handleRenderedCodeblocks(context.element, lazilyCreatedPart, codeBlockStartIndex);
|
|
1580
|
+
return {
|
|
1581
|
+
domNode: lazilyCreatedPart.domNode,
|
|
1582
|
+
part: lazilyCreatedPart
|
|
1583
|
+
};
|
|
1584
|
+
};
|
|
1585
|
+
const collapsedToolsMode = this.configService.getValue("chat.agent.thinking.collapsedTools");
|
|
1250
1586
|
if (isResponseVM(context.element) && collapsedToolsMode !== CollapsedToolsDisplayMode.Off) {
|
|
1251
1587
|
const lastThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
1252
|
-
if (!lastThinking &&
|
|
1588
|
+
if (!lastThinking && toolInvocation.presentation !== "hidden" && this.shouldPinPart(toolInvocation, context.element) && collapsedToolsMode === CollapsedToolsDisplayMode.Always) {
|
|
1253
1589
|
const thinkingPart = this.renderThinkingPart({
|
|
1254
|
-
kind:
|
|
1590
|
+
kind: "thinking"
|
|
1255
1591
|
}, context, templateData);
|
|
1256
1592
|
if (thinkingPart instanceof ChatThinkingContentPart) {
|
|
1257
|
-
thinkingPart.appendItem(
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1593
|
+
thinkingPart.appendItem(createToolPart, toolInvocation.toolId, toolInvocation, templateData.value);
|
|
1594
|
+
this.setupConfirmationTransitionWatcher(
|
|
1595
|
+
toolInvocation,
|
|
1596
|
+
thinkingPart,
|
|
1597
|
+
() => lazilyCreatedPart,
|
|
1598
|
+
createToolPart,
|
|
1599
|
+
context,
|
|
1600
|
+
templateData
|
|
1601
|
+
);
|
|
1262
1602
|
}
|
|
1263
1603
|
return thinkingPart;
|
|
1264
1604
|
}
|
|
1265
1605
|
if (this.shouldPinPart(toolInvocation, context.element)) {
|
|
1266
|
-
if (lastThinking &&
|
|
1267
|
-
lastThinking.appendItem(
|
|
1268
|
-
|
|
1606
|
+
if (lastThinking && toolInvocation.presentation !== "hidden") {
|
|
1607
|
+
lastThinking.appendItem(createToolPart, toolInvocation.toolId, toolInvocation, templateData.value);
|
|
1608
|
+
this.setupConfirmationTransitionWatcher(
|
|
1609
|
+
toolInvocation,
|
|
1610
|
+
lastThinking,
|
|
1611
|
+
() => lazilyCreatedPart,
|
|
1612
|
+
createToolPart,
|
|
1613
|
+
context,
|
|
1614
|
+
templateData
|
|
1615
|
+
);
|
|
1616
|
+
return this.renderNoContent(
|
|
1617
|
+
(other, followingContent, element) => lazilyCreatedPart ? lazilyCreatedPart.hasSameContent(other, followingContent, element) : toolInvocation.kind === other.kind
|
|
1618
|
+
);
|
|
1269
1619
|
}
|
|
1270
|
-
}
|
|
1271
|
-
else {
|
|
1620
|
+
} else {
|
|
1272
1621
|
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1273
1622
|
}
|
|
1274
1623
|
}
|
|
1624
|
+
const subagentId = toolInvocation.toolId === RunSubagentTool.Id ? toolInvocation.toolCallId : toolInvocation.subAgentInvocationId;
|
|
1625
|
+
if (subagentId && isResponseVM(context.element) && toolInvocation.presentation !== "hidden") {
|
|
1626
|
+
return this.handleSubagentToolGrouping(toolInvocation, subagentId, context, templateData, codeBlockStartIndex);
|
|
1627
|
+
}
|
|
1628
|
+
const {
|
|
1629
|
+
part
|
|
1630
|
+
} = createToolPart();
|
|
1275
1631
|
return part;
|
|
1276
1632
|
}
|
|
1633
|
+
setupConfirmationTransitionWatcher(
|
|
1634
|
+
toolInvocation,
|
|
1635
|
+
thinkingPart,
|
|
1636
|
+
getCreatedPart,
|
|
1637
|
+
createToolPart,
|
|
1638
|
+
context,
|
|
1639
|
+
templateData
|
|
1640
|
+
) {
|
|
1641
|
+
if (toolInvocation.kind !== "toolInvocation") {
|
|
1642
|
+
return;
|
|
1643
|
+
}
|
|
1644
|
+
const removeConfirmationWidget = () => {
|
|
1645
|
+
const createdPart = getCreatedPart();
|
|
1646
|
+
if (createdPart?.domNode) {
|
|
1647
|
+
const wrapper = createdPart.domNode.parentElement;
|
|
1648
|
+
if (wrapper?.classList.contains("chat-thinking-tool-wrapper")) {
|
|
1649
|
+
wrapper.remove();
|
|
1650
|
+
}
|
|
1651
|
+
templateData.value.appendChild(createdPart.domNode);
|
|
1652
|
+
} else {
|
|
1653
|
+
thinkingPart.removeLazyItem(toolInvocation.toolId);
|
|
1654
|
+
const {
|
|
1655
|
+
domNode
|
|
1656
|
+
} = createToolPart();
|
|
1657
|
+
templateData.value.appendChild(domNode);
|
|
1658
|
+
}
|
|
1659
|
+
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1660
|
+
};
|
|
1661
|
+
const currentState = toolInvocation.state.get();
|
|
1662
|
+
if (currentState.type === IChatToolInvocation.StateKind.WaitingForConfirmation || currentState.type === IChatToolInvocation.StateKind.WaitingForPostApproval) {
|
|
1663
|
+
removeConfirmationWidget();
|
|
1664
|
+
return;
|
|
1665
|
+
}
|
|
1666
|
+
const isWorkingState = type => type === IChatToolInvocation.StateKind.Streaming || type === IChatToolInvocation.StateKind.Executing;
|
|
1667
|
+
if (!isWorkingState(currentState.type)) {
|
|
1668
|
+
return;
|
|
1669
|
+
}
|
|
1670
|
+
let didRemoveConfirmationWidget = false;
|
|
1671
|
+
const disposable = autorun(reader => {
|
|
1672
|
+
const state = toolInvocation.state.read(reader);
|
|
1673
|
+
if (state.type === IChatToolInvocation.StateKind.WaitingForConfirmation || state.type === IChatToolInvocation.StateKind.WaitingForPostApproval) {
|
|
1674
|
+
if (didRemoveConfirmationWidget) {
|
|
1675
|
+
return;
|
|
1676
|
+
}
|
|
1677
|
+
didRemoveConfirmationWidget = true;
|
|
1678
|
+
disposable.dispose();
|
|
1679
|
+
removeConfirmationWidget();
|
|
1680
|
+
}
|
|
1681
|
+
});
|
|
1682
|
+
thinkingPart.addDisposable(disposable);
|
|
1683
|
+
}
|
|
1277
1684
|
renderExtensionsContent(extensionsContent, context, templateData) {
|
|
1278
1685
|
const part = this.instantiationService.createInstance(ChatExtensionsContentPart, extensionsContent);
|
|
1279
|
-
part.addDisposable(part.onDidChangeHeight(() => this.updateItemHeight(templateData)));
|
|
1280
1686
|
return part;
|
|
1281
1687
|
}
|
|
1282
1688
|
renderPullRequestContent(pullRequestContent, context, templateData) {
|
|
1283
1689
|
const part = this.instantiationService.createInstance(ChatPullRequestContentPart, pullRequestContent);
|
|
1284
|
-
part.addDisposable(part.onDidChangeHeight(() => this.updateItemHeight(templateData)));
|
|
1285
1690
|
return part;
|
|
1286
1691
|
}
|
|
1287
1692
|
renderProgressTask(task, templateData, context) {
|
|
1288
1693
|
if (!isResponseVM(context.element)) {
|
|
1289
1694
|
return;
|
|
1290
1695
|
}
|
|
1291
|
-
const taskPart = this.instantiationService.createInstance(
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1696
|
+
const taskPart = this.instantiationService.createInstance(
|
|
1697
|
+
ChatTaskContentPart,
|
|
1698
|
+
task,
|
|
1699
|
+
this._contentReferencesListPool,
|
|
1700
|
+
this.chatContentMarkdownRenderer,
|
|
1701
|
+
context
|
|
1702
|
+
);
|
|
1295
1703
|
return taskPart;
|
|
1296
1704
|
}
|
|
1297
1705
|
renderConfirmation(context, confirmation, templateData) {
|
|
1298
1706
|
const part = this.instantiationService.createInstance(ChatConfirmationContentPart, confirmation, context);
|
|
1299
|
-
part.addDisposable(part.onDidChangeHeight(() => this.updateItemHeight(templateData)));
|
|
1300
1707
|
return part;
|
|
1301
1708
|
}
|
|
1302
1709
|
renderElicitation(context, elicitation, templateData) {
|
|
1303
|
-
if (elicitation.kind ===
|
|
1710
|
+
if (elicitation.kind === "elicitationSerialized" ? elicitation.isHidden : elicitation.isHidden?.get()) {
|
|
1304
1711
|
return this.renderNoContent(other => elicitation.kind === other.kind);
|
|
1305
1712
|
}
|
|
1713
|
+
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1306
1714
|
const part = this.instantiationService.createInstance(ChatElicitationContentPart, elicitation, context);
|
|
1307
|
-
part.addDisposable(part.onDidChangeHeight(() => this.updateItemHeight(templateData)));
|
|
1308
1715
|
return part;
|
|
1309
1716
|
}
|
|
1717
|
+
renderQuestionCarousel(context, carousel, templateData) {
|
|
1718
|
+
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1719
|
+
const widget = isResponseVM(context.element) ? this.chatWidgetService.getWidgetBySessionResource(context.element.sessionResource) : undefined;
|
|
1720
|
+
const shouldAutoFocus = widget ? widget.getInput() === "" : true;
|
|
1721
|
+
const part = this.instantiationService.createInstance(ChatQuestionCarouselPart, carousel, context, {
|
|
1722
|
+
shouldAutoFocus,
|
|
1723
|
+
onSubmit: async answers => {
|
|
1724
|
+
const answersRecord = answers ? Object.fromEntries(answers) : undefined;
|
|
1725
|
+
if (answersRecord) {
|
|
1726
|
+
carousel.data = answersRecord;
|
|
1727
|
+
}
|
|
1728
|
+
carousel.isUsed = true;
|
|
1729
|
+
if (isResponseVM(context.element) && carousel.resolveId) {
|
|
1730
|
+
this.chatService.notifyQuestionCarouselAnswer(context.element.requestId, carousel.resolveId, answersRecord);
|
|
1731
|
+
}
|
|
1732
|
+
this.removeCarouselFromTracking(context, part);
|
|
1733
|
+
}
|
|
1734
|
+
});
|
|
1735
|
+
if (!carousel.isUsed && this.configService.getValue(ChatConfiguration.GlobalAutoApprove)) {
|
|
1736
|
+
part.skip();
|
|
1737
|
+
}
|
|
1738
|
+
if (isResponseVM(context.element) && carousel.allowSkip && !carousel.isUsed) {
|
|
1739
|
+
let carousels = this.pendingQuestionCarousels.get(context.element.sessionResource);
|
|
1740
|
+
if (!carousels) {
|
|
1741
|
+
carousels = ( new Set());
|
|
1742
|
+
this.pendingQuestionCarousels.set(context.element.sessionResource, carousels);
|
|
1743
|
+
}
|
|
1744
|
+
carousels.add(part);
|
|
1745
|
+
part.addDisposable({
|
|
1746
|
+
dispose: () => this.removeCarouselFromTracking(context, part)
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
return part;
|
|
1750
|
+
}
|
|
1751
|
+
removeCarouselFromTracking(context, part) {
|
|
1752
|
+
if (isResponseVM(context.element)) {
|
|
1753
|
+
const carousels = this.pendingQuestionCarousels.get(context.element.sessionResource);
|
|
1754
|
+
if (carousels) {
|
|
1755
|
+
carousels.delete(part);
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1310
1759
|
renderChangesSummary(content, context, templateData) {
|
|
1311
1760
|
const part = this.instantiationService.createInstance(ChatCheckpointFileChangesSummaryContentPart, content, context);
|
|
1312
|
-
part.addDisposable(part.onDidChangeHeight(() => { this.updateItemHeight(templateData); }));
|
|
1313
1761
|
return part;
|
|
1314
1762
|
}
|
|
1315
1763
|
renderAttachments(variables, contentReferences, templateData) {
|
|
@@ -1320,66 +1768,130 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1320
1768
|
});
|
|
1321
1769
|
}
|
|
1322
1770
|
renderTextEdit(context, chatTextEdit, templateData) {
|
|
1323
|
-
const textEditPart = this.instantiationService.createInstance(
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1771
|
+
const textEditPart = this.instantiationService.createInstance(
|
|
1772
|
+
ChatTextEditContentPart,
|
|
1773
|
+
chatTextEdit,
|
|
1774
|
+
context,
|
|
1775
|
+
this.rendererOptions,
|
|
1776
|
+
this._diffEditorPool,
|
|
1777
|
+
this._currentLayoutWidth.get()
|
|
1778
|
+
);
|
|
1328
1779
|
return textEditPart;
|
|
1329
1780
|
}
|
|
1330
1781
|
renderMarkdown(markdown, templateData, context) {
|
|
1331
|
-
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1332
1782
|
const element = context.element;
|
|
1783
|
+
const isFinalAnswerPart = isResponseVM(element) && element.isComplete && context.contentIndex === context.content.length - 1;
|
|
1784
|
+
if (!this.hasCodeblockUri(markdown) || isFinalAnswerPart) {
|
|
1785
|
+
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1786
|
+
}
|
|
1333
1787
|
const fillInIncompleteTokens = isResponseVM(element) && (!element.isComplete || element.isCanceled || element.errorDetails?.responseIsFiltered || element.errorDetails?.responseIsIncomplete || !!element.renderData);
|
|
1334
1788
|
const codeBlockStartIndex = context.codeBlockStartIndex;
|
|
1335
|
-
const markdownPart = templateData.instantiationService.createInstance(
|
|
1789
|
+
const markdownPart = templateData.instantiationService.createInstance(
|
|
1790
|
+
ChatMarkdownContentPart,
|
|
1791
|
+
markdown,
|
|
1792
|
+
context,
|
|
1793
|
+
this._editorPool,
|
|
1794
|
+
fillInIncompleteTokens,
|
|
1795
|
+
codeBlockStartIndex,
|
|
1796
|
+
this.chatContentMarkdownRenderer,
|
|
1797
|
+
undefined,
|
|
1798
|
+
this._currentLayoutWidth.get(),
|
|
1799
|
+
this.codeBlockModelCollection,
|
|
1800
|
+
{}
|
|
1801
|
+
);
|
|
1336
1802
|
if (isRequestVM(element)) {
|
|
1337
1803
|
markdownPart.domNode.tabIndex = 0;
|
|
1338
|
-
if (this.configService.getValue(
|
|
1339
|
-
markdownPart.domNode.classList.add(
|
|
1340
|
-
markdownPart.addDisposable(
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
}
|
|
1344
|
-
const clickedElement = e.target;
|
|
1345
|
-
if (clickedElement.tagName === 'A') {
|
|
1346
|
-
return;
|
|
1347
|
-
}
|
|
1348
|
-
const selection = getWindow(templateData.rowContainer).getSelection();
|
|
1349
|
-
if (selection && !selection.isCollapsed && ( selection.toString()).length > 0) {
|
|
1350
|
-
return;
|
|
1351
|
-
}
|
|
1352
|
-
const monacoEditor = findParentWithClass(clickedElement, 'monaco-editor');
|
|
1353
|
-
if (monacoEditor) {
|
|
1354
|
-
const editorPart = Array.from(this.editorsInUse()).find(editor => editor.element.contains(monacoEditor));
|
|
1355
|
-
if (editorPart?.editor.getSelection()?.isEmpty() === false) {
|
|
1804
|
+
if (this.configService.getValue("chat.editRequests") === "inline" && this.rendererOptions.editable) {
|
|
1805
|
+
markdownPart.domNode.classList.add("clickable");
|
|
1806
|
+
markdownPart.addDisposable(
|
|
1807
|
+
addDisposableListener(markdownPart.domNode, EventType.CLICK, e => {
|
|
1808
|
+
if (this.viewModel?.editing?.id === element.id) {
|
|
1356
1809
|
return;
|
|
1357
1810
|
}
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1811
|
+
const clickedElement = e.target;
|
|
1812
|
+
if (clickedElement.tagName === "A") {
|
|
1813
|
+
return;
|
|
1814
|
+
}
|
|
1815
|
+
const selection = getWindow(templateData.rowContainer).getSelection();
|
|
1816
|
+
if (selection && !selection.isCollapsed && ( selection.toString()).length > 0) {
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
const monacoEditor = findParentWithClass(clickedElement, "monaco-editor");
|
|
1820
|
+
if (monacoEditor) {
|
|
1821
|
+
const editorPart = Array.from(this.editorsInUse()).find(editor => editor.element.contains(monacoEditor));
|
|
1822
|
+
if (editorPart?.editor.getSelection()?.isEmpty() === false) {
|
|
1823
|
+
return;
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
e.preventDefault();
|
|
1827
|
+
e.stopPropagation();
|
|
1828
|
+
this._onDidClickRequest.fire(templateData);
|
|
1829
|
+
})
|
|
1830
|
+
);
|
|
1831
|
+
markdownPart.addDisposable(
|
|
1832
|
+
this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), markdownPart.domNode, ( localize(6037, "Click to Edit")), {
|
|
1833
|
+
trapFocus: true
|
|
1834
|
+
})
|
|
1835
|
+
);
|
|
1836
|
+
}
|
|
1837
|
+
markdownPart.addDisposable(
|
|
1838
|
+
addDisposableListener(markdownPart.domNode, EventType.FOCUS, () => {
|
|
1839
|
+
this.hoverVisible(templateData.requestHover);
|
|
1840
|
+
})
|
|
1841
|
+
);
|
|
1842
|
+
markdownPart.addDisposable(
|
|
1843
|
+
addDisposableListener(markdownPart.domNode, EventType.BLUR, () => {
|
|
1844
|
+
this.hoverHidden(templateData.requestHover);
|
|
1845
|
+
})
|
|
1846
|
+
);
|
|
1371
1847
|
}
|
|
1372
|
-
markdownPart.addDisposable(markdownPart.onDidChangeHeight(() => {
|
|
1373
|
-
markdownPart.layout(this._currentLayoutWidth);
|
|
1374
|
-
this.updateItemHeight(templateData);
|
|
1375
|
-
}));
|
|
1376
1848
|
this.handleRenderedCodeblocks(element, markdownPart, codeBlockStartIndex);
|
|
1849
|
+
const collapsedToolsMode = this.configService.getValue("chat.agent.thinking.collapsedTools");
|
|
1850
|
+
if (isResponseVM(context.element) && collapsedToolsMode !== CollapsedToolsDisplayMode.Off && !isFinalAnswerPart) {
|
|
1851
|
+
const isComplete = this.isCodeblockComplete(markdown, context.element);
|
|
1852
|
+
const subAgentInvocationId = extractSubAgentInvocationIdFromText(markdown.content.value);
|
|
1853
|
+
if (subAgentInvocationId) {
|
|
1854
|
+
const subagentPart = this.getSubagentPart(templateData.renderedParts, subAgentInvocationId);
|
|
1855
|
+
if (subagentPart && markdownPart?.domNode && isComplete) {
|
|
1856
|
+
subagentPart.appendMarkdownItem(() => ({
|
|
1857
|
+
domNode: markdownPart.domNode,
|
|
1858
|
+
disposable: markdownPart
|
|
1859
|
+
}), markdownPart.codeblocksPartId, markdown, templateData.value);
|
|
1860
|
+
return subagentPart;
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
const lastThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
1864
|
+
if (!lastThinking && markdownPart?.domNode && this.shouldPinPart(markdown, context.element) && collapsedToolsMode === CollapsedToolsDisplayMode.Always && isComplete) {
|
|
1865
|
+
const thinkingPart = this.renderThinkingPart({
|
|
1866
|
+
kind: "thinking"
|
|
1867
|
+
}, context, templateData);
|
|
1868
|
+
if (thinkingPart instanceof ChatThinkingContentPart) {
|
|
1869
|
+
thinkingPart.appendItem(() => ({
|
|
1870
|
+
domNode: markdownPart.domNode,
|
|
1871
|
+
disposable: markdownPart
|
|
1872
|
+
}), markdownPart.codeblocksPartId, markdown, templateData.value);
|
|
1873
|
+
}
|
|
1874
|
+
return thinkingPart;
|
|
1875
|
+
}
|
|
1876
|
+
if (this.shouldPinPart(markdown, context.element) && isComplete) {
|
|
1877
|
+
if (lastThinking && markdownPart?.domNode) {
|
|
1878
|
+
lastThinking.appendItem(() => ({
|
|
1879
|
+
domNode: markdownPart.domNode,
|
|
1880
|
+
disposable: markdownPart
|
|
1881
|
+
}), markdownPart.codeblocksPartId, markdown, templateData.value);
|
|
1882
|
+
}
|
|
1883
|
+
} else if (!this.shouldPinPart(markdown, context.element)) {
|
|
1884
|
+
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1377
1887
|
return markdownPart;
|
|
1378
1888
|
}
|
|
1379
1889
|
renderThinkingPart(content, context, templateData) {
|
|
1380
1890
|
if (!content.id) {
|
|
1381
1891
|
content.id = ( Date.now().toString());
|
|
1382
1892
|
}
|
|
1893
|
+
const element = isResponseVM(context.element) ? context.element : undefined;
|
|
1894
|
+
const streamingCompleted = this.isThinkingLookAheadComplete(context, element);
|
|
1383
1895
|
if (Array.isArray(content.value)) {
|
|
1384
1896
|
if (content.value.length < 1) {
|
|
1385
1897
|
const lastThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
@@ -1391,33 +1903,46 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1391
1903
|
if (item) {
|
|
1392
1904
|
const lastThinkingPart = lastPart instanceof ChatThinkingContentPart && lastPart.getIsActive() ? lastPart : undefined;
|
|
1393
1905
|
if (lastThinkingPart) {
|
|
1394
|
-
lastThinkingPart.setupThinkingContainer({
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1906
|
+
lastThinkingPart.setupThinkingContainer({
|
|
1907
|
+
...content,
|
|
1908
|
+
value: item
|
|
1909
|
+
});
|
|
1910
|
+
} else {
|
|
1911
|
+
const itemContent = {
|
|
1912
|
+
...content,
|
|
1913
|
+
value: item
|
|
1914
|
+
};
|
|
1915
|
+
const itemPart = templateData.instantiationService.createInstance(
|
|
1916
|
+
ChatThinkingContentPart,
|
|
1917
|
+
itemContent,
|
|
1918
|
+
context,
|
|
1919
|
+
this.chatContentMarkdownRenderer,
|
|
1920
|
+
streamingCompleted
|
|
1921
|
+
);
|
|
1400
1922
|
lastPart = itemPart;
|
|
1401
1923
|
}
|
|
1402
1924
|
}
|
|
1403
1925
|
}
|
|
1404
1926
|
return lastPart ?? this.renderNoContent(other => content.kind === other.kind);
|
|
1405
|
-
}
|
|
1406
|
-
else {
|
|
1927
|
+
} else {
|
|
1407
1928
|
const lastActiveThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
1408
1929
|
if (lastActiveThinking) {
|
|
1409
|
-
lastActiveThinking.setupThinkingContainer(content
|
|
1930
|
+
lastActiveThinking.setupThinkingContainer(content);
|
|
1410
1931
|
return lastActiveThinking;
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1932
|
+
} else {
|
|
1933
|
+
const part = templateData.instantiationService.createInstance(
|
|
1934
|
+
ChatThinkingContentPart,
|
|
1935
|
+
content,
|
|
1936
|
+
context,
|
|
1937
|
+
this.chatContentMarkdownRenderer,
|
|
1938
|
+
streamingCompleted
|
|
1939
|
+
);
|
|
1415
1940
|
return part;
|
|
1416
1941
|
}
|
|
1417
1942
|
}
|
|
1418
1943
|
}
|
|
1419
1944
|
disposeElement(node, index, templateData, details) {
|
|
1420
|
-
this.traceLayout(
|
|
1945
|
+
this.traceLayout("disposeElement", `Disposing element, index=${index}`);
|
|
1421
1946
|
templateData.elementDisposables.clear();
|
|
1422
1947
|
if (templateData.currentElement && !this.viewModel?.editing) {
|
|
1423
1948
|
this.templateDataByRequestId.delete(templateData.currentElement.id);
|
|
@@ -1429,46 +1954,31 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1429
1954
|
templateData.titleToolbar.context = undefined;
|
|
1430
1955
|
}
|
|
1431
1956
|
templateData.footerToolbar.context = undefined;
|
|
1957
|
+
templateData.checkpointToolbar.context = undefined;
|
|
1958
|
+
templateData.checkpointRestoreToolbar.context = undefined;
|
|
1432
1959
|
}
|
|
1433
1960
|
renderMcpServersInteractionRequired(content, context, templateData) {
|
|
1434
1961
|
return this.instantiationService.createInstance(ChatMcpServersInteractionContentPart, content, context);
|
|
1435
1962
|
}
|
|
1436
1963
|
disposeTemplate(templateData) {
|
|
1964
|
+
this.clearRenderedParts(templateData);
|
|
1437
1965
|
templateData.templateDisposables.dispose();
|
|
1438
1966
|
}
|
|
1439
1967
|
hoverVisible(requestHover) {
|
|
1440
|
-
requestHover.style.opacity =
|
|
1968
|
+
requestHover.style.opacity = "1";
|
|
1441
1969
|
}
|
|
1442
1970
|
hoverHidden(requestHover) {
|
|
1443
|
-
requestHover.style.opacity =
|
|
1971
|
+
requestHover.style.opacity = "0";
|
|
1444
1972
|
}
|
|
1445
1973
|
};
|
|
1446
|
-
ChatListItemRenderer = ChatListItemRenderer_1 = ( __decorate([
|
|
1447
|
-
|
|
1448
|
-
(
|
|
1449
|
-
|
|
1450
|
-
( __param(9, IContextKeyService)),
|
|
1451
|
-
( __param(10, IThemeService)),
|
|
1452
|
-
( __param(11, ICommandService)),
|
|
1453
|
-
( __param(12, IHoverService)),
|
|
1454
|
-
( __param(13, IChatWidgetService)),
|
|
1455
|
-
( __param(14, IChatEntitlementService))
|
|
1456
|
-
], ChatListItemRenderer));
|
|
1457
|
-
let ChatListDelegate = class ChatListDelegate {
|
|
1458
|
-
constructor(defaultElementHeight, logService) {
|
|
1974
|
+
ChatListItemRenderer = ChatListItemRenderer_1 = ( __decorate([( __param(6, IInstantiationService)), ( __param(7, IConfigurationService)), ( __param(8, ILogService)), ( __param(9, IContextKeyService)), ( __param(10, IThemeService)), ( __param(11, ICommandService)), ( __param(12, IHoverService)), ( __param(13, IChatWidgetService)), ( __param(14, IChatEntitlementService)), ( __param(15, IChatService)), ( __param(16, IChatTipService))], ChatListItemRenderer));
|
|
1975
|
+
class ChatListDelegate extends CachedListVirtualDelegate {
|
|
1976
|
+
constructor(defaultElementHeight) {
|
|
1977
|
+
super();
|
|
1459
1978
|
this.defaultElementHeight = defaultElementHeight;
|
|
1460
|
-
this.logService = logService;
|
|
1461
1979
|
}
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
this.logService.trace(`ChatListDelegate#${method}: ${message}`);
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
getHeight(element) {
|
|
1468
|
-
const kind = isRequestVM(element) ? 'request' : 'response';
|
|
1469
|
-
const height = element.currentRenderedHeight ?? this.defaultElementHeight;
|
|
1470
|
-
this._traceLayout('getHeight', `${kind}, height=${height}`);
|
|
1471
|
-
return height;
|
|
1980
|
+
estimateHeight(element) {
|
|
1981
|
+
return element.currentRenderedHeight ?? this.defaultElementHeight;
|
|
1472
1982
|
}
|
|
1473
1983
|
getTemplateId(element) {
|
|
1474
1984
|
return ChatListItemRenderer.ID;
|
|
@@ -1476,26 +1986,32 @@ let ChatListDelegate = class ChatListDelegate {
|
|
|
1476
1986
|
hasDynamicHeight(element) {
|
|
1477
1987
|
return true;
|
|
1478
1988
|
}
|
|
1479
|
-
}
|
|
1480
|
-
ChatListDelegate = ( __decorate([
|
|
1481
|
-
( __param(1, ILogService))
|
|
1482
|
-
], ChatListDelegate));
|
|
1989
|
+
}
|
|
1483
1990
|
const voteDownDetailLabels = {
|
|
1484
|
-
[ChatAgentVoteDownReason.IncorrectCode]: ( localize(
|
|
1485
|
-
[ChatAgentVoteDownReason.DidNotFollowInstructions]: ( localize(
|
|
1486
|
-
[ChatAgentVoteDownReason.MissingContext]: ( localize(
|
|
1487
|
-
[ChatAgentVoteDownReason.OffensiveOrUnsafe]: ( localize(
|
|
1488
|
-
[ChatAgentVoteDownReason.PoorlyWrittenOrFormatted]: ( localize(
|
|
1489
|
-
[ChatAgentVoteDownReason.RefusedAValidRequest]: ( localize(
|
|
1490
|
-
[ChatAgentVoteDownReason.IncompleteCode]: ( localize(
|
|
1491
|
-
[ChatAgentVoteDownReason.WillReportIssue]: ( localize(
|
|
1492
|
-
[ChatAgentVoteDownReason.Other]: ( localize(
|
|
1991
|
+
[ChatAgentVoteDownReason.IncorrectCode]: ( localize(6038, "Suggested incorrect code")),
|
|
1992
|
+
[ChatAgentVoteDownReason.DidNotFollowInstructions]: ( localize(6039, "Didn't follow instructions")),
|
|
1993
|
+
[ChatAgentVoteDownReason.MissingContext]: ( localize(6040, "Missing context")),
|
|
1994
|
+
[ChatAgentVoteDownReason.OffensiveOrUnsafe]: ( localize(6041, "Offensive or unsafe")),
|
|
1995
|
+
[ChatAgentVoteDownReason.PoorlyWrittenOrFormatted]: ( localize(6042, "Poorly written or formatted")),
|
|
1996
|
+
[ChatAgentVoteDownReason.RefusedAValidRequest]: ( localize(6043, "Refused a valid request")),
|
|
1997
|
+
[ChatAgentVoteDownReason.IncompleteCode]: ( localize(6044, "Incomplete code")),
|
|
1998
|
+
[ChatAgentVoteDownReason.WillReportIssue]: ( localize(6045, "Report an issue")),
|
|
1999
|
+
[ChatAgentVoteDownReason.Other]: ( localize(6046, "Other"))
|
|
1493
2000
|
};
|
|
1494
2001
|
let ChatVoteDownButton = class ChatVoteDownButton extends DropdownMenuActionViewItem {
|
|
1495
|
-
constructor(
|
|
1496
|
-
|
|
2002
|
+
constructor(
|
|
2003
|
+
action,
|
|
2004
|
+
options,
|
|
2005
|
+
commandService,
|
|
2006
|
+
issueService,
|
|
2007
|
+
logService,
|
|
2008
|
+
contextMenuService
|
|
2009
|
+
) {
|
|
2010
|
+
super(action, {
|
|
2011
|
+
getActions: () => this.getActions()
|
|
2012
|
+
}, contextMenuService, {
|
|
1497
2013
|
...options,
|
|
1498
|
-
classNames: ThemeIcon.asClassNameArray(Codicon.thumbsdown)
|
|
2014
|
+
classNames: ThemeIcon.asClassNameArray(Codicon.thumbsdown)
|
|
1499
2015
|
});
|
|
1500
2016
|
this.commandService = commandService;
|
|
1501
2017
|
this.issueService = issueService;
|
|
@@ -1512,38 +2028,40 @@ let ChatVoteDownButton = class ChatVoteDownButton extends DropdownMenuActionView
|
|
|
1512
2028
|
this.getVoteDownDetailAction(ChatAgentVoteDownReason.OffensiveOrUnsafe),
|
|
1513
2029
|
this.getVoteDownDetailAction(ChatAgentVoteDownReason.Other),
|
|
1514
2030
|
{
|
|
1515
|
-
id:
|
|
2031
|
+
id: "reportIssue",
|
|
1516
2032
|
label: voteDownDetailLabels[ChatAgentVoteDownReason.WillReportIssue],
|
|
1517
|
-
tooltip:
|
|
2033
|
+
tooltip: "",
|
|
1518
2034
|
enabled: true,
|
|
1519
2035
|
class: undefined,
|
|
1520
|
-
run: async
|
|
2036
|
+
run: async context => {
|
|
1521
2037
|
if (!isResponseVM(context)) {
|
|
1522
|
-
this.logService.error(
|
|
2038
|
+
this.logService.error("ChatVoteDownButton#run: invalid context");
|
|
1523
2039
|
return;
|
|
1524
2040
|
}
|
|
1525
2041
|
await this.commandService.executeCommand(MarkUnhelpfulActionId, context, ChatAgentVoteDownReason.WillReportIssue);
|
|
1526
|
-
await this.issueService.openReporter({
|
|
2042
|
+
await this.issueService.openReporter({
|
|
2043
|
+
extensionId: context.agent?.extensionId.value
|
|
2044
|
+
});
|
|
1527
2045
|
}
|
|
1528
2046
|
}
|
|
1529
2047
|
];
|
|
1530
2048
|
}
|
|
1531
2049
|
render(container) {
|
|
1532
2050
|
super.render(container);
|
|
1533
|
-
this.element?.classList.toggle(
|
|
2051
|
+
this.element?.classList.toggle("checked", this.action.checked);
|
|
1534
2052
|
}
|
|
1535
2053
|
getVoteDownDetailAction(reason) {
|
|
1536
2054
|
const label = voteDownDetailLabels[reason];
|
|
1537
2055
|
return {
|
|
1538
2056
|
id: MarkUnhelpfulActionId,
|
|
1539
2057
|
label,
|
|
1540
|
-
tooltip:
|
|
2058
|
+
tooltip: "",
|
|
1541
2059
|
enabled: true,
|
|
1542
2060
|
checked: this._context.voteDownReason === reason,
|
|
1543
2061
|
class: undefined,
|
|
1544
|
-
run: async
|
|
2062
|
+
run: async context => {
|
|
1545
2063
|
if (!isResponseVM(context)) {
|
|
1546
|
-
this.logService.error(
|
|
2064
|
+
this.logService.error("ChatVoteDownButton#getVoteDownDetailAction: invalid context");
|
|
1547
2065
|
return;
|
|
1548
2066
|
}
|
|
1549
2067
|
await this.commandService.executeCommand(MarkUnhelpfulActionId, context, reason);
|
|
@@ -1551,11 +2069,6 @@ let ChatVoteDownButton = class ChatVoteDownButton extends DropdownMenuActionView
|
|
|
1551
2069
|
};
|
|
1552
2070
|
}
|
|
1553
2071
|
};
|
|
1554
|
-
ChatVoteDownButton = ( __decorate([
|
|
1555
|
-
( __param(2, ICommandService)),
|
|
1556
|
-
( __param(3, IWorkbenchIssueService)),
|
|
1557
|
-
( __param(4, ILogService)),
|
|
1558
|
-
( __param(5, IContextMenuService))
|
|
1559
|
-
], ChatVoteDownButton));
|
|
2072
|
+
ChatVoteDownButton = ( __decorate([( __param(2, ICommandService)), ( __param(3, IWorkbenchIssueService)), ( __param(4, ILogService)), ( __param(5, IContextMenuService))], ChatVoteDownButton));
|
|
1560
2073
|
|
|
1561
2074
|
export { ChatListDelegate, ChatListItemRenderer, ChatVoteDownButton };
|