@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.
Files changed (230) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +10 -4
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +37 -11
  4. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +3 -0
  5. package/vscode/src/vs/platform/actions/browser/buttonbar.js +15 -4
  6. package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +576 -0
  7. package/vscode/src/vs/{workbench/contrib → platform}/mcp/common/modelContextProtocolApps.js +1 -0
  8. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +15 -15
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +5 -0
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +176 -17
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +5 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +127 -64
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +1 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -11
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +26 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +106 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +9 -9
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +14 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +105 -29
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +13 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +69 -43
  23. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +2 -2
  24. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +35 -7
  25. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +187 -78
  26. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +138 -32
  27. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -6
  28. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +394 -87
  29. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +1 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +28 -13
  31. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +38 -19
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +113 -116
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +16 -15
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +2 -2
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +5 -5
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +1 -1
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +2 -1
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +30 -11
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +250 -132
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
  43. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +1 -16
  44. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -110
  45. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
  46. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.d.ts +1 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  48. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.d.ts +1 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  50. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +3 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +9 -4
  52. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +2 -4
  53. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +7 -10
  54. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.d.ts +1 -1
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -2
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +22 -4
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +3 -2
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +11 -3
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -1
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +1 -1
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -1
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +59 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.js +29 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.d.ts +0 -2
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +0 -6
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.d.ts +1 -1
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +2 -2
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +4 -2
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +6 -3
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.d.ts +1 -1
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +1 -1
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.d.ts +3 -2
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +7 -6
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +0 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +26 -27
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +4 -1
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +53 -20
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.d.ts +15 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.js +55 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +1 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -7
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +1 -1
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +3 -2
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +24 -10
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +4 -4
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -6
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +62 -7
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +414 -129
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +1 -1
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +4 -3
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +19 -12
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +22 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +263 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +14 -5
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +98 -26
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +1 -1
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +1 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +1 -1
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +11 -2
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +252 -80
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +29 -1
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +246 -8
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +4 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +39 -18
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +6 -4
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +36 -23
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +3 -13
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +6 -260
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +1 -1
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +5 -7
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +42 -37
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +12 -3
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +65 -18
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatHookContentPart.css +9 -6
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +2 -2
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +356 -415
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +14 -7
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +102 -7
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +68 -19
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/codeBlockPart.css +48 -15
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +5 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +47 -23
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +1 -2
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +0 -5
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +8 -1
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +57 -4
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +5 -1
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +24 -8
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +1 -1
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.d.ts +18 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +103 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +1 -1
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -18
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +44 -1
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +85 -89
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +3 -5
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +15 -17
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +4 -2
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +41 -2
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +1 -1
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +3 -3
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +2 -2
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +6 -5
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +1 -1
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +13 -1
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +1 -1
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +2 -1
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +21 -5
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +341 -88
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +6 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +13 -4
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.d.ts +35 -0
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +440 -0
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +24 -10
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +437 -241
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +77 -17
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +521 -284
  176. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +1 -1
  177. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +7 -1
  178. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +71 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +664 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +104 -0
  181. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +127 -0
  182. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +12 -1
  183. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +57 -16
  184. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +4 -7
  185. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +89 -49
  186. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +1 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +28 -0
  188. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +87 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +22 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +213 -0
  191. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +1 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +15 -17
  193. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +7 -4
  194. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +563 -140
  195. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +35 -26
  196. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +2 -2
  197. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +26 -23
  198. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +26 -6
  199. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +145 -79
  200. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +36 -50
  201. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +35 -15
  202. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +7 -0
  203. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +127 -30
  204. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
  205. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +20 -14
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +6 -6
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +96 -34
  208. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +11 -2
  209. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +68 -27
  210. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +5 -0
  211. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +125 -13
  212. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +8 -11
  213. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +54 -45
  214. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +11 -10
  215. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +172 -112
  216. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
  217. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +2 -44
  219. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +28 -4
  220. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +84 -3
  221. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +9 -2
  222. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +58 -41
  223. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  224. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +1 -548
  225. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  227. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  228. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  229. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +6 -10
  230. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +0 -187
@@ -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 };
@@ -57,7 +57,7 @@ let AgentSessionHoverWidget = class AgentSessionHoverWidget extends Disposable {
57
57
  }
58
58
  }
59
59
  async loadModel() {
60
- const modelRef = await this.chatService.loadSessionForResource(this.session.resource, ChatAgentLocation.Chat, this.cts.token);
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(4904, "1 file")) : ( localize(4905, "{0} files", diff.files))));
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(4906, "Archived"))));
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(4904, "1 file")) : ( localize(4905, "{0} files", diff.files)));
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(4906, "Archived"))}`);
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(4907, "Needs Input"));
231
+ statusLabel = ( localize(5040, "Needs Input"));
232
232
  break;
233
233
  case ChatSessionStatus.InProgress:
234
- statusLabel = ( localize(4908, "In Progress"));
234
+ statusLabel = ( localize(5041, "In Progress"));
235
235
  break;
236
236
  case ChatSessionStatus.Failed:
237
- statusLabel = ( localize(4909, "Failed"));
237
+ statusLabel = ( localize(5042, "Failed"));
238
238
  break;
239
239
  default:
240
- statusLabel = ( localize(4910, "Completed"));
240
+ statusLabel = ( localize(5043, "Completed"));
241
241
  }
242
242
  return statusLabel;
243
243
  }
@@ -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, AgentSessionsListDelegate, AgentSessionsCompressionDelegate, AgentSessionRenderer, AgentSessionSectionRenderer, AgentSessionsDataSource, AgentSessionsKeyboardNavigationLabelProvider, AgentSessionsIdentityProvider, AgentSessionsDragAndDrop, AgentSessionsAccessibilityProvider } from './agentSessionsViewer.js';
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.createList(this.container);
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
- createList(container) {
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
- this.sessionsContainer,
106
- ( new AgentSessionsListDelegate()),
156
+ container,
157
+ ( new AgentSessionsListDelegate(approvalModel)),
107
158
  ( new AgentSessionsCompressionDelegate()),
108
- [this._register(
109
- this.instantiationService.createInstance(AgentSessionRenderer, this.options)
110
- ), this.instantiationService.createInstance(AgentSessionSectionRenderer)],
111
- ( new AgentSessionsDataSource(this.options.filter, sorter)),
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
- list.updateChildren();
192
+ this.update();
133
193
  }
134
194
  }));
135
195
  this._register(model.onDidChangeSessions(() => {
136
196
  if (this.visible) {
137
- list.updateChildren();
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
- const widget = await this.instantiationService.invokeFunction(openSession, element, options);
186
- if (widget) {
187
- this.options.notifySessionOpened?.(element.resource, widget);
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
- await this.chatSessionsService.activateChatSessionItemProvider(session.providerType);
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
- let autoExpandMore = false;
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
- await this.sessionsList?.updateChildren();
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.sessionsList?.updateChildren();
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: MenuId;
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
  }