@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,6 +1,6 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { reset, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
3
+ import { $, reset } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
4
  import { renderLabelWithIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
5
5
  import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
6
6
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
@@ -8,7 +8,6 @@ import { groupBy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/coll
8
8
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
9
9
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
10
10
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
11
- import { ActionWidgetDropdownActionViewItem } from '../../../../../../platform/actions/browser/actionWidgetDropdownActionViewItem.js';
12
11
  import { getFlatActionBarActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
13
12
  import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
14
13
  import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
@@ -18,39 +17,124 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
18
17
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
19
18
  import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
20
19
  import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
20
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
21
21
  import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service';
22
22
  import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
23
23
  import { IChatModeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service';
24
+ import { isOrganizationPromptFile } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/utils/promptsServiceUtils';
24
25
  import { ChatConfiguration, ChatModeKind, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
25
- import { PromptsStorage, ExtensionAgentSourceType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
26
+ import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
26
27
  import { getOpenChatActionIdForMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
27
28
  import { ToggleAgentModeActionId } from '../../actions/chatExecuteActions.js';
29
+ import { ChatInputPickerActionViewItem } from './chatInputPickerActionItem.js';
30
+ import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
28
31
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
29
32
 
30
- let ModePickerActionItem = class ModePickerActionItem extends ActionWidgetDropdownActionViewItem {
31
- constructor(action, delegate, actionWidgetService, chatAgentService, keybindingService, configurationService, contextKeyService, chatModeService, menuService, commandService, productService) {
32
- const builtInCategory = { label: ( localize(5852, "Built-In")), order: 0 };
33
- const customCategory = { label: ( localize(5853, "Custom")), order: 1 };
34
- const policyDisabledCategory = { label: ( localize(5854, "Managed by your organization")), order: 999, showHeader: true };
33
+ const builtinDefaultIcon = Codicon.tasklist;
34
+ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerActionViewItem {
35
+ constructor(
36
+ action,
37
+ delegate,
38
+ pickerOptions,
39
+ actionWidgetService,
40
+ chatAgentService,
41
+ keybindingService,
42
+ configurationService,
43
+ contextKeyService,
44
+ chatModeService,
45
+ menuService,
46
+ commandService,
47
+ _productService,
48
+ telemetryService,
49
+ openerService
50
+ ) {
51
+ const customAgentTarget = delegate.customAgentTarget?.();
52
+ const builtInCategory = {
53
+ label: ( localize(6106, "Built-In")),
54
+ order: 0
55
+ };
56
+ const customCategory = {
57
+ label: ( localize(6107, "Custom")),
58
+ order: 1
59
+ };
60
+ const policyDisabledCategory = {
61
+ label: ( localize(6108, "Managed by your organization")),
62
+ order: 999,
63
+ showHeader: true
64
+ };
35
65
  const agentModeDisabledViaPolicy = configurationService.inspect(ChatConfiguration.AgentEnabled).policyValue === false;
36
66
  const makeAction = (mode, currentMode) => {
37
- const isDisabledViaPolicy = mode.kind === ChatModeKind.Agent &&
38
- agentModeDisabledViaPolicy;
67
+ const isDisabledViaPolicy = mode.kind === ChatModeKind.Agent && agentModeDisabledViaPolicy;
39
68
  const tooltip = chatAgentService.getDefaultAgent(ChatAgentLocation.Chat, mode.kind)?.description ?? action.tooltip;
69
+ const toolbarActions = [];
70
+ if (mode.kind === ChatModeKind.Agent && !isDisabledViaPolicy) {
71
+ if (mode.uri) {
72
+ let label, icon, id;
73
+ if (mode.source?.storage === PromptsStorage.extension) {
74
+ icon = Codicon.eye;
75
+ id = `viewAgent:${mode.id}`;
76
+ label = ( localize(6109, "View {0} agent", mode.label.get()));
77
+ } else {
78
+ icon = Codicon.edit;
79
+ id = `editAgent:${mode.id}`;
80
+ label = ( localize(6110, "Edit {0} agent", mode.label.get()));
81
+ }
82
+ const modeResource = mode.uri;
83
+ toolbarActions.push({
84
+ id,
85
+ label,
86
+ tooltip: label,
87
+ class: ThemeIcon.asClassName(icon),
88
+ enabled: true,
89
+ run: async () => {
90
+ openerService.open(modeResource.get());
91
+ }
92
+ });
93
+ } else if (!customAgentTarget) {
94
+ const label = ( localize(6111, "Configure tools for {0} agent", mode.label.get()));
95
+ toolbarActions.push({
96
+ id: `configureTools:${mode.id}`,
97
+ label,
98
+ tooltip: label,
99
+ class: ThemeIcon.asClassName(Codicon.tools),
100
+ enabled: true,
101
+ run: async () => {
102
+ actionWidgetService.hide();
103
+ if (currentMode.id !== mode.id) {
104
+ await commandService.executeCommand(ToggleAgentModeActionId, {
105
+ modeId: mode.id,
106
+ sessionResource: this.delegate.sessionResource()
107
+ });
108
+ }
109
+ await commandService.executeCommand("workbench.action.chat.configureTools", pickerOptions.actionContext, {
110
+ source: "modePicker"
111
+ });
112
+ }
113
+ });
114
+ }
115
+ }
40
116
  return {
41
117
  ...action,
42
118
  id: getOpenChatActionIdForMode(mode),
43
119
  label: mode.label.get(),
44
- icon: isDisabledViaPolicy ? ThemeIcon.fromId(Codicon.lock.id) : undefined,
45
- class: isDisabledViaPolicy ? 'disabled-by-policy' : undefined,
120
+ icon: isDisabledViaPolicy ? ThemeIcon.fromId(Codicon.lock.id) : mode.icon.get(),
121
+ class: isDisabledViaPolicy ? "disabled-by-policy" : undefined,
46
122
  enabled: !isDisabledViaPolicy,
47
123
  checked: !isDisabledViaPolicy && currentMode.id === mode.id,
48
- tooltip,
124
+ tooltip: "",
125
+ hover: {
126
+ content: tooltip,
127
+ position: this.pickerOptions.hoverPosition
128
+ },
129
+ toolbarActions,
49
130
  run: async () => {
50
131
  if (isDisabledViaPolicy) {
51
132
  return;
52
133
  }
53
- const result = await commandService.executeCommand(ToggleAgentModeActionId, { modeId: mode.id, sessionResource: this.delegate.sessionResource() });
134
+ const result = await commandService.executeCommand(ToggleAgentModeActionId, {
135
+ modeId: mode.id,
136
+ sessionResource: this.delegate.sessionResource()
137
+ });
54
138
  if (this.element) {
55
139
  this.renderLabel(this.element);
56
140
  }
@@ -62,42 +146,87 @@ let ModePickerActionItem = class ModePickerActionItem extends ActionWidgetDropdo
62
146
  const makeActionFromCustomMode = (mode, currentMode) => {
63
147
  return {
64
148
  ...makeAction(mode, currentMode),
65
- tooltip: mode.description.get() ?? chatAgentService.getDefaultAgent(ChatAgentLocation.Chat, mode.kind)?.description ?? action.tooltip,
149
+ tooltip: "",
150
+ hover: {
151
+ content: mode.description.get() ?? chatAgentService.getDefaultAgent(ChatAgentLocation.Chat, mode.kind)?.description ?? action.tooltip,
152
+ position: this.pickerOptions.hoverPosition
153
+ },
154
+ icon: mode.icon.get() ?? (isModeConsideredBuiltIn(mode, this._productService) ? builtinDefaultIcon : undefined),
66
155
  category: agentModeDisabledViaPolicy ? policyDisabledCategory : customCategory
67
156
  };
68
157
  };
158
+ const isUserDefinedCustomAgent = mode => {
159
+ if (mode.isBuiltin || !mode.source) {
160
+ return false;
161
+ }
162
+ return mode.source.storage === PromptsStorage.local || mode.source.storage === PromptsStorage.user;
163
+ };
164
+ const actionProviderWithCustomAgentTarget = {
165
+ getActions: () => {
166
+ const modes = chatModeService.getModes();
167
+ const currentMode = delegate.currentMode.get();
168
+ const filteredCustomModes = modes.custom.filter(mode => {
169
+ const target = mode.target?.get();
170
+ return isUserDefinedCustomAgent(mode) && (!target || target === customAgentTarget);
171
+ });
172
+ const checked = currentMode.id === ChatMode.Agent.id;
173
+ const defaultAction = {
174
+ ...makeAction(ChatMode.Agent, ChatMode.Agent),
175
+ checked
176
+ };
177
+ const customActions = ( filteredCustomModes.map(mode => makeActionFromCustomMode(mode, currentMode)));
178
+ return [defaultAction, ...customActions];
179
+ }
180
+ };
69
181
  const actionProvider = {
70
182
  getActions: () => {
71
183
  const modes = chatModeService.getModes();
72
184
  const currentMode = delegate.currentMode.get();
73
185
  const agentMode = modes.builtin.find(mode => mode.id === ChatMode.Agent.id);
74
- const otherBuiltinModes = modes.builtin.filter(mode => mode.id !== ChatMode.Agent.id);
75
- const customModes = groupBy(modes.custom, mode => mode.source?.storage === PromptsStorage.extension && mode.source.extensionId.value === productService.defaultChatAgent?.chatExtensionId && mode.source.type === ExtensionAgentSourceType.contribution ?
76
- 'builtin' : 'custom');
186
+ const shouldHideEditMode = configurationService.getValue(ChatConfiguration.EditModeHidden) && chatAgentService.hasToolsAgent && currentMode.id !== ChatMode.Edit.id;
187
+ const otherBuiltinModes = modes.builtin.filter(
188
+ mode => mode.id !== ChatMode.Agent.id && !(shouldHideEditMode && mode.id === ChatMode.Edit.id)
189
+ );
190
+ const customModes = groupBy(
191
+ modes.custom,
192
+ mode => isModeConsideredBuiltIn(mode, this._productService) ? "builtin" : "custom"
193
+ );
77
194
  const customBuiltinModeActions = customModes.builtin?.map(mode => {
78
195
  const action = makeActionFromCustomMode(mode, currentMode);
79
196
  action.category = agentModeDisabledViaPolicy ? policyDisabledCategory : builtInCategory;
80
197
  return action;
81
198
  }) ?? [];
82
- const orderedModes = coalesce([
83
- agentMode && makeAction(agentMode, currentMode),
84
- ...( otherBuiltinModes.map(mode => mode && makeAction(mode, currentMode))),
85
- ...customBuiltinModeActions, ...(customModes.custom?.map(mode => makeActionFromCustomMode(mode, currentMode)) ?? [])
86
- ]);
199
+ customBuiltinModeActions.sort((a, b) => a.label.localeCompare(b.label));
200
+ const customModeActions = customModes.custom?.map(mode => makeActionFromCustomMode(mode, currentMode)) ?? [];
201
+ customModeActions.sort((a, b) => a.label.localeCompare(b.label));
202
+ const orderedModes = coalesce([agentMode && makeAction(agentMode, currentMode), ...( otherBuiltinModes.map(mode => mode && makeAction(mode, currentMode))), ...customBuiltinModeActions, ...customModeActions]);
87
203
  return orderedModes;
88
204
  }
89
205
  };
90
206
  const modePickerActionWidgetOptions = {
91
- actionProvider,
207
+ actionProvider: customAgentTarget ? actionProviderWithCustomAgentTarget : actionProvider,
92
208
  actionBarActionProvider: {
93
209
  getActions: () => this.getModePickerActionBarActions()
94
210
  },
95
- showItemKeybindings: true
211
+ showItemKeybindings: true,
212
+ reporter: {
213
+ name: "ChatModePicker",
214
+ includeOptions: true
215
+ }
96
216
  };
97
- super(action, modePickerActionWidgetOptions, actionWidgetService, keybindingService, contextKeyService);
217
+ super(
218
+ action,
219
+ modePickerActionWidgetOptions,
220
+ pickerOptions,
221
+ actionWidgetService,
222
+ keybindingService,
223
+ contextKeyService,
224
+ telemetryService
225
+ );
98
226
  this.delegate = delegate;
99
227
  this.contextKeyService = contextKeyService;
100
228
  this.menuService = menuService;
229
+ this._productService = _productService;
101
230
  this._register(autorun(reader => {
102
231
  this.delegate.currentMode.read(reader).label.read(reader);
103
232
  if (this.element) {
@@ -107,31 +236,50 @@ let ModePickerActionItem = class ModePickerActionItem extends ActionWidgetDropdo
107
236
  }
108
237
  getModePickerActionBarActions() {
109
238
  const menuActions = this.menuService.createMenu(MenuId.ChatModePicker, this.contextKeyService);
110
- const menuContributions = getFlatActionBarActions(menuActions.getActions({ renderShortTitle: true }));
239
+ const menuContributions = getFlatActionBarActions(menuActions.getActions({
240
+ renderShortTitle: true
241
+ }));
111
242
  menuActions.dispose();
112
243
  return menuContributions;
113
244
  }
114
245
  renderLabel(element) {
115
246
  this.setAriaLabelAttributes(element);
116
- const state = this.delegate.currentMode.get().label.get();
117
- reset(element, $('span.chat-model-label', undefined, state), ...renderLabelWithIcons(`$(chevron-down)`));
247
+ const currentMode = this.delegate.currentMode.get();
248
+ const isDefault = currentMode.id === ChatMode.Agent.id;
249
+ const state = currentMode.label.get();
250
+ let icon = currentMode.icon.get();
251
+ if (!icon && isModeConsideredBuiltIn(currentMode, this._productService)) {
252
+ icon = builtinDefaultIcon;
253
+ }
254
+ const labelElements = [];
255
+ if (icon) {
256
+ labelElements.push(...renderLabelWithIcons(`$(${icon.id})`));
257
+ }
258
+ if (!isDefault || !icon || !this.pickerOptions.onlyShowIconsForDefaultActions.get()) {
259
+ labelElements.push($("span.chat-input-picker-label", undefined, state));
260
+ }
261
+ labelElements.push(...renderLabelWithIcons(`$(chevron-down)`));
262
+ reset(element, ...labelElements);
118
263
  return null;
119
264
  }
120
- render(container) {
121
- super.render(container);
122
- container.classList.add('chat-modelPicker-item');
123
- }
124
265
  };
125
- ModePickerActionItem = ( __decorate([
126
- ( __param(2, IActionWidgetService)),
127
- ( __param(3, IChatAgentService)),
128
- ( __param(4, IKeybindingService)),
129
- ( __param(5, IConfigurationService)),
130
- ( __param(6, IContextKeyService)),
131
- ( __param(7, IChatModeService)),
132
- ( __param(8, IMenuService)),
133
- ( __param(9, ICommandService)),
134
- ( __param(10, IProductService))
135
- ], ModePickerActionItem));
266
+ ModePickerActionItem = ( __decorate([( __param(3, IActionWidgetService)), ( __param(4, IChatAgentService)), ( __param(5, IKeybindingService)), ( __param(6, IConfigurationService)), ( __param(7, IContextKeyService)), ( __param(8, IChatModeService)), ( __param(9, IMenuService)), ( __param(10, ICommandService)), ( __param(11, IProductService)), ( __param(12, ITelemetryService)), ( __param(13, IOpenerService))], ModePickerActionItem));
267
+ function isModeConsideredBuiltIn(mode, productService) {
268
+ if (mode.isBuiltin) {
269
+ return true;
270
+ }
271
+ if (mode.source?.storage !== PromptsStorage.extension) {
272
+ return false;
273
+ }
274
+ const chatExtensionId = productService.defaultChatAgent?.chatExtensionId;
275
+ if (!chatExtensionId || mode.source.extensionId.value !== chatExtensionId) {
276
+ return false;
277
+ }
278
+ const modeUri = mode.uri?.get();
279
+ if (!modeUri) {
280
+ return true;
281
+ }
282
+ return !isOrganizationPromptFile(modeUri, mode.source.extensionId, productService);
283
+ }
136
284
 
137
285
  export { ModePickerActionItem };
@@ -1,30 +1,29 @@
1
+ import { IManagedHoverContent } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hover";
1
2
  import { IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
2
- import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
3
- import { ILanguageModelChatMetadataAndIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
4
3
  import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
5
- import { ActionWidgetDropdownActionViewItem } from "../../../../../../platform/actions/browser/actionWidgetDropdownActionViewItem.js";
4
+ import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
6
5
  import { IActionWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service";
7
6
  import { IActionWidgetDropdownOptions } from "../../../../../../platform/actionWidget/browser/actionWidgetDropdown.js";
8
- import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
9
7
  import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
10
- import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
8
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
11
9
  import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
12
- import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
13
10
  import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
14
- import { IManagedHoverContent } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hover";
11
+ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
12
+ import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
13
+ import { ILanguageModelChatMetadataAndIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
14
+ import { ChatInputPickerActionViewItem, IChatInputPickerOptions } from "./chatInputPickerActionItem.js";
15
15
  export interface IModelPickerDelegate {
16
- readonly onDidChangeModel: Event<ILanguageModelChatMetadataAndIdentifier>;
17
- getCurrentModel(): ILanguageModelChatMetadataAndIdentifier | undefined;
16
+ readonly currentModel: IObservable<ILanguageModelChatMetadataAndIdentifier | undefined>;
18
17
  setModel(model: ILanguageModelChatMetadataAndIdentifier): void;
19
18
  getModels(): ILanguageModelChatMetadataAndIdentifier[];
20
19
  }
21
20
  /**
22
21
  * Action view item for selecting a language model in the chat interface.
23
22
  */
24
- export declare class ModelPickerActionItem extends ActionWidgetDropdownActionViewItem {
23
+ export declare class ModelPickerActionItem extends ChatInputPickerActionViewItem {
25
24
  protected currentModel: ILanguageModelChatMetadataAndIdentifier | undefined;
26
- constructor(action: IAction, currentModel: ILanguageModelChatMetadataAndIdentifier | undefined, widgetOptions: Omit<IActionWidgetDropdownOptions, "label" | "labelRenderer"> | undefined, delegate: IModelPickerDelegate, actionWidgetService: IActionWidgetService, contextKeyService: IContextKeyService, commandService: ICommandService, chatEntitlementService: IChatEntitlementService, keybindingService: IKeybindingService, telemetryService: ITelemetryService, productService: IProductService);
25
+ constructor(action: IAction, widgetOptions: Omit<IActionWidgetDropdownOptions, "label" | "labelRenderer"> | undefined, delegate: IModelPickerDelegate, pickerOptions: IChatInputPickerOptions, actionWidgetService: IActionWidgetService, contextKeyService: IContextKeyService, commandService: ICommandService, chatEntitlementService: IChatEntitlementService, keybindingService: IKeybindingService, telemetryService: ITelemetryService, productService: IProductService);
27
26
  protected getHoverContents(): IManagedHoverContent | undefined;
27
+ protected setAriaLabelAttributes(element: HTMLElement): void;
28
28
  protected renderLabel(element: HTMLElement): IDisposable | null;
29
- render(container: HTMLElement): void;
30
29
  }
@@ -1,53 +1,68 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
3
  import { $, reset } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
4
  import { renderIcon, renderLabelWithIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
6
- import { ActionWidgetDropdownActionViewItem } from '../../../../../../platform/actions/browser/actionWidgetDropdownActionViewItem.js';
5
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
6
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
7
7
  import { IActionWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service';
8
- import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
9
8
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
10
- import { ChatEntitlement } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
11
- import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
9
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
12
10
  import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
13
- import { DEFAULT_MODEL_PICKER_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/widget/input/modelPickerWidget';
14
- import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
15
11
  import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
16
- import { MANAGE_CHAT_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
12
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
17
13
  import { TelemetryTrustedValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
14
+ import { ChatEntitlement } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
15
+ import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
16
+ import { MANAGE_CHAT_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
17
+ import { DEFAULT_MODEL_PICKER_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/widget/input/modelPickerWidget';
18
+ import { ChatInputPickerActionViewItem } from './chatInputPickerActionItem.js';
19
+ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
18
20
 
19
- function modelDelegateToWidgetActionsProvider(delegate, telemetryService) {
21
+ function modelDelegateToWidgetActionsProvider(delegate, telemetryService, pickerOptions) {
20
22
  return {
21
23
  getActions: () => {
22
24
  const models = delegate.getModels();
23
25
  if (models.length === 0) {
24
26
  return [{
25
- id: 'auto',
26
- enabled: true,
27
- checked: true,
28
- category: DEFAULT_MODEL_PICKER_CATEGORY,
29
- class: undefined,
30
- tooltip: ( localize(5855, "Auto")),
31
- label: ( localize(5855, "Auto")),
32
- run: () => { }
33
- }];
27
+ id: "auto",
28
+ enabled: true,
29
+ checked: true,
30
+ category: DEFAULT_MODEL_PICKER_CATEGORY,
31
+ class: undefined,
32
+ description: ( localize(6112, "Best for your request based on capacity and performance.")),
33
+ tooltip: ( localize(6113, "Auto")),
34
+ label: ( localize(6113, "Auto")),
35
+ hover: {
36
+ content: ( localize(
37
+ 6114,
38
+ "Automatically selects the best model for your task based on context and complexity."
39
+ )),
40
+ position: pickerOptions.hoverPosition
41
+ },
42
+ run: () => {}
43
+ }];
34
44
  }
35
45
  return ( models.map(model => {
46
+ const hoverContent = model.metadata.tooltip;
36
47
  return {
37
48
  id: model.metadata.id,
38
49
  enabled: true,
39
50
  icon: model.metadata.statusIcon,
40
- checked: model.identifier === delegate.getCurrentModel()?.identifier,
51
+ checked: model.identifier === delegate.currentModel.get()?.identifier,
41
52
  category: model.metadata.modelPickerCategory || DEFAULT_MODEL_PICKER_CATEGORY,
42
53
  class: undefined,
43
- description: model.metadata.detail,
44
- tooltip: model.metadata.tooltip ?? model.metadata.name,
54
+ description: model.metadata.multiplier ?? model.metadata.detail,
55
+ tooltip: hoverContent ? "" : model.metadata.name,
56
+ hover: hoverContent ? {
57
+ content: hoverContent,
58
+ position: pickerOptions.hoverPosition
59
+ } : undefined,
45
60
  label: model.metadata.name,
46
61
  run: () => {
47
- const previousModel = delegate.getCurrentModel();
48
- telemetryService.publicLog2('chat.modelChange', {
49
- fromModel: previousModel?.metadata.vendor === 'copilot' ? ( new TelemetryTrustedValue(previousModel.identifier)) : 'unknown',
50
- toModel: model.metadata.vendor === 'copilot' ? ( new TelemetryTrustedValue(model.identifier)) : 'unknown'
62
+ const previousModel = delegate.currentModel.get();
63
+ telemetryService.publicLog2("chat.modelChange", {
64
+ fromModel: previousModel?.metadata.vendor === "copilot" ? ( new TelemetryTrustedValue(previousModel.identifier)) : "unknown",
65
+ toModel: model.metadata.vendor === "copilot" ? ( new TelemetryTrustedValue(model.identifier)) : "unknown"
51
66
  });
52
67
  delegate.setModel(model);
53
68
  }
@@ -60,34 +75,28 @@ function getModelPickerActionBarActionProvider(commandService, chatEntitlementSe
60
75
  const actionProvider = {
61
76
  getActions: () => {
62
77
  const additionalActions = [];
63
- if (chatEntitlementService.entitlement === ChatEntitlement.Free ||
64
- chatEntitlementService.entitlement === ChatEntitlement.Pro ||
65
- chatEntitlementService.entitlement === ChatEntitlement.ProPlus ||
66
- chatEntitlementService.isInternal) {
78
+ if (chatEntitlementService.entitlement === ChatEntitlement.Free || chatEntitlementService.entitlement === ChatEntitlement.Pro || chatEntitlementService.entitlement === ChatEntitlement.ProPlus || chatEntitlementService.entitlement === ChatEntitlement.Business || chatEntitlementService.entitlement === ChatEntitlement.Enterprise || chatEntitlementService.isInternal) {
67
79
  additionalActions.push({
68
- id: 'manageModels',
69
- label: ( localize(5856, "Manage Models...")),
80
+ id: "manageModels",
81
+ label: ( localize(6115, "Manage Models...")),
70
82
  enabled: true,
71
- tooltip: ( localize(5857, "Manage Language Models")),
83
+ tooltip: ( localize(6116, "Manage Language Models")),
72
84
  class: undefined,
73
85
  run: () => {
74
86
  commandService.executeCommand(MANAGE_CHAT_COMMAND_ID);
75
87
  }
76
88
  });
77
89
  }
78
- const isNewOrAnonymousUser = !chatEntitlementService.sentiment.installed ||
79
- chatEntitlementService.entitlement === ChatEntitlement.Available ||
80
- chatEntitlementService.anonymous ||
81
- chatEntitlementService.entitlement === ChatEntitlement.Unknown;
90
+ const isNewOrAnonymousUser = !chatEntitlementService.sentiment.installed || chatEntitlementService.entitlement === ChatEntitlement.Available || chatEntitlementService.anonymous || chatEntitlementService.entitlement === ChatEntitlement.Unknown;
82
91
  if (isNewOrAnonymousUser || chatEntitlementService.entitlement === ChatEntitlement.Free) {
83
92
  additionalActions.push({
84
- id: 'moreModels',
85
- label: isNewOrAnonymousUser ? ( localize(5858, "Add Language Models")) : ( localize(5859, "Add Premium Models")),
93
+ id: "moreModels",
94
+ label: isNewOrAnonymousUser ? ( localize(6117, "Add Language Models")) : ( localize(6118, "Add Premium Models")),
86
95
  enabled: true,
87
- tooltip: isNewOrAnonymousUser ? ( localize(5860, "Add Language Models")) : ( localize(5861, "Add Premium Models")),
96
+ tooltip: isNewOrAnonymousUser ? ( localize(6119, "Add Language Models")) : ( localize(6120, "Add Premium Models")),
88
97
  class: undefined,
89
98
  run: () => {
90
- const commandId = isNewOrAnonymousUser ? 'workbench.action.chat.triggerSetup' : 'workbench.action.chat.upgradePlan';
99
+ const commandId = isNewOrAnonymousUser ? "workbench.action.chat.triggerSetup" : "workbench.action.chat.upgradePlan";
91
100
  commandService.executeCommand(commandId);
92
101
  }
93
102
  });
@@ -97,20 +106,45 @@ function getModelPickerActionBarActionProvider(commandService, chatEntitlementSe
97
106
  };
98
107
  return actionProvider;
99
108
  }
100
- let ModelPickerActionItem = class ModelPickerActionItem extends ActionWidgetDropdownActionViewItem {
101
- constructor(action, currentModel, widgetOptions, delegate, actionWidgetService, contextKeyService, commandService, chatEntitlementService, keybindingService, telemetryService, productService) {
109
+ let ModelPickerActionItem = class ModelPickerActionItem extends ChatInputPickerActionViewItem {
110
+ constructor(
111
+ action,
112
+ widgetOptions,
113
+ delegate,
114
+ pickerOptions,
115
+ actionWidgetService,
116
+ contextKeyService,
117
+ commandService,
118
+ chatEntitlementService,
119
+ keybindingService,
120
+ telemetryService,
121
+ productService
122
+ ) {
102
123
  const actionWithLabel = {
103
124
  ...action,
104
- label: currentModel?.metadata.name ?? ( localize(5855, "Auto")),
105
- run: () => { }
125
+ label: delegate.currentModel.get()?.metadata.name ?? ( localize(6113, "Auto")),
126
+ run: () => {}
106
127
  };
107
128
  const modelPickerActionWidgetOptions = {
108
- actionProvider: modelDelegateToWidgetActionsProvider(delegate, telemetryService),
109
- actionBarActionProvider: getModelPickerActionBarActionProvider(commandService, chatEntitlementService)
129
+ actionProvider: modelDelegateToWidgetActionsProvider(delegate, telemetryService, pickerOptions),
130
+ actionBarActionProvider: getModelPickerActionBarActionProvider(commandService, chatEntitlementService),
131
+ reporter: {
132
+ name: "ChatModelPicker",
133
+ includeOptions: true
134
+ }
110
135
  };
111
- super(actionWithLabel, widgetOptions ?? modelPickerActionWidgetOptions, actionWidgetService, keybindingService, contextKeyService);
112
- this.currentModel = currentModel;
113
- this._register(delegate.onDidChangeModel(model => {
136
+ super(
137
+ actionWithLabel,
138
+ widgetOptions ?? modelPickerActionWidgetOptions,
139
+ pickerOptions,
140
+ actionWidgetService,
141
+ keybindingService,
142
+ contextKeyService,
143
+ telemetryService
144
+ );
145
+ this.currentModel = delegate.currentModel.get();
146
+ this._register(autorun(t => {
147
+ const model = delegate.currentModel.read(t);
114
148
  this.currentModel = model;
115
149
  this.updateTooltip();
116
150
  if (this.element) {
@@ -119,36 +153,35 @@ let ModelPickerActionItem = class ModelPickerActionItem extends ActionWidgetDrop
119
153
  }));
120
154
  }
121
155
  getHoverContents() {
122
- const label = `${( localize(5862, "Pick Model"))}${super.getHoverContents()}`;
123
- const { statusIcon, tooltip } = this.currentModel?.metadata || {};
156
+ const label = `${( localize(6121, "Pick Model"))}${super.getHoverContents()}`;
157
+ const {
158
+ statusIcon,
159
+ tooltip
160
+ } = this.currentModel?.metadata || {};
124
161
  return statusIcon && tooltip ? `${label} • ${tooltip}` : label;
125
162
  }
163
+ setAriaLabelAttributes(element) {
164
+ super.setAriaLabelAttributes(element);
165
+ const modelName = this.currentModel?.metadata.name ?? ( localize(6113, "Auto"));
166
+ element.ariaLabel = ( localize(6122, "Pick Model, {0}", modelName));
167
+ }
126
168
  renderLabel(element) {
127
- const { name, statusIcon } = this.currentModel?.metadata || {};
169
+ const {
170
+ name,
171
+ statusIcon
172
+ } = this.currentModel?.metadata || {};
128
173
  const domChildren = [];
129
174
  if (statusIcon) {
130
175
  const iconElement = renderIcon(statusIcon);
131
176
  domChildren.push(iconElement);
132
177
  }
133
- domChildren.push($('span.chat-model-label', undefined, name ?? ( localize(5855, "Auto"))));
178
+ domChildren.push($("span.chat-input-picker-label", undefined, name ?? ( localize(6113, "Auto"))));
134
179
  domChildren.push(...renderLabelWithIcons(`$(chevron-down)`));
135
180
  reset(element, ...domChildren);
136
181
  this.setAriaLabelAttributes(element);
137
182
  return null;
138
183
  }
139
- render(container) {
140
- super.render(container);
141
- container.classList.add('chat-modelPicker-item');
142
- }
143
184
  };
144
- ModelPickerActionItem = ( __decorate([
145
- ( __param(4, IActionWidgetService)),
146
- ( __param(5, IContextKeyService)),
147
- ( __param(6, ICommandService)),
148
- ( __param(7, IChatEntitlementService)),
149
- ( __param(8, IKeybindingService)),
150
- ( __param(9, ITelemetryService)),
151
- ( __param(10, IProductService))
152
- ], ModelPickerActionItem));
185
+ ModelPickerActionItem = ( __decorate([( __param(4, IActionWidgetService)), ( __param(5, IContextKeyService)), ( __param(6, ICommandService)), ( __param(7, IChatEntitlementService)), ( __param(8, IKeybindingService)), ( __param(9, ITelemetryService)), ( __param(10, IProductService))], ModelPickerActionItem));
153
186
 
154
187
  export { ModelPickerActionItem };