@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
@@ -0,0 +1,69 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
6
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
7
+ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
8
+ import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel';
9
+ import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
10
+ import { SimpleChatConfirmationWidget } from './chatConfirmationWidget.js';
11
+
12
+ let ChatConfirmationContentPart = class ChatConfirmationContentPart extends Disposable {
13
+ constructor(confirmation, context, instantiationService, chatService, chatWidgetService) {
14
+ super();
15
+ this.instantiationService = instantiationService;
16
+ this.chatService = chatService;
17
+ this._onDidChangeHeight = this._register(( new Emitter()));
18
+ this.onDidChangeHeight = this._onDidChangeHeight.event;
19
+ const element = context.element;
20
+ const buttons = confirmation.buttons
21
+ ? ( confirmation.buttons.map(button => ({
22
+ label: button,
23
+ data: confirmation.data,
24
+ isSecondary: button !== confirmation.buttons?.[0],
25
+ })))
26
+ : [
27
+ { label: ( localize(5050, "Accept")), data: confirmation.data },
28
+ { label: ( localize(5051, "Dismiss")), data: confirmation.data, isSecondary: true },
29
+ ];
30
+ const confirmationWidget = this._register(this.instantiationService.createInstance(SimpleChatConfirmationWidget, context, { title: confirmation.title, buttons, message: confirmation.message, silent: confirmation.isLive === false }));
31
+ confirmationWidget.setShowButtons(!confirmation.isUsed);
32
+ this._register(confirmationWidget.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
33
+ this._register(confirmationWidget.onDidClick(async (e) => {
34
+ if (isResponseVM(element)) {
35
+ const prompt = `${e.label}: "${confirmation.title}"`;
36
+ const options = e.isSecondary ?
37
+ { rejectedConfirmationData: [e.data] } :
38
+ { acceptedConfirmationData: [e.data] };
39
+ options.agentId = element.agent?.id;
40
+ options.slashCommand = element.slashCommand?.name;
41
+ options.confirmation = e.label;
42
+ const widget = chatWidgetService.getWidgetBySessionResource(element.sessionResource);
43
+ options.userSelectedModelId = widget?.input.currentLanguageModel;
44
+ options.modeInfo = widget?.input.currentModeInfo;
45
+ options.location = widget?.location;
46
+ Object.assign(options, widget?.getModeRequestOptions());
47
+ if (await this.chatService.sendRequest(element.sessionResource, prompt, options)) {
48
+ confirmation.isUsed = true;
49
+ confirmationWidget.setShowButtons(false);
50
+ this._onDidChangeHeight.fire();
51
+ }
52
+ }
53
+ }));
54
+ this.domNode = confirmationWidget.domNode;
55
+ }
56
+ hasSameContent(other) {
57
+ return other.kind === 'confirmation';
58
+ }
59
+ addDisposable(disposable) {
60
+ this._register(disposable);
61
+ }
62
+ };
63
+ ChatConfirmationContentPart = ( __decorate([
64
+ ( __param(2, IInstantiationService)),
65
+ ( __param(3, IChatService)),
66
+ ( __param(4, IChatWidgetService))
67
+ ], ChatConfirmationContentPart));
68
+
69
+ export { ChatConfirmationContentPart };
@@ -0,0 +1,116 @@
1
+ import { Separator } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
2
+ import { Emitter, Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
3
+ import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
4
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
5
+ import type { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
6
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
7
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
8
+ import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
9
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
10
+ import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
11
+ import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
12
+ import { IChatMarkdownAnchorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service";
13
+ export interface IChatConfirmationButton<T> {
14
+ label: string;
15
+ isSecondary?: boolean;
16
+ tooltip?: string;
17
+ data: T;
18
+ disabled?: boolean;
19
+ readonly onDidChangeDisablement?: Event<boolean>;
20
+ moreActions?: (IChatConfirmationButton<T> | Separator)[];
21
+ }
22
+ export interface IChatConfirmationWidgetOptions<T> {
23
+ title: string | IMarkdownString;
24
+ message: string | IMarkdownString;
25
+ subtitle?: string | IMarkdownString;
26
+ buttons: IChatConfirmationButton<T>[];
27
+ toolbarData?: {
28
+ arg: unknown;
29
+ partType: string;
30
+ partSource?: string;
31
+ };
32
+ silent?: boolean;
33
+ }
34
+ export declare class ChatQueryTitlePart extends Disposable {
35
+ private readonly element;
36
+ private _title;
37
+ private readonly _renderer;
38
+ private readonly _onDidChangeHeight;
39
+ readonly onDidChangeHeight: Event<void>;
40
+ private readonly _renderedTitle;
41
+ get title(): string | IMarkdownString;
42
+ set title(value: string | IMarkdownString);
43
+ constructor(element: HTMLElement, _title: IMarkdownString | string, subtitle: string | IMarkdownString | undefined, _renderer: IMarkdownRendererService);
44
+ private toMdString;
45
+ }
46
+ declare abstract class BaseSimpleChatConfirmationWidget<T> extends Disposable {
47
+ protected readonly context: IChatContentPartRenderContext;
48
+ protected readonly instantiationService: IInstantiationService;
49
+ protected readonly _markdownRendererService: IMarkdownRendererService;
50
+ private readonly _configurationService;
51
+ private _onDidClick;
52
+ get onDidClick(): Event<IChatConfirmationButton<T>>;
53
+ protected _onDidChangeHeight: Emitter<void>;
54
+ get onDidChangeHeight(): Event<void>;
55
+ private _domNode;
56
+ get domNode(): HTMLElement;
57
+ private get showingButtons();
58
+ setShowButtons(showButton: boolean): void;
59
+ private readonly messageElement;
60
+ private readonly silent;
61
+ private readonly notificationManager;
62
+ constructor(context: IChatContentPartRenderContext, options: IChatConfirmationWidgetOptions<T>, instantiationService: IInstantiationService, _markdownRendererService: IMarkdownRendererService, contextMenuService: IContextMenuService, _configurationService: IConfigurationService, contextKeyService: IContextKeyService);
63
+ protected renderMessage(element: HTMLElement, listContainer: HTMLElement): void;
64
+ }
65
+ /** @deprecated Use ChatConfirmationWidget instead */
66
+ export declare class SimpleChatConfirmationWidget<T> extends BaseSimpleChatConfirmationWidget<T> {
67
+ private _renderedMessage;
68
+ constructor(context: IChatContentPartRenderContext, options: IChatConfirmationWidgetOptions<T>, instantiationService: IInstantiationService, markdownRendererService: IMarkdownRendererService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, contextKeyService: IContextKeyService);
69
+ updateMessage(message: string | IMarkdownString): void;
70
+ }
71
+ export interface IChatConfirmationWidget2Options<T> {
72
+ title: string | IMarkdownString;
73
+ message: string | IMarkdownString | HTMLElement;
74
+ icon?: ThemeIcon;
75
+ subtitle?: string | IMarkdownString;
76
+ buttons: IChatConfirmationButton<T>[];
77
+ toolbarData?: {
78
+ arg: unknown;
79
+ partType: string;
80
+ partSource?: string;
81
+ };
82
+ }
83
+ declare abstract class BaseChatConfirmationWidget<T> extends Disposable {
84
+ protected readonly _context: IChatContentPartRenderContext;
85
+ protected readonly instantiationService: IInstantiationService;
86
+ protected readonly markdownRendererService: IMarkdownRendererService;
87
+ private readonly contextMenuService;
88
+ private readonly _configurationService;
89
+ private readonly chatMarkdownAnchorService;
90
+ private _onDidClick;
91
+ get onDidClick(): Event<IChatConfirmationButton<T>>;
92
+ protected _onDidChangeHeight: Emitter<void>;
93
+ get onDidChangeHeight(): Event<void>;
94
+ private _domNode;
95
+ get domNode(): HTMLElement;
96
+ private _buttonsDomNode;
97
+ private get showingButtons();
98
+ setShowButtons(showButton: boolean): void;
99
+ private readonly messageElement;
100
+ private readonly markdownContentPart;
101
+ private readonly notificationManager;
102
+ get codeblocksPartId(): string | undefined;
103
+ get codeblocks(): import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat").IChatCodeBlockInfo[] | undefined;
104
+ constructor(_context: IChatContentPartRenderContext, options: IChatConfirmationWidget2Options<T>, instantiationService: IInstantiationService, markdownRendererService: IMarkdownRendererService, contextMenuService: IContextMenuService, _configurationService: IConfigurationService, contextKeyService: IContextKeyService, chatMarkdownAnchorService: IChatMarkdownAnchorService);
105
+ updateButtons(buttons: IChatConfirmationButton<T>[]): void;
106
+ protected renderMessage(element: HTMLElement | IMarkdownString | string, listContainer: HTMLElement): void;
107
+ }
108
+ export declare class ChatConfirmationWidget<T> extends BaseChatConfirmationWidget<T> {
109
+ private _renderedMessage;
110
+ constructor(context: IChatContentPartRenderContext, options: IChatConfirmationWidget2Options<T>, instantiationService: IInstantiationService, markdownRendererService: IMarkdownRendererService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, chatMarkdownAnchorService: IChatMarkdownAnchorService);
111
+ updateMessage(message: string | IMarkdownString): void;
112
+ }
113
+ export declare class ChatCustomConfirmationWidget<T> extends BaseChatConfirmationWidget<T> {
114
+ constructor(context: IChatContentPartRenderContext, options: IChatConfirmationWidget2Options<T>, instantiationService: IInstantiationService, markdownRendererService: IMarkdownRendererService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, chatMarkdownAnchorService: IChatMarkdownAnchorService);
115
+ }
116
+ export {};
@@ -0,0 +1,417 @@
1
+
2
+ import { registerCss } from '@codingame/monaco-vscode-api/css';
3
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
+ import { createElement, triggerNotification, h, getWindow, isHTMLElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
+ import { ButtonWithDropdown, Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
6
+ import { Separator, Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
7
+ import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
8
+ import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
9
+ import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
10
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
11
+ import { MenuWorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
12
+ import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
13
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.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 { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
17
+ import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
18
+ import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
19
+ import { FocusMode } from '@codingame/monaco-vscode-api/vscode/vs/platform/native/common/native';
20
+ import { defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
21
+ import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
22
+ import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
23
+ import { renderFileWidgets } from '../chatInlineAnchorWidget.js';
24
+ import { IChatMarkdownAnchorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service';
25
+ import { ChatMarkdownContentPart } from './chatMarkdownContentPart.js';
26
+ import * as chatConfirmationWidget from './media/chatConfirmationWidget.css';
27
+
28
+ registerCss(chatConfirmationWidget);
29
+ let ChatQueryTitlePart = class ChatQueryTitlePart extends Disposable {
30
+ get title() {
31
+ return this._title;
32
+ }
33
+ set title(value) {
34
+ this._title = value;
35
+ const next = this._renderer.render(this.toMdString(value), {
36
+ asyncRenderCallback: () => this._onDidChangeHeight.fire(),
37
+ });
38
+ const previousEl = this._renderedTitle.value?.element;
39
+ if (previousEl?.parentElement) {
40
+ previousEl.replaceWith(next.element);
41
+ }
42
+ else {
43
+ this.element.appendChild(next.element);
44
+ }
45
+ this._renderedTitle.value = next;
46
+ }
47
+ constructor(element, _title, subtitle, _renderer) {
48
+ super();
49
+ this.element = element;
50
+ this._title = _title;
51
+ this._renderer = _renderer;
52
+ this._onDidChangeHeight = this._register(( new Emitter()));
53
+ this.onDidChangeHeight = this._onDidChangeHeight.event;
54
+ this._renderedTitle = this._register(( new MutableDisposable()));
55
+ element.classList.add('chat-query-title-part');
56
+ this._renderedTitle.value = _renderer.render(this.toMdString(_title), {
57
+ asyncRenderCallback: () => this._onDidChangeHeight.fire(),
58
+ });
59
+ element.append(this._renderedTitle.value.element);
60
+ if (subtitle) {
61
+ const str = this.toMdString(subtitle);
62
+ const renderedTitle = this._register(_renderer.render(str, {
63
+ asyncRenderCallback: () => this._onDidChangeHeight.fire(),
64
+ }));
65
+ const wrapper = createElement('small');
66
+ wrapper.appendChild(renderedTitle.element);
67
+ element.append(wrapper);
68
+ }
69
+ }
70
+ toMdString(value) {
71
+ if (typeof value === 'string') {
72
+ return ( new MarkdownString('', { supportThemeIcons: true })).appendText(value);
73
+ }
74
+ else {
75
+ return ( new MarkdownString(value.value, { supportThemeIcons: true, isTrusted: value.isTrusted }));
76
+ }
77
+ }
78
+ };
79
+ ChatQueryTitlePart = ( __decorate([
80
+ ( __param(3, IMarkdownRendererService))
81
+ ], ChatQueryTitlePart));
82
+ let ChatConfirmationNotifier = class ChatConfirmationNotifier extends Disposable {
83
+ constructor(_hostService, _chatWidgetService) {
84
+ super();
85
+ this._hostService = _hostService;
86
+ this._chatWidgetService = _chatWidgetService;
87
+ this.disposables = this._register(( new MutableDisposable()));
88
+ }
89
+ async notify(targetWindow, sessionResource) {
90
+ this._hostService.focus(targetWindow, { mode: FocusMode.Notify });
91
+ const widget = this._chatWidgetService.getWidgetBySessionResource(sessionResource);
92
+ const title = widget?.viewModel?.model.title ? ( localize(5052, "Chat: {0}", widget.viewModel.model.title)) : ( localize(5053, "Untitled Chat"));
93
+ const notification = await triggerNotification(title, {
94
+ detail: ( localize(5054, "Approval needed to continue."))
95
+ });
96
+ if (notification) {
97
+ const disposables = this.disposables.value = ( new DisposableStore());
98
+ disposables.add(notification);
99
+ disposables.add(Event.once(notification.onClick)(async () => {
100
+ await this._hostService.focus(targetWindow, { mode: FocusMode.Force });
101
+ if (widget) {
102
+ await this._chatWidgetService.reveal(widget);
103
+ widget.focusInput();
104
+ }
105
+ disposables.dispose();
106
+ }));
107
+ disposables.add(this._hostService.onDidChangeFocus(focus => {
108
+ if (focus) {
109
+ disposables.dispose();
110
+ }
111
+ }));
112
+ }
113
+ }
114
+ };
115
+ ChatConfirmationNotifier = ( __decorate([
116
+ ( __param(0, IHostService)),
117
+ ( __param(1, IChatWidgetService))
118
+ ], ChatConfirmationNotifier));
119
+ let BaseSimpleChatConfirmationWidget = class BaseSimpleChatConfirmationWidget extends Disposable {
120
+ get onDidClick() { return this._onDidClick.event; }
121
+ get onDidChangeHeight() { return this._onDidChangeHeight.event; }
122
+ get domNode() {
123
+ return this._domNode;
124
+ }
125
+ get showingButtons() {
126
+ return !this.domNode.classList.contains('hideButtons');
127
+ }
128
+ setShowButtons(showButton) {
129
+ this.domNode.classList.toggle('hideButtons', !showButton);
130
+ }
131
+ constructor(context, options, instantiationService, _markdownRendererService, contextMenuService, _configurationService, contextKeyService) {
132
+ super();
133
+ this.context = context;
134
+ this.instantiationService = instantiationService;
135
+ this._markdownRendererService = _markdownRendererService;
136
+ this._configurationService = _configurationService;
137
+ this._onDidClick = this._register(( new Emitter()));
138
+ this._onDidChangeHeight = this._register(( new Emitter()));
139
+ const { title, subtitle, message, buttons, silent } = options;
140
+ this.silent = !!silent;
141
+ this.notificationManager = this._register(instantiationService.createInstance(ChatConfirmationNotifier));
142
+ const elements = h('.chat-confirmation-widget-container@container', [
143
+ h('.chat-confirmation-widget@root', [
144
+ h('.chat-confirmation-widget-title@title'),
145
+ h('.chat-confirmation-widget-message-container', [
146
+ h('.chat-confirmation-widget-message@message'),
147
+ h('.chat-buttons-container@buttonsContainer', [
148
+ h('.chat-buttons@buttons'),
149
+ h('.chat-toolbar@toolbar'),
150
+ ]),
151
+ ]),
152
+ ]),
153
+ ]);
154
+ configureAccessibilityContainer(elements.container, title, message);
155
+ this._domNode = elements.root;
156
+ const titlePart = this._register(instantiationService.createInstance(ChatQueryTitlePart, elements.title, title, subtitle));
157
+ this._register(titlePart.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
158
+ this.messageElement = elements.message;
159
+ buttons.forEach(buttonData => {
160
+ const buttonOptions = { ...defaultButtonStyles, secondary: buttonData.isSecondary, title: buttonData.tooltip, disabled: buttonData.disabled };
161
+ let button;
162
+ if (buttonData.moreActions) {
163
+ button = ( new ButtonWithDropdown(elements.buttons, {
164
+ ...buttonOptions,
165
+ contextMenuProvider: contextMenuService,
166
+ addPrimaryActionToDropdown: false,
167
+ actions: ( buttonData.moreActions.map(action => {
168
+ if (action instanceof Separator) {
169
+ return action;
170
+ }
171
+ return this._register(( new Action(action.label, action.label, undefined, !action.disabled, () => {
172
+ this._onDidClick.fire(action);
173
+ return Promise.resolve();
174
+ })));
175
+ })),
176
+ }));
177
+ }
178
+ else {
179
+ button = ( new Button(elements.buttons, buttonOptions));
180
+ }
181
+ this._register(button);
182
+ button.label = buttonData.label;
183
+ this._register(button.onDidClick(() => this._onDidClick.fire(buttonData)));
184
+ if (buttonData.onDidChangeDisablement) {
185
+ this._register(buttonData.onDidChangeDisablement(disabled => button.enabled = !disabled));
186
+ }
187
+ });
188
+ if (options?.toolbarData) {
189
+ const overlay = contextKeyService.createOverlay([
190
+ ['chatConfirmationPartType', options.toolbarData.partType],
191
+ ['chatConfirmationPartSource', options.toolbarData.partSource],
192
+ ]);
193
+ const nestedInsta = this._register(instantiationService.createChild(( new ServiceCollection([IContextKeyService, overlay]))));
194
+ this._register(nestedInsta.createInstance(MenuWorkbenchToolBar, elements.toolbar, MenuId.ChatConfirmationMenu, {
195
+ menuOptions: {
196
+ arg: options.toolbarData.arg,
197
+ shouldForwardArgs: true,
198
+ }
199
+ }));
200
+ }
201
+ }
202
+ renderMessage(element, listContainer) {
203
+ this.messageElement.append(element);
204
+ if (this.showingButtons && this._configurationService.getValue('chat.notifyWindowOnConfirmation') && !this.silent) {
205
+ const targetWindow = getWindow(listContainer);
206
+ if (!targetWindow.document.hasFocus()) {
207
+ this.notificationManager.notify(targetWindow, this.context.element.sessionResource);
208
+ }
209
+ }
210
+ }
211
+ };
212
+ BaseSimpleChatConfirmationWidget = ( __decorate([
213
+ ( __param(2, IInstantiationService)),
214
+ ( __param(3, IMarkdownRendererService)),
215
+ ( __param(4, IContextMenuService)),
216
+ ( __param(5, IConfigurationService)),
217
+ ( __param(6, IContextKeyService))
218
+ ], BaseSimpleChatConfirmationWidget));
219
+ let SimpleChatConfirmationWidget = class SimpleChatConfirmationWidget extends BaseSimpleChatConfirmationWidget {
220
+ constructor(context, options, instantiationService, markdownRendererService, contextMenuService, configurationService, contextKeyService) {
221
+ super(context, options, instantiationService, markdownRendererService, contextMenuService, configurationService, contextKeyService);
222
+ this.updateMessage(options.message);
223
+ }
224
+ updateMessage(message) {
225
+ this._renderedMessage?.remove();
226
+ const renderedMessage = this._register(this._markdownRendererService.render(typeof message === 'string' ? ( new MarkdownString(message)) : message, { asyncRenderCallback: () => this._onDidChangeHeight.fire() }));
227
+ this.renderMessage(renderedMessage.element, this.context.container);
228
+ this._renderedMessage = renderedMessage.element;
229
+ }
230
+ };
231
+ SimpleChatConfirmationWidget = ( __decorate([
232
+ ( __param(2, IInstantiationService)),
233
+ ( __param(3, IMarkdownRendererService)),
234
+ ( __param(4, IContextMenuService)),
235
+ ( __param(5, IConfigurationService)),
236
+ ( __param(6, IContextKeyService))
237
+ ], SimpleChatConfirmationWidget));
238
+ let BaseChatConfirmationWidget = class BaseChatConfirmationWidget extends Disposable {
239
+ get onDidClick() { return this._onDidClick.event; }
240
+ get onDidChangeHeight() { return this._onDidChangeHeight.event; }
241
+ get domNode() {
242
+ return this._domNode;
243
+ }
244
+ get showingButtons() {
245
+ return !this.domNode.classList.contains('hideButtons');
246
+ }
247
+ setShowButtons(showButton) {
248
+ this.domNode.classList.toggle('hideButtons', !showButton);
249
+ }
250
+ get codeblocksPartId() {
251
+ return this.markdownContentPart.value?.codeblocksPartId;
252
+ }
253
+ get codeblocks() {
254
+ return this.markdownContentPart.value?.codeblocks;
255
+ }
256
+ constructor(_context, options, instantiationService, markdownRendererService, contextMenuService, _configurationService, contextKeyService, chatMarkdownAnchorService) {
257
+ super();
258
+ this._context = _context;
259
+ this.instantiationService = instantiationService;
260
+ this.markdownRendererService = markdownRendererService;
261
+ this.contextMenuService = contextMenuService;
262
+ this._configurationService = _configurationService;
263
+ this.chatMarkdownAnchorService = chatMarkdownAnchorService;
264
+ this._onDidClick = this._register(( new Emitter()));
265
+ this._onDidChangeHeight = this._register(( new Emitter()));
266
+ this.markdownContentPart = this._register(( new MutableDisposable()));
267
+ const { title, subtitle, message, buttons, icon } = options;
268
+ this.notificationManager = this._register(instantiationService.createInstance(ChatConfirmationNotifier));
269
+ const elements = h('.chat-confirmation-widget-container@container', [
270
+ h('.chat-confirmation-widget2@root', [
271
+ h('.chat-confirmation-widget-title', [
272
+ h('.chat-title@title'),
273
+ h('.chat-toolbar-container@buttonsContainer', [
274
+ h('.chat-toolbar@toolbar'),
275
+ ]),
276
+ ]),
277
+ h('.chat-confirmation-widget-message@message'),
278
+ h('.chat-confirmation-widget-buttons', [
279
+ h('.chat-buttons@buttons'),
280
+ ]),
281
+ ]),
282
+ ]);
283
+ configureAccessibilityContainer(elements.container, title, message);
284
+ this._domNode = elements.root;
285
+ this._buttonsDomNode = elements.buttons;
286
+ const titlePart = this._register(instantiationService.createInstance(ChatQueryTitlePart, elements.title, ( new MarkdownString(
287
+ icon ? `$(${icon.id}) ${typeof title === 'string' ? title : title.value}` : typeof title === 'string' ? title : title.value
288
+ )), subtitle));
289
+ this._register(titlePart.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
290
+ this.messageElement = elements.message;
291
+ this.updateButtons(buttons);
292
+ if (options?.toolbarData) {
293
+ const overlay = contextKeyService.createOverlay([
294
+ ['chatConfirmationPartType', options.toolbarData.partType],
295
+ ['chatConfirmationPartSource', options.toolbarData.partSource],
296
+ ]);
297
+ const nestedInsta = this._register(instantiationService.createChild(( new ServiceCollection([IContextKeyService, overlay]))));
298
+ this._register(nestedInsta.createInstance(MenuWorkbenchToolBar, elements.toolbar, MenuId.ChatConfirmationMenu, {
299
+ menuOptions: {
300
+ arg: options.toolbarData.arg,
301
+ shouldForwardArgs: true,
302
+ }
303
+ }));
304
+ }
305
+ }
306
+ updateButtons(buttons) {
307
+ while (this._buttonsDomNode.children.length > 0) {
308
+ this._buttonsDomNode.children[0].remove();
309
+ }
310
+ for (const buttonData of buttons) {
311
+ const buttonOptions = { ...defaultButtonStyles, secondary: buttonData.isSecondary, title: buttonData.tooltip, disabled: buttonData.disabled };
312
+ let button;
313
+ if (buttonData.moreActions) {
314
+ button = ( new ButtonWithDropdown(this._buttonsDomNode, {
315
+ ...buttonOptions,
316
+ contextMenuProvider: this.contextMenuService,
317
+ addPrimaryActionToDropdown: false,
318
+ actions: ( buttonData.moreActions.map(action => {
319
+ if (action instanceof Separator) {
320
+ return action;
321
+ }
322
+ return this._register(( new Action(action.label, action.label, undefined, !action.disabled, () => {
323
+ this._onDidClick.fire(action);
324
+ return Promise.resolve();
325
+ })));
326
+ })),
327
+ }));
328
+ }
329
+ else {
330
+ button = ( new Button(this._buttonsDomNode, buttonOptions));
331
+ }
332
+ this._register(button);
333
+ button.label = buttonData.label;
334
+ this._register(button.onDidClick(() => this._onDidClick.fire(buttonData)));
335
+ if (buttonData.onDidChangeDisablement) {
336
+ this._register(buttonData.onDidChangeDisablement(disabled => button.enabled = !disabled));
337
+ }
338
+ }
339
+ }
340
+ renderMessage(element, listContainer) {
341
+ this.markdownContentPart.clear();
342
+ if (!isHTMLElement(element)) {
343
+ const part = this._register(this.instantiationService.createInstance(ChatMarkdownContentPart, {
344
+ kind: 'markdownContent',
345
+ content: typeof element === 'string' ? ( new MarkdownString()).appendMarkdown(element) : element
346
+ }, this._context, this._context.editorPool, false, this._context.codeBlockStartIndex, this.markdownRendererService, undefined, this._context.currentWidth(), this._context.codeBlockModelCollection, {
347
+ allowInlineDiffs: true,
348
+ horizontalPadding: 6,
349
+ }));
350
+ renderFileWidgets(part.domNode, this.instantiationService, this.chatMarkdownAnchorService, this._store);
351
+ this._register(part.onDidChangeHeight(() => this._onDidChangeHeight.fire()));
352
+ this.markdownContentPart.value = part;
353
+ element = part.domNode;
354
+ }
355
+ for (const child of this.messageElement.children) {
356
+ child.remove();
357
+ }
358
+ this.messageElement.append(element);
359
+ if (this.showingButtons && this._configurationService.getValue('chat.notifyWindowOnConfirmation')) {
360
+ const targetWindow = getWindow(listContainer);
361
+ if (!targetWindow.document.hasFocus()) {
362
+ this.notificationManager.notify(targetWindow, this._context.element.sessionResource);
363
+ }
364
+ }
365
+ }
366
+ };
367
+ BaseChatConfirmationWidget = ( __decorate([
368
+ ( __param(2, IInstantiationService)),
369
+ ( __param(3, IMarkdownRendererService)),
370
+ ( __param(4, IContextMenuService)),
371
+ ( __param(5, IConfigurationService)),
372
+ ( __param(6, IContextKeyService)),
373
+ ( __param(7, IChatMarkdownAnchorService))
374
+ ], BaseChatConfirmationWidget));
375
+ let ChatConfirmationWidget = class ChatConfirmationWidget extends BaseChatConfirmationWidget {
376
+ constructor(context, options, instantiationService, markdownRendererService, contextMenuService, configurationService, contextKeyService, chatMarkdownAnchorService) {
377
+ super(context, options, instantiationService, markdownRendererService, contextMenuService, configurationService, contextKeyService, chatMarkdownAnchorService);
378
+ this.renderMessage(options.message, context.container);
379
+ }
380
+ updateMessage(message) {
381
+ this._renderedMessage?.remove();
382
+ const renderedMessage = this._register(this.markdownRendererService.render(typeof message === 'string' ? ( new MarkdownString(message)) : message, { asyncRenderCallback: () => this._onDidChangeHeight.fire() }));
383
+ this.renderMessage(renderedMessage.element, this._context.container);
384
+ this._renderedMessage = renderedMessage.element;
385
+ }
386
+ };
387
+ ChatConfirmationWidget = ( __decorate([
388
+ ( __param(2, IInstantiationService)),
389
+ ( __param(3, IMarkdownRendererService)),
390
+ ( __param(4, IContextMenuService)),
391
+ ( __param(5, IConfigurationService)),
392
+ ( __param(6, IContextKeyService)),
393
+ ( __param(7, IChatMarkdownAnchorService))
394
+ ], ChatConfirmationWidget));
395
+ let ChatCustomConfirmationWidget = class ChatCustomConfirmationWidget extends BaseChatConfirmationWidget {
396
+ constructor(context, options, instantiationService, markdownRendererService, contextMenuService, configurationService, contextKeyService, chatMarkdownAnchorService) {
397
+ super(context, options, instantiationService, markdownRendererService, contextMenuService, configurationService, contextKeyService, chatMarkdownAnchorService);
398
+ this.renderMessage(options.message, context.container);
399
+ }
400
+ };
401
+ ChatCustomConfirmationWidget = ( __decorate([
402
+ ( __param(2, IInstantiationService)),
403
+ ( __param(3, IMarkdownRendererService)),
404
+ ( __param(4, IContextMenuService)),
405
+ ( __param(5, IConfigurationService)),
406
+ ( __param(6, IContextKeyService)),
407
+ ( __param(7, IChatMarkdownAnchorService))
408
+ ], ChatCustomConfirmationWidget));
409
+ function configureAccessibilityContainer(container, title, message) {
410
+ container.tabIndex = 0;
411
+ const titleAsString = typeof title === 'string' ? title : title.value;
412
+ const messageAsString = typeof message === 'string' ? message : message && 'value' in message ? message.value : message && 'textContent' in message ? message.textContent : '';
413
+ container.setAttribute('aria-label', ( localize(5055, "Chat Confirmation Dialog {0} {1}", titleAsString, messageAsString)));
414
+ container.classList.add('chat-confirmation-widget-container');
415
+ }
416
+
417
+ export { ChatConfirmationWidget, ChatCustomConfirmationWidget, ChatQueryTitlePart, SimpleChatConfirmationWidget };
@@ -0,0 +1,20 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
3
+ import { IChatRendererDelegate } from "../chatListRenderer.js";
4
+ import { ChatEditorOptions } from "../chatOptions.js";
5
+ import { CodeBlockPart, CodeCompareBlockPart } from "../codeBlockPart.js";
6
+ import { IDisposableReference } from "./chatCollections.js";
7
+ export declare class EditorPool extends Disposable {
8
+ private readonly isSimpleWidget;
9
+ private readonly _pool;
10
+ inUse(): Iterable<CodeBlockPart>;
11
+ constructor(options: ChatEditorOptions, delegate: IChatRendererDelegate, overflowWidgetsDomNode: HTMLElement | undefined, isSimpleWidget: boolean | undefined, instantiationService: IInstantiationService);
12
+ get(): IDisposableReference<CodeBlockPart>;
13
+ }
14
+ export declare class DiffEditorPool extends Disposable {
15
+ private readonly isSimpleWidget;
16
+ private readonly _pool;
17
+ inUse(): Iterable<CodeCompareBlockPart>;
18
+ constructor(options: ChatEditorOptions, delegate: IChatRendererDelegate, overflowWidgetsDomNode: HTMLElement | undefined, isSimpleWidget: boolean | undefined, instantiationService: IInstantiationService);
19
+ get(): IDisposableReference<CodeCompareBlockPart>;
20
+ }