@codingame/monaco-vscode-katex-common 31.0.1 → 32.0.1

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
@@ -29,6 +29,8 @@ import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/l
29
29
  import { ResourceContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
30
30
  import { isStringImplicitContextValue } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
31
31
  import { IChatContextService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.service';
32
+ import { IBrowserViewWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service';
33
+ import { BrowserViewUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/browserView/common/browserViewUri';
32
34
 
33
35
  let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget extends Disposable {
34
36
  constructor(
@@ -47,7 +49,8 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
47
49
  modelService,
48
50
  hoverService,
49
51
  configService,
50
- chatContextService
52
+ chatContextService,
53
+ browserViewService
51
54
  ) {
52
55
  super();
53
56
  this.widgetRef = widgetRef;
@@ -66,6 +69,7 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
66
69
  this.hoverService = hoverService;
67
70
  this.configService = configService;
68
71
  this.chatContextService = chatContextService;
72
+ this.browserViewService = browserViewService;
69
73
  this.renderDisposables = this._register(( new DisposableStore()));
70
74
  this.renderedCount = 0;
71
75
  this.render();
@@ -93,12 +97,12 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
93
97
  contextNode.tabIndex = 0;
94
98
  contextNode.classList.toggle("disabled", !context.enabled);
95
99
  const file = context.uri;
96
- const attachmentTypeName = file?.scheme === Schemas.vscodeNotebookCell ? ( localize(5619, "cell")) : ( localize(5620, "file"));
97
- const contextLabel = context.name ?? (file ? basename(file) : ( localize(5621, "context")));
100
+ const attachmentTypeName = file?.scheme === Schemas.vscodeNotebookCell ? ( localize(5741, "cell")) : ( localize(5742, "file"));
101
+ const contextLabel = context.name ?? (file ? basename(file) : ( localize(5743, "context")));
98
102
  const isSuggestedEnabled = this.configService.getValue("chat.implicitContext.suggestedContext");
99
103
  if (isSuggestedEnabled) {
100
104
  if (!isSelection) {
101
- const buttonMsg = context.enabled ? ( localize(5622, "Disable {0} context {1}", attachmentTypeName, contextLabel)) : ( localize(5623, "Add {0} to context", contextLabel));
105
+ const buttonMsg = context.enabled ? ( localize(5744, "Disable {0} context {1}", attachmentTypeName, contextLabel)) : ( localize(5745, "Add {0} to context", contextLabel));
102
106
  const toggleButton = this.renderDisposables.add(( new Button(contextNode, {
103
107
  supportIcons: true,
104
108
  title: buttonMsg
@@ -113,7 +117,7 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
113
117
  context.enabled = false;
114
118
  }));
115
119
  } else {
116
- const pinButtonMsg = ( localize(5624, "Pin selection"));
120
+ const pinButtonMsg = ( localize(5746, "Pin selection"));
117
121
  const pinButton = this.renderDisposables.add(( new Button(contextNode, {
118
122
  supportIcons: true,
119
123
  title: pinButtonMsg
@@ -146,7 +150,7 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
146
150
  })
147
151
  );
148
152
  } else {
149
- const buttonMsg = context.enabled ? ( localize(5625, "Disable current {0} context", attachmentTypeName)) : ( localize(5626, "Enable current {0} context", attachmentTypeName));
153
+ const buttonMsg = context.enabled ? ( localize(5747, "Disable current {0} context", attachmentTypeName)) : ( localize(5748, "Enable current {0} context", attachmentTypeName));
150
154
  const toggleButton = this.renderDisposables.add(( new Button(contextNode, {
151
155
  supportIcons: true,
152
156
  title: buttonMsg
@@ -170,9 +174,9 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
170
174
  context.icon,
171
175
  context.value.resourceUri,
172
176
  markdownTooltip,
173
- ( localize(5627, "Current file context"))
177
+ ( localize(5749, "Current file context"))
174
178
  );
175
- contextNode.ariaLabel = ( localize(5628, "Suggested context, {0}", context.name));
179
+ contextNode.ariaLabel = ( localize(5750, "Suggested context, {0}", context.name));
176
180
  } else {
177
181
  title = this.renderResource(context.value, context.isSelection, context.enabled, label, contextNode);
178
182
  }
@@ -229,23 +233,26 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
229
233
  renderResource(attachmentValue, isSelection, enabled, label, contextNode) {
230
234
  const file = URI.isUri(attachmentValue) ? attachmentValue : attachmentValue.uri;
231
235
  const range = URI.isUri(attachmentValue) || !isSelection ? undefined : attachmentValue.range;
232
- const attachmentTypeName = file.scheme === Schemas.vscodeNotebookCell ? ( localize(5619, "cell")) : ( localize(5620, "file"));
236
+ if (file.scheme === Schemas.vscodeBrowser) {
237
+ return this.renderBrowserResource(file, label, contextNode);
238
+ }
239
+ const attachmentTypeName = file.scheme === Schemas.vscodeNotebookCell ? ( localize(5741, "cell")) : ( localize(5742, "file"));
233
240
  const fileBasename = basename(file);
234
241
  const fileDirname = dirname(file);
235
242
  const friendlyName = `${fileBasename} ${fileDirname}`;
236
243
  const ariaLabel = range ? ( localize(
237
- 5629,
244
+ 5751,
238
245
  "Suggested context, {0}, {1}, line {2} to line {3}",
239
246
  attachmentTypeName,
240
247
  friendlyName,
241
248
  range.startLineNumber,
242
249
  range.endLineNumber
243
- )) : ( localize(5630, "Suggested context, {0}, {1}", attachmentTypeName, friendlyName));
250
+ )) : ( localize(5752, "Suggested context, {0}, {1}", attachmentTypeName, friendlyName));
244
251
  const uriLabel = this.labelService.getUriLabel(file, {
245
252
  relative: true
246
253
  });
247
- const currentFile = ( localize(5631, "Current {0} context", attachmentTypeName));
248
- const inactive = ( localize(5632, "Enable current {0} context", attachmentTypeName));
254
+ const currentFile = ( localize(5753, "Current {0} context", attachmentTypeName));
255
+ const inactive = ( localize(5754, "Enable current {0} context", attachmentTypeName));
249
256
  const currentFileHint = enabled || isSelection ? currentFile : inactive;
250
257
  const title = `${currentFileHint}\n${uriLabel}`;
251
258
  label.setFile(file, {
@@ -257,6 +264,22 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
257
264
  contextNode.ariaLabel = ariaLabel;
258
265
  return title;
259
266
  }
267
+ renderBrowserResource(browserUri, label, contextNode) {
268
+ const id = BrowserViewUri.getId(browserUri);
269
+ const input = id && this.browserViewService.getKnownBrowserViews().get(id);
270
+ if (!input) {
271
+ return undefined;
272
+ }
273
+ const update = () => {
274
+ label.setLabel(input.getName(), undefined, {
275
+ iconPath: Codicon.globe
276
+ });
277
+ contextNode.ariaLabel = ( localize(5755, "Suggested browser context, {0}", input.getName()));
278
+ };
279
+ update();
280
+ this.renderDisposables.add(input.onDidChangeLabel(() => update()));
281
+ return input.getTitle();
282
+ }
260
283
  async convertToRegularAttachment(attachment) {
261
284
  if (!attachment.value) {
262
285
  return;
@@ -302,6 +325,6 @@ let ImplicitContextAttachmentWidget = class ImplicitContextAttachmentWidget exte
302
325
  this.widgetRef()?.focusInput();
303
326
  }
304
327
  };
305
- ImplicitContextAttachmentWidget = ( __decorate([( __param(6, IContextKeyService)), ( __param(7, IContextMenuService)), ( __param(8, ILabelService)), ( __param(9, IMenuService)), ( __param(10, IFileService)), ( __param(11, ILanguageService)), ( __param(12, IModelService)), ( __param(13, IHoverService)), ( __param(14, IConfigurationService)), ( __param(15, IChatContextService))], ImplicitContextAttachmentWidget));
328
+ ImplicitContextAttachmentWidget = ( __decorate([( __param(6, IContextKeyService)), ( __param(7, IContextMenuService)), ( __param(8, ILabelService)), ( __param(9, IMenuService)), ( __param(10, IFileService)), ( __param(11, ILanguageService)), ( __param(12, IModelService)), ( __param(13, IHoverService)), ( __param(14, IConfigurationService)), ( __param(15, IChatContextService)), ( __param(16, IBrowserViewWorkbenchService))], ImplicitContextAttachmentWidget));
306
329
 
307
330
  export { ImplicitContextAttachmentWidget };
@@ -82,7 +82,7 @@ registerAction2(class OpenFileInDiffAction extends WorkingSetAction {
82
82
  constructor() {
83
83
  super({
84
84
  id: "chatEditing.openFileInDiff",
85
- title: ( localize2(6057, "Open Changes in Diff Editor")),
85
+ title: ( localize2(6304, "Open Changes in Diff Editor")),
86
86
  icon: Codicon.diffSingle,
87
87
  menu: [{
88
88
  id: MenuId.ChatEditingWidgetModifiedFilesToolbar,
@@ -113,7 +113,7 @@ registerAction2(class AcceptAction extends WorkingSetAction {
113
113
  constructor() {
114
114
  super({
115
115
  id: "chatEditing.acceptFile",
116
- title: ( localize2(6058, "Keep")),
116
+ title: ( localize2(6305, "Keep")),
117
117
  icon: Codicon.check,
118
118
  menu: [{
119
119
  when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("resourceScheme", CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)), ContextKeyExpr.notIn(
@@ -139,7 +139,7 @@ registerAction2(class DiscardAction extends WorkingSetAction {
139
139
  constructor() {
140
140
  super({
141
141
  id: "chatEditing.discardFile",
142
- title: ( localize2(6059, "Undo")),
142
+ title: ( localize2(6306, "Undo")),
143
143
  icon: Codicon.discard,
144
144
  menu: [{
145
145
  when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("resourceScheme", CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME)), ContextKeyExpr.notIn(
@@ -165,9 +165,9 @@ class ChatEditingAcceptAllAction extends EditingSessionAction {
165
165
  constructor() {
166
166
  super({
167
167
  id: "chatEditing.acceptAllFiles",
168
- title: ( localize(6060, "Keep")),
168
+ title: ( localize(6307, "Keep")),
169
169
  icon: Codicon.check,
170
- tooltip: ( localize(6061, "Keep All Edits")),
170
+ tooltip: ( localize(6308, "Keep All Edits")),
171
171
  precondition: hasUndecidedChatEditingResourceContextKey,
172
172
  keybinding: {
173
173
  primary: KeyMod.CtrlCmd | KeyCode.Enter,
@@ -191,9 +191,9 @@ class ChatEditingDiscardAllAction extends EditingSessionAction {
191
191
  constructor() {
192
192
  super({
193
193
  id: "chatEditing.discardAllFiles",
194
- title: ( localize(6062, "Undo")),
194
+ title: ( localize(6309, "Undo")),
195
195
  icon: Codicon.discard,
196
- tooltip: ( localize(6063, "Undo All Edits")),
196
+ tooltip: ( localize(6310, "Undo All Edits")),
197
197
  precondition: hasUndecidedChatEditingResourceContextKey,
198
198
  menu: [{
199
199
  id: MenuId.ChatEditingWidgetToolbar,
@@ -224,8 +224,8 @@ class ToggleExplanationWidgetAction extends EditingSessionAction {
224
224
  constructor() {
225
225
  super({
226
226
  id: ToggleExplanationWidgetAction.ID,
227
- title: ( localize(6064, "Explain")),
228
- tooltip: ( localize(6065, "Toggle Change Explanations")),
227
+ title: ( localize(6311, "Explain")),
228
+ tooltip: ( localize(6312, "Toggle Change Explanations")),
229
229
  precondition: hasUndecidedChatEditingResourceContextKey,
230
230
  menu: [{
231
231
  id: MenuId.ChatEditingWidgetToolbar,
@@ -249,17 +249,17 @@ async function discardAllEditsWithConfirmation(accessor, currentEditingSession)
249
249
  const entries = currentEditingSession.entries.get().filter(e => e.state.get() === ModifiedFileEntryState.Modified);
250
250
  if (entries.length > 0) {
251
251
  const confirmation = await dialogService.confirm({
252
- title: ( localize(6066, "Undo all edits?")),
252
+ title: ( localize(6313, "Undo all edits?")),
253
253
  message: entries.length === 1 ? ( localize(
254
- 6067,
254
+ 6314,
255
255
  "This will undo changes made in {0}. Do you want to proceed?",
256
256
  basename(entries[0].modifiedURI)
257
257
  )) : ( localize(
258
- 6068,
258
+ 6315,
259
259
  "This will undo changes made in {0} files. Do you want to proceed?",
260
260
  entries.length
261
261
  )),
262
- primaryButton: ( localize(6069, "Yes")),
262
+ primaryButton: ( localize(6316, "Yes")),
263
263
  type: "info"
264
264
  });
265
265
  if (!confirmation.confirmed) {
@@ -274,7 +274,7 @@ class ChatEditingShowChangesAction extends EditingSessionAction {
274
274
  this.ID = "chatEditing.viewChanges";
275
275
  }
276
276
  static {
277
- this.LABEL = ( localize(6070, "View All Edits"));
277
+ this.LABEL = ( localize(6317, "View All Edits"));
278
278
  }
279
279
  constructor() {
280
280
  super({
@@ -336,13 +336,13 @@ async function restoreSnapshotWithConfirmationByRequestId(accessor, sessionResou
336
336
  if (editsToUndo === 1) {
337
337
  if (entriesModifiedInRequestsToRemove.length === 1) {
338
338
  message = ( localize(
339
- 6071,
339
+ 6318,
340
340
  "This will remove your last request and undo the edits made to {0}. Do you want to proceed?",
341
341
  basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
342
342
  ));
343
343
  } else {
344
344
  message = ( localize(
345
- 6072,
345
+ 6319,
346
346
  "This will remove your last request and undo edits made to {0} files in your working set. Do you want to proceed?",
347
347
  entriesModifiedInRequestsToRemove.length
348
348
  ));
@@ -350,24 +350,24 @@ async function restoreSnapshotWithConfirmationByRequestId(accessor, sessionResou
350
350
  } else {
351
351
  if (entriesModifiedInRequestsToRemove.length === 1) {
352
352
  message = ( localize(
353
- 6073,
353
+ 6320,
354
354
  "This will remove all subsequent requests and undo edits made to {0}. Do you want to proceed?",
355
355
  basename(entriesModifiedInRequestsToRemove[0].modifiedURI)
356
356
  ));
357
357
  } else {
358
358
  message = ( localize(
359
- 6074,
359
+ 6321,
360
360
  "This will remove all subsequent requests and undo edits made to {0} files in your working set. Do you want to proceed?",
361
361
  entriesModifiedInRequestsToRemove.length
362
362
  ));
363
363
  }
364
364
  }
365
365
  const confirmation = shouldPrompt ? await dialogService.confirm({
366
- title: editsToUndo === 1 ? ( localize(6075, "Do you want to undo your last edit?")) : ( localize(6076, "Do you want to undo {0} edits?", editsToUndo)),
366
+ title: editsToUndo === 1 ? ( localize(6322, "Do you want to undo your last edit?")) : ( localize(6323, "Do you want to undo {0} edits?", editsToUndo)),
367
367
  message: message,
368
- primaryButton: ( localize(6077, "Yes")),
368
+ primaryButton: ( localize(6324, "Yes")),
369
369
  checkbox: {
370
- label: ( localize(6078, "Don't ask again")),
370
+ label: ( localize(6325, "Don't ask again")),
371
371
  checked: false
372
372
  },
373
373
  type: "info"
@@ -397,7 +397,7 @@ registerAction2(class RemoveAction extends Action2 {
397
397
  constructor() {
398
398
  super({
399
399
  id: "workbench.action.chat.undoEdits",
400
- title: ( localize2(6079, "Undo Requests")),
400
+ title: ( localize2(6326, "Undo Requests")),
401
401
  f1: false,
402
402
  category: CHAT_CATEGORY,
403
403
  icon: Codicon.discard,
@@ -443,8 +443,8 @@ registerAction2(class RestoreCheckpointAction extends Action2 {
443
443
  constructor() {
444
444
  super({
445
445
  id: "workbench.action.chat.restoreCheckpoint",
446
- title: ( localize2(6080, "Restore Checkpoint")),
447
- tooltip: ( localize2(6081, "Restores workspace and chat to this point")),
446
+ title: ( localize2(6327, "Restore Checkpoint")),
447
+ tooltip: ( localize2(6328, "Restores workspace and chat to this point")),
448
448
  f1: false,
449
449
  category: CHAT_CATEGORY,
450
450
  keybinding: {
@@ -489,8 +489,8 @@ registerAction2(class StartOverAction extends Action2 {
489
489
  constructor() {
490
490
  super({
491
491
  id: "workbench.action.chat.startOver",
492
- title: ( localize2(6082, "Start Over")),
493
- tooltip: ( localize2(6083, "Clears the chat and undoes all changes")),
492
+ title: ( localize2(6329, "Start Over")),
493
+ tooltip: ( localize2(6330, "Clears the chat and undoes all changes")),
494
494
  f1: false,
495
495
  category: CHAT_CATEGORY,
496
496
  menu: [{
@@ -519,7 +519,7 @@ registerAction2(class RestoreLastCheckpoint extends Action2 {
519
519
  constructor() {
520
520
  super({
521
521
  id: "workbench.action.chat.restoreLastCheckpoint",
522
- title: ( localize2(6084, "Restore to Last Checkpoint")),
522
+ title: ( localize2(6331, "Restore to Last Checkpoint")),
523
523
  f1: true,
524
524
  category: CHAT_CATEGORY,
525
525
  icon: Codicon.discard,
@@ -544,7 +544,7 @@ registerAction2(class RestoreLastCheckpoint extends Action2 {
544
544
  }
545
545
  const checkpointRequest = chatModel.checkpoint;
546
546
  if (!checkpointRequest) {
547
- alert(( localize(6085, "There is no checkpoint to restore.")));
547
+ alert(( localize(6332, "There is no checkpoint to restore.")));
548
548
  return;
549
549
  }
550
550
  widget?.viewModel?.model.setCheckpoint(checkpointRequest.id);
@@ -557,7 +557,7 @@ registerAction2(class EditAction extends Action2 {
557
557
  constructor() {
558
558
  super({
559
559
  id: "workbench.action.chat.editRequests",
560
- title: ( localize2(6086, "Edit Request")),
560
+ title: ( localize2(6333, "Edit Request")),
561
561
  f1: false,
562
562
  category: CHAT_CATEGORY,
563
563
  icon: Codicon.edit,
@@ -596,7 +596,7 @@ registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
596
596
  constructor() {
597
597
  super({
598
598
  id: OpenWorkingSetHistoryAction.id,
599
- title: ( localize(6087, "Open File")),
599
+ title: ( localize(6334, "Open File")),
600
600
  menu: [{
601
601
  id: MenuId.ChatEditingCodeBlockContext,
602
602
  group: "navigation",
@@ -622,7 +622,7 @@ registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
622
622
  constructor() {
623
623
  super({
624
624
  id: OpenWorkingSetHistoryAction.id,
625
- title: ( localize(6088, "Open File Snapshot")),
625
+ title: ( localize(6335, "Open File Snapshot")),
626
626
  menu: [{
627
627
  id: MenuId.ChatEditingCodeBlockContext,
628
628
  group: "navigation",
@@ -646,7 +646,7 @@ registerAction2(class OpenWorkingSetHistoryAction extends Action2 {
646
646
  if (snapshot) {
647
647
  const editor = await editorService.openEditor({
648
648
  resource: snapshot,
649
- label: ( localize(6089, "{0} (Snapshot)", basename(context.uri))),
649
+ label: ( localize(6336, "{0} (Snapshot)", basename(context.uri))),
650
650
  options: {
651
651
  activation: EditorActivation.ACTIVATE
652
652
  }
@@ -663,7 +663,7 @@ registerAction2(class ResolveSymbolsContextAction extends EditingSessionAction {
663
663
  constructor() {
664
664
  super({
665
665
  id: "workbench.action.edits.addFilesFromReferences",
666
- title: ( localize2(6090, "Add Files From References")),
666
+ title: ( localize2(6337, "Add Files From References")),
667
667
  f1: false,
668
668
  category: CHAT_CATEGORY,
669
669
  menu: {
@@ -731,7 +731,7 @@ class ViewPreviousEditsAction extends EditingSessionAction {
731
731
  this.Id = "chatEditing.viewPreviousEdits";
732
732
  }
733
733
  static {
734
- this.Label = ( localize(6091, "View Previous Edits"));
734
+ this.Label = ( localize(6338, "View Previous Edits"));
735
735
  }
736
736
  constructor() {
737
737
  super({
@@ -151,7 +151,7 @@ let ChatSessionPickerActionItem = class ChatSessionPickerActionItem extends Acti
151
151
  domChildren.push($(
152
152
  "span.chat-session-option-label",
153
153
  undefined,
154
- this.currentOption?.name ?? group?.description ?? ( localize(6256, "Pick Option"))
154
+ this.currentOption?.name ?? group?.description ?? ( localize(6499, "Pick Option"))
155
155
  ));
156
156
  }
157
157
  domChildren.push(...renderLabelWithIcons(`$(chevron-down)`));
@@ -21,6 +21,7 @@
21
21
  .monaco-action-bar .action-item .chat-session-option-picker {
22
22
  align-items: center;
23
23
  overflow: hidden;
24
+ padding: 2px 3px;
24
25
 
25
26
  .chat-session-option-label {
26
27
  overflow: hidden;
@@ -0,0 +1,28 @@
1
+ import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
+ import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
4
+ import { IToolData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
5
+ import { IChatToolRiskAssessmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.service";
6
+ export declare enum ToolRiskLevel {
7
+ Green = "green",
8
+ Orange = "orange",
9
+ Red = "red"
10
+ }
11
+ export interface IToolRiskAssessment {
12
+ readonly risk: ToolRiskLevel;
13
+ /** One-sentence natural-language explanation, <= 140 chars. */
14
+ readonly explanation: string;
15
+ }
16
+ export declare class ChatToolRiskAssessmentService implements IChatToolRiskAssessmentService {
17
+ private readonly _configurationService;
18
+ private readonly _languageModelsService;
19
+ readonly _serviceBrand: undefined;
20
+ private readonly _cache;
21
+ private readonly _inFlight;
22
+ constructor(_configurationService: IConfigurationService, _languageModelsService: ILanguageModelsService);
23
+ isEnabled(): boolean;
24
+ getCached(tool: IToolData, parameters: unknown): IToolRiskAssessment | undefined;
25
+ assess(tool: IToolData, parameters: unknown, token: CancellationToken): Promise<IToolRiskAssessment | undefined>;
26
+ private _cacheKey;
27
+ private _invokeModel;
28
+ }
@@ -0,0 +1,250 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { LRUCache } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
4
+ import { stableStringify } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
5
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
6
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
7
+ import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
8
+ import { ChatMessageRole } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
9
+ import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
10
+ import { TerminalToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/terminalToolIds';
11
+
12
+ var ToolRiskLevel;
13
+ (function(ToolRiskLevel) {
14
+ ToolRiskLevel["Green"] = "green";
15
+ ToolRiskLevel["Orange"] = "orange";
16
+ ToolRiskLevel["Red"] = "red";
17
+ })(ToolRiskLevel || (ToolRiskLevel = {}));
18
+ const MAX_PARAM_BYTES = 2000;
19
+ const CACHE_SIZE = 200;
20
+ let ChatToolRiskAssessmentService = class ChatToolRiskAssessmentService {
21
+ constructor(_configurationService, _languageModelsService) {
22
+ this._configurationService = _configurationService;
23
+ this._languageModelsService = _languageModelsService;
24
+ this._cache = ( new LRUCache(CACHE_SIZE));
25
+ this._inFlight = ( new Map());
26
+ }
27
+ isEnabled() {
28
+ return this._configurationService.getValue(ChatConfiguration.ToolRiskAssessmentEnabled) !== false;
29
+ }
30
+ getCached(tool, parameters) {
31
+ return this._cache.get(this._cacheKey(tool, parameters))?.assessment;
32
+ }
33
+ async assess(tool, parameters, token) {
34
+ if (!this.isEnabled()) {
35
+ return undefined;
36
+ }
37
+ const key = this._cacheKey(tool, parameters);
38
+ const cached = this._cache.get(key);
39
+ if (cached) {
40
+ return cached.assessment;
41
+ }
42
+ const inflight = this._inFlight.get(key);
43
+ if (inflight) {
44
+ return inflight;
45
+ }
46
+ const promise = (async () => {
47
+ try {
48
+ const assessment = await this._invokeModel(tool, parameters, token);
49
+ if (token.isCancellationRequested) {
50
+ return undefined;
51
+ }
52
+ this._cache.set(key, {
53
+ assessment
54
+ });
55
+ return assessment;
56
+ } catch {
57
+ return undefined;
58
+ } finally {
59
+ this._inFlight.delete(key);
60
+ }
61
+ })();
62
+ this._inFlight.set(key, promise);
63
+ return promise;
64
+ }
65
+ _cacheKey(tool, parameters) {
66
+ return tool.id + "::" + stableStringify(normalizeRiskCacheParameters(tool, parameters));
67
+ }
68
+ async _invokeModel(tool, parameters, token) {
69
+ const modelId = this._configurationService.getValue(ChatConfiguration.ToolRiskAssessmentModel) || "copilot-fast";
70
+ const models = await this._languageModelsService.selectLanguageModels({
71
+ vendor: "copilot",
72
+ id: modelId
73
+ });
74
+ if (!models.length || token.isCancellationRequested) {
75
+ return undefined;
76
+ }
77
+ const prompt = buildPrompt(tool, parameters);
78
+ const response = await this._languageModelsService.sendChatRequest(models[0], undefined, [{
79
+ role: ChatMessageRole.User,
80
+ content: [{
81
+ type: "text",
82
+ value: prompt
83
+ }]
84
+ }], {}, token);
85
+ let text = "";
86
+ for await (const part of response.stream) {
87
+ if (token.isCancellationRequested) {
88
+ return undefined;
89
+ }
90
+ if (Array.isArray(part)) {
91
+ for (const p of part) {
92
+ if (p.type === "text") {
93
+ text += p.value;
94
+ }
95
+ }
96
+ } else if (part.type === "text") {
97
+ text += part.value;
98
+ }
99
+ }
100
+ await response.result;
101
+ if (token.isCancellationRequested) {
102
+ return undefined;
103
+ }
104
+ return parseAssessment(text, tool);
105
+ }
106
+ };
107
+ ChatToolRiskAssessmentService = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, ILanguageModelsService))], ChatToolRiskAssessmentService));
108
+ function normalizeRiskCacheParameters(tool, parameters) {
109
+ if (tool.id === TerminalToolId.RunInTerminal && parameters && typeof parameters === "object") {
110
+ const p = parameters;
111
+ return {
112
+ command: p.command
113
+ };
114
+ }
115
+ return parameters;
116
+ }
117
+ function buildPrompt(tool, parameters) {
118
+ let argsJson;
119
+ try {
120
+ argsJson = JSON.stringify(parameters ?? {});
121
+ } catch {
122
+ argsJson = "{}";
123
+ }
124
+ if (argsJson.length > MAX_PARAM_BYTES) {
125
+ argsJson = argsJson.slice(0, MAX_PARAM_BYTES) + "...[truncated]";
126
+ }
127
+ return [
128
+ `You assess what one terminal command does for a code-editing AI agent, and how risky it is.`,
129
+ `Reply with STRICT JSON only (no prose, no markdown fences):`,
130
+ `{`,
131
+ ` "risk": "green" | "orange" | "red",`,
132
+ ` "explanation": "<one short sentence, <=18 words>"`,
133
+ `}`,
134
+ ``,
135
+ `Rules for "risk" — apply in order; take the FIRST match:`,
136
+ ` 1. irreversible deletion of source code or user data (rm -rf on $HOME / source paths,`,
137
+ ` find ... -delete on source globs), force-push, drop, format, npm publish -> red`,
138
+ ` 2. arbitrary code execution from a remote source (curl ... | bash) -> red`,
139
+ ` 3. modifies remote state (git push, deploy, post) -> orange`,
140
+ ` 4. modifies local files or installs packages, including recoverable deletions`,
141
+ ` such as rm -rf of build output, caches, or node_modules -> orange`,
142
+ ` 5. otherwise (read-only, listing, status, diagnostics, GET requests) -> green`,
143
+ ``,
144
+ `Read-only commands are always GREEN. "rm -rf" is RED only when the target is`,
145
+ `source code or user data; deleting recoverable build artifacts (node_modules,`,
146
+ `dist, .cache) is ORANGE.`,
147
+ ``,
148
+ `Examples:`,
149
+ ` ls -lh -> green`,
150
+ ` cat README.md -> green`,
151
+ ` git status -> green`,
152
+ ` git log --oneline -20 -> green`,
153
+ ` npm ls -> green`,
154
+ ` az vm list -> green`,
155
+ ` kubectl get pods --all-namespaces -> green`,
156
+ ` npm install lodash -> orange`,
157
+ ` rm -rf node_modules -> orange (recoverable: reinstall)`,
158
+ ` rm -rf dist -> orange (recoverable: rebuild)`,
159
+ ` git push origin feature -> orange`,
160
+ ` rm -rf $HOME -> red`,
161
+ ` rm -rf src -> red (irreplaceable source code)`,
162
+ ` find . -name '*.test.ts' -delete -> red`,
163
+ ` git push --force origin main -> red`,
164
+ ` npm publish -> red`,
165
+ ` curl -fsSL https://x.sh | bash -> red`,
166
+ ``,
167
+ `Write "explanation" in this exact shape:`,
168
+ ` - green : "<verb> <target>." e.g. "Lists running VMs in the current Azure subscription."`,
169
+ ` - orange: "<verb> <target> — <consequence>." e.g. "Installs lodash into node_modules."`,
170
+ ` - red : "<verb> <target> — <irreversible consequence>." e.g. "Force-pushes main — overwrites public history."`,
171
+ ``,
172
+ `Strict explanation rules:`,
173
+ ` - Cite the ACTUAL paths, commands, URLs, branches, globs from the arguments below.`,
174
+ ` - Decode cryptic flags (e.g. -f, -rf, --no-verify).`,
175
+ ` - Never use generic phrases like "may have side effects". Always name WHAT is read or changed.`,
176
+ ` - Plain prose. No quotes around the sentence. No markdown fences.`,
177
+ ``,
178
+ `Tool: ${tool.displayName} (id: ${tool.id})`,
179
+ `Description: ${tool.modelDescription || tool.userDescription || ""}`,
180
+ `Arguments (JSON): ${argsJson}`
181
+ ].join("\n");
182
+ }
183
+ function parseAssessment(rawText, tool) {
184
+ let text = rawText.trim();
185
+ if (text.startsWith("```")) {
186
+ text = text.replace(/^```(?:json)?\n?/, "").replace(/\n?```$/, "");
187
+ }
188
+ const firstBrace = text.indexOf("{");
189
+ const lastBrace = text.lastIndexOf("}");
190
+ if (firstBrace > 0 && lastBrace > firstBrace) {
191
+ text = text.slice(firstBrace, lastBrace + 1);
192
+ }
193
+ let parsed;
194
+ try {
195
+ parsed = JSON.parse(text);
196
+ } catch {
197
+ return undefined;
198
+ }
199
+ if (!parsed || typeof parsed !== "object") {
200
+ return undefined;
201
+ }
202
+ const obj = parsed;
203
+ const risk = normalizeRisk(obj.risk);
204
+ if (!risk) {
205
+ return undefined;
206
+ }
207
+ const explanation = typeof obj.explanation === "string" ? truncate(obj.explanation, 140) : defaultExplanationFor(risk, tool);
208
+ return {
209
+ risk,
210
+ explanation
211
+ };
212
+ }
213
+ function normalizeRisk(value) {
214
+ if (typeof value !== "string") {
215
+ return undefined;
216
+ }
217
+ const v = value.toLowerCase();
218
+ if (v === "green") {
219
+ return ToolRiskLevel.Green;
220
+ }
221
+ if (v === "orange" || v === "yellow") {
222
+ return ToolRiskLevel.Orange;
223
+ }
224
+ if (v === "red") {
225
+ return ToolRiskLevel.Red;
226
+ }
227
+ return undefined;
228
+ }
229
+ function truncate(s, max) {
230
+ if (s.length <= max) {
231
+ return s;
232
+ }
233
+ return s.slice(0, max - 1) + "…";
234
+ }
235
+ function defaultExplanationFor(risk, tool) {
236
+ switch (risk) {
237
+ case ToolRiskLevel.Green:
238
+ return localize(6955, "{0} appears to have no observable side effects.", tool.displayName);
239
+ case ToolRiskLevel.Orange:
240
+ return localize(
241
+ 6956,
242
+ "{0} may modify your workspace or send data over the network.",
243
+ tool.displayName
244
+ );
245
+ case ToolRiskLevel.Red:
246
+ return localize(6957, "{0} performs an action that is hard to undo.", tool.displayName);
247
+ }
248
+ }
249
+
250
+ export { ChatToolRiskAssessmentService, ToolRiskLevel };