@codingame/monaco-vscode-katex-common 25.1.1 → 26.0.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 (317) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +23 -2
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +64 -27
  4. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +3 -1
  5. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +31 -28
  6. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +2 -0
  7. package/vscode/src/vs/platform/actions/browser/buttonbar.js +71 -50
  8. package/vscode/src/vs/platform/editor/browser/editor.js +17 -7
  9. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +112 -129
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +10 -1
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +110 -85
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +5 -5
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +21 -6
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +308 -216
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +153 -148
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +27 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +247 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +71 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +347 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +44 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +287 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +20 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +89 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +188 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +677 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentSessionHoverWidget.css +98 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +263 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +34 -25
  29. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +19 -14
  30. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +762 -359
  31. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +22 -1
  32. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +188 -99
  33. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +9 -3
  34. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +166 -113
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +12 -5
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +279 -213
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +28 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +382 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +24 -7
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +128 -52
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +153 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +1218 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +14 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +39 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +193 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +2 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +93 -89
  54. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +5 -2
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +42 -47
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +58 -56
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +18 -14
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +17 -15
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -2
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +132 -68
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +0 -2
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +68 -47
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +14 -13
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -4
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +36 -24
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +18 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +32 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +7 -2
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +15 -4
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +22 -14
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +0 -2
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +34 -27
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -5
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +198 -135
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +2 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +38 -10
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +29 -27
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +0 -2
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +41 -36
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +0 -2
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +23 -18
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.js +13 -13
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +0 -3
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +20 -14
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +11 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +291 -152
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -3
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +227 -162
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.js +68 -72
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +2 -4
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +76 -75
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +2 -5
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +96 -76
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +4 -1
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +74 -38
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +0 -2
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -25
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +107 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +814 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +0 -2
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +34 -29
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +8 -10
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +236 -197
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +123 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +492 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +75 -47
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +2 -4
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +31 -20
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +0 -3
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +42 -36
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +55 -7
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +714 -148
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +7 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +21 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +2 -7
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +143 -153
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +14 -5
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +79 -61
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +10 -4
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +209 -77
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +9 -7
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +71 -54
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +18 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +83 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +4 -4
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +248 -190
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +1 -14
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +23 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPullRequestContent.css +5 -41
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +493 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +63 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +9 -1
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +121 -5
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +37 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +51 -45
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +46 -42
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +4 -2
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +99 -67
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +112 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +634 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +49 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +132 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.js +15 -9
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +196 -149
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +17 -1
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +577 -193
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +119 -86
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +10 -2
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +165 -36
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +0 -2
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +5 -8
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +5 -3
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +75 -65
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +30 -28
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -5
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +102 -106
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +44 -20
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +19 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +67 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +57 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +69 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +122 -82
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +39 -12
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +1110 -597
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +291 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +485 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +38 -28
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -20
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +650 -689
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +21 -18
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +102 -36
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +1253 -790
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -7
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +11 -11
  176. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +34 -0
  177. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +55 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +6 -2
  179. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +51 -35
  180. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +22 -0
  181. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +102 -0
  182. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +16 -4
  183. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +192 -44
  184. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +11 -12
  185. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +99 -66
  186. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +47 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +188 -0
  188. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.d.ts +20 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +115 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +129 -167
  191. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +16 -3
  192. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +37 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +143 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +56 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +206 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +152 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +67 -0
  198. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +22 -0
  199. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +170 -0
  200. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
  201. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +80 -19
  202. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +20 -28
  203. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +2 -1
  204. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +22 -19
  205. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +15 -0
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +122 -0
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +19 -104
  208. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -1040
  209. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +28 -0
  210. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +162 -0
  211. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +21 -0
  212. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +98 -0
  213. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +68 -0
  214. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +416 -0
  215. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +1 -6
  216. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +194 -215
  217. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +0 -1
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +74 -104
  219. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +45 -91
  220. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +22 -0
  221. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +98 -0
  222. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +5 -2
  223. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +96 -68
  224. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +7 -0
  225. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +11 -0
  226. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +20 -0
  227. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +150 -0
  228. package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +141 -147
  229. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +64 -0
  230. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +200 -0
  231. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +548 -0
  232. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.js +23 -0
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +22 -0
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +338 -0
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +18 -0
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +75 -0
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +364 -0
  239. package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +21 -0
  240. package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +36 -0
  241. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +110 -0
  242. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +692 -0
  243. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +40 -0
  244. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +158 -0
  245. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +80 -21
  246. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +440 -82
  247. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.d.ts +0 -34
  248. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.js +0 -139
  249. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +0 -10
  250. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +0 -1081
  251. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +0 -199
  252. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +0 -482
  253. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -28
  254. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -37
  255. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +0 -94
  256. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +0 -495
  257. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +0 -72
  258. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +0 -454
  259. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +0 -13
  260. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +0 -66
  261. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +0 -41
  262. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +0 -372
  263. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +0 -4
  264. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +0 -58
  265. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
  266. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -594
  267. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
  268. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
  269. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
  270. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1746
  271. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
  272. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -269
  273. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
  274. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -806
  275. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
  276. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -116
  277. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
  278. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -62
  279. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
  280. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
  281. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
  282. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -295
  283. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
  284. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -241
  285. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
  286. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -146
  287. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
  288. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -90
  289. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
  290. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -41
  291. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
  292. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -42
  293. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
  294. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -77
  295. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
  296. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
  297. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -823
  298. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
  299. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -29
  300. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
  301. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -567
  302. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
  303. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -189
  304. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
  305. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -439
  306. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +0 -57
  307. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +0 -263
  308. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +0 -22
  309. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +0 -48
  310. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
  311. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
  312. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
  313. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -89
  314. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
  315. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
  316. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +0 -33
  317. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -108
@@ -0,0 +1,338 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { disposableTimeout, RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
4
+ import { Disposable, dispose, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { language } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
6
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
7
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
8
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
9
+ import { themeColorFromId } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
10
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
11
+ import { NotebookVisibleCellObserver } from './notebookVisibleCellObserver.js';
12
+ import { registerNotebookContribution } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
13
+ import { cellStatusIconSuccess, cellStatusIconError } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorWidget';
14
+ import { successStateIcon, errorStateIcon, pendingStateIcon, executingStateIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
15
+ import { NotebookCellExecutionState, CellStatusbarAlignment, NotebookSetting } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
16
+ import { NotebookExecutionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
17
+ import { INotebookExecutionStateService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
18
+ import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
19
+
20
+ var ExecutionStateCellStatusBarItem_1, TimerCellStatusBarItem_1;
21
+ function formatCellDuration(duration, showMilliseconds = true) {
22
+ if (showMilliseconds && duration < 1000) {
23
+ return `${duration}ms`;
24
+ }
25
+ const minutes = Math.floor(duration / 1000 / 60);
26
+ const seconds = Math.floor(duration / 1000) % 60;
27
+ const tenths = Math.floor((duration % 1000) / 100);
28
+ if (minutes > 0) {
29
+ return `${minutes}m ${seconds}.${tenths}s`;
30
+ } else {
31
+ return `${seconds}.${tenths}s`;
32
+ }
33
+ }
34
+ class NotebookStatusBarController extends Disposable {
35
+ constructor(_notebookEditor, _itemFactory) {
36
+ super();
37
+ this._notebookEditor = _notebookEditor;
38
+ this._itemFactory = _itemFactory;
39
+ this._visibleCells = ( new Map());
40
+ this._observer = this._register(( new NotebookVisibleCellObserver(this._notebookEditor)));
41
+ this._register(this._observer.onDidChangeVisibleCells(this._updateVisibleCells, this));
42
+ this._updateEverything();
43
+ }
44
+ _updateEverything() {
45
+ this._visibleCells.forEach(dispose);
46
+ this._visibleCells.clear();
47
+ this._updateVisibleCells({
48
+ added: this._observer.visibleCells,
49
+ removed: []
50
+ });
51
+ }
52
+ _updateVisibleCells(e) {
53
+ const vm = this._notebookEditor.getViewModel();
54
+ if (!vm) {
55
+ return;
56
+ }
57
+ for (const oldCell of e.removed) {
58
+ this._visibleCells.get(oldCell.handle)?.dispose();
59
+ this._visibleCells.delete(oldCell.handle);
60
+ }
61
+ for (const newCell of e.added) {
62
+ this._visibleCells.set(newCell.handle, this._itemFactory(vm, newCell));
63
+ }
64
+ }
65
+ dispose() {
66
+ super.dispose();
67
+ this._visibleCells.forEach(dispose);
68
+ this._visibleCells.clear();
69
+ }
70
+ }
71
+ let ExecutionStateCellStatusBarContrib = class ExecutionStateCellStatusBarContrib extends Disposable {
72
+ static {
73
+ this.id = "workbench.notebook.statusBar.execState";
74
+ }
75
+ constructor(notebookEditor, instantiationService) {
76
+ super();
77
+ this._register(( new NotebookStatusBarController(
78
+ notebookEditor,
79
+ (vm, cell) => instantiationService.createInstance(ExecutionStateCellStatusBarItem, vm, cell)
80
+ )));
81
+ }
82
+ };
83
+ ExecutionStateCellStatusBarContrib = ( __decorate([( __param(1, IInstantiationService))], ExecutionStateCellStatusBarContrib));
84
+ registerNotebookContribution(ExecutionStateCellStatusBarContrib.id, ExecutionStateCellStatusBarContrib);
85
+ let ExecutionStateCellStatusBarItem = class ExecutionStateCellStatusBarItem extends Disposable {
86
+ static {
87
+ ExecutionStateCellStatusBarItem_1 = this;
88
+ }
89
+ static {
90
+ this.MIN_SPINNER_TIME = 500;
91
+ }
92
+ constructor(_notebookViewModel, _cell, _executionStateService) {
93
+ super();
94
+ this._notebookViewModel = _notebookViewModel;
95
+ this._cell = _cell;
96
+ this._executionStateService = _executionStateService;
97
+ this._currentItemIds = [];
98
+ this._clearExecutingStateTimer = this._register(( new MutableDisposable()));
99
+ this._update();
100
+ this._register(this._executionStateService.onDidChangeExecution(e => {
101
+ if (e.type === NotebookExecutionType.cell && e.affectsCell(this._cell.uri)) {
102
+ this._update();
103
+ }
104
+ }));
105
+ this._register(this._cell.model.onDidChangeInternalMetadata(() => this._update()));
106
+ }
107
+ async _update() {
108
+ const items = this._getItemsForCell();
109
+ if (Array.isArray(items)) {
110
+ this._currentItemIds = this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds, [{
111
+ handle: this._cell.handle,
112
+ items
113
+ }]);
114
+ }
115
+ }
116
+ _getItemsForCell() {
117
+ const runState = this._executionStateService.getCellExecution(this._cell.uri);
118
+ if (runState?.state === NotebookCellExecutionState.Executing && typeof this._showedExecutingStateTime !== "number") {
119
+ this._showedExecutingStateTime = Date.now();
120
+ } else if (runState?.state !== NotebookCellExecutionState.Executing && typeof this._showedExecutingStateTime === "number") {
121
+ const timeUntilMin = ExecutionStateCellStatusBarItem_1.MIN_SPINNER_TIME - (Date.now() - this._showedExecutingStateTime);
122
+ if (timeUntilMin > 0) {
123
+ if (!this._clearExecutingStateTimer.value) {
124
+ this._clearExecutingStateTimer.value = disposableTimeout(() => {
125
+ this._showedExecutingStateTime = undefined;
126
+ this._clearExecutingStateTimer.clear();
127
+ this._update();
128
+ }, timeUntilMin);
129
+ }
130
+ return undefined;
131
+ } else {
132
+ this._showedExecutingStateTime = undefined;
133
+ }
134
+ }
135
+ const items = this._getItemForState(runState, this._cell.internalMetadata);
136
+ return items;
137
+ }
138
+ _getItemForState(runState, internalMetadata) {
139
+ const state = runState?.state;
140
+ const {
141
+ lastRunSuccess
142
+ } = internalMetadata;
143
+ if (!state && lastRunSuccess) {
144
+ return [{
145
+ text: `$(${successStateIcon.id})`,
146
+ color: themeColorFromId(cellStatusIconSuccess),
147
+ tooltip: ( localize(9563, "Success")),
148
+ alignment: CellStatusbarAlignment.Left,
149
+ priority: Number.MAX_SAFE_INTEGER
150
+ }];
151
+ } else if (!state && lastRunSuccess === false) {
152
+ return [{
153
+ text: `$(${errorStateIcon.id})`,
154
+ color: themeColorFromId(cellStatusIconError),
155
+ tooltip: ( localize(9564, "Failed")),
156
+ alignment: CellStatusbarAlignment.Left,
157
+ priority: Number.MAX_SAFE_INTEGER
158
+ }];
159
+ } else if (state === NotebookCellExecutionState.Pending || state === NotebookCellExecutionState.Unconfirmed) {
160
+ return [{
161
+ text: `$(${pendingStateIcon.id})`,
162
+ tooltip: ( localize(9565, "Pending")),
163
+ alignment: CellStatusbarAlignment.Left,
164
+ priority: Number.MAX_SAFE_INTEGER
165
+ }];
166
+ } else if (state === NotebookCellExecutionState.Executing) {
167
+ const icon = runState?.didPause ? executingStateIcon : ThemeIcon.modify(executingStateIcon, "spin");
168
+ return [{
169
+ text: `$(${icon.id})`,
170
+ tooltip: ( localize(9566, "Executing")),
171
+ alignment: CellStatusbarAlignment.Left,
172
+ priority: Number.MAX_SAFE_INTEGER
173
+ }];
174
+ }
175
+ return [];
176
+ }
177
+ dispose() {
178
+ super.dispose();
179
+ this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds, [{
180
+ handle: this._cell.handle,
181
+ items: []
182
+ }]);
183
+ }
184
+ };
185
+ ExecutionStateCellStatusBarItem = ExecutionStateCellStatusBarItem_1 = ( __decorate([( __param(2, INotebookExecutionStateService))], ExecutionStateCellStatusBarItem));
186
+ let TimerCellStatusBarContrib = class TimerCellStatusBarContrib extends Disposable {
187
+ static {
188
+ this.id = "workbench.notebook.statusBar.execTimer";
189
+ }
190
+ constructor(notebookEditor, instantiationService) {
191
+ super();
192
+ this._register(( new NotebookStatusBarController(
193
+ notebookEditor,
194
+ (vm, cell) => instantiationService.createInstance(TimerCellStatusBarItem, vm, cell)
195
+ )));
196
+ }
197
+ };
198
+ TimerCellStatusBarContrib = ( __decorate([( __param(1, IInstantiationService))], TimerCellStatusBarContrib));
199
+ registerNotebookContribution(TimerCellStatusBarContrib.id, TimerCellStatusBarContrib);
200
+ const UPDATE_TIMER_GRACE_PERIOD = 200;
201
+ let TimerCellStatusBarItem = class TimerCellStatusBarItem extends Disposable {
202
+ static {
203
+ TimerCellStatusBarItem_1 = this;
204
+ }
205
+ static {
206
+ this.UPDATE_INTERVAL = 100;
207
+ }
208
+ constructor(
209
+ _notebookViewModel,
210
+ _cell,
211
+ _executionStateService,
212
+ _notebookService,
213
+ _configurationService
214
+ ) {
215
+ super();
216
+ this._notebookViewModel = _notebookViewModel;
217
+ this._cell = _cell;
218
+ this._executionStateService = _executionStateService;
219
+ this._notebookService = _notebookService;
220
+ this._configurationService = _configurationService;
221
+ this._currentItemIds = [];
222
+ this._isVerbose = this._configurationService.getValue(NotebookSetting.cellExecutionTimeVerbosity) === "verbose";
223
+ this._scheduler = this._register(( new RunOnceScheduler(() => this._update(), TimerCellStatusBarItem_1.UPDATE_INTERVAL)));
224
+ this._update();
225
+ this._register(this._cell.model.onDidChangeInternalMetadata(() => this._update()));
226
+ this._register(this._configurationService.onDidChangeConfiguration(e => {
227
+ if (e.affectsConfiguration(NotebookSetting.cellExecutionTimeVerbosity)) {
228
+ this._isVerbose = this._configurationService.getValue(NotebookSetting.cellExecutionTimeVerbosity) === "verbose";
229
+ this._update();
230
+ }
231
+ }));
232
+ }
233
+ async _update() {
234
+ let timerItem;
235
+ const runState = this._executionStateService.getCellExecution(this._cell.uri);
236
+ const state = runState?.state;
237
+ const startTime = this._cell.internalMetadata.runStartTime;
238
+ const adjustment = this._cell.internalMetadata.runStartTimeAdjustment ?? 0;
239
+ const endTime = this._cell.internalMetadata.runEndTime;
240
+ if (runState?.didPause) {
241
+ timerItem = undefined;
242
+ } else if (state === NotebookCellExecutionState.Executing) {
243
+ if (typeof startTime === "number") {
244
+ timerItem = this._getTimeItem(startTime, Date.now(), adjustment);
245
+ this._scheduler.schedule();
246
+ }
247
+ } else if (!state) {
248
+ if (typeof startTime === "number" && typeof endTime === "number") {
249
+ const timerDuration = Date.now() - startTime + adjustment;
250
+ const executionDuration = endTime - startTime;
251
+ const renderDuration = this._cell.internalMetadata.renderDuration ?? {};
252
+ timerItem = this._getTimeItem(startTime, endTime, undefined, {
253
+ timerDuration,
254
+ executionDuration,
255
+ renderDuration
256
+ });
257
+ }
258
+ }
259
+ const items = timerItem ? [timerItem] : [];
260
+ if (!items.length && !!runState) {
261
+ if (!this._deferredUpdate) {
262
+ this._deferredUpdate = disposableTimeout(() => {
263
+ this._deferredUpdate = undefined;
264
+ this._currentItemIds = this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds, [{
265
+ handle: this._cell.handle,
266
+ items
267
+ }]);
268
+ }, UPDATE_TIMER_GRACE_PERIOD, this._store);
269
+ }
270
+ } else {
271
+ this._deferredUpdate?.dispose();
272
+ this._deferredUpdate = undefined;
273
+ this._currentItemIds = this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds, [{
274
+ handle: this._cell.handle,
275
+ items
276
+ }]);
277
+ }
278
+ }
279
+ _getTimeItem(startTime, endTime, adjustment = 0, runtimeInformation) {
280
+ const duration = endTime - startTime + adjustment;
281
+ let tooltip;
282
+ const lastExecution = ( new Date(endTime)).toLocaleTimeString(language);
283
+ if (runtimeInformation) {
284
+ const {
285
+ renderDuration,
286
+ executionDuration,
287
+ timerDuration
288
+ } = runtimeInformation;
289
+ let renderTimes = "";
290
+ for (const key in renderDuration) {
291
+ const rendererInfo = this._notebookService.getRendererInfo(key);
292
+ const args = encodeURIComponent(JSON.stringify({
293
+ extensionId: rendererInfo?.extensionId.value ?? "",
294
+ issueBody: `Auto-generated text from notebook cell performance - Please add an explanation for the performance issue, including cell content if possible.\n` + `The duration for the renderer, ${rendererInfo?.displayName ?? key}, is slower than expected.\n` + `Execution Time: ${formatCellDuration(executionDuration)}\n` + `Renderer Duration: ${formatCellDuration(renderDuration[key])}\n`
295
+ }));
296
+ const renderIssueLink = (renderDuration[key] > 200 && executionDuration < 2000) || renderDuration[key] > 1000;
297
+ const linkText = rendererInfo?.displayName ?? key;
298
+ const rendererTitle = renderIssueLink ? `[${linkText}](command:workbench.action.openIssueReporter?${args})` : `**${linkText}**`;
299
+ renderTimes += `- ${rendererTitle} ${formatCellDuration(renderDuration[key])}\n`;
300
+ }
301
+ renderTimes += `\n*${( localize(9567, "Use the links above to file an issue using the issue reporter."))}*\n`;
302
+ tooltip = {
303
+ value: ( localize(
304
+ 9568,
305
+ "**Last Execution** {0}\n\n**Execution Time** {1}\n\n**Overhead Time** {2}\n\n**Render Times**\n\n{3}",
306
+ lastExecution,
307
+ formatCellDuration(executionDuration),
308
+ formatCellDuration(timerDuration - executionDuration),
309
+ renderTimes
310
+ )),
311
+ isTrusted: true
312
+ };
313
+ }
314
+ const executionText = this._isVerbose ? ( localize(
315
+ 9569,
316
+ "Last Execution: {0}, Duration: {1}",
317
+ lastExecution,
318
+ formatCellDuration(duration, false)
319
+ )) : formatCellDuration(duration, false);
320
+ return {
321
+ text: executionText,
322
+ alignment: CellStatusbarAlignment.Left,
323
+ priority: Number.MAX_SAFE_INTEGER - 5,
324
+ tooltip
325
+ };
326
+ }
327
+ dispose() {
328
+ super.dispose();
329
+ this._deferredUpdate?.dispose();
330
+ this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds, [{
331
+ handle: this._cell.handle,
332
+ items: []
333
+ }]);
334
+ }
335
+ };
336
+ TimerCellStatusBarItem = TimerCellStatusBarItem_1 = ( __decorate([( __param(2, INotebookExecutionStateService)), ( __param(3, INotebookService)), ( __param(4, IConfigurationService))], TimerCellStatusBarItem));
337
+
338
+ export { ExecutionStateCellStatusBarContrib, NotebookStatusBarController, TimerCellStatusBarContrib, formatCellDuration };
@@ -0,0 +1,18 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { ICellViewModel, INotebookEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
3
+ export interface ICellVisibilityChangeEvent {
4
+ added: ICellViewModel[];
5
+ removed: ICellViewModel[];
6
+ }
7
+ export declare class NotebookVisibleCellObserver extends Disposable {
8
+ private readonly _notebookEditor;
9
+ private readonly _onDidChangeVisibleCells;
10
+ readonly onDidChangeVisibleCells: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<ICellVisibilityChangeEvent>;
11
+ private readonly _viewModelDisposables;
12
+ private _visibleCells;
13
+ get visibleCells(): ICellViewModel[];
14
+ constructor(_notebookEditor: INotebookEditor);
15
+ private _onModelChange;
16
+ protected updateEverything(): void;
17
+ private _updateVisibleCells;
18
+ }
@@ -0,0 +1,58 @@
1
+
2
+ import { diffSets } from '@codingame/monaco-vscode-api/vscode/vs/base/common/collections';
3
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
+ import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { isDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
6
+ import { cellRangesToIndexes } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookRange';
7
+
8
+ class NotebookVisibleCellObserver extends Disposable {
9
+ get visibleCells() {
10
+ return this._visibleCells;
11
+ }
12
+ constructor(_notebookEditor) {
13
+ super();
14
+ this._notebookEditor = _notebookEditor;
15
+ this._onDidChangeVisibleCells = this._register(( new Emitter()));
16
+ this.onDidChangeVisibleCells = this._onDidChangeVisibleCells.event;
17
+ this._viewModelDisposables = this._register(( new DisposableStore()));
18
+ this._visibleCells = [];
19
+ this._register(
20
+ this._notebookEditor.onDidChangeVisibleRanges(this._updateVisibleCells, this)
21
+ );
22
+ this._register(this._notebookEditor.onDidChangeModel(this._onModelChange, this));
23
+ this._updateVisibleCells();
24
+ }
25
+ _onModelChange() {
26
+ this._viewModelDisposables.clear();
27
+ if (this._notebookEditor.hasModel()) {
28
+ this._viewModelDisposables.add(this._notebookEditor.onDidChangeViewCells(() => this.updateEverything()));
29
+ }
30
+ this.updateEverything();
31
+ }
32
+ updateEverything() {
33
+ this._onDidChangeVisibleCells.fire({
34
+ added: [],
35
+ removed: Array.from(this._visibleCells)
36
+ });
37
+ this._visibleCells = [];
38
+ this._updateVisibleCells();
39
+ }
40
+ _updateVisibleCells() {
41
+ if (!this._notebookEditor.hasModel()) {
42
+ return;
43
+ }
44
+ const newVisibleCells = ( cellRangesToIndexes(this._notebookEditor.visibleRanges).map(index => this._notebookEditor.cellAt(index))).filter(isDefined);
45
+ const newVisibleHandles = ( new Set(( newVisibleCells.map(cell => cell.handle))));
46
+ const oldVisibleHandles = ( new Set(( this._visibleCells.map(cell => cell.handle))));
47
+ const diff = diffSets(oldVisibleHandles, newVisibleHandles);
48
+ const added = ( diff.added.map(handle => this._notebookEditor.getCellByHandle(handle))).filter(isDefined);
49
+ const removed = ( diff.removed.map(handle => this._notebookEditor.getCellByHandle(handle))).filter(isDefined);
50
+ this._visibleCells = newVisibleCells;
51
+ this._onDidChangeVisibleCells.fire({
52
+ added,
53
+ removed
54
+ });
55
+ }
56
+ }
57
+
58
+ export { NotebookVisibleCellObserver };
@@ -0,0 +1,75 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
3
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
4
+ import { IContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
5
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
6
+ import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
7
+ import { IContextViewService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
8
+ import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
9
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
10
+ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
11
+ import { FindModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/contrib/find/findModel";
12
+ import { SimpleFindReplaceWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget";
13
+ import { ICellViewModel, INotebookEditor, INotebookEditorContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
14
+ import { INotebookFindScope } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
15
+ export interface IShowNotebookFindWidgetOptions {
16
+ isRegex?: boolean;
17
+ wholeWord?: boolean;
18
+ matchCase?: boolean;
19
+ matchIndex?: number;
20
+ focus?: boolean;
21
+ searchStringSeededFrom?: {
22
+ cell: ICellViewModel;
23
+ range: Range;
24
+ };
25
+ findScope?: INotebookFindScope;
26
+ }
27
+ export declare class NotebookFindContrib extends Disposable implements INotebookEditorContribution {
28
+ private readonly notebookEditor;
29
+ private readonly instantiationService;
30
+ static readonly id: string;
31
+ private readonly _widget;
32
+ constructor(notebookEditor: INotebookEditor, instantiationService: IInstantiationService);
33
+ get widget(): NotebookFindWidget;
34
+ show(initialInput?: string, options?: IShowNotebookFindWidgetOptions): Promise<void>;
35
+ hide(): void;
36
+ replace(searchString: string | undefined): void;
37
+ isVisible(): boolean;
38
+ findNext(): void;
39
+ findPrevious(): void;
40
+ }
41
+ declare class NotebookFindWidget extends SimpleFindReplaceWidget implements INotebookEditorContribution {
42
+ protected _findWidgetFocused: IContextKey<boolean>;
43
+ protected _findWidgetVisible: IContextKey<boolean>;
44
+ private _isFocused;
45
+ private _showTimeout;
46
+ private _hideTimeout;
47
+ private _previousFocusElement?;
48
+ private _findModel;
49
+ constructor(_notebookEditor: INotebookEditor, contextViewService: IContextViewService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, contextMenuService: IContextMenuService, hoverService: IHoverService, instantiationService: IInstantiationService, storageService: IStorageService);
50
+ get findModel(): FindModel;
51
+ get isFocused(): boolean;
52
+ private _onFindInputKeyDown;
53
+ private _onReplaceInputKeyDown;
54
+ protected onInputChanged(): boolean;
55
+ private findIndex;
56
+ protected find(previous: boolean): void;
57
+ findNext(): void;
58
+ findPrevious(): void;
59
+ protected replaceOne(): void;
60
+ protected replaceAll(): void;
61
+ protected findFirst(): void;
62
+ protected onFocusTrackerFocus(): void;
63
+ protected onFocusTrackerBlur(): void;
64
+ protected onReplaceInputFocusTrackerFocus(): void;
65
+ protected onReplaceInputFocusTrackerBlur(): void;
66
+ protected onFindInputFocusTrackerFocus(): void;
67
+ protected onFindInputFocusTrackerBlur(): void;
68
+ show(initialInput?: string, options?: IShowNotebookFindWidgetOptions): Promise<void>;
69
+ replace(initialFindInput?: string, initialReplaceInput?: string): void;
70
+ hide(): void;
71
+ protected _updateMatchesCount(): void;
72
+ private _getAriaLabel;
73
+ dispose(): void;
74
+ }
75
+ export {};