@codingame/monaco-vscode-katex-common 24.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/empty.js +1 -0
  2. package/package.json +45 -0
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +37 -0
  4. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +127 -0
  5. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +27 -0
  6. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +81 -0
  7. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +44 -0
  8. package/vscode/src/vs/platform/actions/browser/buttonbar.js +172 -0
  9. package/vscode/src/vs/platform/editor/browser/editor.d.ts +12 -0
  10. package/vscode/src/vs/platform/editor/browser/editor.js +51 -0
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +41 -0
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +295 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.d.ts +2 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +60 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +65 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +650 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +2 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +364 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +38 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +207 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.d.ts +17 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.js +216 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.d.ts +24 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +114 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentModel.d.ts +34 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentModel.js +141 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.d.ts +169 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.js +951 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer.d.ts +19 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer.js +109 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAgentCommandContentPart.d.ts +12 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAgentCommandContentPart.js +47 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAnonymousRateLimitedPart.d.ts +13 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAnonymousRateLimitedPart.js +49 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.d.ts +27 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.js +160 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatChangesSummaryPart.d.ts +40 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatChangesSummaryPart.js +286 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.d.ts +13 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.js +49 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollapsibleContentPart.d.ts +34 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollapsibleContentPart.js +101 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.d.ts +14 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.js +30 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.d.ts +11 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +37 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.d.ts +17 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +69 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.d.ts +116 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.js +417 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentCodePools.d.ts +20 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentCodePools.js +66 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatElicitationContentPart.d.ts +25 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatElicitationContentPart.js +123 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorConfirmationPart.d.ts +18 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorConfirmationPart.js +60 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorContentPart.d.ts +16 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorContentPart.js +46 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatExtensionsContentPart.d.ts +19 -0
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatExtensionsContentPart.js +57 -0
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.d.ts +94 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.js +567 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMcpServersInteractionContentPart.d.ts +34 -0
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMcpServersInteractionContentPart.js +224 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.d.ts +34 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.js +259 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.d.ts +38 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.js +160 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatPullRequestContentPart.d.ts +16 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatPullRequestContentPart.js +55 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatQuotaExceededPart.d.ts +17 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatQuotaExceededPart.js +117 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.d.ts +66 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +528 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.d.ts +31 -0
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.js +160 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.d.ts +17 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.js +49 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.d.ts +18 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +91 -0
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.d.ts +13 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.js +6 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.d.ts +54 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.js +429 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.d.ts +40 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.js +347 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInputOutputContentPart.d.ts +56 -0
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInputOutputContentPart.js +164 -0
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolOutputContentSubPart.d.ts +32 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolOutputContentSubPart.js +224 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.d.ts +35 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +173 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatConfirmationWidget.css +341 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatExtensionsContent.css +27 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatMarkdownPart.css +23 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatMcpServersInteractionContent.css +14 -0
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatPullRequestContent.css +75 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatTerminalToolProgressPart.css +221 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatThinkingContent.css +162 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +41 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +94 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +15 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +96 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +18 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +147 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +14 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatResultListSubPart.js +23 -0
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +68 -0
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +353 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +100 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +1085 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +39 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +275 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +32 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +119 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +19 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +36 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +21 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolOutputPart.js +130 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +25 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +225 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +24 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolProgressPart.js +101 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatDiffBlockPart.d.ts +42 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatDiffBlockPart.js +127 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.d.ts +43 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.js +388 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +49 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +721 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.d.ts +13 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +52 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.d.ts +39 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.js +409 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.d.ts +334 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +2008 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPartWidgets.d.ts +52 -0
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPartWidgets.js +93 -0
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.d.ts +217 -0
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1573 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.d.ts +43 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +249 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.d.ts +50 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +84 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatSelectedTools.d.ts +32 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatSelectedTools.js +174 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +31 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +101 -0
  148. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +19 -0
  149. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +76 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionAction.css +39 -0
  151. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.d.ts +292 -0
  152. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +2014 -0
  153. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css +171 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.d.ts +173 -0
  155. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +797 -0
  156. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.d.ts +54 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.js +345 -0
  158. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.d.ts +10 -0
  159. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.js +1069 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.d.ts +34 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +139 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css +2880 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css +87 -0
  164. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatCodeBlockPill.css +139 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatInlineAnchorWidget.css +61 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewWelcome.css +209 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modePickerActionItem.d.ts +28 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modePickerActionItem.js +135 -0
  169. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.d.ts +28 -0
  170. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.js +147 -0
  171. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +71 -0
  172. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +279 -0
  173. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.d.ts +28 -0
  174. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +28 -0
  175. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.d.ts +13 -0
  176. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +38 -0
  177. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.d.ts +55 -0
  178. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +176 -0
  179. package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.d.ts +45 -0
  180. package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +207 -0
  181. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +48 -0
  182. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +373 -0
  183. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +171 -0
  184. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +1442 -0
  185. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +199 -0
  186. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +482 -0
  187. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +28 -0
  188. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +37 -0
  189. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +95 -0
  190. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +497 -0
  191. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +76 -0
  192. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +464 -0
  193. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +124 -0
  194. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +562 -0
  195. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +42 -0
  196. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +279 -0
  197. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +411 -0
  198. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +13 -0
  199. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +66 -0
  200. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +61 -0
  201. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +154 -0
  202. package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.d.ts +19 -0
  203. package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +201 -0
  204. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +41 -0
  205. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +372 -0
  206. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +4 -0
  207. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +58 -0
  208. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
  209. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +594 -0
  210. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
  211. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
  212. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
  213. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1746 -0
  214. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
  215. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +269 -0
  216. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
  217. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +806 -0
  218. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
  219. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +116 -0
  220. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
  221. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +62 -0
  222. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
  223. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
  224. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
  225. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +295 -0
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
  227. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +241 -0
  228. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
  229. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +146 -0
  230. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
  231. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +90 -0
  232. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +41 -0
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +42 -0
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +77 -0
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
  239. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
  240. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +823 -0
  241. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
  242. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +29 -0
  243. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
  244. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +567 -0
  245. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
  246. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +189 -0
  247. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
  248. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +439 -0
  249. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
  250. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +263 -0
  251. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
  252. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +48 -0
  253. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
  254. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
  255. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
  256. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +89 -0
  257. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
  258. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
  259. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
  260. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +108 -0
  261. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +34 -0
  262. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +145 -0
package/empty.js ADDED
@@ -0,0 +1 @@
1
+ export {}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@codingame/monaco-vscode-katex-common",
3
+ "version": "24.1.0",
4
+ "private": false,
5
+ "description": "VSCode public API plugged on the monaco editor - common package depending on katex",
6
+ "keywords": [],
7
+ "author": {
8
+ "name": "CodinGame",
9
+ "url": "http://www.codingame.com"
10
+ },
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
15
+ },
16
+ "type": "module",
17
+ "dependencies": {
18
+ "@codingame/monaco-vscode-api": "24.1.0",
19
+ "katex": "0.16.22",
20
+ "marked": "14.0.0"
21
+ },
22
+ "exports": {
23
+ ".": {
24
+ "default": "./empty.js"
25
+ },
26
+ "./vscode/*.css": {
27
+ "default": "./vscode/src/*.css"
28
+ },
29
+ "./vscode/*": {
30
+ "types": "./vscode/src/*.d.ts",
31
+ "default": "./vscode/src/*.js"
32
+ },
33
+ "./*": {
34
+ "types": "./*.d.ts",
35
+ "default": "./*.js"
36
+ }
37
+ },
38
+ "typesVersions": {
39
+ "*": {
40
+ "vscode/*": [
41
+ "./vscode/src/*.d.ts"
42
+ ]
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,37 @@
1
+ import { IActionWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service";
2
+ import { IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
3
+ import { BaseDropdown, IActionProvider, IBaseDropdownOptions } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/dropdown/dropdown";
4
+ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
5
+ import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
6
+ export interface IActionWidgetDropdownAction extends IAction {
7
+ category?: {
8
+ label: string;
9
+ order: number;
10
+ showHeader?: boolean;
11
+ };
12
+ icon?: ThemeIcon;
13
+ description?: string;
14
+ }
15
+ export interface IActionWidgetDropdownActionProvider {
16
+ getActions(): IActionWidgetDropdownAction[];
17
+ }
18
+ export interface IActionWidgetDropdownOptions extends IBaseDropdownOptions {
19
+ readonly actions?: IActionWidgetDropdownAction[];
20
+ readonly actionProvider?: IActionWidgetDropdownActionProvider;
21
+ readonly actionBarActions?: IAction[];
22
+ readonly actionBarActionProvider?: IActionProvider;
23
+ readonly showItemKeybindings?: boolean;
24
+ }
25
+ /**
26
+ * Action widget dropdown is a dropdown that uses the action widget under the hood to simulate a native dropdown menu
27
+ * The benefits of this include non native features such as headers, descriptions, icons, and button bar
28
+ */
29
+ export declare class ActionWidgetDropdown extends BaseDropdown {
30
+ private readonly _options;
31
+ private readonly actionWidgetService;
32
+ private readonly keybindingService;
33
+ private enabled;
34
+ constructor(container: HTMLElement, _options: IActionWidgetDropdownOptions, actionWidgetService: IActionWidgetService, keybindingService: IKeybindingService);
35
+ show(): void;
36
+ setEnabled(enabled: boolean): void;
37
+ }
@@ -0,0 +1,127 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { IActionWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service';
4
+ import { BaseDropdown } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/dropdown/dropdown';
5
+ import { ActionListItemKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionList';
6
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
7
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
8
+ import { getActiveElement, isHTMLElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
9
+ import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
10
+
11
+ let ActionWidgetDropdown = class ActionWidgetDropdown extends BaseDropdown {
12
+ constructor(container, _options, actionWidgetService, keybindingService) {
13
+ super(container, _options);
14
+ this._options = _options;
15
+ this.actionWidgetService = actionWidgetService;
16
+ this.keybindingService = keybindingService;
17
+ this.enabled = true;
18
+ }
19
+ show() {
20
+ if (!this.enabled) {
21
+ return;
22
+ }
23
+ let actionBarActions = this._options.actionBarActions ?? this._options.actionBarActionProvider?.getActions() ?? [];
24
+ const actions = this._options.actions ?? this._options.actionProvider?.getActions() ?? [];
25
+ const actionWidgetItems = [];
26
+ const actionsByCategory = ( new Map());
27
+ for (const action of actions) {
28
+ let category = action.category;
29
+ if (!category) {
30
+ category = { label: '', order: Number.MIN_SAFE_INTEGER };
31
+ }
32
+ if (!( actionsByCategory.has(category.label))) {
33
+ actionsByCategory.set(category.label, []);
34
+ }
35
+ actionsByCategory.get(category.label).push(action);
36
+ }
37
+ const sortedCategories = Array.from(actionsByCategory.entries())
38
+ .sort((a, b) => {
39
+ const aOrder = a[1][0]?.category?.order ?? Number.MAX_SAFE_INTEGER;
40
+ const bOrder = b[1][0]?.category?.order ?? Number.MAX_SAFE_INTEGER;
41
+ return aOrder - bOrder;
42
+ });
43
+ for (let i = 0; i < sortedCategories.length; i++) {
44
+ const [categoryLabel, categoryActions] = sortedCategories[i];
45
+ const showHeader = categoryActions[0]?.category?.showHeader ?? false;
46
+ if (showHeader && categoryLabel) {
47
+ actionWidgetItems.push({
48
+ kind: ActionListItemKind.Header,
49
+ label: categoryLabel,
50
+ canPreview: false,
51
+ disabled: false,
52
+ hideIcon: false,
53
+ });
54
+ }
55
+ for (const action of categoryActions) {
56
+ actionWidgetItems.push({
57
+ item: action,
58
+ tooltip: action.tooltip,
59
+ description: action.description,
60
+ kind: ActionListItemKind.Action,
61
+ canPreview: false,
62
+ group: { title: '', icon: action.icon ?? ThemeIcon.fromId(action.checked ? Codicon.check.id : Codicon.blank.id) },
63
+ disabled: !action.enabled,
64
+ hideIcon: false,
65
+ label: action.label,
66
+ keybinding: this._options.showItemKeybindings ?
67
+ this.keybindingService.lookupKeybinding(action.id) :
68
+ undefined,
69
+ });
70
+ }
71
+ if (i < sortedCategories.length - 1) {
72
+ actionWidgetItems.push({
73
+ label: '',
74
+ kind: ActionListItemKind.Separator,
75
+ canPreview: false,
76
+ disabled: false,
77
+ hideIcon: false,
78
+ });
79
+ }
80
+ }
81
+ const previouslyFocusedElement = getActiveElement();
82
+ const actionWidgetDelegate = {
83
+ onSelect: (action, preview) => {
84
+ this.actionWidgetService.hide();
85
+ action.run();
86
+ },
87
+ onHide: () => {
88
+ if (isHTMLElement(previouslyFocusedElement)) {
89
+ previouslyFocusedElement.focus();
90
+ }
91
+ }
92
+ };
93
+ actionBarActions = ( actionBarActions.map(action => ({
94
+ ...action,
95
+ run: async (...args) => {
96
+ this.actionWidgetService.hide();
97
+ return action.run(...args);
98
+ }
99
+ })));
100
+ const accessibilityProvider = {
101
+ isChecked(element) {
102
+ return element.kind === ActionListItemKind.Action && !!element?.item?.checked;
103
+ },
104
+ getRole: (e) => {
105
+ switch (e.kind) {
106
+ case ActionListItemKind.Action:
107
+ return 'menuitemcheckbox';
108
+ case ActionListItemKind.Separator:
109
+ return 'separator';
110
+ default:
111
+ return 'separator';
112
+ }
113
+ },
114
+ getWidgetRole: () => 'menu',
115
+ };
116
+ this.actionWidgetService.show(this._options.label ?? '', false, actionWidgetItems, actionWidgetDelegate, this.element, undefined, actionBarActions, accessibilityProvider);
117
+ }
118
+ setEnabled(enabled) {
119
+ this.enabled = enabled;
120
+ }
121
+ };
122
+ ActionWidgetDropdown = ( __decorate([
123
+ ( __param(2, IActionWidgetService)),
124
+ ( __param(3, IKeybindingService))
125
+ ], ActionWidgetDropdown));
126
+
127
+ export { ActionWidgetDropdown };
@@ -0,0 +1,27 @@
1
+ import { BaseActionViewItem } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems";
2
+ import { IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
3
+ import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
+ import { IActionWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service";
5
+ import { IActionWidgetDropdownOptions } from "../../actionWidget/browser/actionWidgetDropdown.js";
6
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
7
+ import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
8
+ /**
9
+ * Action view item for the custom action widget dropdown widget.
10
+ * Very closely based off of `DropdownMenuActionViewItem`, would be good to have some code re-use in the future
11
+ */
12
+ export declare class ActionWidgetDropdownActionViewItem extends BaseActionViewItem {
13
+ private readonly actionWidgetOptions;
14
+ private readonly _actionWidgetService;
15
+ private readonly _keybindingService;
16
+ private readonly _contextKeyService;
17
+ private actionWidgetDropdown;
18
+ private actionItem;
19
+ constructor(action: IAction, actionWidgetOptions: Omit<IActionWidgetDropdownOptions, "label" | "labelRenderer">, _actionWidgetService: IActionWidgetService, _keybindingService: IKeybindingService, _contextKeyService: IContextKeyService);
20
+ render(container: HTMLElement): void;
21
+ protected renderLabel(element: HTMLElement): IDisposable | null;
22
+ protected updateAriaLabel(): void;
23
+ protected setAriaLabelAttributes(element: HTMLElement): void;
24
+ protected getTooltip(): string;
25
+ show(): void;
26
+ protected updateEnabled(): void;
27
+ }
@@ -0,0 +1,81 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
+ import { BaseActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
5
+ import { getBaseLayerHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegate2';
6
+ import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
7
+ import { IActionWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service';
8
+ import { ActionWidgetDropdown } from '../../actionWidget/browser/actionWidgetDropdown.js';
9
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
10
+ import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
11
+
12
+ let ActionWidgetDropdownActionViewItem = class ActionWidgetDropdownActionViewItem extends BaseActionViewItem {
13
+ constructor(action, actionWidgetOptions, _actionWidgetService, _keybindingService, _contextKeyService) {
14
+ super(undefined, action);
15
+ this.actionWidgetOptions = actionWidgetOptions;
16
+ this._actionWidgetService = _actionWidgetService;
17
+ this._keybindingService = _keybindingService;
18
+ this._contextKeyService = _contextKeyService;
19
+ this.actionItem = null;
20
+ }
21
+ render(container) {
22
+ this.actionItem = container;
23
+ const labelRenderer = (el) => {
24
+ this.element = append(el, $('a.action-label'));
25
+ return this.renderLabel(this.element);
26
+ };
27
+ this.actionWidgetDropdown = this._register(( new ActionWidgetDropdown(
28
+ container,
29
+ { ...this.actionWidgetOptions, labelRenderer },
30
+ this._actionWidgetService,
31
+ this._keybindingService
32
+ )));
33
+ this._register(this.actionWidgetDropdown.onDidChangeVisibility(visible => {
34
+ this.element?.setAttribute('aria-expanded', `${visible}`);
35
+ }));
36
+ this.updateTooltip();
37
+ this.updateEnabled();
38
+ }
39
+ renderLabel(element) {
40
+ element.classList.add('codicon');
41
+ if (this._action.label) {
42
+ this._register(getBaseLayerHoverDelegate().setupManagedHover(this.options.hoverDelegate ?? getDefaultHoverDelegate('mouse'), element, this._action.label));
43
+ }
44
+ return null;
45
+ }
46
+ updateAriaLabel() {
47
+ if (this.element) {
48
+ this.setAriaLabelAttributes(this.element);
49
+ }
50
+ }
51
+ setAriaLabelAttributes(element) {
52
+ element.setAttribute('role', 'button');
53
+ element.setAttribute('aria-haspopup', 'true');
54
+ element.setAttribute('aria-expanded', 'false');
55
+ element.ariaLabel = (this.getTooltip() + ' - ' + (element.textContent || this._action.label)) || '';
56
+ }
57
+ getTooltip() {
58
+ const keybinding = this._keybindingService.lookupKeybinding(this.action.id, this._contextKeyService);
59
+ const keybindingLabel = keybinding && keybinding.getLabel();
60
+ const tooltip = this.action.tooltip ?? this.action.label;
61
+ return keybindingLabel
62
+ ? `${tooltip} (${keybindingLabel})`
63
+ : tooltip;
64
+ }
65
+ show() {
66
+ this.actionWidgetDropdown?.show();
67
+ }
68
+ updateEnabled() {
69
+ const disabled = !this.action.enabled;
70
+ this.actionItem?.classList.toggle('disabled', disabled);
71
+ this.element?.classList.toggle('disabled', disabled);
72
+ this.actionWidgetDropdown?.setEnabled(!disabled);
73
+ }
74
+ };
75
+ ActionWidgetDropdownActionViewItem = ( __decorate([
76
+ ( __param(2, IActionWidgetService)),
77
+ ( __param(3, IKeybindingService)),
78
+ ( __param(4, IContextKeyService))
79
+ ], ActionWidgetDropdownActionViewItem));
80
+
81
+ export { ActionWidgetDropdownActionViewItem };
@@ -0,0 +1,44 @@
1
+ import { ButtonBar } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button";
2
+ import { IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
3
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
4
+ import { DisposableStore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
5
+ import { IToolBarRenderOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar";
6
+ import { MenuId, IMenuActionOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
7
+ import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
8
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
9
+ import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
10
+ import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
11
+ 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
+ export type IButtonConfigProvider = (action: IAction, index: number) => {
14
+ showIcon?: boolean;
15
+ showLabel?: boolean;
16
+ isSecondary?: boolean;
17
+ } | undefined;
18
+ export interface IWorkbenchButtonBarOptions {
19
+ telemetrySource?: string;
20
+ buttonConfigProvider?: IButtonConfigProvider;
21
+ }
22
+ export declare class WorkbenchButtonBar extends ButtonBar {
23
+ private readonly _options;
24
+ private readonly _contextMenuService;
25
+ private readonly _keybindingService;
26
+ private readonly _hoverService;
27
+ protected readonly _store: DisposableStore;
28
+ protected readonly _updateStore: DisposableStore;
29
+ private readonly _actionRunner;
30
+ private readonly _onDidChange;
31
+ readonly onDidChange: Event<this>;
32
+ constructor(container: HTMLElement, _options: IWorkbenchButtonBarOptions | undefined, _contextMenuService: IContextMenuService, _keybindingService: IKeybindingService, telemetryService: ITelemetryService, _hoverService: IHoverService);
33
+ dispose(): void;
34
+ update(actions: IAction[], secondary: IAction[]): void;
35
+ }
36
+ export interface IMenuWorkbenchButtonBarOptions extends IWorkbenchButtonBarOptions {
37
+ menuOptions?: IMenuActionOptions;
38
+ toolbarOptions?: IToolBarRenderOptions;
39
+ }
40
+ export declare class MenuWorkbenchButtonBar extends WorkbenchButtonBar {
41
+ constructor(container: HTMLElement, menuId: MenuId, options: IMenuWorkbenchButtonBarOptions | undefined, menuService: IMenuService, contextKeyService: IContextKeyService, contextMenuService: IContextMenuService, keybindingService: IKeybindingService, telemetryService: ITelemetryService, hoverService: IHoverService);
42
+ dispose(): void;
43
+ update(_actions: IAction[]): void;
44
+ }
@@ -0,0 +1,172 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { ButtonBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
4
+ import { createInstantHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
5
+ import { ActionRunner, SubmenuAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
6
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
7
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
8
+ import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
9
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
10
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
11
+ import { getActionBarActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
12
+ import { MenuItemAction } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
13
+ import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
14
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
15
+ import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
16
+ import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
17
+ import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
18
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
19
+
20
+ let WorkbenchButtonBar = class WorkbenchButtonBar extends ButtonBar {
21
+ constructor(container, _options, _contextMenuService, _keybindingService, telemetryService, _hoverService) {
22
+ super(container);
23
+ this._options = _options;
24
+ this._contextMenuService = _contextMenuService;
25
+ this._keybindingService = _keybindingService;
26
+ this._hoverService = _hoverService;
27
+ this._store = ( new DisposableStore());
28
+ this._updateStore = ( new DisposableStore());
29
+ this._onDidChange = ( new Emitter());
30
+ this.onDidChange = this._onDidChange.event;
31
+ this._actionRunner = this._store.add(( new ActionRunner()));
32
+ if (_options?.telemetrySource) {
33
+ this._actionRunner.onDidRun(e => {
34
+ telemetryService.publicLog2('workbenchActionExecuted', { id: e.action.id, from: _options.telemetrySource });
35
+ }, undefined, this._store);
36
+ }
37
+ }
38
+ dispose() {
39
+ this._onDidChange.dispose();
40
+ this._updateStore.dispose();
41
+ this._store.dispose();
42
+ super.dispose();
43
+ }
44
+ update(actions, secondary) {
45
+ const conifgProvider = this._options?.buttonConfigProvider ?? (() => ({ showLabel: true }));
46
+ this._updateStore.clear();
47
+ this.clear();
48
+ const hoverDelegate = this._updateStore.add(createInstantHoverDelegate());
49
+ for (let i = 0; i < actions.length; i++) {
50
+ const secondary = i > 0;
51
+ const actionOrSubmenu = actions[i];
52
+ let action;
53
+ let btn;
54
+ let tooltip = '';
55
+ const kb = actionOrSubmenu instanceof SubmenuAction ? '' : this._keybindingService.lookupKeybinding(actionOrSubmenu.id);
56
+ if (kb) {
57
+ tooltip = ( localize(
58
+ 1750,
59
+ "{0} ({1})",
60
+ actionOrSubmenu.tooltip || actionOrSubmenu.label,
61
+ kb.getLabel()
62
+ ));
63
+ }
64
+ else {
65
+ tooltip = actionOrSubmenu.tooltip || actionOrSubmenu.label;
66
+ }
67
+ if (actionOrSubmenu instanceof SubmenuAction && actionOrSubmenu.actions.length > 0) {
68
+ const [first, ...rest] = actionOrSubmenu.actions;
69
+ action = first;
70
+ btn = this.addButtonWithDropdown({
71
+ secondary: conifgProvider(action, i)?.isSecondary ?? secondary,
72
+ actionRunner: this._actionRunner,
73
+ actions: rest,
74
+ contextMenuProvider: this._contextMenuService,
75
+ ariaLabel: tooltip,
76
+ supportIcons: true,
77
+ });
78
+ }
79
+ else {
80
+ action = actionOrSubmenu;
81
+ btn = this.addButton({
82
+ secondary: conifgProvider(action, i)?.isSecondary ?? secondary,
83
+ ariaLabel: tooltip,
84
+ supportIcons: true,
85
+ });
86
+ }
87
+ btn.enabled = action.enabled;
88
+ btn.checked = action.checked ?? false;
89
+ btn.element.classList.add('default-colors');
90
+ const showLabel = conifgProvider(action, i)?.showLabel ?? true;
91
+ if (showLabel) {
92
+ btn.label = action.label;
93
+ }
94
+ else {
95
+ btn.element.classList.add('monaco-text-button');
96
+ }
97
+ if (conifgProvider(action, i)?.showIcon) {
98
+ if (action instanceof MenuItemAction && ThemeIcon.isThemeIcon(action.item.icon)) {
99
+ if (!showLabel) {
100
+ btn.icon = action.item.icon;
101
+ }
102
+ else {
103
+ btn.label = `$(${action.item.icon.id}) ${action.label}`;
104
+ }
105
+ }
106
+ else if (action.class) {
107
+ btn.element.classList.add(...action.class.split(' '));
108
+ }
109
+ }
110
+ this._updateStore.add(this._hoverService.setupManagedHover(hoverDelegate, btn.element, tooltip));
111
+ this._updateStore.add(btn.onDidClick(async () => {
112
+ this._actionRunner.run(action);
113
+ }));
114
+ }
115
+ if (secondary.length > 0) {
116
+ const btn = this.addButton({
117
+ secondary: true,
118
+ ariaLabel: ( localize(1751, "More Actions"))
119
+ });
120
+ btn.icon = Codicon.dropDownButton;
121
+ btn.element.classList.add('default-colors', 'monaco-text-button');
122
+ btn.enabled = true;
123
+ this._updateStore.add(this._hoverService.setupManagedHover(hoverDelegate, btn.element, ( localize(1751, "More Actions"))));
124
+ this._updateStore.add(btn.onDidClick(async () => {
125
+ this._contextMenuService.showContextMenu({
126
+ getAnchor: () => btn.element,
127
+ getActions: () => secondary,
128
+ actionRunner: this._actionRunner,
129
+ onHide: () => btn.element.setAttribute('aria-expanded', 'false')
130
+ });
131
+ btn.element.setAttribute('aria-expanded', 'true');
132
+ }));
133
+ }
134
+ this._onDidChange.fire(this);
135
+ }
136
+ };
137
+ WorkbenchButtonBar = ( __decorate([
138
+ ( __param(2, IContextMenuService)),
139
+ ( __param(3, IKeybindingService)),
140
+ ( __param(4, ITelemetryService)),
141
+ ( __param(5, IHoverService))
142
+ ], WorkbenchButtonBar));
143
+ let MenuWorkbenchButtonBar = class MenuWorkbenchButtonBar extends WorkbenchButtonBar {
144
+ constructor(container, menuId, options, menuService, contextKeyService, contextMenuService, keybindingService, telemetryService, hoverService) {
145
+ super(container, options, contextMenuService, keybindingService, telemetryService, hoverService);
146
+ const menu = menuService.createMenu(menuId, contextKeyService);
147
+ this._store.add(menu);
148
+ const update = () => {
149
+ this.clear();
150
+ const actions = getActionBarActions(menu.getActions(options?.menuOptions), options?.toolbarOptions?.primaryGroup);
151
+ super.update(actions.primary, actions.secondary);
152
+ };
153
+ this._store.add(menu.onDidChange(update));
154
+ update();
155
+ }
156
+ dispose() {
157
+ super.dispose();
158
+ }
159
+ update(_actions) {
160
+ throw ( new Error('Use Menu or WorkbenchButtonBar'));
161
+ }
162
+ };
163
+ MenuWorkbenchButtonBar = ( __decorate([
164
+ ( __param(3, IMenuService)),
165
+ ( __param(4, IContextKeyService)),
166
+ ( __param(5, IContextMenuService)),
167
+ ( __param(6, IKeybindingService)),
168
+ ( __param(7, ITelemetryService)),
169
+ ( __param(8, IHoverService))
170
+ ], MenuWorkbenchButtonBar));
171
+
172
+ export { MenuWorkbenchButtonBar, WorkbenchButtonBar };
@@ -0,0 +1,12 @@
1
+ import { StandardKeyboardEvent } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent";
2
+ import { StandardMouseEvent } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent";
3
+ import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
+ import { IEditorOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor";
5
+ export interface IOpenEditorOptions {
6
+ readonly editorOptions: IEditorOptions;
7
+ readonly openToSide: boolean;
8
+ }
9
+ export declare function registerOpenEditorListeners(element: HTMLElement, onOpenEditor: (options: IOpenEditorOptions) => void): IDisposable;
10
+ export declare function toOpenEditorOptions(event: StandardMouseEvent, isDoubleClick?: boolean): IOpenEditorOptions;
11
+ export declare function toOpenEditorOptions(event: StandardKeyboardEvent): IOpenEditorOptions | undefined;
12
+ export declare function toOpenEditorOptions(event: StandardMouseEvent | StandardKeyboardEvent): IOpenEditorOptions | undefined;
@@ -0,0 +1,51 @@
1
+
2
+ import { addDisposableListener, EventType, EventHelper, getWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
3
+ import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
4
+ import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
5
+ import { KeyCode, KeyMod } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
6
+ import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
7
+ import { isMacintosh } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
8
+
9
+ function registerOpenEditorListeners(element, onOpenEditor) {
10
+ const disposables = ( new DisposableStore());
11
+ disposables.add(addDisposableListener(element, EventType.CLICK, e => {
12
+ if (e.detail === 2) {
13
+ return;
14
+ }
15
+ EventHelper.stop(e, true);
16
+ onOpenEditor(toOpenEditorOptions(( new StandardMouseEvent(getWindow(element), e))));
17
+ }));
18
+ disposables.add(addDisposableListener(element, EventType.DBLCLICK, e => {
19
+ EventHelper.stop(e, true);
20
+ onOpenEditor(toOpenEditorOptions(( new StandardMouseEvent(getWindow(element), e)), true));
21
+ }));
22
+ disposables.add(addDisposableListener(element, EventType.KEY_DOWN, e => {
23
+ const options = toOpenEditorOptions(( new StandardKeyboardEvent(e)));
24
+ if (!options) {
25
+ return;
26
+ }
27
+ EventHelper.stop(e, true);
28
+ onOpenEditor(options);
29
+ }));
30
+ return disposables;
31
+ }
32
+ function toOpenEditorOptions(event, isDoubleClick) {
33
+ if (event instanceof StandardKeyboardEvent) {
34
+ let preserveFocus = undefined;
35
+ if (event.equals(KeyCode.Enter) || (isMacintosh && event.equals(KeyMod.CtrlCmd | KeyCode.DownArrow))) {
36
+ preserveFocus = false;
37
+ }
38
+ else if (event.equals(KeyCode.Space)) {
39
+ preserveFocus = true;
40
+ }
41
+ if (typeof preserveFocus === 'undefined') {
42
+ return;
43
+ }
44
+ return { editorOptions: { preserveFocus, pinned: !preserveFocus }, openToSide: false };
45
+ }
46
+ else {
47
+ return { editorOptions: { preserveFocus: !isDoubleClick, pinned: isDoubleClick || event.middleButton }, openToSide: event.ctrlKey || event.metaKey || event.altKey };
48
+ }
49
+ }
50
+
51
+ export { registerOpenEditorListeners, toOpenEditorOptions };
@@ -0,0 +1,41 @@
1
+ import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { ActionWidgetDropdownActionViewItem } from "../../../../../platform/actions/browser/actionWidgetDropdownActionViewItem.js";
3
+ import { IActionViewItemService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/actionViewItemService.service";
4
+ import { Action2, MenuItemAction } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
5
+ import { IActionWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service";
6
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
7
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
8
+ import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
9
+ import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
10
+ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
11
+ import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
12
+ export declare enum ActionLocation {
13
+ ChatWidget = "chatWidget",
14
+ Editor = "editor"
15
+ }
16
+ export declare class ContinueChatInSessionAction extends Action2 {
17
+ static readonly ID = "workbench.action.chat.continueChatInSession";
18
+ constructor();
19
+ run(): Promise<void>;
20
+ }
21
+ export declare class ChatContinueInSessionActionItem extends ActionWidgetDropdownActionViewItem {
22
+ private readonly location;
23
+ private readonly contextKeyService;
24
+ constructor(action: MenuItemAction, location: ActionLocation, actionWidgetService: IActionWidgetService, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, chatSessionsService: IChatSessionsService, instantiationService: IInstantiationService, openerService: IOpenerService);
25
+ protected static getActionBarActions(openerService: IOpenerService): {
26
+ id: string;
27
+ label: string;
28
+ tooltip: string;
29
+ class: undefined;
30
+ enabled: boolean;
31
+ run: () => Promise<void>;
32
+ }[];
33
+ private static actionProvider;
34
+ private static toAction;
35
+ private static toSetupAction;
36
+ protected renderLabel(element: HTMLElement): IDisposable | null;
37
+ }
38
+ export declare class ContinueChatInSessionActionRendering extends Disposable implements IWorkbenchContribution {
39
+ static readonly ID = "chat.continueChatInSessionActionRendering";
40
+ constructor(actionViewItemService: IActionViewItemService, instantiationService: IInstantiationService);
41
+ }