@codingame/monaco-vscode-katex-common 25.1.2 → 26.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +23 -2
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +64 -27
  4. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +3 -1
  5. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +31 -28
  6. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +2 -0
  7. package/vscode/src/vs/platform/actions/browser/buttonbar.js +71 -50
  8. package/vscode/src/vs/platform/editor/browser/editor.js +17 -7
  9. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +112 -129
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +10 -1
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +110 -85
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +5 -5
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +21 -6
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +308 -216
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +153 -148
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +27 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +247 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +71 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +347 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +44 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +287 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +20 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +89 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +188 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +677 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentSessionHoverWidget.css +98 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +263 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +34 -25
  29. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +19 -14
  30. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +762 -359
  31. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +22 -1
  32. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +188 -99
  33. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +9 -3
  34. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +166 -113
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +12 -5
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +279 -213
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +28 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +382 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +24 -7
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +128 -52
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +153 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +1218 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +14 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +39 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +193 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +2 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +93 -89
  54. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +5 -2
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +42 -47
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +58 -56
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +18 -14
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +17 -15
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -2
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +132 -68
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +0 -2
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +68 -47
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +14 -13
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -4
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +36 -24
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +18 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +32 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +7 -2
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +15 -4
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +22 -14
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +0 -2
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +34 -27
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -5
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +198 -135
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +2 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +38 -10
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +29 -27
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +0 -2
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +41 -36
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +0 -2
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +23 -18
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.js +13 -13
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +0 -3
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +20 -14
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +11 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +291 -152
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -3
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +227 -162
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.js +68 -72
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +2 -4
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +76 -75
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +2 -5
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +96 -76
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +4 -1
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +74 -38
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +0 -2
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -25
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +107 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +814 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +0 -2
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +34 -29
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +8 -10
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +236 -197
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +123 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +492 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +75 -47
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +2 -4
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +31 -20
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +0 -3
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +42 -36
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +55 -7
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +714 -148
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +7 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +21 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +2 -7
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +143 -153
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +14 -5
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +79 -61
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +10 -4
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +209 -77
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +9 -7
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +71 -54
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +18 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +83 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +4 -4
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +248 -190
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +1 -14
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +23 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPullRequestContent.css +5 -41
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +493 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +63 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +9 -1
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +121 -5
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +37 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +51 -45
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +46 -42
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +4 -2
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +99 -67
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +112 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +634 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +49 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +132 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.js +15 -9
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +196 -149
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +17 -1
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +577 -193
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +119 -86
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +10 -2
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +165 -36
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +0 -2
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +5 -8
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +5 -3
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +75 -65
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +30 -28
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -5
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +102 -106
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +44 -20
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +19 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +67 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +57 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +69 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +122 -82
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +39 -12
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +1110 -597
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +291 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +485 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +38 -28
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -20
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +650 -689
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +21 -18
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +102 -36
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +1253 -790
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -7
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +11 -11
  176. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +34 -0
  177. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +55 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +6 -2
  179. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +51 -35
  180. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +22 -0
  181. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +102 -0
  182. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +16 -4
  183. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +192 -44
  184. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +11 -12
  185. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +99 -66
  186. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +47 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +188 -0
  188. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.d.ts +20 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +115 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +129 -167
  191. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +16 -3
  192. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +37 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +143 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +56 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +206 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +152 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +67 -0
  198. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +22 -0
  199. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +170 -0
  200. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
  201. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +80 -19
  202. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +20 -28
  203. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +2 -1
  204. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +22 -19
  205. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +15 -0
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +122 -0
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +19 -104
  208. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -1040
  209. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +28 -0
  210. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +162 -0
  211. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +21 -0
  212. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +98 -0
  213. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +68 -0
  214. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +416 -0
  215. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +1 -6
  216. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +194 -215
  217. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +0 -1
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +74 -104
  219. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +45 -91
  220. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +22 -0
  221. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +98 -0
  222. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +5 -2
  223. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +96 -68
  224. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +7 -0
  225. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +11 -0
  226. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +20 -0
  227. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +150 -0
  228. package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +141 -147
  229. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +64 -0
  230. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +200 -0
  231. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +548 -0
  232. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.js +23 -0
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +22 -0
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +338 -0
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +18 -0
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +75 -0
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +364 -0
  239. package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +21 -0
  240. package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +36 -0
  241. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +110 -0
  242. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +692 -0
  243. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +40 -0
  244. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +158 -0
  245. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +80 -21
  246. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +440 -82
  247. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.d.ts +0 -34
  248. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.js +0 -139
  249. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +0 -10
  250. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +0 -1081
  251. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +0 -199
  252. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +0 -482
  253. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -28
  254. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -37
  255. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +0 -94
  256. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +0 -495
  257. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +0 -72
  258. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +0 -454
  259. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +0 -13
  260. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +0 -66
  261. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +0 -41
  262. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +0 -372
  263. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +0 -4
  264. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +0 -58
  265. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
  266. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -594
  267. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
  268. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
  269. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
  270. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1746
  271. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
  272. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -269
  273. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
  274. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -806
  275. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
  276. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -116
  277. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
  278. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -62
  279. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
  280. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
  281. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
  282. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -295
  283. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
  284. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -241
  285. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
  286. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -146
  287. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
  288. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -90
  289. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
  290. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -41
  291. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
  292. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -42
  293. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
  294. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -77
  295. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
  296. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
  297. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -823
  298. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
  299. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -29
  300. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
  301. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -567
  302. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
  303. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -189
  304. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
  305. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -439
  306. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +0 -57
  307. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +0 -263
  308. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +0 -22
  309. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +0 -48
  310. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
  311. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
  312. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
  313. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -89
  314. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
  315. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
  316. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +0 -33
  317. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -108
@@ -1,10 +1,9 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { $, clearNode, addDisposableListener, EventType, getWindow, EventHelper } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
3
+ import { $, addDisposableListener, EventType, getWindow, EventHelper } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
4
  import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
5
5
  import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
6
6
  import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
7
- import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
8
7
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
9
8
  import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
10
9
  import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
@@ -30,12 +29,31 @@ import { isStringImplicitContextValue } from '@codingame/monaco-vscode-api/vscod
30
29
  import { IChatContextService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.service';
31
30
 
32
31
  let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget extends Disposable {
33
- constructor(widgetRef, attachment, resourceLabels, attachmentModel, contextKeyService, contextMenuService, labelService, menuService, fileService, languageService, modelService, hoverService, configService, chatContextService) {
32
+ constructor(
33
+ widgetRef,
34
+ isAttachmentAlreadyAttached,
35
+ attachment,
36
+ resourceLabels,
37
+ attachmentModel,
38
+ domNode,
39
+ contextKeyService,
40
+ contextMenuService,
41
+ labelService,
42
+ menuService,
43
+ fileService,
44
+ languageService,
45
+ modelService,
46
+ hoverService,
47
+ configService,
48
+ chatContextService
49
+ ) {
34
50
  super();
35
51
  this.widgetRef = widgetRef;
52
+ this.isAttachmentAlreadyAttached = isAttachmentAlreadyAttached;
36
53
  this.attachment = attachment;
37
54
  this.resourceLabels = resourceLabels;
38
55
  this.attachmentModel = attachmentModel;
56
+ this.domNode = domNode;
39
57
  this.contextKeyService = contextKeyService;
40
58
  this.contextMenuService = contextMenuService;
41
59
  this.labelService = labelService;
@@ -47,78 +65,114 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
47
65
  this.configService = configService;
48
66
  this.chatContextService = chatContextService;
49
67
  this.renderDisposables = this._register(( new DisposableStore()));
50
- this.domNode = $('.chat-attached-context-attachment.show-file-icons.implicit');
68
+ this.renderedCount = 0;
51
69
  this.render();
52
70
  }
53
71
  render() {
54
- clearNode(this.domNode);
55
72
  this.renderDisposables.clear();
56
- this.domNode.classList.toggle('disabled', !this.attachment.enabled);
57
- const file = this.attachment.uri;
58
- const attachmentTypeName = file?.scheme === Schemas.vscodeNotebookCell ? ( localize(4966, "cell")) : ( localize(4967, "file"));
59
- const isSuggestedEnabled = this.configService.getValue('chat.implicitContext.suggestedContext');
73
+ this.renderedCount = 0;
74
+ for (const context of this.attachment.values) {
75
+ const targetUri = context.uri;
76
+ const targetRange = isLocation(context.value) ? context.value.range : undefined;
77
+ const targetHandle = isStringImplicitContextValue(context.value) ? context.value.handle : undefined;
78
+ const currentlyAttached = this.isAttachmentAlreadyAttached(targetUri, targetRange, targetHandle);
79
+ if (!currentlyAttached) {
80
+ this.renderMainContext(context, context.isSelection);
81
+ this.renderedCount++;
82
+ }
83
+ }
84
+ }
85
+ get hasRenderedContexts() {
86
+ return this.renderedCount > 0;
87
+ }
88
+ renderMainContext(context, isSelection) {
89
+ const contextNode = $(".chat-attached-context-attachment.show-file-icons.implicit");
90
+ this.domNode.appendChild(contextNode);
91
+ contextNode.classList.toggle("disabled", !context.enabled);
92
+ const file = context.uri;
93
+ const attachmentTypeName = file?.scheme === Schemas.vscodeNotebookCell ? ( localize(5095, "cell")) : ( localize(5096, "file"));
94
+ const isSuggestedEnabled = this.configService.getValue("chat.implicitContext.suggestedContext");
60
95
  if (isSuggestedEnabled) {
61
- if (!this.attachment.isSelection) {
62
- const buttonMsg = this.attachment.enabled ? ( localize(4968, "Disable current {0} context", attachmentTypeName)) : '';
63
- const toggleButton = this.renderDisposables.add(( new Button(this.domNode, { supportIcons: true, title: buttonMsg })));
64
- toggleButton.icon = this.attachment.enabled ? Codicon.x : Codicon.plus;
65
- this.renderDisposables.add(toggleButton.onDidClick(async (e) => {
96
+ if (!isSelection) {
97
+ const buttonMsg = context.enabled ? ( localize(5097, "Disable current {0} context", attachmentTypeName)) : "";
98
+ const toggleButton = this.renderDisposables.add(( new Button(contextNode, {
99
+ supportIcons: true,
100
+ title: buttonMsg
101
+ })));
102
+ toggleButton.icon = context.enabled ? Codicon.x : Codicon.plus;
103
+ this.renderDisposables.add(toggleButton.onDidClick(async e => {
66
104
  e.stopPropagation();
67
105
  e.preventDefault();
68
- if (!this.attachment.enabled) {
69
- await this.convertToRegularAttachment();
106
+ if (!context.enabled) {
107
+ await this.convertToRegularAttachment(context);
70
108
  }
71
- this.attachment.enabled = false;
109
+ context.enabled = false;
72
110
  }));
73
- }
74
- else {
75
- const pinButtonMsg = ( localize(4969, "Pin selection"));
76
- const pinButton = this.renderDisposables.add(( new Button(this.domNode, { supportIcons: true, title: pinButtonMsg })));
111
+ } else {
112
+ const pinButtonMsg = ( localize(5098, "Pin selection"));
113
+ const pinButton = this.renderDisposables.add(( new Button(contextNode, {
114
+ supportIcons: true,
115
+ title: pinButtonMsg
116
+ })));
77
117
  pinButton.icon = Codicon.pinned;
78
- this.renderDisposables.add(pinButton.onDidClick(async (e) => {
118
+ this.renderDisposables.add(pinButton.onDidClick(async e => {
79
119
  e.stopPropagation();
80
120
  e.preventDefault();
81
121
  await this.pinSelection();
82
122
  }));
83
123
  }
84
- if (!this.attachment.enabled && this.attachment.isSelection) {
85
- this.domNode.classList.remove('disabled');
124
+ if (!context.enabled && isSelection) {
125
+ contextNode.classList.remove("disabled");
86
126
  }
87
- this.renderDisposables.add(addDisposableListener(this.domNode, EventType.CLICK, async (e) => {
88
- if (!this.attachment.enabled && !this.attachment.isSelection) {
89
- await this.convertToRegularAttachment();
127
+ this.renderDisposables.add(addDisposableListener(contextNode, EventType.CLICK, async e => {
128
+ if (!context.enabled && !isSelection) {
129
+ await this.convertToRegularAttachment(context);
90
130
  }
91
131
  }));
92
- this.renderDisposables.add(addDisposableListener(this.domNode, EventType.KEY_DOWN, async (e) => {
93
- const event = ( new StandardKeyboardEvent(e));
94
- if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
95
- if (!this.attachment.enabled && !this.attachment.isSelection) {
96
- e.preventDefault();
97
- e.stopPropagation();
98
- await this.convertToRegularAttachment();
132
+ this.renderDisposables.add(
133
+ addDisposableListener(contextNode, EventType.KEY_DOWN, async e => {
134
+ const event = ( new StandardKeyboardEvent(e));
135
+ if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
136
+ if (!context.enabled && !isSelection) {
137
+ e.preventDefault();
138
+ e.stopPropagation();
139
+ await this.convertToRegularAttachment(context);
140
+ }
99
141
  }
100
- }
101
- }));
102
- }
103
- else {
104
- const buttonMsg = this.attachment.enabled ? ( localize(4968, "Disable current {0} context", attachmentTypeName)) : ( localize(4970, "Enable current {0} context", attachmentTypeName));
105
- const toggleButton = this.renderDisposables.add(( new Button(this.domNode, { supportIcons: true, title: buttonMsg })));
106
- toggleButton.icon = this.attachment.enabled ? Codicon.eye : Codicon.eyeClosed;
107
- this.renderDisposables.add(toggleButton.onDidClick((e) => {
142
+ })
143
+ );
144
+ } else {
145
+ const buttonMsg = context.enabled ? ( localize(5097, "Disable current {0} context", attachmentTypeName)) : ( localize(5099, "Enable current {0} context", attachmentTypeName));
146
+ const toggleButton = this.renderDisposables.add(( new Button(contextNode, {
147
+ supportIcons: true,
148
+ title: buttonMsg
149
+ })));
150
+ toggleButton.icon = context.enabled ? Codicon.eye : Codicon.eyeClosed;
151
+ this.renderDisposables.add(toggleButton.onDidClick(e => {
108
152
  e.stopPropagation();
109
- this.attachment.enabled = !this.attachment.enabled;
153
+ context.enabled = !context.enabled;
110
154
  }));
111
155
  }
112
- const label = this.resourceLabels.create(this.domNode, { supportIcons: true });
156
+ const label = this.resourceLabels.create(contextNode, {
157
+ supportIcons: true
158
+ });
113
159
  let title;
114
- if (isStringImplicitContextValue(this.attachment.value)) {
115
- title = this.renderString(label);
160
+ let markdownTooltip;
161
+ if (isStringImplicitContextValue(context.value)) {
162
+ markdownTooltip = context.value.tooltip;
163
+ title = this.renderString(label, context.name, context.icon, markdownTooltip, ( localize(5100, "Current file context")));
164
+ } else {
165
+ title = this.renderResource(context.value, context.isSelection, context.enabled, label);
116
166
  }
117
- else {
118
- title = this.renderResource(this.attachment.value, label);
167
+ if (markdownTooltip || title) {
168
+ this.renderDisposables.add(this.hoverService.setupDelayedHover(contextNode, {
169
+ content: markdownTooltip ?? title,
170
+ appearance: {
171
+ showPointer: true
172
+ }
173
+ }));
119
174
  }
120
- this._register(this.hoverService.setupManagedHover(getDefaultHoverDelegate('element'), this.domNode, title));
121
- const scopedContextKeyService = this.renderDisposables.add(this.contextKeyService.createScoped(this.domNode));
175
+ const scopedContextKeyService = this.renderDisposables.add(this.contextKeyService.createScoped(contextNode));
122
176
  const resourceContextKey = this.renderDisposables.add(( new ResourceContextKey(
123
177
  scopedContextKeyService,
124
178
  this.fileService,
@@ -126,45 +180,52 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
126
180
  this.modelService
127
181
  )));
128
182
  resourceContextKey.set(file);
129
- this.renderDisposables.add(addDisposableListener(this.domNode, EventType.CONTEXT_MENU, async (domEvent) => {
130
- const event = ( new StandardMouseEvent(getWindow(domEvent), domEvent));
131
- EventHelper.stop(domEvent, true);
132
- this.contextMenuService.showContextMenu({
133
- contextKeyService: scopedContextKeyService,
134
- getAnchor: () => event,
135
- getActions: () => {
136
- const menu = this.menuService.getMenuActions(MenuId.ChatInputResourceAttachmentContext, scopedContextKeyService, { arg: file });
137
- return getFlatContextMenuActions(menu);
138
- },
139
- });
140
- }));
183
+ this.renderDisposables.add(
184
+ addDisposableListener(contextNode, EventType.CONTEXT_MENU, async domEvent => {
185
+ const event = ( new StandardMouseEvent(getWindow(domEvent), domEvent));
186
+ EventHelper.stop(domEvent, true);
187
+ this.contextMenuService.showContextMenu({
188
+ contextKeyService: scopedContextKeyService,
189
+ getAnchor: () => event,
190
+ getActions: () => {
191
+ const menu = this.menuService.getMenuActions(MenuId.ChatInputResourceAttachmentContext, scopedContextKeyService, {
192
+ arg: file
193
+ });
194
+ return getFlatContextMenuActions(menu);
195
+ }
196
+ });
197
+ })
198
+ );
141
199
  }
142
- renderString(resourceLabel) {
143
- const label = this.attachment.name;
144
- const icon = this.attachment.icon;
145
- const title = ( localize(4971, "Current file context"));
146
- resourceLabel.setLabel(label, undefined, { iconPath: icon, title });
200
+ renderString(resourceLabel, name, icon, markdownTooltip, defaultTitle) {
201
+ const title = markdownTooltip ? undefined : defaultTitle;
202
+ resourceLabel.setLabel(name, undefined, {
203
+ iconPath: icon,
204
+ title
205
+ });
147
206
  return title;
148
207
  }
149
- renderResource(attachmentValue, label) {
208
+ renderResource(attachmentValue, isSelection, enabled, label) {
150
209
  const file = URI.isUri(attachmentValue) ? attachmentValue : attachmentValue.uri;
151
- const range = URI.isUri(attachmentValue) || !this.attachment.isSelection ? undefined : attachmentValue.range;
152
- const attachmentTypeName = file.scheme === Schemas.vscodeNotebookCell ? ( localize(4966, "cell")) : ( localize(4967, "file"));
210
+ const range = URI.isUri(attachmentValue) || !isSelection ? undefined : attachmentValue.range;
211
+ const attachmentTypeName = file.scheme === Schemas.vscodeNotebookCell ? ( localize(5095, "cell")) : ( localize(5096, "file"));
153
212
  const fileBasename = basename(file);
154
213
  const fileDirname = dirname(file);
155
214
  const friendlyName = `${fileBasename} ${fileDirname}`;
156
215
  const ariaLabel = range ? ( localize(
157
- 4972,
216
+ 5101,
158
217
  "Attached {0}, {1}, line {2} to line {3}",
159
218
  attachmentTypeName,
160
219
  friendlyName,
161
220
  range.startLineNumber,
162
221
  range.endLineNumber
163
- )) : ( localize(4973, "Attached {0}, {1}", attachmentTypeName, friendlyName));
164
- const uriLabel = this.labelService.getUriLabel(file, { relative: true });
165
- const currentFile = ( localize(4974, "Current {0} context", attachmentTypeName));
166
- const inactive = ( localize(4975, "Enable current {0} context", attachmentTypeName));
167
- const currentFileHint = this.attachment.enabled || this.attachment.isSelection ? currentFile : inactive;
222
+ )) : ( localize(5102, "Attached {0}, {1}", attachmentTypeName, friendlyName));
223
+ const uriLabel = this.labelService.getUriLabel(file, {
224
+ relative: true
225
+ });
226
+ const currentFile = ( localize(5103, "Current {0} context", attachmentTypeName));
227
+ const inactive = ( localize(5104, "Enable current {0} context", attachmentTypeName));
228
+ const currentFileHint = enabled || isSelection ? currentFile : inactive;
168
229
  const title = `${currentFileHint}\n${uriLabel}`;
169
230
  label.setFile(file, {
170
231
  fileKind: FileKind.FILE,
@@ -176,58 +237,50 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
176
237
  this.domNode.tabIndex = 0;
177
238
  return title;
178
239
  }
179
- async convertToRegularAttachment() {
180
- if (!this.attachment.value) {
240
+ async convertToRegularAttachment(attachment) {
241
+ if (!attachment.value) {
181
242
  return;
182
243
  }
183
- if (isStringImplicitContextValue(this.attachment.value)) {
184
- if (this.attachment.value.value === undefined) {
185
- await this.chatContextService.resolveChatContext(this.attachment.value);
244
+ if (isStringImplicitContextValue(attachment.value)) {
245
+ if (attachment.value.value === undefined) {
246
+ await this.chatContextService.resolveChatContext(attachment.value);
186
247
  }
187
248
  const context = {
188
- kind: 'string',
189
- value: this.attachment.value.value,
190
- id: this.attachment.id,
191
- name: this.attachment.name,
192
- icon: this.attachment.value.icon,
193
- modelDescription: this.attachment.value.modelDescription,
194
- uri: this.attachment.value.uri
249
+ kind: "string",
250
+ value: attachment.value.value,
251
+ id: attachment.id,
252
+ name: attachment.name,
253
+ icon: attachment.value.icon,
254
+ modelDescription: attachment.modelDescription,
255
+ uri: attachment.value.uri,
256
+ tooltip: attachment.value.tooltip,
257
+ commandId: attachment.value.commandId,
258
+ handle: attachment.value.handle
195
259
  };
196
260
  this.attachmentModel.addContext(context);
197
- }
198
- else {
199
- const file = URI.isUri(this.attachment.value) ? this.attachment.value : this.attachment.value.uri;
200
- if (file.scheme === Schemas.vscodeNotebookCell && isLocation(this.attachment.value)) {
201
- this.attachmentModel.addFile(file, this.attachment.value.range);
202
- }
203
- else {
261
+ } else {
262
+ const file = URI.isUri(attachment.value) ? attachment.value : attachment.value.uri;
263
+ if (file.scheme === Schemas.vscodeNotebookCell && isLocation(attachment.value)) {
264
+ this.attachmentModel.addFile(file, attachment.value.range);
265
+ } else {
204
266
  this.attachmentModel.addFile(file);
205
267
  }
206
268
  }
207
269
  this.widgetRef()?.focusInput();
208
270
  }
209
271
  async pinSelection() {
210
- if (!this.attachment.value || !this.attachment.isSelection) {
211
- return;
212
- }
213
- if (!URI.isUri(this.attachment.value) && !isStringImplicitContextValue(this.attachment.value)) {
214
- const location = this.attachment.value;
215
- this.attachmentModel.addFile(location.uri, location.range);
272
+ for (const attachment of this.attachment.values) {
273
+ if (!attachment.value || !attachment.isSelection) {
274
+ continue;
275
+ }
276
+ if (!URI.isUri(attachment.value) && !isStringImplicitContextValue(attachment.value)) {
277
+ const location = attachment.value;
278
+ this.attachmentModel.addFile(location.uri, location.range);
279
+ }
216
280
  }
217
281
  this.widgetRef()?.focusInput();
218
282
  }
219
283
  };
220
- ImplicitContextAttachmentWidget = ( __decorate([
221
- ( __param(4, IContextKeyService)),
222
- ( __param(5, IContextMenuService)),
223
- ( __param(6, ILabelService)),
224
- ( __param(7, IMenuService)),
225
- ( __param(8, IFileService)),
226
- ( __param(9, ILanguageService)),
227
- ( __param(10, IModelService)),
228
- ( __param(11, IHoverService)),
229
- ( __param(12, IConfigurationService)),
230
- ( __param(13, IChatContextService))
231
- ], ImplicitContextAttachmentWidget));
284
+ ImplicitContextAttachmentWidget = ( __decorate([( __param(6, IContextKeyService)), ( __param(7, IContextMenuService)), ( __param(8, ILabelService)), ( __param(9, IMenuService)), ( __param(10, IFileService)), ( __param(11, ILanguageService)), ( __param(12, IModelService)), ( __param(13, IHoverService)), ( __param(14, IConfigurationService)), ( __param(15, IChatContextService))], ImplicitContextAttachmentWidget));
232
285
 
233
286
  export { ImplicitContextAttachmentWidget };
@@ -3,18 +3,20 @@ import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/editor/
3
3
  import { Action2, IAction2Options } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
4
4
  import { IChatEditingSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
5
5
  import { IChatWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
6
+ import { IAgentSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel";
6
7
  export declare abstract class EditingSessionAction extends Action2 {
7
8
  constructor(opts: Readonly<IAction2Options>);
8
9
  run(accessor: ServicesAccessor, ...args: unknown[]): any;
9
10
  abstract runEditingSessionAction(accessor: ServicesAccessor, editingSession: IChatEditingSession, chatWidget: IChatWidget, ...args: unknown[]): any;
10
11
  }
12
+ export type EditingSessionActionContext = {
13
+ editingSession?: IChatEditingSession;
14
+ chatWidget: IChatWidget;
15
+ };
11
16
  /**
12
17
  * Resolve view title toolbar context. If none, return context from the lastFocusedWidget.
13
18
  */
14
- export declare function getEditingSessionContext(accessor: ServicesAccessor, args: any[]): {
15
- editingSession?: IChatEditingSession;
16
- chatWidget: IChatWidget;
17
- } | undefined;
19
+ export declare function getEditingSessionContext(accessor: ServicesAccessor, args: any[]): EditingSessionActionContext | undefined;
18
20
  export declare class ChatEditingAcceptAllAction extends EditingSessionAction {
19
21
  constructor();
20
22
  runEditingSessionAction(accessor: ServicesAccessor, editingSession: IChatEditingSession, chatWidget: IChatWidget, ...args: unknown[]): Promise<void>;
@@ -23,6 +25,11 @@ export declare class ChatEditingDiscardAllAction extends EditingSessionAction {
23
25
  constructor();
24
26
  runEditingSessionAction(accessor: ServicesAccessor, editingSession: IChatEditingSession, chatWidget: IChatWidget, ...args: unknown[]): Promise<void>;
25
27
  }
28
+ export declare class ToggleExplanationWidgetAction extends EditingSessionAction {
29
+ static readonly ID = "chatEditing.toggleExplanationWidget";
30
+ constructor();
31
+ runEditingSessionAction(accessor: ServicesAccessor, editingSession: IChatEditingSession, chatWidget: IChatWidget, ...args: unknown[]): Promise<void>;
32
+ }
26
33
  export declare function discardAllEditsWithConfirmation(accessor: ServicesAccessor, currentEditingSession: IChatEditingSession): Promise<boolean>;
27
34
  export declare class ChatEditingShowChangesAction extends EditingSessionAction {
28
35
  static readonly ID = "chatEditing.viewChanges";
@@ -33,7 +40,7 @@ export declare class ChatEditingShowChangesAction extends EditingSessionAction {
33
40
  export declare class ViewAllSessionChangesAction extends Action2 {
34
41
  static readonly ID = "chatEditing.viewAllSessionChanges";
35
42
  constructor();
36
- run(accessor: ServicesAccessor, sessionResource?: URI): Promise<void>;
43
+ run(accessor: ServicesAccessor, sessionOrSessionResource?: URI | IAgentSession): Promise<void>;
37
44
  }
38
45
  export interface ChatEditingActionContext {
39
46
  readonly sessionResource: URI;