@codingame/monaco-vscode-katex-common 26.2.2 → 28.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 +10 -4
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +37 -11
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +3 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +15 -4
- package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +576 -0
- package/vscode/src/vs/{workbench/contrib → platform}/mcp/common/modelContextProtocolApps.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +176 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +127 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +106 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +105 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +69 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +35 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +187 -78
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +138 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +394 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +38 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +113 -116
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +30 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +250 -132
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +1 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -110
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +9 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +7 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +22 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +11 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +26 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +53 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +24 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +62 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +414 -129
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +19 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +98 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +11 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +252 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +29 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +246 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +39 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +36 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +3 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +6 -260
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +42 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +65 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatHookContentPart.css +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +356 -415
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +102 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +68 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/codeBlockPart.css +48 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +47 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +57 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +24 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +103 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +44 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +85 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +3 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +15 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +41 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +21 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +341 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +440 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +24 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +437 -241
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +77 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +521 -284
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +664 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +104 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +57 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +4 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +89 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +87 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +213 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +15 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +563 -140
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +35 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +26 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +26 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +145 -79
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +36 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +35 -15
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +127 -30
- 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 +20 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +6 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +96 -34
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +11 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +68 -27
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +125 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +8 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +54 -45
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +11 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +172 -112
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +2 -44
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +28 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +84 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +58 -41
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +1 -548
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +6 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +0 -187
|
@@ -13,7 +13,9 @@ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/in
|
|
|
13
13
|
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
14
14
|
import { isFalsyOrWhitespace } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
15
15
|
import { hasKey, isDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
16
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
16
17
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
18
|
+
import { IChatResponseResourceFileSystemProvider } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.service';
|
|
17
19
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
18
20
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
19
21
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
@@ -21,7 +23,7 @@ import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
21
23
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
22
24
|
import { McpToolCallUI } from '../../../../../mcp/browser/mcpToolCallUI.js';
|
|
23
25
|
import { McpResourceURI } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
|
|
24
|
-
import { McpApps } from '
|
|
26
|
+
import { McpApps } from '../../../../../../../platform/mcp/common/modelContextProtocolApps.js';
|
|
25
27
|
import { WebviewOriginStore, WebviewContentPurpose } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview';
|
|
26
28
|
import { IWebviewService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview.service';
|
|
27
29
|
import { IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
@@ -49,6 +51,7 @@ let ChatMcpAppModel = class ChatMcpAppModel extends Disposable {
|
|
|
49
51
|
_chatWidgetService,
|
|
50
52
|
_webviewService,
|
|
51
53
|
storageService,
|
|
54
|
+
_chatResponseResourceFsProvider,
|
|
52
55
|
_logService,
|
|
53
56
|
_productService,
|
|
54
57
|
_openerService
|
|
@@ -60,6 +63,7 @@ let ChatMcpAppModel = class ChatMcpAppModel extends Disposable {
|
|
|
60
63
|
this._instantiationService = _instantiationService;
|
|
61
64
|
this._chatWidgetService = _chatWidgetService;
|
|
62
65
|
this._webviewService = _webviewService;
|
|
66
|
+
this._chatResponseResourceFsProvider = _chatResponseResourceFsProvider;
|
|
63
67
|
this._logService = _logService;
|
|
64
68
|
this._productService = _productService;
|
|
65
69
|
this._openerService = _openerService;
|
|
@@ -72,13 +76,15 @@ let ChatMcpAppModel = class ChatMcpAppModel extends Disposable {
|
|
|
72
76
|
this.loadState = this._loadState;
|
|
73
77
|
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
74
78
|
this.onDidChangeHeight = this._onDidChangeHeight.event;
|
|
79
|
+
this._downloadParts = observableValue(this, []);
|
|
80
|
+
this.downloadParts = this._downloadParts;
|
|
75
81
|
this._originStore = ( new WebviewOriginStore(ORIGIN_STORE_KEY, storageService));
|
|
76
82
|
this._webviewOrigin = this._originStore.getOrigin("mcpApp", renderData.serverDefinitionId);
|
|
77
83
|
this._mcpToolCallUI = this._register(this._instantiationService.createInstance(McpToolCallUI, renderData));
|
|
78
84
|
this._height = ChatMcpAppModel_1.heightCache.get(this.toolInvocation) ?? 300;
|
|
79
85
|
this._webview = this._register(this._webviewService.createWebviewElement({
|
|
80
86
|
origin: this._webviewOrigin,
|
|
81
|
-
title: ( localize(
|
|
87
|
+
title: ( localize(6660, "MCP App")),
|
|
82
88
|
options: {
|
|
83
89
|
purpose: WebviewContentPurpose.ChatOutputItem,
|
|
84
90
|
enableFindWidget: false,
|
|
@@ -341,6 +347,9 @@ let ChatMcpAppModel = class ChatMcpAppModel extends Disposable {
|
|
|
341
347
|
case "ui/open-link":
|
|
342
348
|
result = await this._handleOpenLink(request.params);
|
|
343
349
|
break;
|
|
350
|
+
case "ui/download-file":
|
|
351
|
+
result = await this._handleDownloadFile(request.params);
|
|
352
|
+
break;
|
|
344
353
|
case "ui/request-display-mode":
|
|
345
354
|
result = {
|
|
346
355
|
mode: "inline"
|
|
@@ -441,7 +450,8 @@ let ChatMcpAppModel = class ChatMcpAppModel extends Disposable {
|
|
|
441
450
|
resourceLink: {},
|
|
442
451
|
resource: {},
|
|
443
452
|
structuredContent: {}
|
|
444
|
-
}
|
|
453
|
+
},
|
|
454
|
+
downloadFile: {}
|
|
445
455
|
},
|
|
446
456
|
hostContext: this.hostContext.get()
|
|
447
457
|
};
|
|
@@ -583,6 +593,49 @@ let ChatMcpAppModel = class ChatMcpAppModel extends Disposable {
|
|
|
583
593
|
const widget = this._chatWidgetService.getWidgetBySessionResource(this.renderData.sessionResource);
|
|
584
594
|
widget?.delegateScrollFromMouseWheelEvent(evt);
|
|
585
595
|
}
|
|
596
|
+
async _handleDownloadFile(params) {
|
|
597
|
+
const newParts = [];
|
|
598
|
+
let hadError = false;
|
|
599
|
+
for (const content of params.contents) {
|
|
600
|
+
try {
|
|
601
|
+
if (content.type === "resource") {
|
|
602
|
+
const resource = content.resource;
|
|
603
|
+
const parsed = ( URI.parse(resource.uri));
|
|
604
|
+
const data = hasKey(resource, {
|
|
605
|
+
text: true
|
|
606
|
+
}) ? ( new TextEncoder()).encode(resource.text) : {
|
|
607
|
+
base64: resource.blob
|
|
608
|
+
};
|
|
609
|
+
const uri = this._chatResponseResourceFsProvider.associate(this.renderData.sessionResource, data, basename(parsed));
|
|
610
|
+
newParts.push({
|
|
611
|
+
kind: "data",
|
|
612
|
+
mimeType: resource.mimeType,
|
|
613
|
+
uri
|
|
614
|
+
});
|
|
615
|
+
} else if (content.type === "resource_link") {
|
|
616
|
+
const mcpUri = McpResourceURI.fromServer({
|
|
617
|
+
id: this.renderData.serverDefinitionId,
|
|
618
|
+
label: ""
|
|
619
|
+
}, content.uri);
|
|
620
|
+
newParts.push({
|
|
621
|
+
kind: "data",
|
|
622
|
+
mimeType: content.mimeType,
|
|
623
|
+
uri: mcpUri
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
} catch (error) {
|
|
627
|
+
hadError = true;
|
|
628
|
+
this._logService.warn("[MCP App] Failed to process ui/download-file content", error);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
if (newParts.length > 0) {
|
|
632
|
+
const existing = this._downloadParts.get();
|
|
633
|
+
this._downloadParts.set([...existing, ...newParts], undefined);
|
|
634
|
+
}
|
|
635
|
+
return hadError ? {
|
|
636
|
+
isError: true
|
|
637
|
+
} : {};
|
|
638
|
+
}
|
|
586
639
|
async _handleOpenLink(params) {
|
|
587
640
|
const ok = await this._openerService.open(params.url);
|
|
588
641
|
return {
|
|
@@ -629,6 +682,6 @@ let ChatMcpAppModel = class ChatMcpAppModel extends Disposable {
|
|
|
629
682
|
super.dispose();
|
|
630
683
|
}
|
|
631
684
|
};
|
|
632
|
-
ChatMcpAppModel = ChatMcpAppModel_1 = ( __decorate([( __param(5, IInstantiationService)), ( __param(6, IChatWidgetService)), ( __param(7, IWebviewService)), ( __param(8, IStorageService)), ( __param(9,
|
|
685
|
+
ChatMcpAppModel = ChatMcpAppModel_1 = ( __decorate([( __param(5, IInstantiationService)), ( __param(6, IChatWidgetService)), ( __param(7, IWebviewService)), ( __param(8, IStorageService)), ( __param(9, IChatResponseResourceFileSystemProvider)), ( __param(10, ILogService)), ( __param(11, IProductService)), ( __param(12, IOpenerService))], ChatMcpAppModel));
|
|
633
686
|
|
|
634
687
|
export { ChatMcpAppModel };
|
|
@@ -4,7 +4,7 @@ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
4
4
|
import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
|
|
5
5
|
import { IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
6
6
|
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
7
|
-
import { IChatContentPartRenderContext } from "
|
|
7
|
+
import { IChatContentPartRenderContext } from "../chatContentParts.js";
|
|
8
8
|
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
9
9
|
/**
|
|
10
10
|
* Data needed to render an MCP App, available before tool completion.
|
|
@@ -39,6 +39,10 @@ export declare class ChatMcpAppSubPart extends BaseChatToolInvocationSubPart {
|
|
|
39
39
|
private readonly _progressPart;
|
|
40
40
|
/** Current error node */
|
|
41
41
|
private _errorNode;
|
|
42
|
+
/** Container for download resource pills */
|
|
43
|
+
private readonly _downloadContainer;
|
|
44
|
+
/** Current resource group widget for downloads */
|
|
45
|
+
private readonly _downloadWidget;
|
|
42
46
|
constructor(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, onDidRemount: Event<void>, context: IChatContentPartRenderContext, _renderData: IMcpAppRenderData, _instantiationService: IInstantiationService, _markdownRendererService: IMarkdownRendererService);
|
|
43
47
|
private _handleLoadStateChange;
|
|
44
48
|
private _updateContainerHeight;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { $, getWindow, addDisposableListener, append } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
3
|
+
import { $, getWindow, addDisposableListener, clearNode, append } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
4
|
import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
5
5
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
6
6
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
@@ -14,6 +14,7 @@ import { defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
14
14
|
import { ChatErrorLevel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
15
15
|
import { ChatErrorWidget } from '../chatErrorContentPart.js';
|
|
16
16
|
import { ChatProgressSubPart } from '../chatProgressContentPart.js';
|
|
17
|
+
import { ChatResourceGroupWidget } from '../chatResourceGroupWidget.js';
|
|
17
18
|
import { ChatMcpAppModel } from './chatMcpAppModel.js';
|
|
18
19
|
import { BaseChatToolInvocationSubPart } from './chatToolInvocationSubPart.js';
|
|
19
20
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
@@ -35,12 +36,15 @@ let ChatMcpAppSubPart = class ChatMcpAppSubPart extends BaseChatToolInvocationSu
|
|
|
35
36
|
this._markdownRendererService = _markdownRendererService;
|
|
36
37
|
this.codeblocks = [];
|
|
37
38
|
this._progressPart = this._register(( new MutableDisposable()));
|
|
39
|
+
this._downloadWidget = this._register(( new MutableDisposable()));
|
|
38
40
|
this.domNode = $("div.mcp-app-part");
|
|
39
41
|
this._webviewContainer = $("div.mcp-app-webview");
|
|
40
42
|
this._webviewContainer.style.maxHeight = `${maxWebviewHeightPct * 100}vh`;
|
|
41
43
|
this._webviewContainer.style.minHeight = "100px";
|
|
42
44
|
this._webviewContainer.style.height = "300px";
|
|
43
45
|
this.domNode.appendChild(this._webviewContainer);
|
|
46
|
+
this._downloadContainer = $("div.mcp-app-downloads");
|
|
47
|
+
this.domNode.appendChild(this._downloadContainer);
|
|
44
48
|
const targetWindow = getWindow(this.domNode);
|
|
45
49
|
const getMaxHeight = () => maxWebviewHeightPct * targetWindow.innerHeight;
|
|
46
50
|
const maxHeight = observableValue("mcpAppMaxHeight", getMaxHeight());
|
|
@@ -61,6 +65,18 @@ let ChatMcpAppSubPart = class ChatMcpAppSubPart extends BaseChatToolInvocationSu
|
|
|
61
65
|
this._register(this._model.onDidChangeHeight(() => {
|
|
62
66
|
this._updateContainerHeight();
|
|
63
67
|
}));
|
|
68
|
+
this._register(autorun(reader => {
|
|
69
|
+
const parts = this._model.downloadParts.read(reader);
|
|
70
|
+
if (parts.length === 0) {
|
|
71
|
+
this._downloadWidget.clear();
|
|
72
|
+
clearNode(this._downloadContainer);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
clearNode(this._downloadContainer);
|
|
76
|
+
const widget = this._instantiationService.createInstance(ChatResourceGroupWidget, parts);
|
|
77
|
+
this._downloadWidget.value = widget;
|
|
78
|
+
this._downloadContainer.appendChild(widget.domNode);
|
|
79
|
+
}));
|
|
64
80
|
this._register(onDidRemount(() => {
|
|
65
81
|
this._model.remount();
|
|
66
82
|
}));
|
|
@@ -84,7 +100,7 @@ let ChatMcpAppSubPart = class ChatMcpAppSubPart extends BaseChatToolInvocationSu
|
|
|
84
100
|
{
|
|
85
101
|
container.style.display = "none";
|
|
86
102
|
const progressMessage = $("span");
|
|
87
|
-
progressMessage.textContent = ( localize(
|
|
103
|
+
progressMessage.textContent = ( localize(6661, "Loading MCP App..."));
|
|
88
104
|
const progressPart = this._instantiationService.createInstance(
|
|
89
105
|
ChatProgressSubPart,
|
|
90
106
|
progressMessage,
|
|
@@ -114,15 +130,15 @@ let ChatMcpAppSubPart = class ChatMcpAppSubPart extends BaseChatToolInvocationSu
|
|
|
114
130
|
_showError(container, error) {
|
|
115
131
|
const errorNode = $(".mcp-app-error");
|
|
116
132
|
const errorMessage = ( new MarkdownString());
|
|
117
|
-
errorMessage.appendText(( localize(
|
|
118
|
-
const errorWidget = ( new ChatErrorWidget(ChatErrorLevel.Error, errorMessage, this._markdownRendererService));
|
|
133
|
+
errorMessage.appendText(( localize(6662, "Error loading MCP App: {0}", error.message || String(error))));
|
|
134
|
+
const errorWidget = this._register(( new ChatErrorWidget(ChatErrorLevel.Error, errorMessage, this._markdownRendererService)));
|
|
119
135
|
errorNode.appendChild(errorWidget.domNode);
|
|
120
136
|
const buttonContainer = append(errorNode, $(".chat-buttons-container"));
|
|
121
|
-
const retryButton = ( new Button(buttonContainer, defaultButtonStyles));
|
|
122
|
-
retryButton.label = ( localize(
|
|
123
|
-
retryButton.onDidClick(() => {
|
|
137
|
+
const retryButton = this._register(( new Button(buttonContainer, defaultButtonStyles)));
|
|
138
|
+
retryButton.label = ( localize(6663, "Retry"));
|
|
139
|
+
this._register(retryButton.onDidClick(() => {
|
|
124
140
|
this._model.retry();
|
|
125
|
-
});
|
|
141
|
+
}));
|
|
126
142
|
container.appendChild(errorNode);
|
|
127
143
|
this._errorNode = errorNode;
|
|
128
144
|
}
|
|
@@ -4,7 +4,7 @@ import { Location } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/l
|
|
|
4
4
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
5
|
import { IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
6
6
|
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
7
|
-
import { IChatContentPartRenderContext } from "
|
|
7
|
+
import { IChatContentPartRenderContext } from "../chatContentParts.js";
|
|
8
8
|
import { CollapsibleListPool } from "../chatReferencesContentPart.js";
|
|
9
9
|
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
10
10
|
export declare class ChatResultListSubPart extends BaseChatToolInvocationSubPart {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
2
|
+
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
3
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
4
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { IChatSimpleToolInvocationData, IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
7
|
+
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
8
|
+
import { IChatContentPartRenderContext } from "../chatContentParts.js";
|
|
9
|
+
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
10
|
+
export declare class ChatSimpleToolProgressPart extends BaseChatToolInvocationSubPart {
|
|
11
|
+
/** Remembers expanded tool parts on re-render */
|
|
12
|
+
private static readonly _expandedByDefault;
|
|
13
|
+
readonly domNode: HTMLElement;
|
|
14
|
+
private readonly collapsibleListPart;
|
|
15
|
+
get codeblocks(): IChatCodeBlockInfo[];
|
|
16
|
+
constructor(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, context: IChatContentPartRenderContext, codeBlockStartIndex: number, message: string | IMarkdownString, subtitle: string | IMarkdownString | undefined, data: IChatSimpleToolInvocationData, isError: boolean, instantiationService: IInstantiationService, modelService: IModelService, languageService: ILanguageService, configurationService: IConfigurationService);
|
|
17
|
+
private getAutoApprovalMessageContent;
|
|
18
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { ProgressBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/progressbar/progressbar';
|
|
4
|
+
import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
5
|
+
import { toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
7
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
8
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
9
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
10
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
12
|
+
import { IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
13
|
+
import { ChatCollapsibleInputOutputContentPart } from '../chatToolInputOutputContentPart.js';
|
|
14
|
+
import { BaseChatToolInvocationSubPart } from './chatToolInvocationSubPart.js';
|
|
15
|
+
import { getToolApprovalMessage } from './chatToolPartUtilities.js';
|
|
16
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
17
|
+
|
|
18
|
+
var ChatSimpleToolProgressPart_1;
|
|
19
|
+
let ChatSimpleToolProgressPart = class ChatSimpleToolProgressPart extends BaseChatToolInvocationSubPart {
|
|
20
|
+
static {
|
|
21
|
+
ChatSimpleToolProgressPart_1 = this;
|
|
22
|
+
}
|
|
23
|
+
static {
|
|
24
|
+
this._expandedByDefault = ( new WeakMap());
|
|
25
|
+
}
|
|
26
|
+
get codeblocks() {
|
|
27
|
+
return this.collapsibleListPart.codeblocks;
|
|
28
|
+
}
|
|
29
|
+
constructor(
|
|
30
|
+
toolInvocation,
|
|
31
|
+
context,
|
|
32
|
+
codeBlockStartIndex,
|
|
33
|
+
message,
|
|
34
|
+
subtitle,
|
|
35
|
+
data,
|
|
36
|
+
isError,
|
|
37
|
+
instantiationService,
|
|
38
|
+
modelService,
|
|
39
|
+
languageService,
|
|
40
|
+
configurationService
|
|
41
|
+
) {
|
|
42
|
+
super(toolInvocation);
|
|
43
|
+
let codeBlockIndex = codeBlockStartIndex;
|
|
44
|
+
const createIOPart = (content, label) => {
|
|
45
|
+
return {
|
|
46
|
+
kind: "code",
|
|
47
|
+
data: content,
|
|
48
|
+
languageId: "plaintext",
|
|
49
|
+
codeBlockIndex: codeBlockIndex++,
|
|
50
|
+
ownerMarkdownPartId: this.codeblocksPartId,
|
|
51
|
+
options: {
|
|
52
|
+
hideToolbar: true,
|
|
53
|
+
reserveWidth: 19,
|
|
54
|
+
maxHeightInLines: 13,
|
|
55
|
+
verticalPadding: 5,
|
|
56
|
+
editorOptions: {
|
|
57
|
+
wordWrap: "on"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
const inputPart = createIOPart(data.input);
|
|
63
|
+
const outputParts = data.output ? [createIOPart(data.output)] : undefined;
|
|
64
|
+
const collapsibleListPart = this.collapsibleListPart = this._register(instantiationService.createInstance(
|
|
65
|
+
ChatCollapsibleInputOutputContentPart,
|
|
66
|
+
message,
|
|
67
|
+
subtitle,
|
|
68
|
+
this.getAutoApprovalMessageContent(),
|
|
69
|
+
context,
|
|
70
|
+
inputPart,
|
|
71
|
+
outputParts ? {
|
|
72
|
+
parts: outputParts
|
|
73
|
+
} : undefined,
|
|
74
|
+
isError,
|
|
75
|
+
(isError && configurationService.getValue(ChatConfiguration.AutoExpandToolFailures)) || (ChatSimpleToolProgressPart_1._expandedByDefault.get(toolInvocation) ?? false)
|
|
76
|
+
));
|
|
77
|
+
this._register(toDisposable(
|
|
78
|
+
() => ChatSimpleToolProgressPart_1._expandedByDefault.set(toolInvocation, collapsibleListPart.expanded)
|
|
79
|
+
));
|
|
80
|
+
const progressObservable = toolInvocation.kind === "toolInvocation" ? ( toolInvocation.state.map(
|
|
81
|
+
(s, r) => s.type === IChatToolInvocation.StateKind.Executing ? s.progress.read(r) : undefined
|
|
82
|
+
)) : undefined;
|
|
83
|
+
const progressBar = ( new Lazy(() => this._register(( new ProgressBar(collapsibleListPart.domNode)))));
|
|
84
|
+
if (progressObservable) {
|
|
85
|
+
this._register(autorun(reader => {
|
|
86
|
+
const progress = progressObservable?.read(reader);
|
|
87
|
+
if (progress?.message) {
|
|
88
|
+
collapsibleListPart.title = progress.message;
|
|
89
|
+
}
|
|
90
|
+
if (progress?.progress && !IChatToolInvocation.isComplete(toolInvocation, reader)) {
|
|
91
|
+
progressBar.value.setWorked(progress.progress * 100);
|
|
92
|
+
}
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
this.domNode = collapsibleListPart.domNode;
|
|
96
|
+
}
|
|
97
|
+
getAutoApprovalMessageContent() {
|
|
98
|
+
return getToolApprovalMessage(this.toolInvocation);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
ChatSimpleToolProgressPart = ChatSimpleToolProgressPart_1 = ( __decorate([( __param(7, IInstantiationService)), ( __param(8, IModelService)), ( __param(9, ILanguageService)), ( __param(10, IConfigurationService))], ChatSimpleToolProgressPart));
|
|
102
|
+
|
|
103
|
+
export { ChatSimpleToolProgressPart };
|
|
@@ -16,7 +16,7 @@ import type { CodeBlockModelCollection } from "../../../../common/widget/codeBlo
|
|
|
16
16
|
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
17
17
|
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
18
18
|
import { EditorPool } from "../chatContentCodePools.js";
|
|
19
|
-
import { IChatContentPartRenderContext } from "
|
|
19
|
+
import { IChatContentPartRenderContext } from "../chatContentParts.js";
|
|
20
20
|
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
21
21
|
export declare enum TerminalToolConfirmationStorageKeys {
|
|
22
22
|
TerminalAutoApproveWarningAccepted = "chat.tools.terminal.autoApprove.warningAccepted"
|
|
@@ -113,7 +113,7 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
113
113
|
moreActions = [];
|
|
114
114
|
if (!autoApproveWarningAccepted) {
|
|
115
115
|
moreActions.push({
|
|
116
|
-
label: ( localize(
|
|
116
|
+
label: ( localize(6664, "Enable Auto Approve...")),
|
|
117
117
|
data: {
|
|
118
118
|
type: "enable"
|
|
119
119
|
}
|
|
@@ -175,9 +175,6 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
175
175
|
uriPromise: Promise.resolve(model.uri),
|
|
176
176
|
chatSessionResource: this.context.element.sessionResource
|
|
177
177
|
});
|
|
178
|
-
this._register(editor.object.onDidChangeContentHeight(() => {
|
|
179
|
-
editor.object.layout(this.currentWidthDelegate());
|
|
180
|
-
}));
|
|
181
178
|
this._register(model.onDidChangeContent(e => {
|
|
182
179
|
const currentValue = model.getValue();
|
|
183
180
|
if (currentValue !== initialContent) {
|
|
@@ -322,7 +319,7 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
322
319
|
}
|
|
323
320
|
const target = scope === "workspace" ? ConfigurationTarget.WORKSPACE : ConfigurationTarget.USER;
|
|
324
321
|
const settingsUri = createCommandUri(TerminalContribCommandId.OpenTerminalSettingsLink, target);
|
|
325
|
-
return `[\`${e.key}\`](${( settingsUri.toString())} "${( localize(
|
|
322
|
+
return `[\`${e.key}\`](${( settingsUri.toString())} "${( localize(6665, "View rule in settings"))}")`;
|
|
326
323
|
})).join(", ");
|
|
327
324
|
}
|
|
328
325
|
const mdTrustSettings = {
|
|
@@ -333,33 +330,33 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
333
330
|
const parts = [];
|
|
334
331
|
if (sessionRules.length > 0) {
|
|
335
332
|
parts.push(sessionRules.length === 1 ? ( localize(
|
|
336
|
-
|
|
333
|
+
6666,
|
|
337
334
|
"Session auto approve rule {0} added",
|
|
338
335
|
formatRuleLinks(sessionRules, "session")
|
|
339
336
|
)) : ( localize(
|
|
340
|
-
|
|
337
|
+
6667,
|
|
341
338
|
"Session auto approve rules {0} added",
|
|
342
339
|
formatRuleLinks(sessionRules, "session")
|
|
343
340
|
)));
|
|
344
341
|
}
|
|
345
342
|
if (workspaceRules.length > 0) {
|
|
346
343
|
parts.push(workspaceRules.length === 1 ? ( localize(
|
|
347
|
-
|
|
344
|
+
6668,
|
|
348
345
|
"Workspace auto approve rule {0} added",
|
|
349
346
|
formatRuleLinks(workspaceRules, "workspace")
|
|
350
347
|
)) : ( localize(
|
|
351
|
-
|
|
348
|
+
6669,
|
|
352
349
|
"Workspace auto approve rules {0} added",
|
|
353
350
|
formatRuleLinks(workspaceRules, "workspace")
|
|
354
351
|
)));
|
|
355
352
|
}
|
|
356
353
|
if (userRules.length > 0) {
|
|
357
354
|
parts.push(userRules.length === 1 ? ( localize(
|
|
358
|
-
|
|
355
|
+
6670,
|
|
359
356
|
"User auto approve rule {0} added",
|
|
360
357
|
formatRuleLinks(userRules, "user")
|
|
361
358
|
)) : ( localize(
|
|
362
|
-
|
|
359
|
+
6671,
|
|
363
360
|
"User auto approve rules {0} added",
|
|
364
361
|
formatRuleLinks(userRules, "user")
|
|
365
362
|
)));
|
|
@@ -389,7 +386,7 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
389
386
|
enabledCommands: [TerminalContribCommandId.DisableSessionAutoApproval]
|
|
390
387
|
}
|
|
391
388
|
};
|
|
392
|
-
terminalData.autoApproveInfo = ( new MarkdownString(`${( localize(
|
|
389
|
+
terminalData.autoApproveInfo = ( new MarkdownString(`${( localize(6672, "All commands will be auto approved for this session"))} ([${( localize(6673, "Disable"))}](${( disableUri.toString())}))`, mdTrustSettings));
|
|
393
390
|
toolConfirmKind = ToolConfirmKind.UserAction;
|
|
394
391
|
break;
|
|
395
392
|
}
|
|
@@ -413,11 +410,11 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
413
410
|
};
|
|
414
411
|
};
|
|
415
412
|
return [{
|
|
416
|
-
...getLabelAndTooltip(( localize(
|
|
413
|
+
...getLabelAndTooltip(( localize(6674, "Allow")), AcceptToolConfirmationActionId),
|
|
417
414
|
data: true,
|
|
418
415
|
moreActions
|
|
419
416
|
}, {
|
|
420
|
-
...getLabelAndTooltip(( localize(
|
|
417
|
+
...getLabelAndTooltip(( localize(6675, "Skip")), SkipToolConfirmationActionId, ( localize(6676, "Proceed without executing this command"))),
|
|
421
418
|
data: {
|
|
422
419
|
type: "skip"
|
|
423
420
|
},
|
|
@@ -427,9 +424,9 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
427
424
|
async _showAutoApproveWarning() {
|
|
428
425
|
const promptResult = await this.dialogService.prompt({
|
|
429
426
|
type: Severity.Info,
|
|
430
|
-
message: ( localize(
|
|
427
|
+
message: ( localize(6677, "Enable terminal auto approve?")),
|
|
431
428
|
buttons: [{
|
|
432
|
-
label: ( localize(
|
|
429
|
+
label: ( localize(6678, "Enable")),
|
|
433
430
|
run: () => true
|
|
434
431
|
}],
|
|
435
432
|
cancelButton: true,
|
|
@@ -437,11 +434,11 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
437
434
|
icon: Codicon.shield,
|
|
438
435
|
markdownDetails: [{
|
|
439
436
|
markdown: ( new MarkdownString(( localize(
|
|
440
|
-
|
|
437
|
+
6679,
|
|
441
438
|
"This will enable a configurable subset of commands to run in the terminal autonomously. It provides *best effort protections* and assumes the agent is not acting maliciously."
|
|
442
439
|
))))
|
|
443
440
|
}, {
|
|
444
|
-
markdown: ( new MarkdownString(`[${( localize(
|
|
441
|
+
markdown: ( new MarkdownString(`[${( localize(6680, "Learn more about the potential risks and how to avoid them."))}](https://code.visualstudio.com/docs/copilot/security#_security-considerations)`))
|
|
445
442
|
}]
|
|
446
443
|
}
|
|
447
444
|
});
|
|
@@ -4,7 +4,7 @@ import { IChatToolInvocation, IChatToolInvocationSerialized, type IChatTerminalT
|
|
|
4
4
|
import { CodeBlockModelCollection } from "../../../../common/widget/codeBlockModelCollection.js";
|
|
5
5
|
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
6
6
|
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
7
|
-
import { IChatContentPartRenderContext } from "
|
|
7
|
+
import { IChatContentPartRenderContext } from "../chatContentParts.js";
|
|
8
8
|
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
9
9
|
import { Action, IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
10
10
|
import { IChatTerminalToolProgressPart, ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
@@ -19,6 +19,25 @@ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
19
19
|
import { EditorPool } from "../chatContentCodePools.js";
|
|
20
20
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
21
21
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
22
|
+
/**
|
|
23
|
+
* A chat content part that displays terminal tool invocation progress.
|
|
24
|
+
*
|
|
25
|
+
* This component shows:
|
|
26
|
+
* - The command being executed with syntax highlighting
|
|
27
|
+
* - A status decoration indicating success/failure/running state
|
|
28
|
+
* - Expandable terminal output with live streaming support
|
|
29
|
+
* - Actions to focus the terminal, show/hide output, and continue in background
|
|
30
|
+
*
|
|
31
|
+
* The component supports two rendering modes:
|
|
32
|
+
* - Standard mode: Shows full progress with status indicators
|
|
33
|
+
* - Collapsible wrapper mode: For thinking containers with simplified UI
|
|
34
|
+
*
|
|
35
|
+
* Output auto-expansion behavior:
|
|
36
|
+
* - Long-running commands with output auto-expand after a short delay
|
|
37
|
+
* - Fast commands that complete quickly don't auto-expand (prevents flickering)
|
|
38
|
+
* - Failed commands can be configured to auto-expand via settings
|
|
39
|
+
* - Successful commands auto-collapse if output was auto-expanded
|
|
40
|
+
*/
|
|
22
41
|
export declare class ChatTerminalToolProgressPart extends BaseChatToolInvocationSubPart implements IChatTerminalToolProgressPart {
|
|
23
42
|
private readonly _instantiationService;
|
|
24
43
|
private readonly _terminalChatService;
|
|
@@ -49,6 +68,7 @@ export declare class ChatTerminalToolProgressPart extends BaseChatToolInvocation
|
|
|
49
68
|
private readonly _decoration;
|
|
50
69
|
private _userToggledOutput;
|
|
51
70
|
private _isInThinkingContainer;
|
|
71
|
+
private _usesCollapsibleWrapper;
|
|
52
72
|
private _thinkingCollapsibleWrapper;
|
|
53
73
|
private markdownPart;
|
|
54
74
|
get codeblocks(): IChatCodeBlockInfo[];
|
|
@@ -63,9 +83,32 @@ export declare class ChatTerminalToolProgressPart extends BaseChatToolInvocation
|
|
|
63
83
|
private _getResolvedCommand;
|
|
64
84
|
private _ensureShowOutputAction;
|
|
65
85
|
private _clearCommandAssociation;
|
|
86
|
+
/**
|
|
87
|
+
* Determines whether the terminal output should auto-expand.
|
|
88
|
+
* Returns false if already expanded, user has manually toggled, component is disposed,
|
|
89
|
+
* or if the invocation was previously expanded (to preserve state across re-renders).
|
|
90
|
+
*/
|
|
91
|
+
private _shouldAutoExpand;
|
|
92
|
+
/**
|
|
93
|
+
* Registers event listeners on the terminal instance to track command execution,
|
|
94
|
+
* manage auto-expansion of output, and handle command completion.
|
|
95
|
+
*
|
|
96
|
+
* This method sets up:
|
|
97
|
+
* - Command detection listeners for tracking command lifecycle
|
|
98
|
+
* - Auto-expand logic based on command output and duration
|
|
99
|
+
* - Instance disposal handling to clean up actions and state
|
|
100
|
+
*/
|
|
66
101
|
private _registerInstanceListener;
|
|
67
102
|
private _removeFocusAction;
|
|
68
103
|
private _removeContinueInBackgroundAction;
|
|
104
|
+
/**
|
|
105
|
+
* Handles the completion of a terminal command by updating the UI state.
|
|
106
|
+
* This includes marking the collapsible wrapper as complete, auto-collapsing
|
|
107
|
+
* successful commands, and keeping failed commands expanded.
|
|
108
|
+
*
|
|
109
|
+
* @param resolvedCommand The completed terminal command with exit code information.
|
|
110
|
+
*/
|
|
111
|
+
private _handleCommandCompletion;
|
|
69
112
|
private _toggleOutput;
|
|
70
113
|
private _ensureTerminalInstance;
|
|
71
114
|
private _handleOutputFocus;
|