@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,147 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
+ import { $, reset } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
+ import { renderLabelWithIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
6
+ import { ActionWidgetDropdownActionViewItem } from '../../../../../platform/actions/browser/actionWidgetDropdownActionViewItem.js';
7
+ import { IActionWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service';
8
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
9
+ import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
10
+ import { ChatEntitlement } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
11
+ import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
12
+ import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
13
+ import { DEFAULT_MODEL_PICKER_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget';
14
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
15
+ import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
16
+ import { MANAGE_CHAT_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
17
+ import { TelemetryTrustedValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
18
+
19
+ function modelDelegateToWidgetActionsProvider(delegate, telemetryService) {
20
+ return {
21
+ getActions: () => {
22
+ const models = delegate.getModels();
23
+ if (models.length === 0) {
24
+ return [{
25
+ id: 'auto',
26
+ enabled: true,
27
+ checked: true,
28
+ category: DEFAULT_MODEL_PICKER_CATEGORY,
29
+ class: undefined,
30
+ tooltip: ( localize(5742, "Auto")),
31
+ label: ( localize(5742, "Auto")),
32
+ run: () => { }
33
+ }];
34
+ }
35
+ return ( models.map(model => {
36
+ return {
37
+ id: model.metadata.id,
38
+ enabled: true,
39
+ icon: model.metadata.statusIcon,
40
+ checked: model.identifier === delegate.getCurrentModel()?.identifier,
41
+ category: model.metadata.modelPickerCategory || DEFAULT_MODEL_PICKER_CATEGORY,
42
+ class: undefined,
43
+ description: model.metadata.detail,
44
+ tooltip: model.metadata.tooltip ?? model.metadata.name,
45
+ label: model.metadata.name,
46
+ run: () => {
47
+ const previousModel = delegate.getCurrentModel();
48
+ telemetryService.publicLog2('chat.modelChange', {
49
+ fromModel: previousModel?.metadata.vendor === 'copilot' ? ( new TelemetryTrustedValue(previousModel.identifier)) : 'unknown',
50
+ toModel: model.metadata.vendor === 'copilot' ? ( new TelemetryTrustedValue(model.identifier)) : 'unknown'
51
+ });
52
+ delegate.setModel(model);
53
+ }
54
+ };
55
+ }));
56
+ }
57
+ };
58
+ }
59
+ function getModelPickerActionBarActionProvider(commandService, chatEntitlementService, productService) {
60
+ const actionProvider = {
61
+ getActions: () => {
62
+ const additionalActions = [];
63
+ if (chatEntitlementService.entitlement === ChatEntitlement.Free ||
64
+ chatEntitlementService.entitlement === ChatEntitlement.Pro ||
65
+ chatEntitlementService.entitlement === ChatEntitlement.ProPlus ||
66
+ chatEntitlementService.isInternal) {
67
+ additionalActions.push({
68
+ id: 'manageModels',
69
+ label: ( localize(5743, "Manage Models...")),
70
+ enabled: true,
71
+ tooltip: ( localize(5744, "Manage Language Models")),
72
+ class: undefined,
73
+ run: () => {
74
+ commandService.executeCommand(MANAGE_CHAT_COMMAND_ID);
75
+ }
76
+ });
77
+ }
78
+ const isNewOrAnonymousUser = !chatEntitlementService.sentiment.installed ||
79
+ chatEntitlementService.entitlement === ChatEntitlement.Available ||
80
+ chatEntitlementService.anonymous ||
81
+ chatEntitlementService.entitlement === ChatEntitlement.Unknown;
82
+ if (isNewOrAnonymousUser || chatEntitlementService.entitlement === ChatEntitlement.Free) {
83
+ additionalActions.push({
84
+ id: 'moreModels',
85
+ label: isNewOrAnonymousUser ? ( localize(5745, "Add Language Models")) : ( localize(5746, "Add Premium Models")),
86
+ enabled: true,
87
+ tooltip: isNewOrAnonymousUser ? ( localize(5747, "Add Language Models")) : ( localize(5748, "Add Premium Models")),
88
+ class: undefined,
89
+ run: () => {
90
+ const commandId = isNewOrAnonymousUser ? 'workbench.action.chat.triggerSetup' : 'workbench.action.chat.upgradePlan';
91
+ commandService.executeCommand(commandId);
92
+ }
93
+ });
94
+ }
95
+ return additionalActions;
96
+ }
97
+ };
98
+ return actionProvider;
99
+ }
100
+ let ModelPickerActionItem = class ModelPickerActionItem extends ActionWidgetDropdownActionViewItem {
101
+ constructor(action, currentModel, widgetOptions, delegate, actionWidgetService, contextKeyService, commandService, chatEntitlementService, keybindingService, telemetryService, productService) {
102
+ const actionWithLabel = {
103
+ ...action,
104
+ label: currentModel?.metadata.name ?? ( localize(5742, "Auto")),
105
+ tooltip: ( localize(5749, "Pick Model")),
106
+ run: () => { }
107
+ };
108
+ const modelPickerActionWidgetOptions = {
109
+ actionProvider: modelDelegateToWidgetActionsProvider(delegate, telemetryService),
110
+ actionBarActionProvider: getModelPickerActionBarActionProvider(commandService, chatEntitlementService)
111
+ };
112
+ super(actionWithLabel, widgetOptions ?? modelPickerActionWidgetOptions, actionWidgetService, keybindingService, contextKeyService);
113
+ this.currentModel = currentModel;
114
+ this._register(delegate.onDidChangeModel(model => {
115
+ this.currentModel = model;
116
+ if (this.element) {
117
+ this.renderLabel(this.element);
118
+ }
119
+ }));
120
+ }
121
+ renderLabel(element) {
122
+ const domChildren = [];
123
+ if (this.currentModel?.metadata.statusIcon) {
124
+ domChildren.push(...renderLabelWithIcons(`\$(${this.currentModel.metadata.statusIcon.id})`));
125
+ }
126
+ domChildren.push($('span.chat-model-label', undefined, this.currentModel?.metadata.name ?? ( localize(5742, "Auto"))));
127
+ domChildren.push(...renderLabelWithIcons(`$(chevron-down)`));
128
+ reset(element, ...domChildren);
129
+ this.setAriaLabelAttributes(element);
130
+ return null;
131
+ }
132
+ render(container) {
133
+ super.render(container);
134
+ container.classList.add('chat-modelPicker-item');
135
+ }
136
+ };
137
+ ModelPickerActionItem = ( __decorate([
138
+ ( __param(4, IActionWidgetService)),
139
+ ( __param(5, IContextKeyService)),
140
+ ( __param(6, ICommandService)),
141
+ ( __param(7, IChatEntitlementService)),
142
+ ( __param(8, IKeybindingService)),
143
+ ( __param(9, ITelemetryService)),
144
+ ( __param(10, IProductService))
145
+ ], ModelPickerActionItem));
146
+
147
+ export { ModelPickerActionItem };
@@ -0,0 +1,71 @@
1
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
+ import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
3
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
+ import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
5
+ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
6
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
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 { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
11
+ import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
12
+ import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
13
+ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
14
+ import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
15
+ import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
16
+ export interface IViewWelcomeDelegate {
17
+ readonly onDidChangeViewWelcomeState: Event<void>;
18
+ shouldShowWelcome(): boolean;
19
+ }
20
+ export declare class ChatViewWelcomeController extends Disposable {
21
+ private readonly container;
22
+ private readonly delegate;
23
+ private readonly location;
24
+ private contextKeyService;
25
+ private instantiationService;
26
+ private element;
27
+ private enabled;
28
+ private readonly enabledDisposables;
29
+ private readonly renderDisposables;
30
+ private readonly _isShowingWelcome;
31
+ get isShowingWelcome(): IObservable<boolean>;
32
+ constructor(container: HTMLElement, delegate: IViewWelcomeDelegate, location: ChatAgentLocation, contextKeyService: IContextKeyService, instantiationService: IInstantiationService);
33
+ private update;
34
+ private render;
35
+ }
36
+ export interface IChatViewWelcomeContent {
37
+ readonly icon?: ThemeIcon | URI;
38
+ readonly title: string;
39
+ readonly message: IMarkdownString;
40
+ readonly additionalMessage?: string | IMarkdownString;
41
+ tips?: IMarkdownString;
42
+ readonly inputPart?: HTMLElement;
43
+ readonly suggestedPrompts?: readonly IChatSuggestedPrompts[];
44
+ readonly useLargeIcon?: boolean;
45
+ }
46
+ export interface IChatSuggestedPrompts {
47
+ readonly icon?: ThemeIcon;
48
+ readonly label: string;
49
+ readonly description?: string;
50
+ readonly prompt: string;
51
+ readonly uri?: URI;
52
+ }
53
+ export interface IChatViewWelcomeRenderOptions {
54
+ readonly firstLinkToButton?: boolean;
55
+ readonly location: ChatAgentLocation;
56
+ readonly isWidgetAgentWelcomeViewContent?: boolean;
57
+ }
58
+ export declare class ChatViewWelcomePart extends Disposable {
59
+ readonly content: IChatViewWelcomeContent;
60
+ private openerService;
61
+ private logService;
62
+ private chatWidgetService;
63
+ private telemetryService;
64
+ private readonly markdownRendererService;
65
+ private readonly contextMenuService;
66
+ readonly element: HTMLElement;
67
+ constructor(content: IChatViewWelcomeContent, options: IChatViewWelcomeRenderOptions | undefined, openerService: IOpenerService, logService: ILogService, chatWidgetService: IChatWidgetService, telemetryService: ITelemetryService, markdownRendererService: IMarkdownRendererService, contextMenuService: IContextMenuService);
68
+ private getPromptContextMenuActions;
69
+ needsRerender(content: IChatViewWelcomeContent): boolean;
70
+ private renderMarkdownMessageContent;
71
+ }
@@ -0,0 +1,279 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { asCSSUrl } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/cssValue';
4
+ import { $ as $$1, append, clearNode, addDisposableListener, EventType } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
+ import { createCSSRule } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/domStylesheets';
6
+ import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
7
+ import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
8
+ import { renderIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
9
+ import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
10
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
11
+ import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
12
+ import { StringSHA1 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hash';
13
+ import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
14
+ import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
15
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
16
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
17
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
18
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
19
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
20
+ import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
21
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
22
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
23
+ import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
24
+ import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
25
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
26
+ import { defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
27
+ import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
28
+ import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
29
+ import { chatViewsWelcomeRegistry } from './chatViewsWelcome.js';
30
+ import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
31
+
32
+ const $ = $$1;
33
+ let ChatViewWelcomeController = class ChatViewWelcomeController extends Disposable {
34
+ get isShowingWelcome() {
35
+ return this._isShowingWelcome;
36
+ }
37
+ constructor(container, delegate, location, contextKeyService, instantiationService) {
38
+ super();
39
+ this.container = container;
40
+ this.delegate = delegate;
41
+ this.location = location;
42
+ this.contextKeyService = contextKeyService;
43
+ this.instantiationService = instantiationService;
44
+ this.enabled = false;
45
+ this.enabledDisposables = this._register(( new DisposableStore()));
46
+ this.renderDisposables = this._register(( new DisposableStore()));
47
+ this._isShowingWelcome = observableValue(this, false);
48
+ this.element = append(this.container, $$1('.chat-view-welcome'));
49
+ this._register(Event.runAndSubscribe(delegate.onDidChangeViewWelcomeState, () => this.update()));
50
+ this._register(chatViewsWelcomeRegistry.onDidChange(() => this.update(true)));
51
+ }
52
+ update(force) {
53
+ const enabled = this.delegate.shouldShowWelcome();
54
+ if (this.enabled === enabled && !force) {
55
+ return;
56
+ }
57
+ this.enabled = enabled;
58
+ this.enabledDisposables.clear();
59
+ if (!enabled) {
60
+ this.container.classList.toggle('chat-view-welcome-visible', false);
61
+ this.renderDisposables.clear();
62
+ this._isShowingWelcome.set(false, undefined);
63
+ return;
64
+ }
65
+ const descriptors = chatViewsWelcomeRegistry.get();
66
+ if (descriptors.length) {
67
+ this.render(descriptors);
68
+ const descriptorKeys = ( new Set(descriptors.flatMap(d => ( d.when.keys()))));
69
+ this.enabledDisposables.add(this.contextKeyService.onDidChangeContext(e => {
70
+ if (e.affectsSome(descriptorKeys)) {
71
+ this.render(descriptors);
72
+ }
73
+ }));
74
+ }
75
+ }
76
+ render(descriptors) {
77
+ this.renderDisposables.clear();
78
+ clearNode(this.element);
79
+ const matchingDescriptors = descriptors.filter(descriptor => this.contextKeyService.contextMatchesRules(descriptor.when));
80
+ const enabledDescriptor = matchingDescriptors.at(0);
81
+ if (enabledDescriptor) {
82
+ const content = {
83
+ icon: enabledDescriptor.icon,
84
+ title: enabledDescriptor.title,
85
+ message: enabledDescriptor.content
86
+ };
87
+ const welcomeView = this.renderDisposables.add(this.instantiationService.createInstance(ChatViewWelcomePart, content, { firstLinkToButton: true, location: this.location }));
88
+ this.element.appendChild(welcomeView.element);
89
+ this.container.classList.toggle('chat-view-welcome-visible', true);
90
+ this._isShowingWelcome.set(true, undefined);
91
+ }
92
+ else {
93
+ this.container.classList.toggle('chat-view-welcome-visible', false);
94
+ this._isShowingWelcome.set(false, undefined);
95
+ }
96
+ }
97
+ };
98
+ ChatViewWelcomeController = ( __decorate([
99
+ ( __param(3, IContextKeyService)),
100
+ ( __param(4, IInstantiationService))
101
+ ], ChatViewWelcomeController));
102
+ let ChatViewWelcomePart = class ChatViewWelcomePart extends Disposable {
103
+ constructor(content, options, openerService, logService, chatWidgetService, telemetryService, markdownRendererService, contextMenuService) {
104
+ super();
105
+ this.content = content;
106
+ this.openerService = openerService;
107
+ this.logService = logService;
108
+ this.chatWidgetService = chatWidgetService;
109
+ this.telemetryService = telemetryService;
110
+ this.markdownRendererService = markdownRendererService;
111
+ this.contextMenuService = contextMenuService;
112
+ this.element = $$1('.chat-welcome-view');
113
+ try {
114
+ const icon = append(this.element, $('.chat-welcome-view-icon'));
115
+ if (content.useLargeIcon) {
116
+ icon.classList.add('large-icon');
117
+ }
118
+ if (content.icon) {
119
+ if (ThemeIcon.isThemeIcon(content.icon)) {
120
+ const iconElement = renderIcon(content.icon);
121
+ icon.appendChild(iconElement);
122
+ }
123
+ else if (URI.isUri(content.icon)) {
124
+ const cssUrl = asCSSUrl(content.icon);
125
+ const hash = ( new StringSHA1());
126
+ hash.update(cssUrl);
127
+ const iconId = `chat-welcome-icon-${hash.digest()}`;
128
+ const iconClass = `.chat-welcome-view-icon.${iconId}`;
129
+ createCSSRule(iconClass, `
130
+ mask: ${cssUrl} no-repeat 50% 50%;
131
+ -webkit-mask: ${cssUrl} no-repeat 50% 50%;
132
+ background-color: var(--vscode-icon-foreground);
133
+ `);
134
+ icon.classList.add(iconId, 'custom-icon');
135
+ }
136
+ }
137
+ const title = append(this.element, $('.chat-welcome-view-title'));
138
+ title.textContent = content.title;
139
+ const message = append(this.element, $('.chat-welcome-view-message'));
140
+ const messageResult = this.renderMarkdownMessageContent(content.message, options);
141
+ append(message, messageResult.element);
142
+ if (content.additionalMessage) {
143
+ const disclaimers = append(this.element, $('.chat-welcome-view-disclaimer'));
144
+ if (typeof content.additionalMessage === 'string') {
145
+ disclaimers.textContent = content.additionalMessage;
146
+ }
147
+ else {
148
+ const additionalMessageResult = this.renderMarkdownMessageContent(content.additionalMessage, options);
149
+ disclaimers.appendChild(additionalMessageResult.element);
150
+ }
151
+ }
152
+ if (content.suggestedPrompts && content.suggestedPrompts.length) {
153
+ const suggestedPromptsContainer = append(this.element, $('.chat-welcome-view-suggested-prompts'));
154
+ const titleElement = append(suggestedPromptsContainer, $('.chat-welcome-view-suggested-prompts-title'));
155
+ titleElement.textContent = ( localize(5853, 'Suggested Actions'));
156
+ for (const prompt of content.suggestedPrompts) {
157
+ const promptElement = append(suggestedPromptsContainer, $('.chat-welcome-view-suggested-prompt'));
158
+ promptElement.setAttribute('role', 'button');
159
+ promptElement.setAttribute('tabindex', '0');
160
+ const promptAriaLabel = prompt.description
161
+ ? ( localize(5854, 'Suggested prompt: {0}, {1}', prompt.label, prompt.description))
162
+ : ( localize(5855, 'Suggested prompt: {0}', prompt.label));
163
+ promptElement.setAttribute('aria-label', promptAriaLabel);
164
+ const titleElement = append(promptElement, $('.chat-welcome-view-suggested-prompt-title'));
165
+ titleElement.textContent = prompt.label;
166
+ const tooltip = ( localize(5856, "Suggested prompt: {0}", prompt.prompt));
167
+ promptElement.title = tooltip;
168
+ titleElement.title = tooltip;
169
+ if (prompt.description) {
170
+ const descriptionElement = append(promptElement, $('.chat-welcome-view-suggested-prompt-description'));
171
+ descriptionElement.textContent = prompt.description;
172
+ descriptionElement.title = prompt.description;
173
+ }
174
+ const executePrompt = () => {
175
+ this.telemetryService.publicLog2('chat.clickedSuggestedPrompt', {
176
+ suggestedPrompt: prompt.prompt,
177
+ });
178
+ if (!this.chatWidgetService.lastFocusedWidget) {
179
+ const widgets = this.chatWidgetService.getWidgetsByLocations(ChatAgentLocation.Chat);
180
+ if (widgets.length) {
181
+ widgets[0].setInput(prompt.prompt);
182
+ }
183
+ }
184
+ else {
185
+ this.chatWidgetService.lastFocusedWidget.setInput(prompt.prompt);
186
+ }
187
+ };
188
+ this._register(addDisposableListener(promptElement, EventType.CONTEXT_MENU, (e) => {
189
+ e.preventDefault();
190
+ e.stopImmediatePropagation();
191
+ const actions = this.getPromptContextMenuActions(prompt);
192
+ this.contextMenuService.showContextMenu({
193
+ getAnchor: () => ({ x: e.clientX, y: e.clientY }),
194
+ getActions: () => actions,
195
+ });
196
+ }));
197
+ this._register(addDisposableListener(promptElement, EventType.CLICK, executePrompt));
198
+ this._register(addDisposableListener(promptElement, EventType.KEY_DOWN, (e) => {
199
+ const event = ( new StandardKeyboardEvent(e));
200
+ if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
201
+ e.preventDefault();
202
+ e.stopPropagation();
203
+ executePrompt();
204
+ }
205
+ else if (event.equals(KeyCode.F10) && event.shiftKey) {
206
+ e.preventDefault();
207
+ e.stopPropagation();
208
+ const actions = this.getPromptContextMenuActions(prompt);
209
+ this.contextMenuService.showContextMenu({
210
+ getAnchor: () => promptElement,
211
+ getActions: () => actions,
212
+ });
213
+ }
214
+ }));
215
+ }
216
+ }
217
+ if (content.tips) {
218
+ const tips = append(this.element, $('.chat-welcome-view-tips'));
219
+ const tipsResult = this._register(this.markdownRendererService.render(content.tips));
220
+ tips.appendChild(tipsResult.element);
221
+ }
222
+ }
223
+ catch (err) {
224
+ this.logService.error('Failed to render chat view welcome content', err);
225
+ }
226
+ }
227
+ getPromptContextMenuActions(prompt) {
228
+ const actions = [];
229
+ if (prompt.uri) {
230
+ const uri = prompt.uri;
231
+ actions.push(( new Action('chat.editPromptFile', ( localize(5857, "Edit Prompt File")), ThemeIcon.asClassName(Codicon.goToFile), true, async () => {
232
+ try {
233
+ await this.openerService.open(uri);
234
+ }
235
+ catch (error) {
236
+ this.logService.error('Failed to open prompt file:', error);
237
+ }
238
+ })));
239
+ }
240
+ return actions;
241
+ }
242
+ needsRerender(content) {
243
+ return !!(this.content.title !== content.title ||
244
+ this.content.message.value !== content.message.value ||
245
+ this.content.additionalMessage !== content.additionalMessage ||
246
+ this.content.tips?.value !== content.tips?.value ||
247
+ this.content.suggestedPrompts?.length !== content.suggestedPrompts?.length ||
248
+ this.content.suggestedPrompts?.some((prompt, index) => {
249
+ const incoming = content.suggestedPrompts?.[index];
250
+ return incoming?.label !== prompt.label || incoming?.description !== prompt.description;
251
+ }));
252
+ }
253
+ renderMarkdownMessageContent(content, options) {
254
+ const messageResult = this._register(this.markdownRendererService.render(content));
255
+ const firstLink = options?.firstLinkToButton ? messageResult.element.querySelector('a') : undefined;
256
+ if (firstLink) {
257
+ const target = firstLink.getAttribute('data-href');
258
+ const button = this._register(( new Button(firstLink.parentElement, defaultButtonStyles)));
259
+ button.label = firstLink.textContent ?? '';
260
+ if (target) {
261
+ this._register(button.onDidClick(() => {
262
+ this.openerService.open(target, { allowCommands: true });
263
+ }));
264
+ }
265
+ firstLink.replaceWith(button.element);
266
+ }
267
+ return messageResult;
268
+ }
269
+ };
270
+ ChatViewWelcomePart = ( __decorate([
271
+ ( __param(2, IOpenerService)),
272
+ ( __param(3, ILogService)),
273
+ ( __param(4, IChatWidgetService)),
274
+ ( __param(5, ITelemetryService)),
275
+ ( __param(6, IMarkdownRendererService)),
276
+ ( __param(7, IContextMenuService))
277
+ ], ChatViewWelcomePart));
278
+
279
+ export { ChatViewWelcomeController, ChatViewWelcomePart };
@@ -0,0 +1,28 @@
1
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
+ import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
3
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
+ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
5
+ import { ContextKeyExpression } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
6
+ export declare enum ChatViewsWelcomeExtensions {
7
+ ChatViewsWelcomeRegistry = "workbench.registry.chat.viewsWelcome"
8
+ }
9
+ export interface IChatViewsWelcomeDescriptor {
10
+ readonly icon?: ThemeIcon;
11
+ readonly title: string;
12
+ readonly content: IMarkdownString;
13
+ readonly when: ContextKeyExpression;
14
+ }
15
+ export interface IChatViewsWelcomeContributionRegistry {
16
+ readonly onDidChange: Event<void>;
17
+ get(): ReadonlyArray<IChatViewsWelcomeDescriptor>;
18
+ register(descriptor: IChatViewsWelcomeDescriptor): void;
19
+ }
20
+ declare class ChatViewsWelcomeContributionRegistry extends Disposable implements IChatViewsWelcomeContributionRegistry {
21
+ private readonly descriptors;
22
+ private readonly _onDidChange;
23
+ readonly onDidChange: Event<void>;
24
+ register(descriptor: IChatViewsWelcomeDescriptor): void;
25
+ get(): ReadonlyArray<IChatViewsWelcomeDescriptor>;
26
+ }
27
+ export declare const chatViewsWelcomeRegistry: ChatViewsWelcomeContributionRegistry;
28
+ export {};
@@ -0,0 +1,28 @@
1
+
2
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
3
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
+ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
5
+
6
+ var ChatViewsWelcomeExtensions;
7
+ (function (ChatViewsWelcomeExtensions) {
8
+ ChatViewsWelcomeExtensions["ChatViewsWelcomeRegistry"] = "workbench.registry.chat.viewsWelcome";
9
+ })(ChatViewsWelcomeExtensions || (ChatViewsWelcomeExtensions = {}));
10
+ class ChatViewsWelcomeContributionRegistry extends Disposable {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.descriptors = [];
14
+ this._onDidChange = this._register(( new Emitter()));
15
+ this.onDidChange = this._onDidChange.event;
16
+ }
17
+ register(descriptor) {
18
+ this.descriptors.push(descriptor);
19
+ this._onDidChange.fire();
20
+ }
21
+ get() {
22
+ return this.descriptors;
23
+ }
24
+ }
25
+ const chatViewsWelcomeRegistry = ( new ChatViewsWelcomeContributionRegistry());
26
+ Registry.add(ChatViewsWelcomeExtensions.ChatViewsWelcomeRegistry, chatViewsWelcomeRegistry);
27
+
28
+ export { ChatViewsWelcomeExtensions, chatViewsWelcomeRegistry };
@@ -0,0 +1,13 @@
1
+ export declare const chatRequestBorder: string;
2
+ export declare const chatRequestBackground: string;
3
+ export declare const chatSlashCommandBackground: string;
4
+ export declare const chatSlashCommandForeground: string;
5
+ export declare const chatAvatarBackground: string;
6
+ export declare const chatAvatarForeground: string;
7
+ export declare const chatEditedFileForeground: string;
8
+ export declare const chatRequestCodeBorder: string;
9
+ export declare const chatRequestBubbleBackground: string;
10
+ export declare const chatRequestBubbleHoverBackground: string;
11
+ export declare const chatCheckpointSeparator: string;
12
+ export declare const chatLinesAddedForeground: string;
13
+ export declare const chatLinesRemovedForeground: string;
@@ -0,0 +1,38 @@
1
+
2
+ import { Color, RGBA } from '@codingame/monaco-vscode-api/vscode/vs/base/common/color';
3
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
+ import { registerColor, transparent } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
5
+ import { contrastBorder, foreground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
6
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
7
+ import { editorWidgetBackground, editorBackground, editorSelectionBackground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
8
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
9
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
10
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
11
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
12
+ import { badgeBackground, badgeForeground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
13
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
14
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
15
+
16
+ registerColor('chat.requestBorder', { dark: ( new Color(( new RGBA(255, 255, 255, 0.10)))), light: ( new Color(( new RGBA(0, 0, 0, 0.10)))), hcDark: contrastBorder, hcLight: contrastBorder, }, ( localize(5863, 'The border color of a chat request.')));
17
+ const chatRequestBackground = registerColor('chat.requestBackground', { dark: ( transparent(editorBackground, 0.62)), light: ( transparent(editorBackground, 0.62)), hcDark: editorWidgetBackground, hcLight: null }, ( localize(5864, 'The background color of a chat request.')));
18
+ const chatSlashCommandBackground = registerColor('chat.slashCommandBackground', { dark: '#26477866', light: '#adceff7a', hcDark: Color.white, hcLight: badgeBackground }, ( localize(5865, 'The background color of a chat slash command.')));
19
+ const chatSlashCommandForeground = registerColor('chat.slashCommandForeground', { dark: '#85b6ff', light: '#26569e', hcDark: Color.black, hcLight: badgeForeground }, ( localize(5866, 'The foreground color of a chat slash command.')));
20
+ registerColor('chat.avatarBackground', { dark: '#1f1f1f', light: '#f2f2f2', hcDark: Color.black, hcLight: Color.white, }, ( localize(5867, 'The background color of a chat avatar.')));
21
+ registerColor('chat.avatarForeground', foreground, ( localize(5868, 'The foreground color of a chat avatar.')));
22
+ registerColor('chat.editedFileForeground', {
23
+ light: '#895503',
24
+ dark: '#E2C08D',
25
+ hcDark: '#E2C08D',
26
+ hcLight: '#895503'
27
+ }, ( localize(
28
+ 5869,
29
+ 'The foreground color of a chat edited file in the edited file list.'
30
+ )));
31
+ registerColor('chat.requestCodeBorder', { dark: '#004972B8', light: '#0e639c40', hcDark: null, hcLight: null }, ( localize(5870, 'Border color of code blocks within the chat request bubble.')), true);
32
+ registerColor('chat.requestBubbleBackground', { light: ( transparent(editorSelectionBackground, 0.3)), dark: ( transparent(editorSelectionBackground, 0.3)), hcDark: null, hcLight: null }, ( localize(5871, "Background color of the chat request bubble.")), true);
33
+ registerColor('chat.requestBubbleHoverBackground', { dark: ( transparent(editorSelectionBackground, 0.6)), light: ( transparent(editorSelectionBackground, 0.6)), hcDark: null, hcLight: null }, ( localize(5872, 'Background color of the chat request bubble on hover.')), true);
34
+ registerColor('chat.checkpointSeparator', { dark: '#585858', light: '#a9a9a9', hcDark: '#a9a9a9', hcLight: '#a5a5a5' }, ( localize(5873, "Chat checkpoint separator color.")));
35
+ registerColor('chat.linesAddedForeground', { dark: '#54B054', light: '#107C10', hcDark: '#54B054', hcLight: '#107C10' }, ( localize(5874, 'Foreground color of lines added in chat code block pill.')), true);
36
+ registerColor('chat.linesRemovedForeground', { dark: '#FC6A6A', light: '#BC2F32', hcDark: '#F48771', hcLight: '#B5200D' }, ( localize(5875, 'Foreground color of lines removed in chat code block pill.')), true);
37
+
38
+ export { chatRequestBackground, chatSlashCommandBackground, chatSlashCommandForeground };