@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
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
|
|
4
|
+
import { Disposable, DisposableResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
|
+
import { migrateLegacyTerminalToolSpecificData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
7
|
+
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
8
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
9
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
10
|
+
import { autorunIterableDelta, autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
11
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
12
|
+
|
|
13
|
+
let AgentSessionApprovalModel = class AgentSessionApprovalModel extends Disposable {
|
|
14
|
+
constructor(_chatService, _languageService) {
|
|
15
|
+
super();
|
|
16
|
+
this._chatService = _chatService;
|
|
17
|
+
this._languageService = _languageService;
|
|
18
|
+
this._approvals = ( new Map());
|
|
19
|
+
this._modelTrackers = this._register(( new DisposableResourceMap()));
|
|
20
|
+
this._register(
|
|
21
|
+
autorunIterableDelta(reader => this._chatService.chatModels.read(reader), (
|
|
22
|
+
{
|
|
23
|
+
addedValues,
|
|
24
|
+
removedValues
|
|
25
|
+
}
|
|
26
|
+
) => {
|
|
27
|
+
for (const model of addedValues) {
|
|
28
|
+
this._modelTrackers.set(model.sessionResource, this._trackModel(model));
|
|
29
|
+
}
|
|
30
|
+
for (const model of removedValues) {
|
|
31
|
+
this._modelTrackers.deleteAndDispose(model.sessionResource);
|
|
32
|
+
this._approvals.get(( model.sessionResource.toString()))?.set(undefined, undefined);
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
getApproval(sessionResource) {
|
|
38
|
+
return this._getOrCreateApproval(( sessionResource.toString()));
|
|
39
|
+
}
|
|
40
|
+
_getOrCreateApproval(key) {
|
|
41
|
+
let obs = this._approvals.get(key);
|
|
42
|
+
if (!obs) {
|
|
43
|
+
obs = observableValue(`sessionApproval.${key}`, undefined);
|
|
44
|
+
this._approvals.set(key, obs);
|
|
45
|
+
}
|
|
46
|
+
return obs;
|
|
47
|
+
}
|
|
48
|
+
_trackModel(model) {
|
|
49
|
+
const settable = this._getOrCreateApproval(( model.sessionResource.toString()));
|
|
50
|
+
const setIfChanged = value => {
|
|
51
|
+
const current = settable.get();
|
|
52
|
+
if (current === value) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (current !== undefined && value !== undefined && current.label === value.label && current.languageId === value.languageId) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
settable.set(value, undefined);
|
|
59
|
+
};
|
|
60
|
+
return autorun(reader => {
|
|
61
|
+
const needsInput = model.requestNeedsInput.read(reader);
|
|
62
|
+
if (!needsInput) {
|
|
63
|
+
setIfChanged(undefined);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const lastResponse = model.lastRequest?.response;
|
|
67
|
+
if (!lastResponse?.response?.value) {
|
|
68
|
+
setIfChanged(undefined);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
for (const part of lastResponse.response.value) {
|
|
72
|
+
if (part.kind !== "toolInvocation") {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const state = part.state.read(reader);
|
|
76
|
+
if (state.type === IChatToolInvocation.StateKind.WaitingForConfirmation || state.type === IChatToolInvocation.StateKind.WaitingForPostApproval) {
|
|
77
|
+
let label;
|
|
78
|
+
let languageId;
|
|
79
|
+
if (part.toolSpecificData?.kind === "terminal") {
|
|
80
|
+
const terminalData = migrateLegacyTerminalToolSpecificData(part.toolSpecificData);
|
|
81
|
+
label = terminalData.presentationOverrides?.commandLine ?? terminalData.commandLine.forDisplay ?? terminalData.commandLine.userEdited ?? terminalData.commandLine.toolEdited ?? terminalData.commandLine.original;
|
|
82
|
+
languageId = this._languageService.getLanguageIdByLanguageName(terminalData.presentationOverrides?.language ?? terminalData.language) ?? undefined;
|
|
83
|
+
} else if (needsInput.detail) {
|
|
84
|
+
label = needsInput.detail;
|
|
85
|
+
} else {
|
|
86
|
+
const msg = part.invocationMessage;
|
|
87
|
+
label = typeof msg === "string" ? msg : renderAsPlaintext(msg);
|
|
88
|
+
}
|
|
89
|
+
const confirmState = state;
|
|
90
|
+
setIfChanged({
|
|
91
|
+
label,
|
|
92
|
+
languageId,
|
|
93
|
+
confirm: () => confirmState.confirm({
|
|
94
|
+
type: ToolConfirmKind.UserAction
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
setIfChanged(undefined);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
AgentSessionApprovalModel = ( __decorate([( __param(0, IChatService)), ( __param(1, ILanguageService))], AgentSessionApprovalModel));
|
|
105
|
+
|
|
106
|
+
export { AgentSessionApprovalModel };
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js
CHANGED
|
@@ -57,7 +57,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
async loadModel() {
|
|
60
|
-
const modelRef = await this.chatService.
|
|
60
|
+
const modelRef = await this.chatService.acquireOrLoadSession(this.session.resource, ChatAgentLocation.Chat, this.cts.token);
|
|
61
61
|
if (this._store.isDisposed) {
|
|
62
62
|
modelRef?.dispose();
|
|
63
63
|
return;
|
|
@@ -141,7 +141,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
141
141
|
append(detailsRow, $("span.separator", undefined, "•"));
|
|
142
142
|
const diffContainer = append(detailsRow, $(".agent-session-hover-diff"));
|
|
143
143
|
if (diff.files > 0) {
|
|
144
|
-
append(diffContainer, $("span", undefined, diff.files === 1 ? ( localize(
|
|
144
|
+
append(diffContainer, $("span", undefined, diff.files === 1 ? ( localize(5037, "1 file")) : ( localize(5038, "{0} files", diff.files))));
|
|
145
145
|
}
|
|
146
146
|
if (diff.insertions > 0) {
|
|
147
147
|
append(diffContainer, $("span.insertions", undefined, `+${diff.insertions}`));
|
|
@@ -157,7 +157,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
157
157
|
if (session.isArchived()) {
|
|
158
158
|
append(detailsRow, $("span.separator", undefined, "•"));
|
|
159
159
|
append(detailsRow, renderIcon(Codicon.archive));
|
|
160
|
-
append(detailsRow, $("span", undefined, ( localize(
|
|
160
|
+
append(detailsRow, $("span", undefined, ( localize(5039, "Archived"))));
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
buildFallbackTooltip(session) {
|
|
@@ -194,7 +194,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
194
194
|
if (diff && hasValidDiff(session.changes)) {
|
|
195
195
|
const diffParts = [];
|
|
196
196
|
if (diff.files > 0) {
|
|
197
|
-
diffParts.push(diff.files === 1 ? ( localize(
|
|
197
|
+
diffParts.push(diff.files === 1 ? ( localize(5037, "1 file")) : ( localize(5038, "{0} files", diff.files)));
|
|
198
198
|
}
|
|
199
199
|
if (diff.insertions > 0) {
|
|
200
200
|
diffParts.push(`+${diff.insertions}`);
|
|
@@ -211,7 +211,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
211
211
|
}
|
|
212
212
|
lines.push(details.join(" • "));
|
|
213
213
|
if (session.isArchived()) {
|
|
214
|
-
lines.push(`$(archive) ${( localize(
|
|
214
|
+
lines.push(`$(archive) ${( localize(5039, "Archived"))}`);
|
|
215
215
|
}
|
|
216
216
|
return ( new MarkdownString(lines.join("\n\n"), {
|
|
217
217
|
supportThemeIcons: true
|
|
@@ -228,16 +228,16 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
|
|
|
228
228
|
let statusLabel;
|
|
229
229
|
switch (status) {
|
|
230
230
|
case ChatSessionStatus.NeedsInput:
|
|
231
|
-
statusLabel = ( localize(
|
|
231
|
+
statusLabel = ( localize(5040, "Needs Input"));
|
|
232
232
|
break;
|
|
233
233
|
case ChatSessionStatus.InProgress:
|
|
234
|
-
statusLabel = ( localize(
|
|
234
|
+
statusLabel = ( localize(5041, "In Progress"));
|
|
235
235
|
break;
|
|
236
236
|
case ChatSessionStatus.Failed:
|
|
237
|
-
statusLabel = ( localize(
|
|
237
|
+
statusLabel = ( localize(5042, "Failed"));
|
|
238
238
|
break;
|
|
239
239
|
default:
|
|
240
|
-
statusLabel = ( localize(
|
|
240
|
+
statusLabel = ( localize(5043, "Completed"));
|
|
241
241
|
}
|
|
242
242
|
return statusLabel;
|
|
243
243
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { AgentSessionListItem, IAgentSessionsFilter, IAgentSessionsSorterOptions
|
|
|
7
7
|
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
8
8
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
9
9
|
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
10
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
10
11
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
11
12
|
import { IAgentSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service";
|
|
12
13
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
@@ -22,9 +23,14 @@ export interface IAgentSessionsControlOptions extends IAgentSessionsSorterOption
|
|
|
22
23
|
readonly overrideStyles: IStyleOverride<IListStyles>;
|
|
23
24
|
readonly filter: IAgentSessionsFilter;
|
|
24
25
|
readonly source: string;
|
|
26
|
+
readonly disableHover?: boolean;
|
|
27
|
+
readonly showIsolationIcon?: boolean;
|
|
28
|
+
readonly enableApprovalRow?: boolean;
|
|
25
29
|
getHoverPosition(): HoverPosition;
|
|
26
30
|
trackActiveEditorSession(): boolean;
|
|
31
|
+
collapseOlderSections?(): boolean;
|
|
27
32
|
overrideSessionOpenOptions?(openEvent: IOpenEvent<AgentSessionListItem | undefined>): ISessionOpenOptions;
|
|
33
|
+
overrideSessionOpen?(resource: URI, openOptions?: ISessionOpenOptions): Promise<void>;
|
|
28
34
|
notifySessionOpened?(resource: URI, widget: IChatWidget): void;
|
|
29
35
|
}
|
|
30
36
|
export declare class AgentSessionsControl extends Disposable implements IAgentSessionsControl {
|
|
@@ -41,8 +47,12 @@ export declare class AgentSessionsControl extends Disposable implements IAgentSe
|
|
|
41
47
|
private readonly editorService;
|
|
42
48
|
private sessionsContainer;
|
|
43
49
|
get element(): HTMLElement | undefined;
|
|
50
|
+
private emptyFilterMessage;
|
|
44
51
|
private sessionsList;
|
|
45
52
|
private sessionsListFindIsOpen;
|
|
53
|
+
private readonly updateSessionsListThrottler;
|
|
54
|
+
private readonly _onDidUpdate;
|
|
55
|
+
readonly onDidUpdate: Event<void>;
|
|
46
56
|
private visible;
|
|
47
57
|
private focusedAgentSessionArchivedContextKey;
|
|
48
58
|
private focusedAgentSessionReadContextKey;
|
|
@@ -51,7 +61,11 @@ export declare class AgentSessionsControl extends Disposable implements IAgentSe
|
|
|
51
61
|
constructor(container: HTMLElement, options: IAgentSessionsControlOptions, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, chatSessionsService: IChatSessionsService, commandService: ICommandService, menuService: IMenuService, agentSessionsService: IAgentSessionsService, telemetryService: ITelemetryService, editorService: IEditorService);
|
|
52
62
|
private registerListeners;
|
|
53
63
|
private revealAndFocusActiveEditorSession;
|
|
64
|
+
private create;
|
|
65
|
+
private createEmptyFilterMessage;
|
|
54
66
|
private createList;
|
|
67
|
+
private updateEmpty;
|
|
68
|
+
private hasTodaySessions;
|
|
55
69
|
private openAgentSession;
|
|
56
70
|
private showContextMenu;
|
|
57
71
|
private showAgentSessionSectionContextMenu;
|
|
@@ -5,21 +5,27 @@ import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbenc
|
|
|
5
5
|
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
6
6
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
7
|
import { WorkbenchCompressibleAsyncDataTree } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
8
|
-
import { append, $, EventHelper } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
8
|
+
import { append, $, hide, addDisposableListener, EventType, EventHelper, setVisibility } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
9
|
+
import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
|
|
10
|
+
import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
11
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
9
12
|
import { isAgentSessionSection, AgentSessionSection, isAgentSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
10
|
-
import { AgentSessionsSorter,
|
|
13
|
+
import { AgentSessionsSorter, AgentSessionRenderer, AgentSessionsDataSource, AgentSessionsListDelegate, AgentSessionsCompressionDelegate, AgentSessionSectionRenderer, AgentSessionsKeyboardNavigationLabelProvider, AgentSessionsIdentityProvider, AgentSessionsDragAndDrop, AgentSessionsAccessibilityProvider } from './agentSessionsViewer.js';
|
|
14
|
+
import { AgentSessionApprovalModel } from './agentSessionApprovalModel.js';
|
|
11
15
|
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
12
16
|
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
13
17
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
14
18
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
15
19
|
import { ACTION_ID_NEW_CHAT } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
16
|
-
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
20
|
+
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
17
21
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
22
|
+
import { Throttler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
18
23
|
import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
19
24
|
import { Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
20
25
|
import { RenderIndentGuides, TreeFindMode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/abstractTree';
|
|
21
26
|
import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
|
|
22
27
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
28
|
+
import { getAgentSessionTime } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
23
29
|
import { openSession } from './agentSessionsOpener.js';
|
|
24
30
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
25
31
|
import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput';
|
|
@@ -54,12 +60,15 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
54
60
|
this.telemetryService = telemetryService;
|
|
55
61
|
this.editorService = editorService;
|
|
56
62
|
this.sessionsListFindIsOpen = false;
|
|
63
|
+
this.updateSessionsListThrottler = this._register(( new Throttler()));
|
|
64
|
+
this._onDidUpdate = this._register(( new Emitter()));
|
|
65
|
+
this.onDidUpdate = this._onDidUpdate.event;
|
|
57
66
|
this.visible = true;
|
|
58
67
|
this.focusedAgentSessionArchivedContextKey = ChatContextKeys.isArchivedAgentSession.bindTo(this.contextKeyService);
|
|
59
68
|
this.focusedAgentSessionReadContextKey = ChatContextKeys.isReadAgentSession.bindTo(this.contextKeyService);
|
|
60
69
|
this.focusedAgentSessionTypeContextKey = ChatContextKeys.agentSessionType.bindTo(this.contextKeyService);
|
|
61
70
|
this.hasMultipleAgentSessionsSelectedContextKey = ChatContextKeys.hasMultipleAgentSessionsSelected.bindTo(this.contextKeyService);
|
|
62
|
-
this.
|
|
71
|
+
this.create(this.container);
|
|
63
72
|
this.registerListeners();
|
|
64
73
|
}
|
|
65
74
|
registerListeners() {
|
|
@@ -85,8 +94,32 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
85
94
|
this.sessionsList.setSelection([matchingSession]);
|
|
86
95
|
}
|
|
87
96
|
}
|
|
88
|
-
|
|
97
|
+
create(container) {
|
|
89
98
|
this.sessionsContainer = append(container, $(".agent-sessions-viewer"));
|
|
99
|
+
this.createEmptyFilterMessage(this.sessionsContainer);
|
|
100
|
+
this.createList(this.sessionsContainer);
|
|
101
|
+
}
|
|
102
|
+
createEmptyFilterMessage(container) {
|
|
103
|
+
this.emptyFilterMessage = append(container, $(".agent-sessions-empty-filter-message"));
|
|
104
|
+
hide(this.emptyFilterMessage);
|
|
105
|
+
const span = append(this.emptyFilterMessage, $("span"));
|
|
106
|
+
span.textContent = `${( localize(5109, "No matching sessions"))} - `;
|
|
107
|
+
const link = append(this.emptyFilterMessage, $("span.reset-filter-link"));
|
|
108
|
+
link.textContent = ( localize(5110, "Reset Filter"));
|
|
109
|
+
link.tabIndex = 0;
|
|
110
|
+
link.setAttribute("role", "button");
|
|
111
|
+
this._register(
|
|
112
|
+
addDisposableListener(link, EventType.CLICK, () => this.options.filter.reset())
|
|
113
|
+
);
|
|
114
|
+
this._register(addDisposableListener(link, EventType.KEY_DOWN, e => {
|
|
115
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
116
|
+
if (event.keyCode === KeyCode.Enter || event.keyCode === KeyCode.Space) {
|
|
117
|
+
EventHelper.stop(e, true);
|
|
118
|
+
this.options.filter.reset();
|
|
119
|
+
}
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
createList(container) {
|
|
90
123
|
const collapseByDefault = element => {
|
|
91
124
|
if (isAgentSessionSection(element)) {
|
|
92
125
|
if (element.section === AgentSessionSection.More && !this.options.filter.getExcludes().read) {
|
|
@@ -95,20 +128,39 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
95
128
|
if (element.section === AgentSessionSection.Archived && this.options.filter.getExcludes().archived) {
|
|
96
129
|
return true;
|
|
97
130
|
}
|
|
131
|
+
if (this.options.collapseOlderSections?.()) {
|
|
132
|
+
const olderSections = [
|
|
133
|
+
AgentSessionSection.Week,
|
|
134
|
+
AgentSessionSection.Older,
|
|
135
|
+
AgentSessionSection.Archived
|
|
136
|
+
];
|
|
137
|
+
if (olderSections.includes(element.section)) {
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
if (element.section === AgentSessionSection.Yesterday && this.hasTodaySessions()) {
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
98
144
|
}
|
|
99
145
|
return false;
|
|
100
146
|
};
|
|
101
147
|
const sorter = ( new AgentSessionsSorter(this.options));
|
|
148
|
+
const approvalModel = this.options.enableApprovalRow ? this._register(this.instantiationService.createInstance(AgentSessionApprovalModel)) : undefined;
|
|
149
|
+
const sessionRenderer = this._register(
|
|
150
|
+
this.instantiationService.createInstance(AgentSessionRenderer, this.options, approvalModel)
|
|
151
|
+
);
|
|
152
|
+
const sessionFilter = this._register(( new AgentSessionsDataSource(this.options.filter, sorter)));
|
|
102
153
|
const list = this.sessionsList = this._register(this.instantiationService.createInstance(
|
|
103
154
|
WorkbenchCompressibleAsyncDataTree,
|
|
104
155
|
"AgentSessionsView",
|
|
105
|
-
|
|
106
|
-
( new AgentSessionsListDelegate()),
|
|
156
|
+
container,
|
|
157
|
+
( new AgentSessionsListDelegate(approvalModel)),
|
|
107
158
|
( new AgentSessionsCompressionDelegate()),
|
|
108
|
-
[
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
159
|
+
[
|
|
160
|
+
sessionRenderer,
|
|
161
|
+
this.instantiationService.createInstance(AgentSessionSectionRenderer)
|
|
162
|
+
],
|
|
163
|
+
sessionFilter,
|
|
112
164
|
{
|
|
113
165
|
accessibilityProvider: ( new AgentSessionsAccessibilityProvider()),
|
|
114
166
|
dnd: this.instantiationService.createInstance(AgentSessionsDragAndDrop),
|
|
@@ -125,16 +177,24 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
125
177
|
}
|
|
126
178
|
));
|
|
127
179
|
ChatContextKeys.agentSessionsViewerFocused.bindTo(list.contextKeyService);
|
|
180
|
+
this._register(sessionRenderer.onDidChangeItemHeight(session => {
|
|
181
|
+
if (list.hasNode(session)) {
|
|
182
|
+
list.updateElementHeight(session, undefined);
|
|
183
|
+
}
|
|
184
|
+
}));
|
|
185
|
+
this._register(sessionFilter.onDidGetChildren(count => {
|
|
186
|
+
this.updateEmpty(count === 0);
|
|
187
|
+
}));
|
|
128
188
|
const model = this.agentSessionsService.model;
|
|
129
189
|
this._register(this.options.filter.onDidChange(async () => {
|
|
130
190
|
if (this.visible) {
|
|
131
191
|
this.updateSectionCollapseStates();
|
|
132
|
-
|
|
192
|
+
this.update();
|
|
133
193
|
}
|
|
134
194
|
}));
|
|
135
195
|
this._register(model.onDidChangeSessions(() => {
|
|
136
196
|
if (this.visible) {
|
|
137
|
-
|
|
197
|
+
this.update();
|
|
138
198
|
}
|
|
139
199
|
}));
|
|
140
200
|
list.setInput(model);
|
|
@@ -172,6 +232,23 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
172
232
|
this.updateSectionCollapseStates();
|
|
173
233
|
}));
|
|
174
234
|
}
|
|
235
|
+
updateEmpty(isEmpty) {
|
|
236
|
+
if (!this.emptyFilterMessage || !this.sessionsList) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const model = this.agentSessionsService.model;
|
|
240
|
+
const hasSessionsInModel = model.sessions.length > 0;
|
|
241
|
+
const isFilterActive = !this.options.filter.isDefault();
|
|
242
|
+
const showEmpty = hasSessionsInModel && isEmpty && isFilterActive;
|
|
243
|
+
setVisibility(showEmpty, this.emptyFilterMessage);
|
|
244
|
+
setVisibility(!showEmpty, this.sessionsList.getHTMLElement());
|
|
245
|
+
}
|
|
246
|
+
hasTodaySessions() {
|
|
247
|
+
const startOfToday = ( new Date()).setHours(0, 0, 0, 0);
|
|
248
|
+
return ( this.agentSessionsService.model.sessions.some(
|
|
249
|
+
session => !session.isArchived() && getAgentSessionTime(session.timing) >= startOfToday
|
|
250
|
+
));
|
|
251
|
+
}
|
|
175
252
|
async openAgentSession(e) {
|
|
176
253
|
const element = e.element;
|
|
177
254
|
if (!element || isAgentSessionSection(element)) {
|
|
@@ -182,9 +259,13 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
182
259
|
source: this.options.source
|
|
183
260
|
});
|
|
184
261
|
const options = this.options.overrideSessionOpenOptions?.(e) ?? e;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
262
|
+
if (this.options.overrideSessionOpen) {
|
|
263
|
+
await this.options.overrideSessionOpen(element.resource, options);
|
|
264
|
+
} else {
|
|
265
|
+
const widget = await this.instantiationService.invokeFunction(openSession, element, options);
|
|
266
|
+
if (widget) {
|
|
267
|
+
this.options.notifySessionOpened?.(element.resource, widget);
|
|
268
|
+
}
|
|
188
269
|
}
|
|
189
270
|
}
|
|
190
271
|
async showContextMenu(
|
|
@@ -222,7 +303,7 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
222
303
|
menu.dispose();
|
|
223
304
|
}
|
|
224
305
|
async showAgentSessionContextMenu(session, anchor) {
|
|
225
|
-
|
|
306
|
+
this.chatSessionsService.activateChatSessionItemProvider(session.providerType);
|
|
226
307
|
const contextOverlay = [];
|
|
227
308
|
contextOverlay.push([ChatContextKeys.isArchivedAgentSession.key, session.isArchived()]);
|
|
228
309
|
contextOverlay.push([ChatContextKeys.isReadAgentSession.key, session.isRead()]);
|
|
@@ -273,16 +354,8 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
273
354
|
}
|
|
274
355
|
case AgentSessionSection.More:
|
|
275
356
|
{
|
|
276
|
-
if (child.collapsed) {
|
|
277
|
-
|
|
278
|
-
if (this.sessionsListFindIsOpen) {
|
|
279
|
-
autoExpandMore = true;
|
|
280
|
-
} else if (this.options.filter.getExcludes().read && ( child.element.sessions.some(session => !session.isRead()))) {
|
|
281
|
-
autoExpandMore = true;
|
|
282
|
-
}
|
|
283
|
-
if (autoExpandMore) {
|
|
284
|
-
this.sessionsList.expand(child.element);
|
|
285
|
-
}
|
|
357
|
+
if (child.collapsed && this.sessionsListFindIsOpen) {
|
|
358
|
+
this.sessionsList.expand(child.element);
|
|
286
359
|
}
|
|
287
360
|
break;
|
|
288
361
|
}
|
|
@@ -293,7 +366,10 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
293
366
|
return this.agentSessionsService.model.resolve(undefined);
|
|
294
367
|
}
|
|
295
368
|
async update() {
|
|
296
|
-
|
|
369
|
+
return this.updateSessionsListThrottler.queue(async () => {
|
|
370
|
+
await this.sessionsList?.updateChildren();
|
|
371
|
+
this._onDidUpdate.fire();
|
|
372
|
+
});
|
|
297
373
|
}
|
|
298
374
|
setVisible(visible) {
|
|
299
375
|
if (this.visible === visible) {
|
|
@@ -301,7 +377,7 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
301
377
|
}
|
|
302
378
|
this.visible = visible;
|
|
303
379
|
if (this.visible) {
|
|
304
|
-
this.
|
|
380
|
+
this.update();
|
|
305
381
|
}
|
|
306
382
|
}
|
|
307
383
|
layout(height, width) {
|
|
@@ -2,6 +2,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
2
2
|
import { MenuId } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
|
|
3
3
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
4
4
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
5
|
+
import { AgentSessionProviders } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions";
|
|
5
6
|
import { IAgentSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel";
|
|
6
7
|
import { IAgentSessionsFilter, IAgentSessionsFilterExcludes } from "./agentSessionsViewer.js";
|
|
7
8
|
export declare enum AgentSessionsGrouping {
|
|
@@ -9,7 +10,17 @@ export declare enum AgentSessionsGrouping {
|
|
|
9
10
|
Date = "date"
|
|
10
11
|
}
|
|
11
12
|
export interface IAgentSessionsFilterOptions extends Partial<IAgentSessionsFilter> {
|
|
12
|
-
readonly filterMenuId
|
|
13
|
+
readonly filterMenuId?: MenuId;
|
|
14
|
+
/**
|
|
15
|
+
* When set, only these providers appear in the filter menu (opt-in).
|
|
16
|
+
* When unset, all registered contributions plus `Local` are shown.
|
|
17
|
+
*/
|
|
18
|
+
readonly allowedProviders?: AgentSessionProviders[];
|
|
19
|
+
/**
|
|
20
|
+
* Optional label overrides for providers shown in the filter menu.
|
|
21
|
+
* For example, the sessions window maps `Background` → "Local".
|
|
22
|
+
*/
|
|
23
|
+
readonly providerLabelOverrides?: ReadonlyMap<string, string>;
|
|
13
24
|
readonly limitResults?: () => number | undefined;
|
|
14
25
|
notifyResults?(count: number): void;
|
|
15
26
|
readonly groupResults?: () => AgentSessionsGrouping | undefined;
|
|
@@ -41,4 +52,5 @@ export declare class AgentSessionsFilter extends Disposable implements Required<
|
|
|
41
52
|
getExcludes(): IAgentSessionsFilterExcludes;
|
|
42
53
|
exclude(session: IAgentSession): boolean;
|
|
43
54
|
notifyResults(count: number): void;
|
|
55
|
+
reset(): void;
|
|
44
56
|
}
|