@codingame/monaco-vscode-katex-common 31.0.0 → 32.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 (220) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +15 -3
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +6 -5
  4. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +5 -1
  5. package/vscode/src/vs/platform/actions/browser/buttonbar.js +45 -14
  6. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +15 -1
  7. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +15 -10
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +51 -54
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
  14. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +3 -1
  15. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +45 -23
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +13 -7
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +9 -9
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +5 -3
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +4 -1
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +46 -32
  21. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +8 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +155 -46
  24. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +1 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +20 -1
  26. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +4 -1
  27. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +37 -14
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +34 -34
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +1 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.d.ts +28 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.js +250 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
  34. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +14 -11
  35. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +10 -10
  36. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  38. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +7 -2
  39. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
  40. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  41. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  42. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +7 -3
  43. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +12 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +51 -20
  45. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
  46. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +6 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +56 -3
  48. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
  50. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.d.ts +1 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.js +2 -2
  52. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.d.ts +3 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.js +4 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +68 -10
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.d.ts +58 -2
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +653 -75
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +28 -10
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +5 -1
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +91 -54
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +7 -5
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +53 -51
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +11 -11
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +6 -6
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +4 -1
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +42 -22
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +6 -2
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +93 -35
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +5 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css +169 -27
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +13 -4
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +1 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatToolConfirmationCarousel.css +29 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +1 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +60 -15
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +13 -6
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +2 -2
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +15 -8
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +6 -1
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +125 -26
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +2 -1
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +29 -23
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.d.ts +14 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +119 -10
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +6 -6
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +1 -1
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +5 -5
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/media/toolRiskBadge.css +77 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.d.ts +38 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.js +125 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +1 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +132 -59
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +16 -3
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +156 -67
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +55 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +93 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.d.ts +21 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.js +133 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +53 -8
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +288 -125
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +23 -2
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +699 -145
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +12 -8
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +12 -11
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.d.ts +62 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.js +120 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +5 -5
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatInputNotificationWidget.css +191 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatPhoneInputPresenter.css +22 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +3 -3
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +9 -25
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +4 -3
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +20 -1
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +89 -108
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +3 -3
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +521 -9
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +19 -19
  136. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +6 -6
  137. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionStorageKeys.d.ts +2 -0
  138. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionStorageKeys.js +6 -0
  139. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.d.ts +27 -0
  140. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.js +82 -0
  141. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +3 -0
  142. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +44 -17
  143. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +1 -3
  144. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +3 -46
  145. package/vscode/src/vs/workbench/contrib/inlineChat/browser/{inlineChatEditorAffordance.d.ts → inlineChatAffordanceWidget.d.ts} +1 -1
  146. package/vscode/src/vs/workbench/contrib/inlineChat/browser/{inlineChatEditorAffordance.js → inlineChatAffordanceWidget.js} +6 -6
  147. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -18
  148. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +19 -400
  149. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +4 -9
  150. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +1 -1
  151. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +5 -19
  152. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +47 -133
  153. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +3 -1
  154. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +103 -25
  155. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +29 -0
  156. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +3 -32
  157. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -92
  158. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  159. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  160. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  161. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
  164. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
  165. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
  166. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
  167. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
  168. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  169. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  170. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +7 -0
  171. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +99 -32
  172. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +13 -1
  173. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +76 -14
  174. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -3
  175. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +9 -1
  176. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +89 -28
  177. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +1 -1
  178. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +11 -1
  179. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +11 -7
  180. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +3 -1
  181. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +7 -3
  182. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +1 -1
  183. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  184. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
  185. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  186. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +8 -0
  187. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +11 -2
  188. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +20 -0
  189. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +59 -4
  190. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -1
  191. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +24 -3
  192. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +47 -0
  193. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +111 -30
  194. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +60 -3
  195. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +455 -171
  196. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +33 -0
  197. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +82 -0
  198. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.d.ts +31 -0
  199. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.js +49 -0
  200. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.d.ts +18 -0
  201. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.js +302 -0
  202. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +7 -0
  203. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.js +118 -0
  204. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +34 -4
  205. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +233 -48
  206. package/vscode/src/vs/platform/actions/browser/actionbar.d.ts +0 -16
  207. package/vscode/src/vs/platform/actions/browser/actionbar.js +0 -22
  208. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +0 -46
  209. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +0 -539
  210. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +0 -29
  211. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +0 -386
  212. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +0 -101
  213. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +0 -509
  214. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +0 -130
  215. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +0 -276
  216. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -45
  217. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +0 -93
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +0 -39
  219. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +0 -617
  220. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +0 -231
@@ -1,509 +0,0 @@
1
-
2
- import { registerCss } from '@codingame/monaco-vscode-api/css';
3
- import * as chatEditingExplanationWidget from './media/chatEditingExplanationWidget.css';
4
- import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
5
- import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
- import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
7
- import { EditorOption } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/editorOptions';
8
- import { renderIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
9
- import { $, addDisposableListener, clearNode, createTextNode, getTotalWidth } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
10
- import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
11
- import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
12
- import { overviewRulerRangeHighlight } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editorColorRegistry';
13
- import { OverviewRulerLane } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model';
14
- import { themeColorFromId } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
15
- import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
16
- import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
17
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
18
- import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
19
-
20
- registerCss(chatEditingExplanationWidget);
21
- function getChangeTexts(change, diffInfo) {
22
- const originalLines = [];
23
- const modifiedLines = [];
24
- for (let i = change.original.startLineNumber; i < change.original.endLineNumberExclusive; i++) {
25
- const line = diffInfo.originalModel.getLineContent(i);
26
- originalLines.push(line);
27
- }
28
- for (let i = change.modified.startLineNumber; i < change.modified.endLineNumberExclusive; i++) {
29
- const line = diffInfo.modifiedModel.getLineContent(i);
30
- modifiedLines.push(line);
31
- }
32
- return {
33
- originalText: originalLines.join("\n"),
34
- modifiedText: modifiedLines.join("\n")
35
- };
36
- }
37
- function groupNearbyChanges(changes, lineThreshold = 5) {
38
- if (changes.length === 0) {
39
- return [];
40
- }
41
- const groups = [];
42
- let currentGroup = [changes[0]];
43
- for (let i = 1; i < changes.length; i++) {
44
- const firstChange = currentGroup[0];
45
- const currentChange = changes[i];
46
- const widgetLine = firstChange.modified.startLineNumber;
47
- const lastLine = currentChange.modified.startLineNumber;
48
- const verticalSpan = lastLine - widgetLine;
49
- if (verticalSpan <= lineThreshold) {
50
- currentGroup.push(currentChange);
51
- } else {
52
- groups.push(currentGroup);
53
- currentGroup = [currentChange];
54
- }
55
- }
56
- if (currentGroup.length > 0) {
57
- groups.push(currentGroup);
58
- }
59
- return groups;
60
- }
61
- class ChatEditingExplanationWidget extends Disposable {
62
- static {
63
- this._idPool = 0;
64
- }
65
- constructor(
66
- _editor,
67
- _changes,
68
- diffInfo,
69
- _chatWidgetService,
70
- _viewsService,
71
- _chatSessionResource
72
- ) {
73
- super();
74
- this._editor = _editor;
75
- this._changes = _changes;
76
- this._chatWidgetService = _chatWidgetService;
77
- this._viewsService = _viewsService;
78
- this._chatSessionResource = _chatSessionResource;
79
- this._id = `chat-explanation-widget-${ChatEditingExplanationWidget._idPool++}`;
80
- this._explanationItems = ( new Map());
81
- this._position = null;
82
- this._explanations = [];
83
- this._isExpanded = true;
84
- this._isAllRead = false;
85
- this._disposed = false;
86
- this._startLineNumber = 1;
87
- this._eventStore = this._register(( new DisposableStore()));
88
- this._uri = diffInfo.modifiedModel.uri;
89
- this._rangeHighlightDecoration = this._editor.createDecorationsCollection();
90
- this._explanations = ( this._changes.map(change => {
91
- const {
92
- originalText,
93
- modifiedText
94
- } = getChangeTexts(change, diffInfo);
95
- return {
96
- startLineNumber: change.modified.startLineNumber,
97
- endLineNumber: change.modified.endLineNumberExclusive - 1,
98
- explanation: ( localize(6131, "Generating explanation...")),
99
- read: false,
100
- loading: true,
101
- originalText,
102
- modifiedText
103
- };
104
- }));
105
- this._domNode = $("div.chat-explanation-widget");
106
- this._headerNode = $("div.chat-explanation-header");
107
- this._readIndicator = $("div.chat-explanation-read-indicator");
108
- this._updateReadIndicator();
109
- this._headerNode.appendChild(this._readIndicator);
110
- this._titleNode = $("span.chat-explanation-title");
111
- this._updateTitle();
112
- this._headerNode.appendChild(this._titleNode);
113
- this._headerNode.appendChild($("span.chat-explanation-spacer"));
114
- this._toggleButton = $("div.chat-explanation-toggle");
115
- this._updateToggleButton();
116
- this._headerNode.appendChild(this._toggleButton);
117
- this._dismissButton = $("div.chat-explanation-dismiss");
118
- this._dismissButton.appendChild(renderIcon(Codicon.close));
119
- this._dismissButton.title = ( localize(6132, "Dismiss"));
120
- this._headerNode.appendChild(this._dismissButton);
121
- this._domNode.appendChild(this._headerNode);
122
- this._bodyNode = $("div.chat-explanation-body");
123
- this._buildExplanationItems();
124
- this._domNode.appendChild(this._bodyNode);
125
- const arrow = $("div.chat-explanation-arrow");
126
- this._domNode.appendChild(arrow);
127
- this._setupEventHandlers();
128
- this._domNode.classList.add("visible");
129
- this._editor.addOverlayWidget(this);
130
- }
131
- _setupEventHandlers() {
132
- this._eventStore.add(addDisposableListener(this._readIndicator, "click", e => {
133
- e.stopPropagation();
134
- this._isAllRead = !this._isAllRead;
135
- for (const exp of this._explanations) {
136
- exp.read = this._isAllRead;
137
- }
138
- this._updateReadIndicator();
139
- this._updateExplanationItemsReadState();
140
- }));
141
- this._eventStore.add(addDisposableListener(this._toggleButton, "click", e => {
142
- e.stopPropagation();
143
- this._toggleExpanded();
144
- }));
145
- this._eventStore.add(addDisposableListener(this._headerNode, "click", () => {
146
- this._toggleExpanded();
147
- }));
148
- this._eventStore.add(addDisposableListener(this._dismissButton, "click", e => {
149
- e.stopPropagation();
150
- this._dismiss();
151
- }));
152
- }
153
- _toggleExpanded() {
154
- this._isExpanded = !this._isExpanded;
155
- this._bodyNode.classList.toggle("collapsed", !this._isExpanded);
156
- this._updateToggleButton();
157
- this._editor.layoutOverlayWidget(this);
158
- }
159
- _dismiss() {
160
- this._domNode.classList.add("fadeOut");
161
- const dispose = () => {
162
- this.dispose();
163
- };
164
- const handle = setTimeout(dispose, 150);
165
- this._domNode.addEventListener("animationend", () => {
166
- clearTimeout(handle);
167
- dispose();
168
- }, {
169
- once: true
170
- });
171
- }
172
- _updateReadIndicator() {
173
- clearNode(this._readIndicator);
174
- const allRead = this._explanations.every(e => e.read);
175
- const someRead = ( this._explanations.some(e => e.read));
176
- this._isAllRead = allRead;
177
- if (allRead) {
178
- this._readIndicator.appendChild(renderIcon(Codicon.circle));
179
- this._readIndicator.classList.add("read");
180
- this._readIndicator.classList.remove("partial", "unread");
181
- this._readIndicator.title = ( localize(6133, "Mark as unread"));
182
- } else if (someRead) {
183
- this._readIndicator.appendChild(renderIcon(Codicon.circleFilled));
184
- this._readIndicator.classList.remove("read", "unread");
185
- this._readIndicator.classList.add("partial");
186
- this._readIndicator.title = ( localize(6134, "Mark all as read"));
187
- } else {
188
- this._readIndicator.appendChild(renderIcon(Codicon.circleFilled));
189
- this._readIndicator.classList.remove("read", "partial");
190
- this._readIndicator.classList.add("unread");
191
- this._readIndicator.title = ( localize(6135, "Mark as read"));
192
- }
193
- }
194
- _updateTitle() {
195
- const count = this._explanations.length;
196
- if (count === 1) {
197
- this._titleNode.textContent = ( localize(6136, "1 change"));
198
- } else {
199
- this._titleNode.textContent = ( localize(6137, "{0} changes", count));
200
- }
201
- }
202
- _updateToggleButton() {
203
- clearNode(this._toggleButton);
204
- if (this._isExpanded) {
205
- this._toggleButton.appendChild(renderIcon(Codicon.chevronUp));
206
- this._toggleButton.title = ( localize(6138, "Collapse"));
207
- } else {
208
- this._toggleButton.appendChild(renderIcon(Codicon.chevronDown));
209
- this._toggleButton.title = ( localize(6139, "Expand"));
210
- }
211
- }
212
- _buildExplanationItems() {
213
- clearNode(this._bodyNode);
214
- this._explanationItems.clear();
215
- for (let i = 0; i < this._explanations.length; i++) {
216
- const exp = this._explanations[i];
217
- const item = $("div.chat-explanation-item");
218
- const lineInfo = $("span.chat-explanation-line-info");
219
- if (exp.startLineNumber === exp.endLineNumber) {
220
- lineInfo.textContent = ( localize(6140, "Line {0}", exp.startLineNumber));
221
- } else {
222
- lineInfo.textContent = ( localize(6141, "Lines {0}-{1}", exp.startLineNumber, exp.endLineNumber));
223
- }
224
- item.appendChild(lineInfo);
225
- const text = $("span.chat-explanation-text");
226
- if (exp.loading) {
227
- const loadingIcon = renderIcon(ThemeIcon.modify(Codicon.loading, "spin"));
228
- loadingIcon.classList.add("chat-explanation-loading");
229
- text.appendChild(loadingIcon);
230
- const loadingText = createTextNode(" " + exp.explanation);
231
- text.appendChild(loadingText);
232
- } else {
233
- text.textContent = exp.explanation;
234
- }
235
- item.appendChild(text);
236
- const itemReadIndicator = $("div.chat-explanation-item-read");
237
- this._updateItemReadIndicator(itemReadIndicator, exp.read);
238
- item.appendChild(itemReadIndicator);
239
- const replyButton = $("div.chat-explanation-reply-button");
240
- replyButton.appendChild(renderIcon(Codicon.arrowRight));
241
- replyButton.title = ( localize(6142, "Follow up on this change"));
242
- item.appendChild(replyButton);
243
- this._eventStore.add(addDisposableListener(replyButton, "click", async e => {
244
- e.stopPropagation();
245
- const range = ( new Range(exp.startLineNumber, 1, exp.endLineNumber, 1));
246
- let chatWidget;
247
- if (this._chatSessionResource) {
248
- chatWidget = await this._chatWidgetService.openSession(this._chatSessionResource);
249
- } else {
250
- await this._viewsService.openView(ChatViewId, true);
251
- chatWidget = this._chatWidgetService.lastFocusedWidget;
252
- }
253
- if (chatWidget) {
254
- chatWidget.attachmentModel.addContext(chatWidget.attachmentModel.asFileVariableEntry(this._uri, range));
255
- }
256
- }));
257
- this._eventStore.add(addDisposableListener(item, "click", e => {
258
- e.stopPropagation();
259
- exp.read = !exp.read;
260
- this._updateItemReadIndicator(itemReadIndicator, exp.read);
261
- this._updateReadIndicator();
262
- }));
263
- this._eventStore.add(addDisposableListener(item, "mouseenter", () => {
264
- const range = ( new Range(
265
- exp.startLineNumber,
266
- 1,
267
- exp.endLineNumber,
268
- this._editor.getModel()?.getLineMaxColumn(exp.endLineNumber) ?? 1
269
- ));
270
- this._rangeHighlightDecoration.set([
271
- {
272
- range,
273
- options: {
274
- description: "chat-explanation-range-highlight",
275
- className: "rangeHighlight",
276
- isWholeLine: true,
277
- linesDecorationsClassName: "chat-explanation-range-glyph"
278
- }
279
- },
280
- {
281
- range,
282
- options: {
283
- description: "chat-explanation-range-highlight-overview",
284
- overviewRuler: {
285
- color: themeColorFromId(overviewRulerRangeHighlight),
286
- position: OverviewRulerLane.Full
287
- }
288
- }
289
- }]);
290
- }));
291
- this._eventStore.add(addDisposableListener(item, "mouseleave", () => {
292
- this._rangeHighlightDecoration.clear();
293
- }));
294
- this._explanationItems.set(i, {
295
- item,
296
- readIndicator: itemReadIndicator,
297
- textElement: text
298
- });
299
- this._bodyNode.appendChild(item);
300
- }
301
- }
302
- setExplanationByLineNumber(startLineNumber, endLineNumber, explanation) {
303
- for (let i = 0; i < this._explanations.length; i++) {
304
- const exp = this._explanations[i];
305
- if (exp.startLineNumber === startLineNumber && exp.endLineNumber === endLineNumber) {
306
- exp.explanation = explanation;
307
- exp.loading = false;
308
- this._updateExplanationText(i);
309
- return true;
310
- }
311
- }
312
- return false;
313
- }
314
- get explanationCount() {
315
- return this._explanations.length;
316
- }
317
- _updateExplanationText(index) {
318
- const itemData = this._explanationItems.get(index);
319
- const exp = this._explanations[index];
320
- if (itemData && exp) {
321
- clearNode(itemData.textElement);
322
- itemData.textElement.textContent = exp.explanation;
323
- }
324
- }
325
- _updateItemReadIndicator(element, read) {
326
- clearNode(element);
327
- if (read) {
328
- element.appendChild(renderIcon(Codicon.circle));
329
- element.classList.add("read");
330
- element.classList.remove("unread");
331
- } else {
332
- element.appendChild(renderIcon(Codicon.circleFilled));
333
- element.classList.remove("read");
334
- element.classList.add("unread");
335
- }
336
- }
337
- _updateExplanationItemsReadState() {
338
- this._explanationItems.forEach((
339
- {
340
- readIndicator
341
- },
342
- index
343
- ) => {
344
- const exp = this._explanations[index];
345
- this._updateItemReadIndicator(readIndicator, exp.read);
346
- });
347
- }
348
- layout(startLineNumber) {
349
- if (this._disposed) {
350
- return;
351
- }
352
- this._startLineNumber = startLineNumber;
353
- const lineHeight = this._editor.getOption(EditorOption.lineHeight);
354
- const {
355
- contentLeft,
356
- contentWidth,
357
- verticalScrollbarWidth
358
- } = this._editor.getLayoutInfo();
359
- const scrollTop = this._editor.getScrollTop();
360
- const widgetWidth = getTotalWidth(this._domNode) || 280;
361
- this._position = {
362
- stackOrdinal: 2,
363
- preference: {
364
- top: this._editor.getTopForLineNumber(startLineNumber) - scrollTop - lineHeight,
365
- left: contentLeft + contentWidth - (2 * verticalScrollbarWidth + widgetWidth)
366
- }
367
- };
368
- this._editor.layoutOverlayWidget(this);
369
- }
370
- toggle(show) {
371
- this._domNode.classList.toggle("visible", show);
372
- if (show && this._explanations.length > 0) {
373
- this.layout(this._explanations[0].startLineNumber);
374
- }
375
- }
376
- relayout() {
377
- if (this._startLineNumber) {
378
- this.layout(this._startLineNumber);
379
- }
380
- }
381
- getId() {
382
- return this._id;
383
- }
384
- getDomNode() {
385
- return this._domNode;
386
- }
387
- getPosition() {
388
- return this._position;
389
- }
390
- dispose() {
391
- if (this._disposed) {
392
- return;
393
- }
394
- this._disposed = true;
395
- this._rangeHighlightDecoration.clear();
396
- this._editor.removeOverlayWidget(this);
397
- super.dispose();
398
- }
399
- }
400
- class ChatEditingExplanationWidgetManager extends Disposable {
401
- constructor(_editor, _chatWidgetService, _viewsService, modelManager, _modelUri) {
402
- super();
403
- this._editor = _editor;
404
- this._chatWidgetService = _chatWidgetService;
405
- this._viewsService = _viewsService;
406
- this._modelUri = _modelUri;
407
- this._widgets = [];
408
- this._visible = false;
409
- this._register(this._editor.onDidChangeModel(() => {
410
- const newUri = this._editor.getModel()?.uri;
411
- if (this._modelUri) {
412
- if (newUri && ( newUri.toString()) === ( this._modelUri.toString())) {
413
- for (const widget of this._widgets) {
414
- widget.toggle(this._visible);
415
- widget.relayout();
416
- }
417
- } else {
418
- for (const widget of this._widgets) {
419
- widget.toggle(false);
420
- }
421
- }
422
- }
423
- }));
424
- this._register(autorun(r => {
425
- const state = modelManager.state.read(r);
426
- const uriState = state.get(this._modelUri);
427
- if (uriState) {
428
- this._diffInfo = uriState.diffInfo;
429
- this._chatSessionResource = uriState.chatSessionResource;
430
- if (this._widgets.length === 0 && this._diffInfo) {
431
- this._createWidgets(this._diffInfo, this._chatSessionResource);
432
- }
433
- if (uriState.progress === "complete") {
434
- this._handleExplanations(this._modelUri, uriState.explanations);
435
- }
436
- this.show();
437
- } else {
438
- this.hide();
439
- }
440
- }));
441
- }
442
- _createWidgets(diffInfo, chatSessionResource) {
443
- if (diffInfo.identical || diffInfo.changes.length === 0) {
444
- return;
445
- }
446
- const groups = groupNearbyChanges(diffInfo.changes, 5);
447
- for (const group of groups) {
448
- const widget = ( new ChatEditingExplanationWidget(
449
- this._editor,
450
- group,
451
- diffInfo,
452
- this._chatWidgetService,
453
- this._viewsService,
454
- chatSessionResource
455
- ));
456
- this._widgets.push(widget);
457
- this._register(widget);
458
- widget.layout(group[0].modified.startLineNumber);
459
- }
460
- this._register(
461
- Event.any(this._editor.onDidScrollChange, this._editor.onDidLayoutChange)(() => {
462
- for (const widget of this._widgets) {
463
- widget.relayout();
464
- }
465
- })
466
- );
467
- }
468
- _handleExplanations(uri, explanations) {
469
- if (!this._modelUri || ( uri.toString()) !== ( this._modelUri.toString())) {
470
- return;
471
- }
472
- for (const explanation of explanations) {
473
- for (const widget of this._widgets) {
474
- if (widget.setExplanationByLineNumber(
475
- explanation.startLineNumber,
476
- explanation.endLineNumber,
477
- explanation.explanation
478
- )) {
479
- break;
480
- }
481
- }
482
- }
483
- }
484
- show() {
485
- this._visible = true;
486
- for (const widget of this._widgets) {
487
- widget.toggle(true);
488
- widget.relayout();
489
- }
490
- }
491
- hide() {
492
- this._visible = false;
493
- for (const widget of this._widgets) {
494
- widget.toggle(false);
495
- }
496
- }
497
- _clearWidgets() {
498
- for (const widget of this._widgets) {
499
- widget.dispose();
500
- }
501
- this._widgets.length = 0;
502
- }
503
- dispose() {
504
- this._clearWidgets();
505
- super.dispose();
506
- }
507
- }
508
-
509
- export { ChatEditingExplanationWidget, ChatEditingExplanationWidgetManager };
@@ -1,130 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
-
6
- .chat-editor-overlay-widget {
7
- padding: 2px 4px;
8
- color: var(--vscode-foreground);
9
- background-color: var(--vscode-editorWidget-background);
10
- border-radius: 6px;
11
- border: 1px solid var(--vscode-editorWidget-border);
12
- display: flex;
13
- align-items: center;
14
- justify-content: center;
15
- gap: 4px;
16
- z-index: 10;
17
- box-shadow: var(--vscode-shadow-md);
18
- overflow: hidden;
19
- }
20
-
21
- @keyframes pulse {
22
- 0% {
23
- box-shadow: var(--vscode-shadow-md);
24
- }
25
- 50% {
26
- box-shadow: var(--vscode-shadow-lg);
27
- }
28
- 100% {
29
- box-shadow: var(--vscode-shadow-md);
30
- }
31
- }
32
-
33
- .chat-editor-overlay-widget.busy {
34
- animation: pulse ease-in 2.3s infinite;
35
- }
36
-
37
- .chat-editor-overlay-widget .chat-editor-overlay-progress {
38
- align-items: center;
39
- display: none;
40
- padding: 5px 0 5px 5px;
41
- font-size: 12px;
42
- overflow: hidden;
43
- gap: 6px;
44
- }
45
-
46
- .chat-editor-overlay-widget.busy .chat-editor-overlay-progress {
47
- display: inline-flex;
48
- }
49
-
50
- .chat-editor-overlay-widget .chat-editor-overlay-progress .progress-message {
51
- white-space: nowrap;
52
- max-width: 13em;
53
- overflow: hidden;
54
- text-overflow: ellipsis;
55
- padding-right: 8px;
56
- }
57
-
58
- .chat-editor-overlay-widget .action-item > .action-label {
59
- padding: 4px 6px;
60
- font-size: 11px;
61
- line-height: 14px;
62
- border-radius: 4px; /* same as overlay widget */
63
- }
64
-
65
- .chat-editor-overlay-widget .monaco-action-bar .actions-container {
66
- gap: 4px;
67
- }
68
-
69
- .chat-editor-overlay-widget .action-item.primary > .action-label {
70
- background-color: var(--vscode-button-background);
71
- color: var(--vscode-button-foreground);
72
- }
73
-
74
- .monaco-workbench .chat-editor-overlay-widget .monaco-action-bar .action-item.primary > .action-label:hover {
75
- background-color: var(--vscode-button-hoverBackground);
76
- }
77
-
78
- .chat-editor-overlay-widget.busy .chat-editor-overlay-progress .codicon {
79
- color: var(--vscode-foreground);
80
- }
81
-
82
- .chat-editor-overlay-widget .action-item > .action-label.codicon:not(.separator) {
83
- color: var(--vscode-foreground);
84
- width: 22px; /* align with default icon button dimensions */
85
- height: 22px;
86
- padding: 0;
87
- font-size: 16px;
88
- line-height: 22px;
89
- display: flex;
90
- align-items: center;
91
- justify-content: center;
92
- }
93
-
94
- .chat-diff-change-content-widget .monaco-action-bar .action-item.disabled,
95
- .chat-editor-overlay-widget .monaco-action-bar .action-item.disabled {
96
-
97
- > .action-label.codicon::before,
98
- > .action-label.codicon,
99
- > .action-label,
100
- > .action-label:hover {
101
- color: var(--vscode-button-separator);
102
- opacity: 1;
103
- }
104
- }
105
-
106
- .chat-editor-overlay-widget .action-item.label-item {
107
- font-variant-numeric: tabular-nums;
108
- }
109
-
110
- .chat-editor-overlay-widget .monaco-action-bar .action-item.label-item > .action-label,
111
- .chat-editor-overlay-widget .monaco-action-bar .action-item.label-item > .action-label:hover {
112
- color: var(--vscode-foreground);
113
- opacity: 1;
114
- }
115
-
116
- .chat-editor-overlay-widget .action-item.auto {
117
- position: relative;
118
- overflow: hidden;
119
- }
120
-
121
- .chat-editor-overlay-widget .action-item.auto::before {
122
- content: '';
123
- position: absolute;
124
- top: 0;
125
- left: var(--vscode-action-item-auto-timeout, -100%);
126
- width: 100%;
127
- height: 100%;
128
- background-color: var(--vscode-toolbar-hoverBackground);
129
- transition: left 0.5s linear;
130
- }