@codingame/monaco-vscode-katex-common 33.0.7 → 34.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 (255) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/base/browser/ui/pixelSpinner/pixelSpinner.css +169 -0
  3. package/vscode/src/vs/base/browser/ui/pixelSpinner/pixelSpinner.d.ts +28 -0
  4. package/vscode/src/vs/base/browser/ui/pixelSpinner/pixelSpinner.js +61 -0
  5. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +1 -1
  6. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +1 -1
  7. package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -2
  8. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +18 -17
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +9 -9
  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 +40 -38
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +14 -14
  15. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution.d.ts +1 -16
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution.js +4 -48
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.d.ts +16 -18
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.js +81 -69
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostGenericConfigChips.d.ts +1 -3
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostGenericConfigChips.js +5 -22
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionUri.d.ts +2 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionUri.js +21 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/media/agentHostChatInputPicker.css +18 -28
  24. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
  25. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +2 -2
  26. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +9 -9
  27. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +30 -30
  29. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +13 -2
  30. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +177 -80
  31. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +15 -15
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +34 -34
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +7 -2
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +69 -5
  35. package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.js +3 -3
  36. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
  37. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
  38. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +10 -10
  39. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +25 -1
  40. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  41. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  42. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
  43. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  44. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +2 -1
  45. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +4 -2
  46. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
  48. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +2 -2
  49. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
  50. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatEditPillElement.d.ts +93 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatEditPillElement.js +140 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExternalEditContentPart.d.ts +46 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExternalEditContentPart.js +134 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -15
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +49 -117
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +30 -30
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +2 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +47 -4
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +3 -1
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +52 -51
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +18 -14
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +6 -6
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +23 -13
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +13 -11
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.d.ts +15 -1
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +87 -11
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +21 -4
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +102 -35
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +1 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +22 -1
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +22 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +6 -2
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +1 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +21 -2
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +2 -2
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +6 -6
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +1 -1
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +35 -18
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +1 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +62 -35
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +8 -8
  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/chatToolOutputPart.js +2 -2
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.d.ts +2 -2
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +15 -12
  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/chatToolProgressPart.d.ts +1 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +10 -3
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +2 -2
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +13 -15
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.js +4 -4
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +19 -1
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +154 -59
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +6 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +21 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.d.ts +4 -3
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +6 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +17 -2
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +113 -23
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatGoalBannerWidget.d.ts +21 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatGoalBannerWidget.js +64 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +10 -1
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +7 -1
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.d.ts +11 -1
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.js +18 -7
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +26 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +361 -66
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +2 -2
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +4 -4
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatusActionViewItem.d.ts +30 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatusActionViewItem.js +147 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +11 -5
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +133 -87
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.js +2 -4
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +4 -2
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +13 -7
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatGoalBannerWidget.css +81 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatInputNotificationWidget.css +32 -18
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +6 -6
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +2 -2
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +39 -40
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +23 -2
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +66 -11
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -6
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +373 -32
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +5 -3
  144. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +18 -0
  145. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +7 -7
  146. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.js +6 -6
  147. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +18 -18
  148. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.d.ts +12 -2
  149. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +54 -11
  150. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +3 -3
  151. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
  152. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
  153. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +30 -30
  154. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  155. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  156. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  157. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
  158. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
  159. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
  160. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
  161. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
  164. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  165. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  166. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +0 -76
  167. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +0 -191
  168. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +0 -50
  169. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +0 -138
  170. package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +0 -12
  171. package/vscode/src/vs/platform/networkFilter/common/settings.js +0 -14
  172. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +0 -18
  173. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +0 -13
  174. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +0 -87
  175. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +0 -10
  176. package/vscode/src/vs/workbench/contrib/terminal/terminalContribChatExports.d.ts +0 -2
  177. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +0 -2
  178. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +0 -41
  179. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +0 -24
  180. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +0 -26
  181. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +0 -142
  182. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +0 -52
  183. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +0 -232
  184. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +0 -65
  185. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +0 -225
  186. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +0 -27
  187. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +0 -143
  188. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +0 -37
  189. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +0 -205
  190. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +0 -40
  191. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +0 -174
  192. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +0 -7
  193. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +0 -43
  194. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +0 -52
  195. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +0 -260
  196. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +0 -44
  197. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +0 -98
  198. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +0 -42
  199. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +0 -225
  200. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +0 -31
  201. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +0 -392
  202. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +0 -45
  203. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +0 -243
  204. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +0 -53
  205. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +0 -10
  206. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +0 -20
  207. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +0 -310
  208. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +0 -27
  209. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +0 -177
  210. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +0 -11
  211. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +0 -33
  212. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +0 -41
  213. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +0 -19
  214. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +0 -37
  215. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +0 -19
  216. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +0 -37
  217. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +0 -19
  218. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +0 -44
  219. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +0 -13
  220. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +0 -22
  221. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +0 -42
  222. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +0 -102
  223. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +0 -5
  224. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +0 -27
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +0 -14
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +0 -29
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +0 -8
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +0 -33
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +0 -24
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +0 -15
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +0 -53
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +0 -177
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +0 -512
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +0 -42
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +0 -23
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +0 -9
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +0 -258
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +0 -2623
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +0 -22
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +0 -43
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +0 -17
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +0 -118
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.d.ts +0 -22
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.js +0 -44
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +0 -1
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +0 -58
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +0 -223
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.d.ts +0 -31
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.js +0 -49
  250. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.d.ts +0 -18
  251. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.js +0 -302
  252. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +0 -7
  253. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.js +0 -118
  254. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +0 -114
  255. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +0 -788
@@ -1,41 +0,0 @@
1
- import type { MaybePromise } from "@codingame/monaco-vscode-api/vscode/vs/base/common/async";
2
- import type { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
3
- export interface ICommandLinePresenter {
4
- /**
5
- * Attempts to create a presentation for the given command line.
6
- * Command line presenters allow displaying an extracted/transformed version
7
- * of a command (e.g., Python code from `python -c "..."`) with appropriate
8
- * syntax highlighting, while the actual command remains unchanged.
9
- *
10
- * @returns The presentation result if this presenter handles the command, undefined otherwise.
11
- */
12
- present(options: ICommandLinePresenterOptions): MaybePromise<ICommandLinePresenterResult | undefined>;
13
- }
14
- export interface ICommandLinePresenterOptions {
15
- commandLine: ICommandLinePresentationInput;
16
- shell: string;
17
- os: OperatingSystem;
18
- }
19
- export interface ICommandLinePresentationInput {
20
- original?: string;
21
- forDisplay: string;
22
- }
23
- export interface ICommandLinePresenterResult {
24
- /**
25
- * The extracted/transformed command to display (e.g., the Python code).
26
- */
27
- commandLine: string;
28
- /**
29
- * The language ID for syntax highlighting (e.g., 'python').
30
- */
31
- language?: string;
32
- /**
33
- * A human-readable name for the language (e.g., 'Python') used in UI labels.
34
- */
35
- languageDisplayName?: string;
36
- /**
37
- * Whether other presenters should still process the command line.
38
- * Defaults to false - once a presenter handles a command, no further processing is done.
39
- */
40
- processOtherPresenters?: boolean;
41
- }
@@ -1,19 +0,0 @@
1
- import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
2
- import type { ICommandLinePresenter, ICommandLinePresenterOptions, ICommandLinePresenterResult } from "./commandLinePresenter.js";
3
- /**
4
- * Command line presenter for Node.js inline commands (`node -e "..."`).
5
- * Extracts the JavaScript code and sets up JavaScript syntax highlighting.
6
- */
7
- export declare class NodeCommandLinePresenter implements ICommandLinePresenter {
8
- present(options: ICommandLinePresenterOptions): ICommandLinePresenterResult | undefined;
9
- }
10
- /**
11
- * Extracts the JavaScript code from a `node -e "..."` or `node -e '...'` command,
12
- * returning the code with properly unescaped quotes.
13
- *
14
- * @param commandLine The full command line to parse
15
- * @param shell The shell path (to determine quote escaping style)
16
- * @param os The operating system
17
- * @returns The extracted JavaScript code, or undefined if not a node -e/--eval command
18
- */
19
- export declare function extractNodeCommand(commandLine: string, shell: string, os: OperatingSystem): string | undefined;
@@ -1,37 +0,0 @@
1
-
2
- import { isPowerShell } from '../../runInTerminalHelpers.js';
3
-
4
- class NodeCommandLinePresenter {
5
- present(options) {
6
- const commandLine = options.commandLine.forDisplay;
7
- const extractedNode = extractNodeCommand(commandLine, options.shell, options.os);
8
- if (extractedNode) {
9
- return {
10
- commandLine: extractedNode,
11
- language: 'javascript',
12
- languageDisplayName: 'Node.js',
13
- };
14
- }
15
- return undefined;
16
- }
17
- }
18
- function extractNodeCommand(commandLine, shell, os) {
19
- const doubleQuoteMatch = commandLine.match(/^node(?:js)?\s+(?:-e|--eval)\s+"(?<code>.+)"$/s);
20
- if (doubleQuoteMatch?.groups?.code) {
21
- let jsCode = doubleQuoteMatch.groups.code.trim();
22
- if (isPowerShell(shell, os)) {
23
- jsCode = jsCode.replace(/`"/g, '"');
24
- }
25
- else {
26
- jsCode = jsCode.replace(/\\"/g, '"');
27
- }
28
- return jsCode;
29
- }
30
- const singleQuoteMatch = commandLine.match(/^node(?:js)?\s+(?:-e|--eval)\s+'(?<code>.+)'$/s);
31
- if (singleQuoteMatch?.groups?.code) {
32
- return singleQuoteMatch.groups.code.trim();
33
- }
34
- return undefined;
35
- }
36
-
37
- export { NodeCommandLinePresenter, extractNodeCommand };
@@ -1,19 +0,0 @@
1
- import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
2
- import type { ICommandLinePresenter, ICommandLinePresenterOptions, ICommandLinePresenterResult } from "./commandLinePresenter.js";
3
- /**
4
- * Command line presenter for Python inline commands (`python -c "..."`).
5
- * Extracts the Python code and sets up Python syntax highlighting.
6
- */
7
- export declare class PythonCommandLinePresenter implements ICommandLinePresenter {
8
- present(options: ICommandLinePresenterOptions): ICommandLinePresenterResult | undefined;
9
- }
10
- /**
11
- * Extracts the Python code from a `python -c "..."` or `python -c '...'` command,
12
- * returning the code with properly unescaped quotes.
13
- *
14
- * @param commandLine The full command line to parse
15
- * @param shell The shell path (to determine quote escaping style)
16
- * @param os The operating system
17
- * @returns The extracted Python code, or undefined if not a python -c command
18
- */
19
- export declare function extractPythonCommand(commandLine: string, shell: string, os: OperatingSystem): string | undefined;
@@ -1,37 +0,0 @@
1
-
2
- import { isPowerShell } from '../../runInTerminalHelpers.js';
3
-
4
- class PythonCommandLinePresenter {
5
- present(options) {
6
- const commandLine = options.commandLine.forDisplay;
7
- const extractedPython = extractPythonCommand(commandLine, options.shell, options.os);
8
- if (extractedPython) {
9
- return {
10
- commandLine: extractedPython,
11
- language: 'python',
12
- languageDisplayName: 'Python',
13
- };
14
- }
15
- return undefined;
16
- }
17
- }
18
- function extractPythonCommand(commandLine, shell, os) {
19
- const doubleQuoteMatch = commandLine.match(/^python(?:3)?\s+-c\s+"(?<python>.+)"$/s);
20
- if (doubleQuoteMatch?.groups?.python) {
21
- let pythonCode = doubleQuoteMatch.groups.python.trim();
22
- if (isPowerShell(shell, os)) {
23
- pythonCode = pythonCode.replace(/`"/g, '"');
24
- }
25
- else {
26
- pythonCode = pythonCode.replace(/\\"/g, '"');
27
- }
28
- return pythonCode;
29
- }
30
- const singleQuoteMatch = commandLine.match(/^python(?:3)?\s+-c\s+'(?<python>.+)'$/s);
31
- if (singleQuoteMatch?.groups?.python) {
32
- return singleQuoteMatch.groups.python.trim();
33
- }
34
- return undefined;
35
- }
36
-
37
- export { PythonCommandLinePresenter, extractPythonCommand };
@@ -1,19 +0,0 @@
1
- import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
2
- import type { ICommandLinePresenter, ICommandLinePresenterOptions, ICommandLinePresenterResult } from "./commandLinePresenter.js";
3
- /**
4
- * Command line presenter for Ruby inline commands (`ruby -e "..."`).
5
- * Extracts the Ruby code and sets up Ruby syntax highlighting.
6
- */
7
- export declare class RubyCommandLinePresenter implements ICommandLinePresenter {
8
- present(options: ICommandLinePresenterOptions): ICommandLinePresenterResult | undefined;
9
- }
10
- /**
11
- * Extracts the Ruby code from a `ruby -e "..."` or `ruby -e '...'` command,
12
- * returning the code with properly unescaped quotes.
13
- *
14
- * @param commandLine The full command line to parse
15
- * @param shell The shell path (to determine quote escaping style)
16
- * @param os The operating system
17
- * @returns The extracted Ruby code, or undefined if not a ruby -e command
18
- */
19
- export declare function extractRubyCommand(commandLine: string, shell: string, os: OperatingSystem): string | undefined;
@@ -1,44 +0,0 @@
1
-
2
- import { isPowerShell } from '../../runInTerminalHelpers.js';
3
-
4
- class RubyCommandLinePresenter {
5
- present(options) {
6
- const commandLine = options.commandLine.forDisplay;
7
- const extractedRuby = extractRubyCommand(commandLine, options.shell, options.os);
8
- if (extractedRuby) {
9
- return {
10
- commandLine: extractedRuby,
11
- language: 'ruby',
12
- languageDisplayName: 'Ruby',
13
- };
14
- }
15
- return undefined;
16
- }
17
- }
18
- function extractRubyCommand(commandLine, shell, os) {
19
- const doubleQuoteMatch = commandLine.match(/^ruby\s+-e\s+"(?<code>.+)"$/s);
20
- if (doubleQuoteMatch?.groups?.code) {
21
- let rubyCode = doubleQuoteMatch.groups.code.trim();
22
- if (!rubyCode) {
23
- return undefined;
24
- }
25
- if (isPowerShell(shell, os)) {
26
- rubyCode = rubyCode.replace(/`"/g, '"');
27
- }
28
- else {
29
- rubyCode = rubyCode.replace(/\\"/g, '"');
30
- }
31
- return rubyCode;
32
- }
33
- const singleQuoteMatch = commandLine.match(/^ruby\s+-e\s+'(?<code>.+)'$/s);
34
- if (singleQuoteMatch?.groups?.code) {
35
- const rubyCode = singleQuoteMatch.groups.code.trim();
36
- if (!rubyCode) {
37
- return undefined;
38
- }
39
- return rubyCode;
40
- }
41
- return undefined;
42
- }
43
-
44
- export { RubyCommandLinePresenter, extractRubyCommand };
@@ -1,13 +0,0 @@
1
- import { ITerminalSandboxService } from "../../../common/terminalSandboxService.js";
2
- import type { ICommandLinePresenter, ICommandLinePresenterOptions, ICommandLinePresenterResult } from "./commandLinePresenter.js";
3
- /**
4
- * Command line presenter for sandboxed commands.
5
- * Returns the display form of the command (provided via {@link ICommandLineRewriterResult.forDisplay}
6
- * from the rewriter pipeline) for cleaner presentation, while the actual sandboxed command runs
7
- * unchanged.
8
- */
9
- export declare class SandboxedCommandLinePresenter implements ICommandLinePresenter {
10
- private readonly _sandboxService;
11
- constructor(_sandboxService: ITerminalSandboxService);
12
- present(options: ICommandLinePresenterOptions): Promise<ICommandLinePresenterResult | undefined>;
13
- }
@@ -1,22 +0,0 @@
1
-
2
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import '../../../common/terminalSandboxService.js';
4
- import { ITerminalSandboxService } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/terminalSandboxService.service';
5
-
6
- let SandboxedCommandLinePresenter = class SandboxedCommandLinePresenter {
7
- constructor(_sandboxService) {
8
- this._sandboxService = _sandboxService;
9
- }
10
- async present(options) {
11
- if (!(await this._sandboxService.isEnabled())) {
12
- return undefined;
13
- }
14
- return {
15
- commandLine: options.commandLine.forDisplay,
16
- processOtherPresenters: true
17
- };
18
- }
19
- };
20
- SandboxedCommandLinePresenter = ( __decorate([( __param(0, ITerminalSandboxService))], SandboxedCommandLinePresenter));
21
-
22
- export { SandboxedCommandLinePresenter };
@@ -1,42 +0,0 @@
1
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
- import type { ICommandLineRewriter, ICommandLineRewriterOptions, ICommandLineRewriterResult } from "./commandLineRewriter.js";
4
- /**
5
- * Wraps background terminal commands so their processes survive VS Code shutdown.
6
- *
7
- * On POSIX (bash/zsh/fish), uses `nohup <command> &` to ignore SIGHUP and
8
- * detach from the terminal's process group.
9
- *
10
- * On Windows (PowerShell), uses `Start-Process` to create a process outside
11
- * the terminal's process tree.
12
- *
13
- * Gated behind the {@link TerminalChatAgentToolsSettingId.DetachBackgroundProcesses} setting
14
- * (default off) to avoid orphaned processes in normal usage.
15
- */
16
- export declare class CommandLineBackgroundDetachRewriter extends Disposable implements ICommandLineRewriter {
17
- private readonly _configurationService;
18
- constructor(_configurationService: IConfigurationService);
19
- rewrite(options: ICommandLineRewriterOptions): ICommandLineRewriterResult | undefined;
20
- /**
21
- * Returns true when the command line invokes a program that is known to
22
- * require an interactive stdin. Detaching such a command would close stdin
23
- * and either hang the program or make it exit with an error.
24
- *
25
- * The check is intentionally conservative — only well-known interactive
26
- * front-ends are matched, and only when their command-line flags do not
27
- * obviously force non-interactive behaviour.
28
- */
29
- private _readsFromStdin;
30
- private _rewriteForPosix;
31
- /**
32
- * Returns true when the command uses shell constructs that `nohup` cannot exec
33
- * directly. Such commands must be wrapped in `<shell> -c '...'` before being
34
- * passed to nohup.
35
- *
36
- * `nohup` only accepts a single simple external command (plus its arguments).
37
- * Anything that requires shell parsing — compound statements, builtins, shell
38
- * operators, or inline variable assignments — must go through a shell wrapper.
39
- */
40
- private _needsShellCWrapper;
41
- private _rewriteForPowerShell;
42
- }
@@ -1,102 +0,0 @@
1
-
2
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
- import { OperatingSystem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
5
- import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
6
- import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
7
- import { isFish, isBash, isZsh, isPowerShell } from '../../runInTerminalHelpers.js';
8
-
9
- let CommandLineBackgroundDetachRewriter = class CommandLineBackgroundDetachRewriter extends Disposable {
10
- constructor(_configurationService) {
11
- super();
12
- this._configurationService = _configurationService;
13
- }
14
- rewrite(options) {
15
- if (!this._configurationService.getValue(TerminalChatAgentToolsSettingId.DetachBackgroundProcesses)) {
16
- return undefined;
17
- }
18
- const trimmedForCheck = options.commandLine.trimEnd();
19
- const endsWithBareBackgroundAmp = /(?:^|[^&])&$/.test(trimmedForCheck);
20
- if (!options.isBackground && !endsWithBareBackgroundAmp) {
21
- return undefined;
22
- }
23
- if (this._readsFromStdin(options.commandLine)) {
24
- return undefined;
25
- }
26
- if (options.os === OperatingSystem.Windows) {
27
- if (!options.isBackground) {
28
- return undefined;
29
- }
30
- return this._rewriteForPowerShell(options);
31
- }
32
- return this._rewriteForPosix(options);
33
- }
34
- _readsFromStdin(commandLine) {
35
- const trimmed = commandLine.replace(/^\s*(?:[A-Z_][A-Z0-9_]*=\S+\s+)+/, "").replace(/^\s*cd\s+\S+\s*(?:&&|;)\s*/i, "").trimStart();
36
- if (/^(expect|passwd|vi|vim|nano|less|more|top|htop|sftp|ftp|telnet|gdb|lldb)\b/.test(trimmed)) {
37
- return true;
38
- }
39
- if (/^psql\b/.test(trimmed) && !/\s(-c|-f|--command|--file)\b/.test(trimmed)) {
40
- return true;
41
- }
42
- if (/^mysql\b/.test(trimmed) && !/\s(-e|--execute)\b/.test(trimmed)) {
43
- return true;
44
- }
45
- if (/^ssh\b/.test(trimmed) && !/\s-T\b/.test(trimmed) && !/\sssh\s+\S+\s+\S/.test(" " + trimmed)) {
46
- return true;
47
- }
48
- if (/^sudo\b/.test(trimmed) && !/\s-n\b/.test(trimmed) && !/\bSUDO_ASKPASS\b/.test(commandLine)) {
49
- return true;
50
- }
51
- return false;
52
- }
53
- _rewriteForPosix(options) {
54
- const trimmed = options.commandLine.trimEnd();
55
- const endsWithBackgroundAmp = /(?:^|[^&])&$/.test(trimmed);
56
- let commandToWrap = trimmed;
57
- if (this._needsShellCWrapper(trimmed)) {
58
- const innerCommand = endsWithBackgroundAmp ? trimmed.replace(/\s*&$/, "") : trimmed;
59
- if (isFish(options.shell, options.os)) {
60
- const escaped = innerCommand.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
61
- commandToWrap = `${options.shell} -c "${escaped}"`;
62
- } else {
63
- const escaped = innerCommand.replace(/'/g, `'\\''`);
64
- commandToWrap = `${options.shell} -c '${escaped}'`;
65
- }
66
- }
67
- const needsTrailingAmp = !(/(?:^|[^&])&$/.test(commandToWrap));
68
- const supportsDisown = isBash(options.shell, options.os) || isZsh(options.shell, options.os);
69
- const disownSuffix = supportsDisown ? " disown" : "";
70
- const rewritten = needsTrailingAmp ? `nohup ${commandToWrap} &${disownSuffix}` : `nohup ${commandToWrap}${disownSuffix}`;
71
- return {
72
- rewritten,
73
- reasoning: "Wrapped background command with nohup to survive terminal shutdown",
74
- forDisplay: options.commandLine
75
- };
76
- }
77
- _needsShellCWrapper(commandLine) {
78
- const trimmed = commandLine.trimStart();
79
- return (
80
- (/^(for|while|until|if|case|select|function)\b/.test(trimmed) ||
81
- /^(eval|set|export|source|unset|declare|typeset|local|readonly|alias|cd|exec)\b/.test(trimmed) ||
82
- /^\.\s/.test(trimmed) ||
83
- /^[{(]/.test(trimmed) ||
84
- /^[A-Za-z_][A-Za-z0-9_]*=/.test(trimmed) ||
85
- /(?:\|\||&&|[|;]|&(?!&)(?!\s*$))/.test(trimmed))
86
- );
87
- }
88
- _rewriteForPowerShell(options) {
89
- if (!isPowerShell(options.shell, options.os)) {
90
- return undefined;
91
- }
92
- const escapedCommand = options.commandLine.replace(/"/g, "\\\"");
93
- return {
94
- rewritten: `Start-Process -WindowStyle Hidden -FilePath "${options.shell}" -ArgumentList "-NoProfile", "-Command", "${escapedCommand}"`,
95
- reasoning: "Wrapped background command with Start-Process to survive terminal shutdown",
96
- forDisplay: options.commandLine
97
- };
98
- }
99
- };
100
- CommandLineBackgroundDetachRewriter = ( __decorate([( __param(0, IConfigurationService))], CommandLineBackgroundDetachRewriter));
101
-
102
- export { CommandLineBackgroundDetachRewriter };
@@ -1,5 +0,0 @@
1
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import type { ICommandLineRewriter, ICommandLineRewriterOptions, ICommandLineRewriterResult } from "./commandLineRewriter.js";
3
- export declare class CommandLineCdPrefixRewriter extends Disposable implements ICommandLineRewriter {
4
- rewrite(options: ICommandLineRewriterOptions): ICommandLineRewriterResult | undefined;
5
- }
@@ -1,27 +0,0 @@
1
-
2
- import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
3
- import { OperatingSystem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
4
- import { extractCdPrefix } from '../../runInTerminalHelpers.js';
5
-
6
- class CommandLineCdPrefixRewriter extends Disposable {
7
- rewrite(options) {
8
- if (!options.cwd) {
9
- return undefined;
10
- }
11
- const extracted = extractCdPrefix(options.commandLine, options.shell, options.os);
12
- if (extracted) {
13
- let cdDirPath = extracted.directory.replace(/(?:[\\\/])$/, '');
14
- let cwdFsPath = options.cwd.fsPath.replace(/(?:[\\\/])$/, '');
15
- if (options.os === OperatingSystem.Windows) {
16
- cdDirPath = cdDirPath.toLowerCase();
17
- cwdFsPath = cwdFsPath.toLowerCase();
18
- }
19
- if (cdDirPath === cwdFsPath) {
20
- return { rewritten: extracted.command, reasoning: 'Removed redundant cd command' };
21
- }
22
- }
23
- return undefined;
24
- }
25
- }
26
-
27
- export { CommandLineCdPrefixRewriter };
@@ -1,14 +0,0 @@
1
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
- import type { ICommandLineRewriter, ICommandLineRewriterOptions, ICommandLineRewriterResult } from "./commandLineRewriter.js";
4
- /**
5
- * Rewriter that prepends a space to commands to prevent them from being added to shell history for
6
- * certain shells. This depends on $VSCODE_PREVENT_SHELL_HISTORY being handled in shell integration
7
- * scripts to set `HISTCONTROL=ignorespace` (bash) or `HIST_IGNORE_SPACE` (zsh) env vars. The
8
- * prepended space is harmless so we don't try to remove it if shell integration isn't functional.
9
- */
10
- export declare class CommandLinePreventHistoryRewriter extends Disposable implements ICommandLineRewriter {
11
- private readonly _configurationService;
12
- constructor(_configurationService: IConfigurationService);
13
- rewrite(options: ICommandLineRewriterOptions): ICommandLineRewriterResult | undefined;
14
- }
@@ -1,29 +0,0 @@
1
-
2
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
- import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
5
- import { isBash, isZsh } from '../../runInTerminalHelpers.js';
6
- import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
7
-
8
- let CommandLinePreventHistoryRewriter = class CommandLinePreventHistoryRewriter extends Disposable {
9
- constructor(_configurationService) {
10
- super();
11
- this._configurationService = _configurationService;
12
- }
13
- rewrite(options) {
14
- const preventShellHistory = this._configurationService.getValue(TerminalChatAgentToolsSettingId.PreventShellHistory) === true;
15
- if (!preventShellHistory) {
16
- return undefined;
17
- }
18
- if (isBash(options.shell, options.os) || isZsh(options.shell, options.os)) {
19
- return {
20
- rewritten: ` ${options.commandLine}`,
21
- reasoning: "Prepended with a space to exclude from shell history"
22
- };
23
- }
24
- return undefined;
25
- }
26
- };
27
- CommandLinePreventHistoryRewriter = ( __decorate([( __param(0, IConfigurationService))], CommandLinePreventHistoryRewriter));
28
-
29
- export { CommandLinePreventHistoryRewriter };
@@ -1,8 +0,0 @@
1
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import type { TreeSitterCommandParser } from "../../treeSitterCommandParser.js";
3
- import type { ICommandLineRewriter, ICommandLineRewriterOptions, ICommandLineRewriterResult } from "./commandLineRewriter.js";
4
- export declare class CommandLinePwshChainOperatorRewriter extends Disposable implements ICommandLineRewriter {
5
- private readonly _treeSitterCommandParser;
6
- constructor(_treeSitterCommandParser: TreeSitterCommandParser);
7
- rewrite(options: ICommandLineRewriterOptions): Promise<ICommandLineRewriterResult | undefined>;
8
- }
@@ -1,33 +0,0 @@
1
-
2
- import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
3
- import { isPowerShell } from '../../runInTerminalHelpers.js';
4
-
5
- class CommandLinePwshChainOperatorRewriter extends Disposable {
6
- constructor(_treeSitterCommandParser) {
7
- super();
8
- this._treeSitterCommandParser = _treeSitterCommandParser;
9
- }
10
- async rewrite(options) {
11
- if (isPowerShell(options.shell, options.os)) {
12
- let doubleAmpersandCaptures;
13
- try {
14
- doubleAmpersandCaptures = await this._treeSitterCommandParser.extractPwshDoubleAmpersandChainOperators(options.commandLine);
15
- }
16
- catch {
17
- }
18
- if (doubleAmpersandCaptures && doubleAmpersandCaptures.length > 0) {
19
- let rewritten = options.commandLine;
20
- for (const capture of doubleAmpersandCaptures.reverse()) {
21
- rewritten = `${rewritten.substring(0, capture.node.startIndex)};${rewritten.substring(capture.node.endIndex)}`;
22
- }
23
- return {
24
- rewritten,
25
- reasoning: '&& re-written to ;'
26
- };
27
- }
28
- }
29
- return undefined;
30
- }
31
- }
32
-
33
- export { CommandLinePwshChainOperatorRewriter };
@@ -1,24 +0,0 @@
1
- import type { MaybePromise } from "@codingame/monaco-vscode-api/vscode/vs/base/common/async";
2
- import type { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
- import type { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
4
- import type { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
5
- export interface ICommandLineRewriter extends IDisposable {
6
- rewrite(options: ICommandLineRewriterOptions): MaybePromise<ICommandLineRewriterResult | undefined>;
7
- }
8
- export interface ICommandLineRewriterOptions {
9
- commandLine: string;
10
- cwd: URI | undefined;
11
- shell: string;
12
- os: OperatingSystem;
13
- isBackground?: boolean;
14
- requestUnsandboxedExecution?: boolean;
15
- }
16
- export interface ICommandLineRewriterResult {
17
- rewritten: string;
18
- reasoning: string;
19
- forDisplay?: string;
20
- isSandboxWrapped?: boolean;
21
- requiresUnsandboxConfirmation?: boolean;
22
- blockedDomains?: string[];
23
- deniedDomains?: string[];
24
- }
@@ -1,15 +0,0 @@
1
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { TreeSitterCommandParser } from "../../treeSitterCommandParser.js";
3
- import { ITerminalSandboxService } from "../../../common/terminalSandboxService.js";
4
- import type { ICommandLineRewriter, ICommandLineRewriterOptions, ICommandLineRewriterResult } from "./commandLineRewriter.js";
5
- export declare class CommandLineSandboxRewriter extends Disposable implements ICommandLineRewriter {
6
- private readonly _treeSitterCommandParser;
7
- private readonly _sandboxService;
8
- constructor(_treeSitterCommandParser: TreeSitterCommandParser, _sandboxService: ITerminalSandboxService);
9
- rewrite(options: ICommandLineRewriterOptions): Promise<ICommandLineRewriterResult | undefined>;
10
- /**
11
- * Parses the command line into sandbox command details. If parsing fails,
12
- * wrapping continues with the base sandbox config rather than blocking the command.
13
- */
14
- private _parseCommandDetails;
15
- }
@@ -1,53 +0,0 @@
1
-
2
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
- import { isPowerShell } from '../../runInTerminalHelpers.js';
5
- import { TreeSitterCommandParserLanguage } from '../../treeSitterCommandParser.js';
6
- import '../../../common/terminalSandboxService.js';
7
- import { TerminalSandboxPrerequisiteCheck } from '../../../../../../../platform/sandbox/common/terminalSandboxService.js';
8
- import { ITerminalSandboxService } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/terminalSandboxService.service';
9
-
10
- let CommandLineSandboxRewriter = class CommandLineSandboxRewriter extends Disposable {
11
- constructor(_treeSitterCommandParser, _sandboxService) {
12
- super();
13
- this._treeSitterCommandParser = _treeSitterCommandParser;
14
- this._sandboxService = _sandboxService;
15
- }
16
- async rewrite(options) {
17
- const sandboxPrereqs = await this._sandboxService.checkForSandboxingPrereqs();
18
- if (!sandboxPrereqs.enabled || sandboxPrereqs.failedCheck === TerminalSandboxPrerequisiteCheck.Config) {
19
- return undefined;
20
- }
21
- const commandDetails = await this._parseCommandDetails(options);
22
- const wrappedCommand = await this._sandboxService.wrapCommand(
23
- options.commandLine,
24
- options.requestUnsandboxedExecution,
25
- options.shell,
26
- options.cwd,
27
- commandDetails
28
- );
29
- return {
30
- rewritten: wrappedCommand.command,
31
- reasoning: wrappedCommand.requiresUnsandboxConfirmation ? "Switched command to unsandboxed execution because the command includes a domain that is not in the sandbox allowlist" : "Wrapped command for sandbox execution",
32
- forDisplay: options.commandLine,
33
- isSandboxWrapped: wrappedCommand.isSandboxWrapped,
34
- requiresUnsandboxConfirmation: wrappedCommand.requiresUnsandboxConfirmation,
35
- blockedDomains: wrappedCommand.blockedDomains,
36
- deniedDomains: wrappedCommand.deniedDomains
37
- };
38
- }
39
- async _parseCommandDetails(options) {
40
- try {
41
- if (options.requestUnsandboxedExecution === true) {
42
- return [];
43
- }
44
- const languageId = isPowerShell(options.shell, options.os) ? TreeSitterCommandParserLanguage.PowerShell : TreeSitterCommandParserLanguage.Bash;
45
- return await this._treeSitterCommandParser.extractCommands(languageId, options.commandLine);
46
- } catch {
47
- return [];
48
- }
49
- }
50
- };
51
- CommandLineSandboxRewriter = ( __decorate([( __param(1, ITerminalSandboxService))], CommandLineSandboxRewriter));
52
-
53
- export { CommandLineSandboxRewriter };