@codingame/monaco-vscode-katex-common 31.0.0 → 32.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +15 -3
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +6 -5
  4. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +5 -1
  5. package/vscode/src/vs/platform/actions/browser/buttonbar.js +45 -14
  6. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +15 -1
  7. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +15 -10
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +51 -54
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
  14. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +3 -1
  15. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +45 -23
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +13 -7
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +9 -9
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +5 -3
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +4 -1
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +46 -32
  21. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +8 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +155 -46
  24. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +1 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +20 -1
  26. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +4 -1
  27. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +37 -14
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +34 -34
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +1 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.d.ts +28 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.js +250 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
  34. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +14 -11
  35. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +10 -10
  36. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  38. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +7 -2
  39. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
  40. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  41. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  42. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +7 -3
  43. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +12 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +51 -20
  45. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
  46. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +6 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +56 -3
  48. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
  50. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.d.ts +1 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.js +2 -2
  52. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.d.ts +3 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.js +4 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +68 -10
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.d.ts +58 -2
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +653 -75
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +28 -10
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +5 -1
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +91 -54
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +7 -5
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +53 -51
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +11 -11
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +6 -6
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +4 -1
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +42 -22
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +6 -2
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +93 -35
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +5 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css +169 -27
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +13 -4
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +1 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatToolConfirmationCarousel.css +29 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +1 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +60 -15
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +13 -6
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +2 -2
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +15 -8
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +6 -1
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +125 -26
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +2 -1
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +29 -23
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.d.ts +14 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +119 -10
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +6 -6
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +1 -1
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +5 -5
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/media/toolRiskBadge.css +77 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.d.ts +38 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.js +125 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +1 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +132 -59
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +16 -3
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +156 -67
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +55 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +93 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.d.ts +21 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.js +133 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +53 -8
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +288 -125
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +23 -2
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +699 -145
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +12 -8
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +12 -11
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.d.ts +62 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.js +120 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +5 -5
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatInputNotificationWidget.css +191 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatPhoneInputPresenter.css +22 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +3 -3
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +9 -25
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +4 -3
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +20 -1
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +89 -108
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +3 -3
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +521 -9
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +19 -19
  136. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +6 -6
  137. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionStorageKeys.d.ts +2 -0
  138. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionStorageKeys.js +6 -0
  139. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.d.ts +27 -0
  140. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.js +82 -0
  141. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +3 -0
  142. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +44 -17
  143. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +1 -3
  144. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +3 -46
  145. package/vscode/src/vs/workbench/contrib/inlineChat/browser/{inlineChatEditorAffordance.d.ts → inlineChatAffordanceWidget.d.ts} +1 -1
  146. package/vscode/src/vs/workbench/contrib/inlineChat/browser/{inlineChatEditorAffordance.js → inlineChatAffordanceWidget.js} +6 -6
  147. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -18
  148. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +19 -400
  149. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +4 -9
  150. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +1 -1
  151. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +5 -19
  152. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +47 -133
  153. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +3 -1
  154. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +103 -25
  155. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +29 -0
  156. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +3 -32
  157. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -92
  158. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  159. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  160. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  161. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
  164. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
  165. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
  166. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
  167. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
  168. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  169. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  170. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +7 -0
  171. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +99 -32
  172. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +13 -1
  173. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +76 -14
  174. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -3
  175. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +9 -1
  176. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +89 -28
  177. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +1 -1
  178. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +11 -1
  179. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +11 -7
  180. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +3 -1
  181. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +7 -3
  182. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +1 -1
  183. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  184. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
  185. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  186. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +8 -0
  187. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +11 -2
  188. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +20 -0
  189. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +59 -4
  190. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -1
  191. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +24 -3
  192. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +47 -0
  193. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +111 -30
  194. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +60 -3
  195. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +455 -171
  196. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +33 -0
  197. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +82 -0
  198. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.d.ts +31 -0
  199. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.js +49 -0
  200. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.d.ts +18 -0
  201. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.js +302 -0
  202. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +7 -0
  203. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.js +118 -0
  204. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +34 -4
  205. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +233 -48
  206. package/vscode/src/vs/platform/actions/browser/actionbar.d.ts +0 -16
  207. package/vscode/src/vs/platform/actions/browser/actionbar.js +0 -22
  208. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +0 -46
  209. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +0 -539
  210. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +0 -29
  211. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +0 -386
  212. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +0 -101
  213. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +0 -509
  214. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +0 -130
  215. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +0 -276
  216. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -45
  217. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +0 -93
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +0 -39
  219. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +0 -617
  220. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +0 -231
@@ -1,6 +1,7 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { isMarkdownString, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
4
+ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
4
5
  import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
6
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
6
7
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
@@ -8,9 +9,12 @@ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platf
8
9
  import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
9
10
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
10
11
  import { ElicitationState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
12
+ import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
11
13
  import { IChatAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
12
14
  import { AcceptElicitationRequestActionId } from '../../actions/chatElicitationActions.js';
15
+ import { IChatToolRiskAssessmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.service';
13
16
  import { ChatConfirmationWidget } from './chatConfirmationWidget.js';
17
+ import { ToolRiskBadgeWidget } from './toolInvocationParts/toolRiskBadgeWidget.js';
14
18
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
15
19
 
16
20
  let ChatElicitationContentPart = class ChatElicitationContentPart extends Disposable {
@@ -26,7 +30,9 @@ let ChatElicitationContentPart = class ChatElicitationContentPart extends Dispos
26
30
  instantiationService,
27
31
  chatAccessibilityService,
28
32
  contextKeyService,
29
- keybindingService
33
+ keybindingService,
34
+ languageModelToolsService,
35
+ riskAssessmentService
30
36
  ) {
31
37
  super();
32
38
  this.elicitation = elicitation;
@@ -34,6 +40,8 @@ let ChatElicitationContentPart = class ChatElicitationContentPart extends Dispos
34
40
  this.chatAccessibilityService = chatAccessibilityService;
35
41
  this.contextKeyService = contextKeyService;
36
42
  this.keybindingService = keybindingService;
43
+ this.languageModelToolsService = languageModelToolsService;
44
+ this.riskAssessmentService = riskAssessmentService;
37
45
  const buttons = [];
38
46
  if (elicitation.kind === "elicitation2") {
39
47
  const acceptTooltip = this.keybindingService.appendKeybinding(elicitation.acceptButtonLabel, AcceptElicitationRequestActionId);
@@ -72,6 +80,7 @@ let ChatElicitationContentPart = class ChatElicitationContentPart extends Dispos
72
80
  subtitle: elicitation.subtitle,
73
81
  buttons,
74
82
  message: this.getMessageToRender(elicitation),
83
+ footerBanner: this._createRiskBadge(elicitation),
75
84
  toolbarData: {
76
85
  partType: "elicitation",
77
86
  partSource: elicitation.source?.type,
@@ -83,7 +92,11 @@ let ChatElicitationContentPart = class ChatElicitationContentPart extends Dispos
83
92
  confirmationWidget.setShowButtons(
84
93
  elicitation.kind === "elicitation2" && elicitation.state.get() === ElicitationState.Pending
85
94
  );
86
- this._register(confirmationWidget.onDidClick(async e => {
95
+ this._register(confirmationWidget.onDidClick(async (
96
+ {
97
+ button: e
98
+ }
99
+ ) => {
87
100
  if (elicitation.kind !== "elicitation2") {
88
101
  return;
89
102
  }
@@ -116,6 +129,46 @@ let ChatElicitationContentPart = class ChatElicitationContentPart extends Dispos
116
129
  messageMd.appendCodeblock("json", JSON.stringify(elicitation.acceptedResult, null, 2));
117
130
  return messageMd;
118
131
  }
132
+ _createRiskBadge(elicitation) {
133
+ if (elicitation.kind !== "elicitation2" || !elicitation.riskAssessment) {
134
+ return undefined;
135
+ }
136
+ if (!this.riskAssessmentService.isEnabled()) {
137
+ return undefined;
138
+ }
139
+ const {
140
+ toolId,
141
+ parameters
142
+ } = elicitation.riskAssessment;
143
+ const tool = this.languageModelToolsService.getTool(toolId);
144
+ if (!tool) {
145
+ return undefined;
146
+ }
147
+ const widget = this._register(this.instantiationService.createInstance(ToolRiskBadgeWidget));
148
+ const cached = this.riskAssessmentService.getCached(tool, parameters);
149
+ if (cached) {
150
+ widget.setAssessment(cached);
151
+ } else {
152
+ widget.setLoading();
153
+ const cts = this._register(( new CancellationTokenSource()));
154
+ (async () => {
155
+ try {
156
+ const result = await this.riskAssessmentService.assess(tool, parameters, cts.token);
157
+ if (cts.token.isCancellationRequested) {
158
+ return;
159
+ }
160
+ if (!result) {
161
+ widget.setHidden();
162
+ return;
163
+ }
164
+ widget.setAssessment(result);
165
+ } catch {
166
+ widget.setHidden();
167
+ }
168
+ })();
169
+ }
170
+ return widget.domNode;
171
+ }
119
172
  hasSameContent(other) {
120
173
  return other === this.elicitation;
121
174
  }
@@ -123,6 +176,6 @@ let ChatElicitationContentPart = class ChatElicitationContentPart extends Dispos
123
176
  this._register(disposable);
124
177
  }
125
178
  };
126
- ChatElicitationContentPart = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IChatAccessibilityService)), ( __param(4, IContextKeyService)), ( __param(5, IKeybindingService))], ChatElicitationContentPart));
179
+ ChatElicitationContentPart = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IChatAccessibilityService)), ( __param(4, IContextKeyService)), ( __param(5, IKeybindingService)), ( __param(6, ILanguageModelToolsService)), ( __param(7, IChatToolRiskAssessmentService))], ChatElicitationContentPart));
127
180
 
128
181
  export { ChatElicitationContentPart };
@@ -30,7 +30,7 @@ let ChatExtensionsContentPart = class ChatExtensionsContentPart extends Disposab
30
30
  append(
31
31
  loadingElement,
32
32
  $(ThemeIcon.asCSSSelector(ThemeIcon.modify(Codicon.loading, "spin"))),
33
- $("span.loading-message", undefined, ( localize(6815, "Loading extensions...")))
33
+ $("span.loading-message", undefined, ( localize(7062, "Loading extensions...")))
34
34
  );
35
35
  const extensionsList = append(this.domNode, $(".extensions-list"));
36
36
  const list = this._register(
@@ -20,7 +20,7 @@ let ChatHookContentPart = class ChatHookContentPart extends ChatCollapsibleConte
20
20
  const isStopped = !!hookPart.stopReason;
21
21
  const isWarning = !!hookPart.systemMessage;
22
22
  const toolName = hookPart.toolDisplayName;
23
- const title = isStopped ? (toolName ? ( localize(6816, "Blocked {0} - {1} hook", toolName, hookTypeLabel)) : ( localize(6817, "Blocked by {0} hook", hookTypeLabel))) : (toolName ? ( localize(6818, "Warning for {0} - {1} hook", toolName, hookTypeLabel)) : ( localize(6819, "Warning from {0} hook", hookTypeLabel)));
23
+ const title = isStopped ? (toolName ? ( localize(7063, "Blocked {0} - {1} hook", toolName, hookTypeLabel)) : ( localize(7064, "Blocked by {0} hook", hookTypeLabel))) : (toolName ? ( localize(7065, "Warning for {0} - {1} hook", toolName, hookTypeLabel)) : ( localize(7066, "Warning from {0} hook", hookTypeLabel)));
24
24
  super(title, context, undefined, hoverService, configurationService);
25
25
  this.hookPart = hookPart;
26
26
  this.icon = isStopped ? Codicon.error : isWarning ? Codicon.warning : Codicon.check;
@@ -19,5 +19,5 @@ export declare function lastBlockBoundary(text: string): number;
19
19
  */
20
20
  export declare class ParagraphBuffer implements IIncrementalRenderingBuffer {
21
21
  readonly handlesFlush = false;
22
- getRenderable(fullMarkdown: string, lastRendered: string): string;
22
+ getRenderable(fullMarkdown: string, _lastRendered: string): string;
23
23
  }
@@ -22,10 +22,10 @@ class ParagraphBuffer {
22
22
  constructor() {
23
23
  this.handlesFlush = false;
24
24
  }
25
- getRenderable(fullMarkdown, lastRendered) {
25
+ getRenderable(fullMarkdown, _lastRendered) {
26
26
  const lastBlock = lastBlockBoundary(fullMarkdown);
27
27
  let renderable = lastBlock === -1
28
- ? lastRendered
28
+ ? fullMarkdown
29
29
  : fullMarkdown.slice(0, lastBlock + 2);
30
30
  if (fullMarkdown.length - renderable.length > MAX_BUFFERED_CHARS) {
31
31
  renderable = fullMarkdown;
@@ -54,7 +54,9 @@ export declare class IncrementalDOMMorpher extends Disposable {
54
54
  setRenderCallback(cb: (newMarkdown: string) => void): void;
55
55
  /**
56
56
  * Forward the stream's word-rate estimate to the active buffer
57
- * (word buffer or line buffer).
57
+ * (word buffer or line buffer). When the stream completes,
58
+ * also flushes any remaining buffered content for buffers
59
+ * that don't handle their own flushing (e.g. ParagraphBuffer).
58
60
  */
59
61
  updateStreamRate(rate: number, isComplete: boolean): void;
60
62
  /**
@@ -52,6 +52,10 @@ let IncrementalDOMMorpher = class IncrementalDOMMorpher extends Disposable {
52
52
  if (this._buffer instanceof WordBuffer) {
53
53
  this._buffer.setRate(rate, isComplete);
54
54
  }
55
+ if (isComplete && !this._buffer.handlesFlush && this._lastMarkdown.length > this._renderedMarkdown.length) {
56
+ this._pendingMarkdown = this._lastMarkdown;
57
+ this._scheduleRender();
58
+ }
55
59
  }
56
60
  seed(markdown, animateInitial) {
57
61
  this._lastMarkdown = markdown;
@@ -246,10 +246,10 @@ let InlineAnchorWidget = class InlineAnchorWidget extends Disposable {
246
246
  );
247
247
  if (location.range) {
248
248
  if (location.range.startLineNumber === location.range.endLineNumber) {
249
- element.setAttribute("aria-label", ( localize(6820, "{0} line {1}", filePathLabel, location.range.startLineNumber)));
249
+ element.setAttribute("aria-label", ( localize(7067, "{0} line {1}", filePathLabel, location.range.startLineNumber)));
250
250
  } else {
251
251
  element.setAttribute("aria-label", ( localize(
252
- 6821,
252
+ 7068,
253
253
  "{0} lines {1} to {2}",
254
254
  filePathLabel,
255
255
  location.range.startLineNumber,
@@ -319,7 +319,7 @@ registerAction2(class AddFileToChatAction extends Action2 {
319
319
  constructor() {
320
320
  super({
321
321
  id: AddFileToChatAction.id,
322
- title: ( localize2(6822, "Add File to Chat")),
322
+ title: ( localize2(7069, "Add File to Chat")),
323
323
  menu: [{
324
324
  id: MenuId.ChatInlineResourceAnchorContext,
325
325
  group: "chat",
@@ -343,7 +343,7 @@ registerAction2(class CopyResourceAction extends Action2 {
343
343
  constructor() {
344
344
  super({
345
345
  id: CopyResourceAction.id,
346
- title: ( localize2(6823, "Copy")),
346
+ title: ( localize2(7070, "Copy")),
347
347
  f1: false,
348
348
  precondition: chatAttachmentResourceContextKey,
349
349
  keybinding: {
@@ -370,7 +370,7 @@ registerAction2(class OpenToSideResourceAction extends Action2 {
370
370
  constructor() {
371
371
  super({
372
372
  id: OpenToSideResourceAction.id,
373
- title: ( localize2(6824, "Open to the Side")),
373
+ title: ( localize2(7071, "Open to the Side")),
374
374
  f1: false,
375
375
  precondition: chatAttachmentResourceContextKey,
376
376
  keybinding: {
@@ -436,8 +436,8 @@ registerAction2(class GoToDefinitionAction extends Action2 {
436
436
  super({
437
437
  id: GoToDefinitionAction.id,
438
438
  title: {
439
- ...( localize2(6825, "Go to Definition")),
440
- mnemonicTitle: ( localize(6826, "Go to &&Definition"))
439
+ ...( localize2(7072, "Go to Definition")),
440
+ mnemonicTitle: ( localize(7073, "Go to &&Definition"))
441
441
  },
442
442
  menu: ( [
443
443
  MenuId.ChatInlineSymbolAnchorContext,
@@ -494,8 +494,8 @@ registerAction2(class GoToTypeDefinitionsAction extends Action2 {
494
494
  super({
495
495
  id: GoToTypeDefinitionsAction.id,
496
496
  title: {
497
- ...( localize2(6827, "Go to Type Definitions")),
498
- mnemonicTitle: ( localize(6828, "Go to &&Type Definitions"))
497
+ ...( localize2(7074, "Go to Type Definitions")),
498
+ mnemonicTitle: ( localize(7075, "Go to &&Type Definitions"))
499
499
  },
500
500
  menu: ( [
501
501
  MenuId.ChatInlineSymbolAnchorContext,
@@ -520,8 +520,8 @@ registerAction2(class GoToImplementations extends Action2 {
520
520
  super({
521
521
  id: GoToImplementations.id,
522
522
  title: {
523
- ...( localize2(6829, "Go to Implementations")),
524
- mnemonicTitle: ( localize(6830, "Go to &&Implementations"))
523
+ ...( localize2(7076, "Go to Implementations")),
524
+ mnemonicTitle: ( localize(7077, "Go to &&Implementations"))
525
525
  },
526
526
  menu: ( [
527
527
  MenuId.ChatInlineSymbolAnchorContext,
@@ -546,8 +546,8 @@ registerAction2(class GoToReferencesAction extends Action2 {
546
546
  super({
547
547
  id: GoToReferencesAction.id,
548
548
  title: {
549
- ...( localize2(6831, "Go to References")),
550
- mnemonicTitle: ( localize(6832, "Go to &&References"))
549
+ ...( localize2(7078, "Go to References")),
550
+ mnemonicTitle: ( localize(7079, "Go to &&References"))
551
551
  },
552
552
  menu: ( [
553
553
  MenuId.ChatInlineSymbolAnchorContext,
@@ -21,6 +21,8 @@ import { ScrollbarVisibility } from '@codingame/monaco-vscode-api/vscode/vs/base
21
21
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
22
22
  import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
23
23
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
24
+ import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
25
+ import { isLocation } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages';
24
26
  import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
25
27
  import { getIconClasses } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/getIconClasses';
26
28
  import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
@@ -289,7 +291,8 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
289
291
  modeId: element.model.request?.modeInfo?.modeId,
290
292
  modelId: element.model.request?.modelId,
291
293
  applyCodeBlockSuggestionId: undefined,
292
- source: undefined
294
+ source: undefined,
295
+ sourceRequestId: undefined
293
296
  })
294
297
  };
295
298
  })));
@@ -299,8 +302,11 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
299
302
  markdownDecorationsRenderer.walkTreeAndAnnotateReferenceLinks(this.markdown, result.element)
300
303
  );
301
304
  const layoutParticipants = ( new Lazy(() => {
302
- const observer = store.add(( new DisposableResizeObserver(() => this.mathLayoutParticipants.forEach(layout => layout()))));
303
- observer.observe(this.domNode);
305
+ const observer = store.add(new DisposableResizeObserver(
306
+ "ChatMarkdownContentPart.mathLayout",
307
+ () => this.mathLayoutParticipants.forEach(layout => layout())
308
+ ));
309
+ store.add(observer.observe(this.domNode));
304
310
  return this.mathLayoutParticipants;
305
311
  }));
306
312
  for (const katexBlock of this.domNode.querySelectorAll(".katex-display")) {
@@ -379,7 +385,7 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
379
385
  if (other.kind !== "markdownContent") {
380
386
  return false;
381
387
  }
382
- if (other.content.value === this.markdown.content.value) {
388
+ if (other.content.value === this.markdown.content.value && equalsInlineReferences(other.inlineReferences, this.markdown.inlineReferences)) {
383
389
  return true;
384
390
  }
385
391
  const lastCodeblock = this._codeblocks.at(-1);
@@ -392,6 +398,9 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
392
398
  if (!this._incrementalMorpher) {
393
399
  return false;
394
400
  }
401
+ if (!equalsInlineReferences(newMarkdown.inlineReferences, this.markdown.inlineReferences)) {
402
+ return false;
403
+ }
395
404
  const success = this._incrementalMorpher.tryMorph(newMarkdown.content.value);
396
405
  if (success) {
397
406
  this.markdown = newMarkdown;
@@ -428,6 +437,55 @@ let ChatMarkdownContentPart = class ChatMarkdownContentPart extends Disposable {
428
437
  }
429
438
  };
430
439
  ChatMarkdownContentPart = ChatMarkdownContentPart_1 = ( __decorate([( __param(9, IContextKeyService)), ( __param(10, IConfigurationService)), ( __param(11, IInstantiationService)), ( __param(12, IAiEditTelemetryService))], ChatMarkdownContentPart));
440
+ function equalsInlineReferences(a, b) {
441
+ if (a === b) {
442
+ return true;
443
+ }
444
+ if (!a || !b) {
445
+ return !a && !b;
446
+ }
447
+ const aKeys = ( Object.keys(a));
448
+ const bKeys = ( Object.keys(b));
449
+ if (aKeys.length !== bKeys.length) {
450
+ return false;
451
+ }
452
+ return aKeys.every(key => equalsInlineReference(a[key], b[key]));
453
+ }
454
+ function equalsInlineReference(a, b) {
455
+ if (!a || !b) {
456
+ return !a && !b;
457
+ }
458
+ return a.resolveId === b.resolveId && a.name === b.name && equalsInlineReferenceValue(a.inlineReference, b.inlineReference);
459
+ }
460
+ const workspaceSymbolComparers = {
461
+ name: (a, b) => a.name === b.name,
462
+ containerName: (a, b) => a.containerName === b.containerName,
463
+ kind: (a, b) => a.kind === b.kind,
464
+ tags: (a, b) => equalsSymbolTags(a.tags, b.tags),
465
+ location: (a, b) => isEqual(a.location.uri, b.location.uri) && Range.equalsRange(a.location.range, b.location.range)
466
+ };
467
+ const workspaceSymbolComparerKeys = ( Object.keys(workspaceSymbolComparers));
468
+ function equalsInlineReferenceValue(a, b) {
469
+ if (URI.isUri(a) || URI.isUri(b)) {
470
+ return URI.isUri(a) && URI.isUri(b) && isEqual(a, b);
471
+ }
472
+ if (isLocation(a) || isLocation(b)) {
473
+ return isLocation(a) && isLocation(b) && isEqual(a.uri, b.uri) && Range.equalsRange(a.range, b.range);
474
+ }
475
+ return equalsWorkspaceSymbol(a, b);
476
+ }
477
+ function equalsWorkspaceSymbol(a, b) {
478
+ return workspaceSymbolComparerKeys.every(key => workspaceSymbolComparers[key](a, b));
479
+ }
480
+ function equalsSymbolTags(a, b) {
481
+ if (a === b) {
482
+ return true;
483
+ }
484
+ if (!a || !b || a.length !== b.length) {
485
+ return false;
486
+ }
487
+ return a.every((tag, index) => tag === b[index]);
488
+ }
431
489
  function codeblockHasClosingBackticks(str) {
432
490
  str = str.trim();
433
491
  return !!str.match(/\n```+$/);
@@ -573,7 +631,7 @@ let CollapsedCodeBlock = class CollapsedCodeBlock extends Disposable {
573
631
  statusIconEl.classList.add(...statusIconClasses);
574
632
  const entry = editSession.readEntry(uri, r);
575
633
  const rwRatio = Math.floor((entry?.rewriteRatio.read(r) || 0) * 100);
576
- statusLabelEl.textContent = ( localize(6833, "Applying edits"));
634
+ statusLabelEl.textContent = ( localize(7080, "Applying edits"));
577
635
  const showAnimation = this.configurationService.getValue(ChatConfiguration.ShowCodeBlockProgressAnimation);
578
636
  if (showAnimation) {
579
637
  progressFill.style.width = `${rwRatio}%`;
@@ -582,13 +640,13 @@ let CollapsedCodeBlock = class CollapsedCodeBlock extends Disposable {
582
640
  } else {
583
641
  progressFill.style.width = "0%";
584
642
  this.pillElement.classList.remove("progress-filling");
585
- labelDetail.textContent = rwRatio === 0 || !rwRatio ? ( localize(6834, "Generating edits...")) : ( localize(6835, "({0}%)...", rwRatio));
643
+ labelDetail.textContent = rwRatio === 0 || !rwRatio ? ( localize(7081, "Generating edits...")) : ( localize(7082, "({0}%)...", rwRatio));
586
644
  }
587
645
  } else {
588
646
  const statusCodeicon = Codicon.check;
589
647
  statusIconClasses = ThemeIcon.asClassNameArray(statusCodeicon);
590
648
  statusIconEl.classList.add(...statusIconClasses);
591
- statusLabelEl.textContent = ( localize(6836, "Edited"));
649
+ statusLabelEl.textContent = ( localize(7083, "Edited"));
592
650
  const fileKind = uri.path.endsWith("/") ? FileKind.FOLDER : FileKind.FILE;
593
651
  pillIconClasses = getIconClasses(this.modelService, this.languageService, uri, fileKind);
594
652
  iconEl.classList.add(...pillIconClasses);
@@ -609,10 +667,10 @@ let CollapsedCodeBlock = class CollapsedCodeBlock extends Disposable {
609
667
  this._onDidChangeDiff.fire(changes);
610
668
  labelAdded.textContent = `+${changes.added}`;
611
669
  labelRemoved.textContent = `-${changes.removed}`;
612
- const insertionsFragment = changes.added === 1 ? ( localize(6837, "1 insertion")) : ( localize(6838, "{0} insertions", changes.added));
613
- const deletionsFragment = changes.removed === 1 ? ( localize(6839, "1 deletion")) : ( localize(6840, "{0} deletions", changes.removed));
670
+ const insertionsFragment = changes.added === 1 ? ( localize(7084, "1 insertion")) : ( localize(7085, "{0} insertions", changes.added));
671
+ const deletionsFragment = changes.removed === 1 ? ( localize(7086, "1 deletion")) : ( localize(7087, "{0} deletions", changes.removed));
614
672
  const summary = ( localize(
615
- 6841,
673
+ 7088,
616
674
  "Edited {0}, {1}, {2}",
617
675
  iconText,
618
676
  insertionsFragment,
@@ -92,25 +92,25 @@ let ChatMcpServersInteractionContentPart = class ChatMcpServersInteractionConten
92
92
  text: "`" + escapeMarkdownSyntaxTokens(s.label) + "`",
93
93
  id: McpCommandIds.ServerOptions,
94
94
  arguments: [s.id],
95
- tooltip: ( localize(6842, "Show options for {0}", s.label))
95
+ tooltip: ( localize(7089, "Show options for {0}", s.label))
96
96
  }, false))).join(", ");
97
97
  }
98
98
  updateDetailedProgress(state) {
99
99
  const skipText = createMarkdownCommandLink({
100
- text: ( localize(6843, "Skip?")),
100
+ text: ( localize(7090, "Skip?")),
101
101
  id: McpCommandIds.SkipCurrentAutostart,
102
- tooltip: ( localize(6844, "Skip starting this MCP server"))
102
+ tooltip: ( localize(7091, "Skip starting this MCP server"))
103
103
  });
104
104
  let content;
105
105
  if (state.starting.length === 0) {
106
106
  content = ( new MarkdownString(undefined, {
107
107
  isTrusted: true
108
- })).appendText(( localize(6845, "Activating MCP extensions...")) + " ").appendMarkdown(skipText);
108
+ })).appendText(( localize(7092, "Activating MCP extensions...")) + " ").appendMarkdown(skipText);
109
109
  } else {
110
110
  const serverLinks = this.createServerCommandLinks(state.starting);
111
111
  content = ( new MarkdownString(undefined, {
112
112
  isTrusted: true
113
- })).appendMarkdown(( localize(6846, "Starting MCP servers {0}...", serverLinks)) + " ").appendMarkdown(skipText);
113
+ })).appendMarkdown(( localize(7093, "Starting MCP servers {0}...", serverLinks)) + " ").appendMarkdown(skipText);
114
114
  }
115
115
  if (this.workingProgressPart) {
116
116
  this.workingProgressPart.updateMessage(content);
@@ -149,12 +149,12 @@ let ChatMcpServersInteractionContentPart = class ChatMcpServersInteractionConten
149
149
  const count = serversRequiringInteraction.length;
150
150
  const links = this.createServerCommandLinks(serversRequiringInteraction);
151
151
  const content = count === 1 ? ( localize(
152
- 6847,
152
+ 7094,
153
153
  "The MCP server {0} may have new tools and requires interaction to start. [Start it now?]({1})",
154
154
  links,
155
155
  "#start"
156
156
  )) : ( localize(
157
- 6848,
157
+ 7095,
158
158
  "The MCP servers {0} may have new tools and require interaction to start. [Start them now?]({1})",
159
159
  links,
160
160
  "#start"
@@ -196,7 +196,7 @@ let ChatMcpServersInteractionContentPart = class ChatMcpServersInteractionConten
196
196
  const serversToStart = state.serversRequiringInteraction;
197
197
  for (let i = 0; i < serversToStart.length; i++) {
198
198
  const serverInfo = serversToStart[i];
199
- startLink.textContent = ( localize(6849, "Starting {0}...", serverInfo.label));
199
+ startLink.textContent = ( localize(7096, "Starting {0}...", serverInfo.label));
200
200
  const server = this.mcpService.servers.get().find(s => s.definition.id === serverInfo.id);
201
201
  if (server) {
202
202
  await startServerAndWaitForLiveTools(server, {
@@ -64,7 +64,7 @@ let ChatMultiDiffContentPart = class ChatMultiDiffContentPart extends Disposable
64
64
  const viewListButton = ( new ButtonWithIcon(viewListButtonContainer, {}));
65
65
  this._register(autorun(reader => {
66
66
  const fileCount = this.diffData.read(reader).resources.length;
67
- viewListButton.label = fileCount === 1 ? ( localize(6850, "Changed 1 file")) : ( localize(6851, "Changed {0} files", fileCount));
67
+ viewListButton.label = fileCount === 1 ? ( localize(7097, "Changed 1 file")) : ( localize(7098, "Changed {0} files", fileCount));
68
68
  }));
69
69
  const setExpansionState = () => {
70
70
  viewListButton.icon = this.isCollapsed ? Codicon.chevronRight : Codicon.chevronDown;
@@ -86,7 +86,7 @@ let ChatMultiDiffContentPart = class ChatMultiDiffContentPart extends Disposable
86
86
  renderViewAllFileChangesButton(container) {
87
87
  const button = container.appendChild($(".chat-view-changes-icon"));
88
88
  button.classList.add(...ThemeIcon.asClassNameArray(Codicon.diffMultiple));
89
- button.title = ( localize(6852, "Open Changes"));
89
+ button.title = ( localize(7099, "Open Changes"));
90
90
  return addDisposableListener(button, "click", e => {
91
91
  const source = ( URI.parse(`multi-diff-editor:${( ( new Date()).getMilliseconds().toString()) + ( Math.random().toString())}`));
92
92
  const {
@@ -143,7 +143,7 @@ let ChatMultiDiffContentPart = class ChatMultiDiffContentPart extends Disposable
143
143
  alwaysConsumeMouseWheel: false,
144
144
  accessibilityProvider: {
145
145
  getAriaLabel: element => element.uri.path,
146
- getWidgetAriaLabel: () => ( localize(6853, "File Changes"))
146
+ getWidgetAriaLabel: () => ( localize(7100, "File Changes"))
147
147
  }
148
148
  })
149
149
  );
@@ -259,7 +259,7 @@ class ChatMultiDiffListRenderer {
259
259
  const removedElement = changesSummary.appendChild($(".deletions"));
260
260
  removedElement.textContent = `-${element.diff.removed}`;
261
261
  changesSummary.setAttribute("aria-label", ( localize(
262
- 6854,
262
+ 7101,
263
263
  "{0} lines added, {1} lines removed",
264
264
  element.diff.added,
265
265
  element.diff.removed
@@ -1,11 +1,18 @@
1
1
  import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
2
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
+ import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
4
+ import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
5
+ import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
3
6
  import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
4
7
  import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
5
8
  import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
9
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
10
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
6
11
  import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
7
12
  import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
13
+ import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
8
14
  import { IChatPlanReview, IChatPlanReviewResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
15
+ import { IPlanReviewFeedbackService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.service";
9
16
  import { IChatRendererContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel";
10
17
  import { ChatTreeItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
11
18
  import { IChatContentPart, IChatContentPartRenderContext } from "./chatContentParts.js";
@@ -20,10 +27,19 @@ export declare class ChatPlanReviewPart extends Disposable implements IChatConte
20
27
  private readonly _dialogService;
21
28
  private readonly _editorService;
22
29
  private readonly _hoverService;
30
+ private readonly _planReviewFeedbackService;
31
+ private readonly _instantiationService;
32
+ private readonly _textFileService;
33
+ private readonly _modelService;
34
+ private readonly _textModelService;
35
+ private readonly _languageService;
36
+ private readonly _configurationService;
23
37
  readonly domNode: HTMLElement;
24
38
  private readonly _onDidChangeHeight;
25
39
  readonly onDidChangeHeight: Event<void>;
26
40
  private readonly _buttonStore;
41
+ private _submitButton;
42
+ private _renderedSubmitInlineCount;
27
43
  private readonly _messageContentDisposables;
28
44
  private readonly _titleActionsEl;
29
45
  private readonly _inlineActionsEl;
@@ -32,26 +48,66 @@ export declare class ChatPlanReviewPart extends Disposable implements IChatConte
32
48
  private readonly _messageScrollable;
33
49
  private readonly _collapseButton;
34
50
  private readonly _restoreButton;
51
+ private _reviewButton;
35
52
  private _isCollapsed;
36
53
  private _isExpanded;
37
54
  private _isSubmitted;
38
55
  private _selectedAction;
39
56
  private _feedbackTextarea;
40
57
  private _feedbackSection;
58
+ private _commentsListEl;
59
+ private _commentsListScrollable;
60
+ private _clearAllButtonEl;
41
61
  private _isFeedbackMode;
42
- constructor(review: IChatPlanReview, context: IChatContentPartRenderContext, _options: IChatPlanReviewPartOptions, _markdownRendererService: IMarkdownRendererService, _contextMenuService: IContextMenuService, _dialogService: IDialogService, _editorService: IEditorService, _hoverService: IHoverService);
62
+ private readonly _planReviewRegistration;
63
+ private readonly _commentRowDisposables;
64
+ private _inlineEditorMountId;
65
+ private _suppressFeedbackModeAutoOpen;
66
+ private _messageEditor;
67
+ private _editingUri;
68
+ private _initialEditorContent;
69
+ private readonly _messageEditorDisposables;
70
+ constructor(review: IChatPlanReview, context: IChatContentPartRenderContext, _options: IChatPlanReviewPartOptions, _markdownRendererService: IMarkdownRendererService, _contextMenuService: IContextMenuService, _dialogService: IDialogService, _editorService: IEditorService, _hoverService: IHoverService, _planReviewFeedbackService: IPlanReviewFeedbackService, _instantiationService: IInstantiationService, _textFileService: ITextFileService, _modelService: IModelService, _textModelService: ITextModelService, _languageService: ILanguageService, _configurationService: IConfigurationService);
43
71
  hasSameContent(other: IChatRendererContent, _followingContent: IChatRendererContent[], _element: ChatTreeItem): boolean;
44
72
  private renderMarkdown;
45
73
  private renderFeedback;
74
+ private renderCommentsList;
75
+ private getCommentUri;
76
+ private getInlineFeedbackItems;
77
+ private revealInlineComment;
78
+ private removeInlineComment;
79
+ private clearAllInlineFeedback;
80
+ private getFeedbackUris;
81
+ private onInlineFeedbackChanged;
82
+ /**
83
+ * Render the action buttons into the active container (footer when
84
+ * expanded, inline title slot when collapsed). Clears the inactive slot
85
+ * so the same buttons can never appear in two places at once.
86
+ */
87
+ private renderCurrentActionButtons;
46
88
  private renderActionButtons;
89
+ private canSubmitFeedback;
90
+ private computeSubmitLabel;
91
+ /**
92
+ * Update the cached Submit button's enabled state and label without
93
+ * destroying the button row. Cheap enough to run on every keystroke.
94
+ */
95
+ private updateSubmitButtonState;
47
96
  private toggleCollapsed;
48
97
  private toggleExpanded;
49
98
  private updateCollapsedPresentation;
50
99
  private updateExpandedPresentation;
51
- private openPlanFile;
100
+ private enterReviewMode;
52
101
  private submitApproval;
53
102
  private submitRejection;
54
103
  private enterFeedbackMode;
104
+ private exitFeedbackMode;
105
+ private focusFeedbackInput;
106
+ private mountInlineEditor;
107
+ private canContinueInlineEditorMount;
108
+ private isInlineEditorEnabled;
109
+ private migrateInlineFeedbackToPlan;
110
+ private unmountInlineEditor;
55
111
  private submitFeedback;
56
112
  private confirmAutopilot;
57
113
  private markUsed;