@codingame/monaco-vscode-katex-common 25.1.2 → 26.0.1
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
|
@@ -18,7 +18,7 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
18
18
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
19
19
|
import { MarkerSeverity } from '@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers';
|
|
20
20
|
import { IMarkerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers.service';
|
|
21
|
-
import { ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
21
|
+
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
22
22
|
import { createToolInputUri, createToolSchemaUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
23
23
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
24
24
|
import { ILanguageModelToolsConfirmationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsConfirmationService.service';
|
|
@@ -34,11 +34,39 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
34
34
|
get codeblocks() {
|
|
35
35
|
return this.markdownParts.flatMap(part => part.codeblocks);
|
|
36
36
|
}
|
|
37
|
-
constructor(
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
constructor(
|
|
38
|
+
toolInvocation,
|
|
39
|
+
context,
|
|
40
|
+
renderer,
|
|
41
|
+
editorPool,
|
|
42
|
+
currentWidthDelegate,
|
|
43
|
+
codeBlockModelCollection,
|
|
44
|
+
codeBlockStartIndex,
|
|
45
|
+
instantiationService,
|
|
46
|
+
keybindingService,
|
|
47
|
+
modelService,
|
|
48
|
+
languageService,
|
|
49
|
+
contextKeyService,
|
|
50
|
+
chatWidgetService,
|
|
51
|
+
commandService,
|
|
52
|
+
markerService,
|
|
53
|
+
languageModelToolsService,
|
|
54
|
+
chatMarkdownAnchorService,
|
|
55
|
+
confirmationService
|
|
56
|
+
) {
|
|
57
|
+
const state = toolInvocation.state.get();
|
|
58
|
+
if (state.type !== IChatToolInvocation.StateKind.WaitingForConfirmation || !state.confirmationMessages?.title) {
|
|
59
|
+
throw ( new Error("Confirmation messages are missing"));
|
|
40
60
|
}
|
|
41
|
-
super(
|
|
61
|
+
super(
|
|
62
|
+
toolInvocation,
|
|
63
|
+
context,
|
|
64
|
+
instantiationService,
|
|
65
|
+
keybindingService,
|
|
66
|
+
contextKeyService,
|
|
67
|
+
chatWidgetService,
|
|
68
|
+
languageModelToolsService
|
|
69
|
+
);
|
|
42
70
|
this.renderer = renderer;
|
|
43
71
|
this.editorPool = editorPool;
|
|
44
72
|
this.currentWidthDelegate = currentWidthDelegate;
|
|
@@ -54,22 +82,24 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
54
82
|
this.render({
|
|
55
83
|
allowActionId: AcceptToolConfirmationActionId,
|
|
56
84
|
skipActionId: SkipToolConfirmationActionId,
|
|
57
|
-
allowLabel:
|
|
58
|
-
skipLabel: ( localize(
|
|
59
|
-
partType:
|
|
60
|
-
subtitle: typeof toolInvocation.originMessage ===
|
|
85
|
+
allowLabel: state.confirmationMessages.confirmResults ? ( localize(6002, "Allow and Review")) : ( localize(6003, "Allow")),
|
|
86
|
+
skipLabel: ( localize(6004, "Proceed without running this tool")),
|
|
87
|
+
partType: "chatToolConfirmation",
|
|
88
|
+
subtitle: typeof toolInvocation.originMessage === "string" ? toolInvocation.originMessage : toolInvocation.originMessage?.value
|
|
61
89
|
});
|
|
62
|
-
if (toolInvocation.fromSubAgent) {
|
|
63
|
-
context.container.classList.add('from-sub-agent');
|
|
64
|
-
}
|
|
65
90
|
}
|
|
66
91
|
additionalPrimaryActions() {
|
|
67
92
|
const actions = super.additionalPrimaryActions();
|
|
68
|
-
|
|
93
|
+
const state = this.toolInvocation.state.get();
|
|
94
|
+
if (state.type !== IChatToolInvocation.StateKind.WaitingForConfirmation) {
|
|
95
|
+
return actions;
|
|
96
|
+
}
|
|
97
|
+
if (state.confirmationMessages?.allowAutoConfirm !== false) {
|
|
69
98
|
const confirmActions = this.confirmationService.getPreConfirmActions({
|
|
70
99
|
toolId: this.toolInvocation.toolId,
|
|
71
100
|
source: this.toolInvocation.source,
|
|
72
|
-
parameters:
|
|
101
|
+
parameters: state.parameters,
|
|
102
|
+
chatSessionResource: this.context.element.sessionResource
|
|
73
103
|
});
|
|
74
104
|
for (const action of confirmActions) {
|
|
75
105
|
if (action.divider) {
|
|
@@ -81,52 +111,56 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
81
111
|
data: async () => {
|
|
82
112
|
const shouldConfirm = await action.select();
|
|
83
113
|
if (shouldConfirm) {
|
|
84
|
-
this.confirmWith(this.toolInvocation, {
|
|
114
|
+
this.confirmWith(this.toolInvocation, {
|
|
115
|
+
type: ToolConfirmKind.UserAction
|
|
116
|
+
});
|
|
85
117
|
}
|
|
86
118
|
}
|
|
87
119
|
});
|
|
88
120
|
}
|
|
89
121
|
}
|
|
90
|
-
if (
|
|
122
|
+
if (state.confirmationMessages?.confirmResults) {
|
|
91
123
|
actions.unshift({
|
|
92
|
-
label: ( localize(
|
|
124
|
+
label: ( localize(6005, "Allow and Skip Reviewing Result")),
|
|
93
125
|
data: () => {
|
|
94
|
-
|
|
95
|
-
this.confirmWith(this.toolInvocation, {
|
|
126
|
+
state.confirmationMessages.confirmResults = undefined;
|
|
127
|
+
this.confirmWith(this.toolInvocation, {
|
|
128
|
+
type: ToolConfirmKind.UserAction
|
|
129
|
+
});
|
|
96
130
|
}
|
|
97
131
|
}, ( new Separator()));
|
|
98
132
|
}
|
|
99
133
|
return actions;
|
|
100
134
|
}
|
|
101
135
|
createContentElement() {
|
|
102
|
-
const
|
|
136
|
+
const state = this.toolInvocation.state.get();
|
|
137
|
+
if (state.type !== IChatToolInvocation.StateKind.WaitingForConfirmation) {
|
|
138
|
+
return "";
|
|
139
|
+
}
|
|
140
|
+
const {
|
|
141
|
+
message,
|
|
142
|
+
disclaimer
|
|
143
|
+
} = state.confirmationMessages;
|
|
103
144
|
const toolInvocation = this.toolInvocation;
|
|
104
|
-
if (typeof message ===
|
|
145
|
+
if (typeof message === "string" && !disclaimer) {
|
|
105
146
|
return message;
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
147
|
+
} else {
|
|
108
148
|
const codeBlockRenderOptions = {
|
|
109
149
|
hideToolbar: true,
|
|
110
150
|
reserveWidth: 19,
|
|
111
151
|
verticalPadding: 5,
|
|
112
152
|
editorOptions: {
|
|
113
153
|
tabFocusMode: true,
|
|
114
|
-
ariaLabel: this.getTitle()
|
|
115
|
-
}
|
|
154
|
+
ariaLabel: this.getTitle()
|
|
155
|
+
}
|
|
116
156
|
};
|
|
117
|
-
const elements = h(
|
|
118
|
-
h(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
h('.editor@editor'),
|
|
125
|
-
h('.disclaimer@disclaimer'),
|
|
126
|
-
]);
|
|
127
|
-
if (toolInvocation.toolSpecificData?.kind === 'input' && toolInvocation.toolSpecificData.rawInput && !isEmptyObject(toolInvocation.toolSpecificData.rawInput)) {
|
|
128
|
-
const titleEl = createElement('h3');
|
|
129
|
-
titleEl.textContent = ( localize(5751, "Input"));
|
|
157
|
+
const elements = h("div", [h(".message@messageContainer", [
|
|
158
|
+
h(".message-wrapper@message"),
|
|
159
|
+
h(".see-more@showMore", [h("a", [( localize(6006, "Show More"))])])
|
|
160
|
+
]), h(".editor@editor"), h(".disclaimer@disclaimer")]);
|
|
161
|
+
if (toolInvocation.toolSpecificData?.kind === "input" && toolInvocation.toolSpecificData.rawInput && !isEmptyObject(toolInvocation.toolSpecificData.rawInput)) {
|
|
162
|
+
const titleEl = createElement("h3");
|
|
163
|
+
titleEl.textContent = ( localize(6007, "Input"));
|
|
130
164
|
elements.editor.appendChild(titleEl);
|
|
131
165
|
const inputData = toolInvocation.toolSpecificData;
|
|
132
166
|
const codeBlockRenderOptions = {
|
|
@@ -135,25 +169,27 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
135
169
|
maxHeightInLines: 13,
|
|
136
170
|
verticalPadding: 5,
|
|
137
171
|
editorOptions: {
|
|
138
|
-
wordWrap:
|
|
172
|
+
wordWrap: "off",
|
|
139
173
|
readOnly: false,
|
|
140
|
-
ariaLabel: this.getTitle()
|
|
174
|
+
ariaLabel: this.getTitle()
|
|
141
175
|
}
|
|
142
176
|
};
|
|
143
|
-
const langId = this.languageService.getLanguageIdByLanguageName(
|
|
177
|
+
const langId = this.languageService.getLanguageIdByLanguageName("json");
|
|
144
178
|
const rawJsonInput = JSON.stringify(inputData.rawInput ?? {}, null, 1);
|
|
145
|
-
const canSeeMore = count(rawJsonInput,
|
|
146
|
-
const model = this._register(
|
|
147
|
-
|
|
179
|
+
const canSeeMore = count(rawJsonInput, "\n") > 2;
|
|
180
|
+
const model = this._register(
|
|
181
|
+
this.modelService.createModel(
|
|
182
|
+
rawJsonInput.replace(/\n */g, " "), this.languageService.createById(langId), createToolInputUri(toolInvocation.toolCallId), true)
|
|
183
|
+
);
|
|
148
184
|
const markerOwner = generateUuid();
|
|
149
185
|
const schemaUri = createToolSchemaUri(toolInvocation.toolId);
|
|
150
186
|
const validator = ( new RunOnceScheduler(async () => {
|
|
151
187
|
const newMarker = [];
|
|
152
|
-
const result = await this.commandService.executeCommand(
|
|
188
|
+
const result = await this.commandService.executeCommand("json.validate", schemaUri, model.getValue());
|
|
153
189
|
for (const item of result ?? []) {
|
|
154
190
|
if (item.range && item.message) {
|
|
155
191
|
newMarker.push({
|
|
156
|
-
severity: item.severity ===
|
|
192
|
+
severity: item.severity === "Error" ? MarkerSeverity.Error : MarkerSeverity.Warning,
|
|
157
193
|
message: item.message,
|
|
158
194
|
startLineNumber: item.range[0].line + 1,
|
|
159
195
|
startColumn: item.range[0].character + 1,
|
|
@@ -174,7 +210,7 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
174
210
|
codeBlockIndex: this.codeBlockStartIndex,
|
|
175
211
|
codeBlockPartIndex: 0,
|
|
176
212
|
element: this.context.element,
|
|
177
|
-
languageId: langId ??
|
|
213
|
+
languageId: langId ?? "json",
|
|
178
214
|
renderOptions: codeBlockRenderOptions,
|
|
179
215
|
textModel: Promise.resolve(model),
|
|
180
216
|
chatSessionResource: this.context.element.sessionResource
|
|
@@ -191,28 +227,27 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
191
227
|
});
|
|
192
228
|
this._register(editor.object.onDidChangeContentHeight(() => {
|
|
193
229
|
editor.object.layout(this.currentWidthDelegate());
|
|
194
|
-
this._onDidChangeHeight.fire();
|
|
195
230
|
}));
|
|
196
231
|
this._register(model.onDidChangeContent(e => {
|
|
197
232
|
try {
|
|
198
233
|
inputData.rawInput = JSON.parse(model.getValue());
|
|
199
|
-
}
|
|
200
|
-
catch {
|
|
201
|
-
}
|
|
234
|
+
} catch {}
|
|
202
235
|
}));
|
|
203
236
|
elements.editor.append(editor.object.element);
|
|
204
237
|
if (canSeeMore) {
|
|
205
|
-
const seeMore = h(
|
|
206
|
-
seeMore.link.textContent = ( localize(
|
|
238
|
+
const seeMore = h("div.see-more", [h("a@link")]);
|
|
239
|
+
seeMore.link.textContent = ( localize(6008, "See more"));
|
|
207
240
|
this._register(addDisposableGenericMouseDownListener(seeMore.link, () => {
|
|
208
241
|
try {
|
|
209
242
|
const parsed = JSON.parse(model.getValue());
|
|
210
243
|
model.setValue(JSON.stringify(parsed, null, 2));
|
|
211
|
-
editor.object.editor.updateOptions({
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
244
|
+
editor.object.editor.updateOptions({
|
|
245
|
+
tabFocusMode: false
|
|
246
|
+
});
|
|
247
|
+
editor.object.editor.updateOptions({
|
|
248
|
+
wordWrap: "on"
|
|
249
|
+
});
|
|
250
|
+
} catch {}
|
|
216
251
|
seeMore.root.remove();
|
|
217
252
|
}));
|
|
218
253
|
elements.editor.append(seeMore.root);
|
|
@@ -222,54 +257,52 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
222
257
|
const messageSeeMoreObserver = this._register(( new ElementSizeObserver(mdPart.domNode, undefined)));
|
|
223
258
|
const updateSeeMoreDisplayed = () => {
|
|
224
259
|
const show = messageSeeMoreObserver.getHeight() > SHOW_MORE_MESSAGE_HEIGHT_TRIGGER;
|
|
225
|
-
if (elements.messageContainer.classList.contains(
|
|
226
|
-
elements.messageContainer.classList.toggle(
|
|
227
|
-
this._onDidChangeHeight.fire();
|
|
260
|
+
if (elements.messageContainer.classList.contains("can-see-more") !== show) {
|
|
261
|
+
elements.messageContainer.classList.toggle("can-see-more", show);
|
|
228
262
|
}
|
|
229
263
|
};
|
|
230
|
-
this._register(addDisposableListener(elements.showMore,
|
|
231
|
-
elements.messageContainer.classList.toggle(
|
|
232
|
-
this._onDidChangeHeight.fire();
|
|
264
|
+
this._register(addDisposableListener(elements.showMore, "click", () => {
|
|
265
|
+
elements.messageContainer.classList.toggle("can-see-more", false);
|
|
233
266
|
messageSeeMoreObserver.dispose();
|
|
234
267
|
}));
|
|
235
268
|
this._register(messageSeeMoreObserver.onDidChange(updateSeeMoreDisplayed));
|
|
236
269
|
messageSeeMoreObserver.startObserving();
|
|
237
270
|
if (disclaimer) {
|
|
238
271
|
this._makeMarkdownPart(elements.disclaimer, disclaimer, codeBlockRenderOptions);
|
|
239
|
-
}
|
|
240
|
-
else {
|
|
272
|
+
} else {
|
|
241
273
|
elements.disclaimer.remove();
|
|
242
274
|
}
|
|
243
275
|
return elements.root;
|
|
244
276
|
}
|
|
245
277
|
}
|
|
246
278
|
getTitle() {
|
|
247
|
-
const
|
|
248
|
-
|
|
279
|
+
const state = this.toolInvocation.state.get();
|
|
280
|
+
if (state.type !== IChatToolInvocation.StateKind.WaitingForConfirmation) {
|
|
281
|
+
return "";
|
|
282
|
+
}
|
|
283
|
+
const title = state.confirmationMessages?.title;
|
|
284
|
+
if (!title) {
|
|
285
|
+
return "";
|
|
286
|
+
}
|
|
287
|
+
return typeof title === "string" ? title : title.value;
|
|
249
288
|
}
|
|
250
289
|
_makeMarkdownPart(container, message, codeBlockRenderOptions) {
|
|
251
290
|
const part = this._register(this.instantiationService.createInstance(ChatMarkdownContentPart, {
|
|
252
|
-
kind:
|
|
253
|
-
content: typeof message ===
|
|
254
|
-
}, this.context, this.editorPool, false, this.codeBlockStartIndex, this.renderer, undefined, this.currentWidthDelegate(), this.codeBlockModelCollection, {
|
|
255
|
-
|
|
291
|
+
kind: "markdownContent",
|
|
292
|
+
content: typeof message === "string" ? ( new MarkdownString()).appendMarkdown(message) : message
|
|
293
|
+
}, this.context, this.editorPool, false, this.codeBlockStartIndex, this.renderer, undefined, this.currentWidthDelegate(), this.codeBlockModelCollection, {
|
|
294
|
+
codeBlockRenderOptions
|
|
295
|
+
}));
|
|
296
|
+
renderFileWidgets(
|
|
297
|
+
part.domNode,
|
|
298
|
+
this.instantiationService,
|
|
299
|
+
this.chatMarkdownAnchorService,
|
|
300
|
+
this._store
|
|
301
|
+
);
|
|
256
302
|
container.append(part.domNode);
|
|
257
|
-
this._register(part.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
|
|
258
303
|
return part;
|
|
259
304
|
}
|
|
260
305
|
};
|
|
261
|
-
ToolConfirmationSubPart = ( __decorate([
|
|
262
|
-
( __param(7, IInstantiationService)),
|
|
263
|
-
( __param(8, IKeybindingService)),
|
|
264
|
-
( __param(9, IModelService)),
|
|
265
|
-
( __param(10, ILanguageService)),
|
|
266
|
-
( __param(11, IContextKeyService)),
|
|
267
|
-
( __param(12, IChatWidgetService)),
|
|
268
|
-
( __param(13, ICommandService)),
|
|
269
|
-
( __param(14, IMarkerService)),
|
|
270
|
-
( __param(15, ILanguageModelToolsService)),
|
|
271
|
-
( __param(16, IChatMarkdownAnchorService)),
|
|
272
|
-
( __param(17, ILanguageModelToolsConfirmationService))
|
|
273
|
-
], ToolConfirmationSubPart));
|
|
306
|
+
ToolConfirmationSubPart = ( __decorate([( __param(7, IInstantiationService)), ( __param(8, IKeybindingService)), ( __param(9, IModelService)), ( __param(10, ILanguageService)), ( __param(11, IContextKeyService)), ( __param(12, IChatWidgetService)), ( __param(13, ICommandService)), ( __param(14, IMarkerService)), ( __param(15, ILanguageModelToolsService)), ( __param(16, IChatMarkdownAnchorService)), ( __param(17, ILanguageModelToolsConfirmationService))], ToolConfirmationSubPart));
|
|
274
307
|
|
|
275
308
|
export { ToolConfirmationSubPart };
|
|
@@ -20,13 +20,21 @@ export declare class ChatToolInvocationPart extends Disposable implements IChatC
|
|
|
20
20
|
private readonly codeBlockStartIndex;
|
|
21
21
|
private readonly instantiationService;
|
|
22
22
|
readonly domNode: HTMLElement;
|
|
23
|
-
private _onDidChangeHeight;
|
|
24
|
-
readonly onDidChangeHeight: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
25
23
|
get codeblocks(): IChatCodeBlockInfo[];
|
|
26
24
|
get codeblocksPartId(): string | undefined;
|
|
27
25
|
private subPart;
|
|
26
|
+
private mcpAppPart;
|
|
27
|
+
private readonly _onDidRemount;
|
|
28
28
|
constructor(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, context: IChatContentPartRenderContext, renderer: IMarkdownRenderer, listPool: CollapsibleListPool, editorPool: EditorPool, currentWidthDelegate: () => number, codeBlockModelCollection: CodeBlockModelCollection, announcedToolProgressKeys: Set<string> | undefined, codeBlockStartIndex: number, instantiationService: IInstantiationService);
|
|
29
29
|
private createToolInvocationSubPart;
|
|
30
|
+
/**
|
|
31
|
+
* Gets MCP App render data if this tool invocation has MCP App UI.
|
|
32
|
+
* Returns data from either:
|
|
33
|
+
* - toolSpecificData.mcpAppData (for in-progress tools)
|
|
34
|
+
* - result details mcpOutput (for completed tools)
|
|
35
|
+
*/
|
|
36
|
+
private getMcpAppRenderData;
|
|
37
|
+
onDidRemount(): void;
|
|
30
38
|
hasSameContent(other: IChatRendererContent, followingContent: IChatRendererContent[], element: ChatTreeItem): boolean;
|
|
31
39
|
addDisposable(disposable: IDisposable): void;
|
|
32
40
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { $, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
3
|
+
import { $, createElement, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
4
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
5
|
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
7
7
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
-
import { IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
8
|
+
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
9
9
|
import { ToolInvocationPresentation, isToolResultOutputDetails, isToolResultInputOutputDetails } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
10
10
|
import { ExtensionsInstallConfirmationWidgetSubPart } from './chatExtensionsInstallToolSubPart.js';
|
|
11
11
|
import { ChatInputOutputMarkdownProgressPart } from './chatInputOutputMarkdownProgressPart.js';
|
|
12
|
+
import { ChatMcpAppSubPart } from './chatMcpAppSubPart.js';
|
|
12
13
|
import { ChatResultListSubPart } from './chatResultListSubPart.js';
|
|
13
14
|
import { ChatTerminalToolConfirmationSubPart } from './chatTerminalToolConfirmationSubPart.js';
|
|
14
15
|
import { ChatTerminalToolProgressPart } from './chatTerminalToolProgressPart.js';
|
|
@@ -16,16 +17,33 @@ import { ToolConfirmationSubPart } from './chatToolConfirmationSubPart.js';
|
|
|
16
17
|
import { ChatToolOutputSubPart } from './chatToolOutputPart.js';
|
|
17
18
|
import { ChatToolPostExecuteConfirmationPart } from './chatToolPostExecuteConfirmationPart.js';
|
|
18
19
|
import { ChatToolProgressSubPart } from './chatToolProgressPart.js';
|
|
20
|
+
import { ChatToolStreamingSubPart } from './chatToolStreamingSubPart.js';
|
|
19
21
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
22
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
20
23
|
|
|
21
24
|
let ChatToolInvocationPart = class ChatToolInvocationPart extends Disposable {
|
|
22
25
|
get codeblocks() {
|
|
23
|
-
|
|
26
|
+
const codeblocks = this.subPart?.codeblocks ?? [];
|
|
27
|
+
if (this.mcpAppPart) {
|
|
28
|
+
codeblocks.push(...this.mcpAppPart.codeblocks);
|
|
29
|
+
}
|
|
30
|
+
return codeblocks;
|
|
24
31
|
}
|
|
25
32
|
get codeblocksPartId() {
|
|
26
33
|
return this.subPart?.codeblocksPartId;
|
|
27
34
|
}
|
|
28
|
-
constructor(
|
|
35
|
+
constructor(
|
|
36
|
+
toolInvocation,
|
|
37
|
+
context,
|
|
38
|
+
renderer,
|
|
39
|
+
listPool,
|
|
40
|
+
editorPool,
|
|
41
|
+
currentWidthDelegate,
|
|
42
|
+
codeBlockModelCollection,
|
|
43
|
+
announcedToolProgressKeys,
|
|
44
|
+
codeBlockStartIndex,
|
|
45
|
+
instantiationService
|
|
46
|
+
) {
|
|
29
47
|
super();
|
|
30
48
|
this.toolInvocation = toolInvocation;
|
|
31
49
|
this.context = context;
|
|
@@ -37,16 +55,12 @@ let ChatToolInvocationPart = class ChatToolInvocationPart extends Disposable {
|
|
|
37
55
|
this.announcedToolProgressKeys = announcedToolProgressKeys;
|
|
38
56
|
this.codeBlockStartIndex = codeBlockStartIndex;
|
|
39
57
|
this.instantiationService = instantiationService;
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
|
|
43
|
-
if (toolInvocation.fromSubAgent) {
|
|
44
|
-
this.domNode.classList.add('from-sub-agent');
|
|
45
|
-
}
|
|
46
|
-
if (toolInvocation.presentation === 'hidden') {
|
|
58
|
+
this._onDidRemount = this._register(( new Emitter()));
|
|
59
|
+
this.domNode = $(".chat-tool-invocation-part");
|
|
60
|
+
if (toolInvocation.presentation === "hidden") {
|
|
47
61
|
return;
|
|
48
62
|
}
|
|
49
|
-
if (toolInvocation.kind ===
|
|
63
|
+
if (toolInvocation.kind === "toolInvocation") {
|
|
50
64
|
const initialState = toolInvocation.state.get().type;
|
|
51
65
|
this._register(autorun(reader => {
|
|
52
66
|
if (toolInvocation.state.read(reader).type !== initialState) {
|
|
@@ -55,65 +69,180 @@ let ChatToolInvocationPart = class ChatToolInvocationPart extends Disposable {
|
|
|
55
69
|
}));
|
|
56
70
|
}
|
|
57
71
|
const partStore = this._register(( new DisposableStore()));
|
|
72
|
+
let subPartDomNode = createElement("div");
|
|
73
|
+
this.domNode.appendChild(subPartDomNode);
|
|
58
74
|
const render = () => {
|
|
59
|
-
clearNode(this.domNode);
|
|
60
75
|
partStore.clear();
|
|
61
76
|
if (toolInvocation.presentation === ToolInvocationPresentation.HiddenAfterComplete && IChatToolInvocation.isComplete(toolInvocation)) {
|
|
62
77
|
return;
|
|
63
78
|
}
|
|
64
79
|
this.subPart = partStore.add(this.createToolInvocationSubPart());
|
|
65
|
-
|
|
66
|
-
|
|
80
|
+
subPartDomNode.replaceWith(this.subPart.domNode);
|
|
81
|
+
subPartDomNode = this.subPart.domNode;
|
|
82
|
+
const isConfirmation = this.subPart instanceof ToolConfirmationSubPart || this.subPart instanceof ChatTerminalToolConfirmationSubPart || this.subPart instanceof ExtensionsInstallConfirmationWidgetSubPart || this.subPart instanceof ChatToolPostExecuteConfirmationPart;
|
|
83
|
+
this.domNode.classList.toggle("has-confirmation", isConfirmation);
|
|
67
84
|
partStore.add(this.subPart.onNeedsRerender(render));
|
|
68
|
-
this._onDidChangeHeight.fire();
|
|
69
85
|
};
|
|
86
|
+
const mcpAppRenderData = this.getMcpAppRenderData();
|
|
87
|
+
if (mcpAppRenderData) {
|
|
88
|
+
const shouldRender = derived(r => {
|
|
89
|
+
const outcome = IChatToolInvocation.executionConfirmedOrDenied(toolInvocation, r);
|
|
90
|
+
return !!outcome && outcome.type !== ToolConfirmKind.Denied && outcome.type !== ToolConfirmKind.Skipped;
|
|
91
|
+
});
|
|
92
|
+
let appDomNode = createElement("div");
|
|
93
|
+
this.domNode.appendChild(appDomNode);
|
|
94
|
+
this._register(autorun(r => {
|
|
95
|
+
if (shouldRender.read(r)) {
|
|
96
|
+
this.mcpAppPart = r.store.add(this.instantiationService.createInstance(
|
|
97
|
+
ChatMcpAppSubPart,
|
|
98
|
+
this.toolInvocation,
|
|
99
|
+
this._onDidRemount.event,
|
|
100
|
+
context,
|
|
101
|
+
mcpAppRenderData
|
|
102
|
+
));
|
|
103
|
+
appDomNode.replaceWith(this.mcpAppPart.domNode);
|
|
104
|
+
appDomNode = this.mcpAppPart.domNode;
|
|
105
|
+
} else {
|
|
106
|
+
this.mcpAppPart = undefined;
|
|
107
|
+
clearNode(appDomNode);
|
|
108
|
+
}
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
70
111
|
render();
|
|
71
112
|
}
|
|
72
113
|
createToolInvocationSubPart() {
|
|
73
|
-
if (this.toolInvocation.kind ===
|
|
74
|
-
if (this.toolInvocation.toolSpecificData?.kind ===
|
|
75
|
-
return this.instantiationService.createInstance(
|
|
114
|
+
if (this.toolInvocation.kind === "toolInvocation") {
|
|
115
|
+
if (this.toolInvocation.toolSpecificData?.kind === "extensions") {
|
|
116
|
+
return this.instantiationService.createInstance(
|
|
117
|
+
ExtensionsInstallConfirmationWidgetSubPart,
|
|
118
|
+
this.toolInvocation,
|
|
119
|
+
this.context
|
|
120
|
+
);
|
|
76
121
|
}
|
|
77
122
|
const state = this.toolInvocation.state.get();
|
|
123
|
+
if (state.type === IChatToolInvocation.StateKind.Streaming) {
|
|
124
|
+
return this.instantiationService.createInstance(ChatToolStreamingSubPart, this.toolInvocation, this.context, this.renderer);
|
|
125
|
+
}
|
|
78
126
|
if (state.type === IChatToolInvocation.StateKind.WaitingForConfirmation) {
|
|
79
|
-
if (this.toolInvocation.toolSpecificData?.kind ===
|
|
80
|
-
return this.instantiationService.createInstance(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
127
|
+
if (this.toolInvocation.toolSpecificData?.kind === "terminal") {
|
|
128
|
+
return this.instantiationService.createInstance(
|
|
129
|
+
ChatTerminalToolConfirmationSubPart,
|
|
130
|
+
this.toolInvocation,
|
|
131
|
+
this.toolInvocation.toolSpecificData,
|
|
132
|
+
this.context,
|
|
133
|
+
this.renderer,
|
|
134
|
+
this.editorPool,
|
|
135
|
+
this.currentWidthDelegate,
|
|
136
|
+
this.codeBlockModelCollection,
|
|
137
|
+
this.codeBlockStartIndex
|
|
138
|
+
);
|
|
139
|
+
} else {
|
|
140
|
+
return this.instantiationService.createInstance(
|
|
141
|
+
ToolConfirmationSubPart,
|
|
142
|
+
this.toolInvocation,
|
|
143
|
+
this.context,
|
|
144
|
+
this.renderer,
|
|
145
|
+
this.editorPool,
|
|
146
|
+
this.currentWidthDelegate,
|
|
147
|
+
this.codeBlockModelCollection,
|
|
148
|
+
this.codeBlockStartIndex
|
|
149
|
+
);
|
|
84
150
|
}
|
|
85
151
|
}
|
|
86
152
|
if (state.type === IChatToolInvocation.StateKind.WaitingForPostApproval) {
|
|
87
153
|
return this.instantiationService.createInstance(ChatToolPostExecuteConfirmationPart, this.toolInvocation, this.context);
|
|
88
154
|
}
|
|
89
155
|
}
|
|
90
|
-
if (this.toolInvocation.toolSpecificData?.kind ===
|
|
91
|
-
return this.instantiationService.createInstance(
|
|
156
|
+
if (this.toolInvocation.toolSpecificData?.kind === "terminal") {
|
|
157
|
+
return this.instantiationService.createInstance(
|
|
158
|
+
ChatTerminalToolProgressPart,
|
|
159
|
+
this.toolInvocation,
|
|
160
|
+
this.toolInvocation.toolSpecificData,
|
|
161
|
+
this.context,
|
|
162
|
+
this.renderer,
|
|
163
|
+
this.editorPool,
|
|
164
|
+
this.currentWidthDelegate,
|
|
165
|
+
this.codeBlockStartIndex,
|
|
166
|
+
this.codeBlockModelCollection
|
|
167
|
+
);
|
|
92
168
|
}
|
|
93
169
|
const resultDetails = IChatToolInvocation.resultDetails(this.toolInvocation);
|
|
94
170
|
if (Array.isArray(resultDetails) && resultDetails.length) {
|
|
95
|
-
return this.instantiationService.createInstance(
|
|
171
|
+
return this.instantiationService.createInstance(
|
|
172
|
+
ChatResultListSubPart,
|
|
173
|
+
this.toolInvocation,
|
|
174
|
+
this.context,
|
|
175
|
+
this.toolInvocation.pastTenseMessage ?? this.toolInvocation.invocationMessage,
|
|
176
|
+
resultDetails,
|
|
177
|
+
this.listPool
|
|
178
|
+
);
|
|
96
179
|
}
|
|
97
180
|
if (isToolResultOutputDetails(resultDetails)) {
|
|
98
|
-
return this.instantiationService.createInstance(
|
|
181
|
+
return this.instantiationService.createInstance(
|
|
182
|
+
ChatToolOutputSubPart,
|
|
183
|
+
this.toolInvocation,
|
|
184
|
+
this.context,
|
|
185
|
+
this._onDidRemount.event
|
|
186
|
+
);
|
|
99
187
|
}
|
|
100
188
|
if (isToolResultInputOutputDetails(resultDetails)) {
|
|
101
|
-
return this.instantiationService.createInstance(
|
|
189
|
+
return this.instantiationService.createInstance(
|
|
190
|
+
ChatInputOutputMarkdownProgressPart,
|
|
191
|
+
this.toolInvocation,
|
|
192
|
+
this.context,
|
|
193
|
+
this.codeBlockStartIndex,
|
|
194
|
+
this.toolInvocation.pastTenseMessage ?? this.toolInvocation.invocationMessage,
|
|
195
|
+
this.toolInvocation.originMessage,
|
|
196
|
+
resultDetails.input,
|
|
197
|
+
resultDetails.output,
|
|
198
|
+
!!resultDetails.isError
|
|
199
|
+
);
|
|
102
200
|
}
|
|
103
|
-
if (this.toolInvocation.kind ===
|
|
104
|
-
return this.instantiationService.createInstance(
|
|
201
|
+
if (this.toolInvocation.kind === "toolInvocation" && this.toolInvocation.toolSpecificData?.kind === "input" && !IChatToolInvocation.isComplete(this.toolInvocation)) {
|
|
202
|
+
return this.instantiationService.createInstance(
|
|
203
|
+
ChatInputOutputMarkdownProgressPart,
|
|
204
|
+
this.toolInvocation,
|
|
205
|
+
this.context,
|
|
206
|
+
this.codeBlockStartIndex,
|
|
207
|
+
this.toolInvocation.invocationMessage,
|
|
208
|
+
this.toolInvocation.originMessage,
|
|
209
|
+
typeof this.toolInvocation.toolSpecificData.rawInput === "string" ? this.toolInvocation.toolSpecificData.rawInput : JSON.stringify(this.toolInvocation.toolSpecificData.rawInput, null, 2),
|
|
210
|
+
undefined,
|
|
211
|
+
false
|
|
212
|
+
);
|
|
105
213
|
}
|
|
106
|
-
return this.instantiationService.createInstance(
|
|
214
|
+
return this.instantiationService.createInstance(
|
|
215
|
+
ChatToolProgressSubPart,
|
|
216
|
+
this.toolInvocation,
|
|
217
|
+
this.context,
|
|
218
|
+
this.renderer,
|
|
219
|
+
this.announcedToolProgressKeys
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
getMcpAppRenderData() {
|
|
223
|
+
const toolSpecificData = this.toolInvocation.toolSpecificData;
|
|
224
|
+
if (toolSpecificData?.kind === "input" && toolSpecificData.mcpAppData) {
|
|
225
|
+
const rawInput = typeof toolSpecificData.rawInput === "string" ? toolSpecificData.rawInput : JSON.stringify(toolSpecificData.rawInput, null, 2);
|
|
226
|
+
return {
|
|
227
|
+
resourceUri: toolSpecificData.mcpAppData.resourceUri,
|
|
228
|
+
serverDefinitionId: toolSpecificData.mcpAppData.serverDefinitionId,
|
|
229
|
+
collectionId: toolSpecificData.mcpAppData.collectionId,
|
|
230
|
+
input: rawInput,
|
|
231
|
+
sessionResource: this.context.element.sessionResource
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
return undefined;
|
|
235
|
+
}
|
|
236
|
+
onDidRemount() {
|
|
237
|
+
this._onDidRemount.fire();
|
|
107
238
|
}
|
|
108
239
|
hasSameContent(other, followingContent, element) {
|
|
109
|
-
return (other.kind ===
|
|
240
|
+
return (other.kind === "toolInvocation" || other.kind === "toolInvocationSerialized") && this.toolInvocation.toolCallId === other.toolCallId;
|
|
110
241
|
}
|
|
111
242
|
addDisposable(disposable) {
|
|
112
243
|
this._register(disposable);
|
|
113
244
|
}
|
|
114
245
|
};
|
|
115
|
-
ChatToolInvocationPart = ( __decorate([
|
|
116
|
-
( __param(9, IInstantiationService))
|
|
117
|
-
], ChatToolInvocationPart));
|
|
246
|
+
ChatToolInvocationPart = ( __decorate([( __param(9, IInstantiationService))], ChatToolInvocationPart));
|
|
118
247
|
|
|
119
248
|
export { ChatToolInvocationPart };
|
|
@@ -9,8 +9,6 @@ export declare abstract class BaseChatToolInvocationSubPart extends Disposable {
|
|
|
9
9
|
abstract readonly domNode: HTMLElement;
|
|
10
10
|
protected _onNeedsRerender: Emitter<void>;
|
|
11
11
|
readonly onNeedsRerender: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
12
|
-
protected _onDidChangeHeight: Emitter<void>;
|
|
13
|
-
readonly onDidChangeHeight: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
14
12
|
abstract codeblocks: IChatCodeBlockInfo[];
|
|
15
13
|
private readonly _codeBlocksPartId;
|
|
16
14
|
get codeblocksPartId(): string;
|