@codingame/monaco-vscode-katex-common 26.2.2 → 27.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 (183) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +10 -4
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +35 -11
  4. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +3 -0
  5. package/vscode/src/vs/platform/actions/browser/buttonbar.js +15 -4
  6. package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +548 -0
  7. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +15 -15
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +5 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +168 -15
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +67 -51
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +1 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -11
  14. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +9 -9
  15. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +8 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +42 -19
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +12 -1
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +63 -40
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +7 -5
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +77 -73
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +69 -32
  23. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -6
  24. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +381 -83
  25. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +1 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +28 -13
  27. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +38 -19
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +109 -113
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +16 -15
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +2 -2
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +2 -1
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +28 -9
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +226 -123
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
  37. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -4
  38. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
  39. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  40. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  41. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +3 -1
  42. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +9 -4
  43. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +1 -3
  44. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +7 -10
  45. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  46. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +3 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +22 -4
  48. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +2 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +11 -3
  50. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
  52. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.d.ts +0 -2
  54. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +0 -6
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +2 -2
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +3 -1
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +6 -3
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.d.ts +2 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +5 -4
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +0 -1
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +26 -27
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +3 -0
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +51 -20
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -7
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +2 -1
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +20 -8
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +3 -3
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -6
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +36 -1
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +166 -45
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +3 -2
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +16 -11
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +14 -5
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +98 -26
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +1 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +10 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +241 -78
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +29 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +252 -8
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +4 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +39 -18
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +5 -3
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +36 -23
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +5 -5
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +5 -7
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +42 -37
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +12 -3
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +48 -18
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatHookContentPart.css +9 -6
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +2 -2
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +351 -422
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +14 -7
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +102 -7
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +69 -19
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/codeBlockPart.css +48 -15
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +4 -1
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +47 -23
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +0 -1
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +0 -5
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +2 -2
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +7 -7
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.d.ts +18 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +103 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -18
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +1 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +61 -66
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +1 -1
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +7 -9
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +3 -1
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +41 -2
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +3 -3
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +6 -5
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +13 -1
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +2 -1
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +17 -3
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +310 -79
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +6 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +13 -4
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.d.ts +35 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +441 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +24 -1
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +392 -86
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +52 -6
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +271 -187
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +68 -0
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +668 -0
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +12 -1
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +57 -16
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +2 -6
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +78 -45
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +1 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +28 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +86 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +9 -5
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +4 -3
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +393 -134
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +36 -17
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +2 -2
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +20 -13
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +25 -6
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +141 -79
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +18 -13
  155. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +7 -0
  156. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +108 -27
  157. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
  158. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +20 -14
  159. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +4 -6
  160. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +74 -32
  161. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +11 -2
  162. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +68 -27
  163. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +5 -0
  164. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +125 -13
  165. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +8 -11
  166. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +54 -45
  167. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +11 -10
  168. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +172 -112
  169. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
  170. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
  171. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +0 -42
  172. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +27 -3
  173. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +83 -2
  174. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +8 -1
  175. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +58 -33
  176. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  177. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +1 -548
  178. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  179. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  180. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  181. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  182. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +0 -187
  183. /package/vscode/src/vs/{workbench/contrib → platform}/mcp/common/modelContextProtocolApps.js +0 -0
@@ -1,55 +1,88 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
4
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
5
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
6
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
5
7
  import { LineRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/lineRange';
6
- import { SelectionDirection } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection';
8
+ import { CodeActionController } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/codeAction/browser/codeActionController';
7
9
  import { InlineEditsGutterIndicator, InlineSuggestionGutterMenuData, InlineEditsGutterIndicatorData, SimpleInlineSuggestModel } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView';
8
10
  import { InlineEditTabAction } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface';
9
- import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
10
11
  import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
12
+ import { MenuId, MenuItemAction } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
13
+ import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
14
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
11
15
  import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
12
16
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
13
17
  import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
14
18
  import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
15
- import { ACTION_START } from '../common/inlineChat.js';
19
+ import { IUserInteractionService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userInteraction/browser/userInteractionService.service';
20
+ import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
16
21
  import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
17
22
  import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
18
23
  import { constObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/constObservable';
19
- import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
20
24
 
21
25
  let InlineChatGutterAffordance = class InlineChatGutterAffordance extends InlineEditsGutterIndicator {
22
26
  constructor(
23
- _myEditorObs,
27
+ myEditorObs,
24
28
  selection,
25
- _hover,
26
29
  _keybindingService,
27
30
  hoverService,
28
31
  instantiationService,
29
32
  accessibilityService,
30
- themeService
33
+ themeService,
34
+ userInteractionService,
35
+ menuService,
36
+ contextKeyService
31
37
  ) {
38
+ const menu = menuService.createMenu(MenuId.InlineChatEditorAffordance, contextKeyService);
39
+ const menuObs = observableFromEvent(menu.onDidChange, () => menu.getActions({
40
+ renderShortTitle: false
41
+ }));
42
+ const codeActionController = CodeActionController.get(myEditorObs.editor);
43
+ const lightBulbObs = codeActionController?.lightBulbState;
32
44
  const data = derived(r => {
33
45
  const value = selection.read(r);
34
46
  if (!value) {
35
47
  return undefined;
36
48
  }
49
+ const commandGroups = [];
50
+ for (const [, groupActions] of menuObs.read(r)) {
51
+ const group = [];
52
+ for (const action of groupActions) {
53
+ if (action instanceof MenuItemAction) {
54
+ group.push({
55
+ command: {
56
+ id: action.item.id,
57
+ title: action.label
58
+ },
59
+ icon: ThemeIcon.isThemeIcon(action.item.icon) ? action.item.icon : undefined
60
+ });
61
+ }
62
+ }
63
+ if (group.length > 0) {
64
+ commandGroups.push(group);
65
+ }
66
+ }
37
67
  const cursorPosition = value.getPosition();
38
68
  const lineRange = ( new LineRange(cursorPosition.lineNumber, cursorPosition.lineNumber + 1));
39
69
  const gutterMenuData = ( new InlineSuggestionGutterMenuData(
40
70
  undefined,
41
71
  "",
42
- [],
72
+ commandGroups,
43
73
  undefined,
44
- undefined, undefined));
45
- return ( new InlineEditsGutterIndicatorData(gutterMenuData, lineRange, ( new SimpleInlineSuggestModel(() => {}, () => this._doShowHover())),
74
+ undefined,
75
+ undefined, true));
76
+ const lightBulbInfo = lightBulbObs?.read(r);
77
+ const icon = lightBulbInfo ? lightBulbInfo.icon : Codicon.sparkle;
78
+ return ( new InlineEditsGutterIndicatorData(gutterMenuData, lineRange, ( new SimpleInlineSuggestModel(() => {}, () => {})),
46
79
  undefined, {
47
- icon: Codicon.sparkle
80
+ icon
48
81
  }));
49
82
  });
50
83
  const focusIsInMenu = observableValue({}, false);
51
84
  super(
52
- _myEditorObs,
85
+ myEditorObs,
53
86
  data,
54
87
  constObservable(InlineEditTabAction.Inactive),
55
88
  constObservable(0),
@@ -58,41 +91,17 @@ let InlineChatGutterAffordance = class InlineChatGutterAffordance extends Inline
58
91
  hoverService,
59
92
  instantiationService,
60
93
  accessibilityService,
61
- themeService
94
+ themeService,
95
+ userInteractionService
96
+ );
97
+ this._onDidRunAction = this._store.add(( new Emitter()));
98
+ this.onDidRunAction = this._onDidRunAction.event;
99
+ this._store.add(menu);
100
+ this._store.add(
101
+ this.onDidCloseWithCommand(commandId => this._onDidRunAction.fire(commandId))
62
102
  );
63
- this._myEditorObs = _myEditorObs;
64
- this._hover = _hover;
65
- this._keybindingService = _keybindingService;
66
- this._store.add(autorun(r => {
67
- const element = _hover.read(r);
68
- this._hoverVisible.set(!!element, undefined);
69
- }));
70
- }
71
- _showHover() {
72
- this._hoverService.showInstantHover({
73
- target: this._iconRef.element,
74
- content: this._keybindingService.appendKeybinding(( localize(8828, "Inline Chat")), ACTION_START)
75
- });
76
- }
77
- _doShowHover() {
78
- if (this._hoverVisible.get()) {
79
- return;
80
- }
81
- const iconElement = this._iconRef.element;
82
- if (!iconElement) {
83
- this._hover.set(undefined, undefined);
84
- return;
85
- }
86
- const selection = this._myEditorObs.cursorSelection.get();
87
- const direction = selection?.getDirection() ?? SelectionDirection.LTR;
88
- const lineNumber = selection?.getPosition().lineNumber ?? 1;
89
- this._hover.set({
90
- rect: iconElement.getBoundingClientRect(),
91
- above: direction === SelectionDirection.RTL,
92
- lineNumber
93
- }, undefined);
94
103
  }
95
104
  };
96
- InlineChatGutterAffordance = ( __decorate([( __param(3, IKeybindingService)), ( __param(4, IHoverService)), ( __param(5, IInstantiationService)), ( __param(6, IAccessibilityService)), ( __param(7, IThemeService))], InlineChatGutterAffordance));
105
+ InlineChatGutterAffordance = ( __decorate([( __param(2, IKeybindingService)), ( __param(3, IHoverService)), ( __param(4, IInstantiationService)), ( __param(5, IAccessibilityService)), ( __param(6, IThemeService)), ( __param(7, IUserInteractionService)), ( __param(8, IMenuService)), ( __param(9, IContextKeyService))], InlineChatGutterAffordance));
97
106
 
98
107
  export { InlineChatGutterAffordance };
@@ -7,6 +7,7 @@ import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/ac
7
7
  import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
8
8
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
9
9
  import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
10
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
10
11
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
11
12
  import { IInlineChatSession2 } from "@codingame/monaco-vscode-chat-service-override/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService";
12
13
  /**
@@ -14,36 +15,35 @@ import { IInlineChatSession2 } from "@codingame/monaco-vscode-chat-service-overr
14
15
  */
15
16
  export declare class InlineChatInputWidget extends Disposable {
16
17
  private readonly _editorObs;
17
- private readonly _keybindingService;
18
- private readonly _menuService;
19
18
  private readonly _contextKeyService;
19
+ private readonly _menuService;
20
20
  private readonly _domNode;
21
+ private readonly _container;
21
22
  private readonly _inputContainer;
22
- private readonly _actionBar;
23
+ private readonly _toolbarContainer;
23
24
  private readonly _input;
24
25
  private readonly _position;
25
26
  readonly position: IObservable<IOverlayWidgetPosition | null>;
26
27
  private readonly _showStore;
27
28
  private readonly _stickyScrollHeight;
28
- private _inlineStartAction;
29
+ private readonly _layoutData;
29
30
  private _anchorLineNumber;
30
31
  private _anchorLeft;
31
32
  private _anchorAbove;
32
- constructor(_editorObs: ObservableCodeEditor, _keybindingService: IKeybindingService, _menuService: IMenuService, _contextKeyService: IContextKeyService, instantiationService: IInstantiationService, modelService: IModelService, configurationService: IConfigurationService);
33
+ constructor(_editorObs: ObservableCodeEditor, _contextKeyService: IContextKeyService, _menuService: IMenuService, instantiationService: IInstantiationService, modelService: IModelService, configurationService: IConfigurationService);
34
+ get value(): string;
33
35
  /**
34
36
  * Show the widget at the specified line.
35
37
  * @param lineNumber The line number to anchor the widget to
36
38
  * @param left Left offset relative to editor
37
39
  * @param anchorAbove Whether to anchor above the position (widget grows upward)
38
40
  */
39
- show(lineNumber: number, left: number, anchorAbove: boolean): void;
41
+ show(lineNumber: number, left: number, anchorAbove: boolean, placeholder: string): void;
40
42
  private _updatePosition;
41
43
  /**
42
44
  * Hide the widget (removes from editor but does not dispose).
43
45
  */
44
- private _hide;
45
- private _refreshActions;
46
- private _updateInputHeight;
46
+ hide(): void;
47
47
  }
48
48
  /**
49
49
  * Overlay widget that displays progress messages during inline chat requests.
@@ -52,6 +52,7 @@ export declare class InlineChatSessionOverlayWidget extends Disposable {
52
52
  private readonly _editorObs;
53
53
  private readonly _instaService;
54
54
  private readonly _keybindingService;
55
+ private readonly _logService;
55
56
  private readonly _domNode;
56
57
  private readonly _container;
57
58
  private readonly _statusNode;
@@ -62,7 +63,7 @@ export declare class InlineChatSessionOverlayWidget extends Disposable {
62
63
  private readonly _position;
63
64
  private readonly _minContentWidthInPx;
64
65
  private readonly _stickyScrollHeight;
65
- constructor(_editorObs: ObservableCodeEditor, _instaService: IInstantiationService, _keybindingService: IKeybindingService);
66
+ constructor(_editorObs: ObservableCodeEditor, _instaService: IInstantiationService, _keybindingService: IKeybindingService, _logService: ILogService);
66
67
  show(session: IInlineChatSession2): void;
67
68
  hide(): void;
68
69
  }