@codingame/monaco-vscode-katex-common 30.0.0 → 31.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 (276) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/platform/actions/browser/actionbar.d.ts +16 -0
  3. package/vscode/src/vs/platform/actions/browser/actionbar.js +22 -0
  4. package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -2
  5. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +50 -0
  6. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +138 -0
  7. package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +12 -0
  8. package/vscode/src/vs/platform/networkFilter/common/settings.js +14 -0
  9. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +18 -0
  10. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +13 -0
  11. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +73 -0
  12. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +10 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +3 -1
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +51 -24
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +2 -1
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +64 -72
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +2 -1
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -14
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
  23. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +17 -18
  25. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +5 -2
  26. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +5 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +73 -9
  28. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
  29. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +32 -32
  30. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.d.ts +1 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +20 -2
  32. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +1 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +73 -49
  34. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +12 -12
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +0 -6
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +41 -99
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +2 -1
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +13 -9
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
  42. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +14 -15
  43. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.d.ts +11 -12
  45. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +339 -161
  46. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +9 -2
  47. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  48. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  49. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +9 -4
  50. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +33 -5
  51. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +43 -1
  54. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +147 -2
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +4 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +55 -6
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +1 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +7 -5
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +1 -3
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +42 -10
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/animation.d.ts +18 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/animationRegistry.d.ts +15 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/animationRegistry.js +16 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/blockAnimations.d.ts +13 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/blockAnimations.js +33 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/buffer.d.ts +46 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/bufferRegistry.d.ts +11 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/bufferRegistry.js +12 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/offBuffer.d.ts +9 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/offBuffer.js +12 -0
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.d.ts +23 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.js +37 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/wordBuffer.d.ts +34 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/wordBuffer.js +68 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.d.ts +77 -0
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.js +170 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/media/chatIncrementalRendering.css +112 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +3 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +26 -16
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +24 -6
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +111 -145
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.d.ts +58 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +425 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +16 -7
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +68 -25
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +5 -1
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +101 -45
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +6 -6
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +36 -4
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +217 -25
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +6 -6
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +23 -3
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +168 -60
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +10 -10
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +18 -17
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +1 -5
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +7 -18
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +1 -5
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +7 -19
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +24 -19
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +104 -78
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +11 -2
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css +257 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +19 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +30 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +1 -1
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +12 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatToolConfirmationCarousel.css +286 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +2 -2
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +15 -11
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +1 -7
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +25 -47
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +29 -53
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +258 -321
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.d.ts +53 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +392 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +1 -3
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +24 -30
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +2 -3
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +9 -8
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +5 -5
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +6 -3
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +2 -3
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +38 -11
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +577 -113
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +0 -7
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +4 -7
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +1 -8
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +58 -75
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +44 -12
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +362 -188
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +0 -2
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +4 -5
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +42 -95
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +2 -1
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +9 -10
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +57 -38
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +21 -15
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/{modelPickerActionItem2.js → modelPickerActionItem.js} +5 -7
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +38 -31
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +4 -5
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +94 -40
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
  166. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +16 -0
  167. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +218 -0
  168. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +7 -7
  169. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +6 -1
  170. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
  171. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +12 -21
  172. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -32
  173. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +355 -156
  174. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +2 -13
  175. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +72 -65
  176. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +4 -43
  177. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +238 -204
  178. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +4 -19
  179. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +128 -115
  180. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +6 -9
  181. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +152 -49
  182. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +64 -0
  183. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +40 -40
  184. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  185. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  186. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  187. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
  188. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
  189. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
  190. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
  191. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
  192. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
  193. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
  194. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  195. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  196. package/vscode/src/vs/workbench/contrib/terminal/terminalContribChatExports.d.ts +2 -0
  197. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +2 -0
  198. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +41 -0
  199. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
  200. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
  201. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
  202. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +45 -0
  203. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +165 -0
  204. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +53 -0
  205. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +163 -0
  206. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +27 -0
  207. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +142 -0
  208. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +29 -0
  209. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +144 -0
  210. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +40 -0
  211. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +174 -0
  212. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +7 -0
  213. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +43 -0
  214. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +42 -0
  215. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +256 -0
  216. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +42 -0
  217. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +94 -0
  218. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +42 -0
  219. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +221 -0
  220. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +31 -0
  221. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +392 -0
  222. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
  223. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +243 -0
  224. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +52 -0
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +20 -0
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +310 -0
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +19 -0
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +168 -0
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +11 -0
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +33 -0
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +13 -0
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +22 -0
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +22 -0
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +47 -0
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +27 -0
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +29 -0
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +24 -0
  250. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -0
  251. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +32 -0
  252. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +108 -0
  253. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +412 -0
  254. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +42 -0
  255. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +23 -0
  256. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +9 -0
  257. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +192 -0
  258. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +2258 -0
  259. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +22 -0
  260. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +43 -0
  261. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +17 -0
  262. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +118 -0
  263. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.d.ts +22 -0
  264. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.js +44 -0
  265. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +1 -0
  266. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +25 -0
  267. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +141 -0
  268. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +85 -0
  269. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +608 -0
  270. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +0 -40
  271. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +0 -196
  272. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +0 -29
  273. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +0 -46
  274. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +0 -215
  275. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +0 -18
  276. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +0 -107
@@ -28,7 +28,7 @@ let ChatAgentCommandContentPart = class ChatAgentCommandContentPart extends Disp
28
28
  }, {
29
29
  groupId
30
30
  }));
31
- const rerun = ( localize(6717, "Rerun without {0}{1}", chatSubcommandLeader, cmd.name));
31
+ const rerun = ( localize(6803, "Rerun without {0}{1}", chatSubcommandLeader, cmd.name));
32
32
  const btn = ( new Button(this.domNode, {
33
33
  ariaLabel: rerun
34
34
  }));
@@ -21,14 +21,14 @@ let ChatAnonymousRateLimitedPart = class ChatAnonymousRateLimitedPart extends Di
21
21
  const messageContainer = append(this.domNode, $(".chat-rate-limited-message"));
22
22
  const message = append(messageContainer, $("div"));
23
23
  message.textContent = ( localize(
24
- 6718,
24
+ 6804,
25
25
  "Continue the conversation by signing in. Your free account gets 50 premium requests a month plus access to more models and AI features."
26
26
  ));
27
27
  const signInButton = this._register(( new Button(messageContainer, {
28
28
  ...defaultButtonStyles,
29
29
  supportIcons: true
30
30
  })));
31
- signInButton.label = ( localize(6719, "Enable more AI features"));
31
+ signInButton.label = ( localize(6805, "Enable more AI features"));
32
32
  signInButton.element.classList.add("chat-rate-limited-button");
33
33
  this._register(signInButton.onDidClick(async () => {
34
34
  const commandId = "workbench.action.chat.triggerSetup";
@@ -2,15 +2,18 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
2
2
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
3
3
  import { IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries";
4
4
  import { IChatContentReference } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
5
+ import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
5
6
  import { IChatAttachmentWidgetRegistry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.service";
6
7
  export interface IChatAttachmentsContentPartOptions {
7
8
  readonly variables: readonly IChatRequestVariableEntry[];
8
9
  readonly contentReferences?: ReadonlyArray<IChatContentReference>;
10
+ readonly modelId?: string;
9
11
  readonly domNode?: HTMLElement;
10
12
  readonly limit?: number;
11
13
  }
12
14
  export declare class ChatAttachmentsContentPart extends Disposable {
13
15
  private readonly instantiationService;
16
+ private readonly languageModelsService;
14
17
  private readonly chatAttachmentWidgetRegistry;
15
18
  private readonly attachedContextDisposables;
16
19
  private readonly _onDidChangeVisibility;
@@ -18,10 +21,11 @@ export declare class ChatAttachmentsContentPart extends Disposable {
18
21
  private _showingAll;
19
22
  private _variables;
20
23
  private readonly contentReferences;
24
+ private readonly modelId?;
21
25
  private readonly limit?;
22
26
  readonly domNode: HTMLElement | undefined;
23
27
  contextMenuHandler?: (attachment: IChatRequestVariableEntry, event: MouseEvent) => void;
24
- constructor(options: IChatAttachmentsContentPartOptions, instantiationService: IInstantiationService, chatAttachmentWidgetRegistry: IChatAttachmentWidgetRegistry);
28
+ constructor(options: IChatAttachmentsContentPartOptions, instantiationService: IInstantiationService, languageModelsService: ILanguageModelsService, chatAttachmentWidgetRegistry: IChatAttachmentWidgetRegistry);
25
29
  /**
26
30
  * Update the variables and re-render the attachments in place.
27
31
  */
@@ -29,11 +33,12 @@ export declare class ChatAttachmentsContentPart extends Disposable {
29
33
  private initAttachedContext;
30
34
  private getVisibleAttachments;
31
35
  /**
32
- * When the total number of image attachments exceeds the per-request limit,
33
- * mark the oldest images (those that will be dropped by the backend) with
34
- * {@link OmittedState.ImageLimitExceeded}.
36
+ * When the total number of image attachments exceeds the model-specific
37
+ * per-request limit, mark the oldest images (those dropped by the backend)
38
+ * with {@link OmittedState.ImageLimitExceeded}.
35
39
  */
36
40
  private markImageLimitExceeded;
41
+ private getImageLimitForCurrentModel;
37
42
  private renderShowMoreButton;
38
43
  private renderAttachment;
39
44
  }
@@ -8,21 +8,29 @@ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
8
8
  import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
9
9
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
10
10
  import { ResourceLabels } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/labels';
11
- import { isImageVariableEntry, MAX_IMAGES_PER_REQUEST, OmittedState, isElementVariableEntry, isPromptFileVariableEntry, isPromptTextVariableEntry, isTerminalVariableEntry, isPasteVariableEntry, isNotebookOutputVariableEntry, isSCMHistoryItemVariableEntry, isSCMHistoryItemChangeVariableEntry, isSCMHistoryItemChangeRangeVariableEntry, isWorkspaceVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
11
+ import { isImageVariableEntry, OmittedState, getImageAttachmentLimit, isElementVariableEntry, isPromptFileVariableEntry, isPromptTextVariableEntry, isTerminalVariableEntry, isPasteVariableEntry, isNotebookOutputVariableEntry, isSCMHistoryItemVariableEntry, isSCMHistoryItemChangeVariableEntry, isSCMHistoryItemChangeRangeVariableEntry, isWorkspaceVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
12
12
  import { ChatResponseReferencePartStatusKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
13
+ import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
13
14
  import { ToolSetOrToolItemAttachmentWidget, ElementChatAttachmentWidget, ImageAttachmentWidget, PromptFileAttachmentWidget, PromptTextAttachmentWidget, FileAttachmentWidget, TerminalCommandAttachmentWidget, PasteAttachmentWidget, NotebookCellOutputChatAttachmentWidget, SCMHistoryItemAttachmentWidget, SCMHistoryItemChangeAttachmentWidget, SCMHistoryItemChangeRangeAttachmentWidget, DefaultChatAttachmentWidget } from '../../attachments/chatAttachmentWidgets.js';
14
15
  import { IChatAttachmentWidgetRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.service';
15
16
 
16
17
  let ChatAttachmentsContentPart = class ChatAttachmentsContentPart extends Disposable {
17
- constructor(options, instantiationService, chatAttachmentWidgetRegistry) {
18
+ constructor(
19
+ options,
20
+ instantiationService,
21
+ languageModelsService,
22
+ chatAttachmentWidgetRegistry
23
+ ) {
18
24
  super();
19
25
  this.instantiationService = instantiationService;
26
+ this.languageModelsService = languageModelsService;
20
27
  this.chatAttachmentWidgetRegistry = chatAttachmentWidgetRegistry;
21
28
  this.attachedContextDisposables = this._register(( new DisposableStore()));
22
29
  this._onDidChangeVisibility = this._register(( new Emitter()));
23
30
  this._showingAll = false;
24
31
  this._variables = options.variables;
25
32
  this.contentReferences = options.contentReferences ?? [];
33
+ this.modelId = options.modelId;
26
34
  this.limit = options.limit;
27
35
  this.domNode = options.domNode ?? $(".chat-attached-context");
28
36
  this._contextResourceLabels = this._register(this.instantiationService.createInstance(ResourceLabels, {
@@ -60,15 +68,35 @@ let ChatAttachmentsContentPart = class ChatAttachmentsContentPart extends Dispos
60
68
  }
61
69
  markImageLimitExceeded(attachments) {
62
70
  const imageAttachments = attachments.filter(isImageVariableEntry);
63
- if (imageAttachments.length <= MAX_IMAGES_PER_REQUEST) {
71
+ const maxImagesPerRequest = this.getImageLimitForCurrentModel();
72
+ if (maxImagesPerRequest === undefined) {
64
73
  return;
65
74
  }
66
- const excessCount = imageAttachments.length - MAX_IMAGES_PER_REQUEST;
75
+ if (imageAttachments.length <= maxImagesPerRequest) {
76
+ for (const attachment of imageAttachments) {
77
+ if (attachment.omittedState === OmittedState.ImageLimitExceeded) {
78
+ attachment.omittedState = OmittedState.NotOmitted;
79
+ }
80
+ }
81
+ return;
82
+ }
83
+ const excessCount = imageAttachments.length - maxImagesPerRequest;
67
84
  for (let i = 0; i < excessCount; i++) {
68
85
  if (imageAttachments[i].omittedState === OmittedState.NotOmitted || imageAttachments[i].omittedState === OmittedState.ImageLimitExceeded) {
69
86
  imageAttachments[i].omittedState = OmittedState.ImageLimitExceeded;
70
87
  }
71
88
  }
89
+ for (let i = excessCount; i < imageAttachments.length; i++) {
90
+ if (imageAttachments[i].omittedState === OmittedState.ImageLimitExceeded) {
91
+ imageAttachments[i].omittedState = OmittedState.NotOmitted;
92
+ }
93
+ }
94
+ }
95
+ getImageLimitForCurrentModel() {
96
+ if (!this.modelId) {
97
+ return undefined;
98
+ }
99
+ return getImageAttachmentLimit(this.languageModelsService.lookupLanguageModel(this.modelId));
72
100
  }
73
101
  renderShowMoreButton(container) {
74
102
  const remainingCount = this._variables.length - (this.limit ?? 0);
@@ -237,6 +265,6 @@ let ChatAttachmentsContentPart = class ChatAttachmentsContentPart extends Dispos
237
265
  this.attachedContextDisposables.add(widget);
238
266
  }
239
267
  };
240
- ChatAttachmentsContentPart = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IChatAttachmentWidgetRegistry))], ChatAttachmentsContentPart));
268
+ ChatAttachmentsContentPart = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, ILanguageModelsService)), ( __param(3, IChatAttachmentWidgetRegistry))], ChatAttachmentsContentPart));
241
269
 
242
270
  export { ChatAttachmentsContentPart };
@@ -93,7 +93,7 @@ let ChatCheckpointFileChangesSummaryContentPart = class ChatCheckpointFileChange
93
93
  renderViewAllFileChangesButton(container) {
94
94
  const button = container.appendChild($(".chat-view-changes-icon"));
95
95
  const hoverDisposable = this.hoverService.setupDelayedHover(button, () => ({
96
- content: ( localize2(6720, "View All File Changes"))
96
+ content: ( localize2(6806, "View All File Changes"))
97
97
  }));
98
98
  button.classList.add(...ThemeIcon.asClassNameArray(Codicon.diffMultiple));
99
99
  button.setAttribute("role", "button");
@@ -29,7 +29,7 @@ let ChatCodeCitationContentPart = class ChatCodeCitationContentPart extends Disp
29
29
  buttonSecondaryHoverBackground: undefined,
30
30
  buttonSeparator: undefined
31
31
  })));
32
- button.label = ( localize(6721, "View matches"));
32
+ button.label = ( localize(6807, "View matches"));
33
33
  this._register(button.onDidClick(() => {
34
34
  const citationText = `# Code Citations\n\n` + ( citations.citations.map(c => `## License: ${c.license}\n${( c.value.toString())}\n\n\`\`\`\n${c.snippet}\n\`\`\`\n\n`)).join("\n");
35
35
  this.editorService.openEditor({
@@ -1,18 +1,60 @@
1
1
  import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ export interface IResourcePoolOptions {
3
+ /**
4
+ * Maximum number of idle items to keep in the pool.
5
+ * When exceeded after a debounce period, excess idle items are disposed.
6
+ * Defaults to no limit.
7
+ */
8
+ maxIdleSize?: number;
9
+ /**
10
+ * Delay in milliseconds before trimming excess idle items.
11
+ * Allows rapid get/release cycles (e.g. during streaming) without
12
+ * unnecessary disposal. Defaults to 10 seconds.
13
+ */
14
+ trimIdleDelay?: number;
15
+ }
2
16
  export declare class ResourcePool<T extends IDisposable> implements IDisposable {
3
17
  private readonly _itemFactory;
18
+ private readonly _options?;
4
19
  private readonly pool;
20
+ private _trimTimer;
5
21
  private _inUse;
6
22
  get inUse(): ReadonlySet<T>;
7
- constructor(_itemFactory: () => T);
23
+ constructor(_itemFactory: () => T, _options?: IResourcePoolOptions | undefined);
8
24
  get(): T;
9
25
  release(item: T): void;
26
+ private _scheduleTrim;
27
+ private _trimIdle;
10
28
  /**
11
29
  * Clear and dispose the items in the pool that are not in use.
12
30
  */
13
31
  clear(): void;
14
32
  dispose(): void;
15
33
  }
34
+ /**
35
+ * A resource pool that supports keyed reuse. On {@link get}, the pool will
36
+ * prefer returning an idle item that was previously {@link release released}
37
+ * with the same key. Keys are best-effort hints — multiple items can share a
38
+ * key and the pool falls back to any idle item when no keyed match is found.
39
+ */
40
+ export declare class KeyedResourcePool<T extends IDisposable> implements IDisposable {
41
+ private readonly _itemFactory;
42
+ private readonly _options?;
43
+ private readonly _idle;
44
+ private readonly _inUse;
45
+ private readonly _keyToItems;
46
+ private readonly _itemToKey;
47
+ private _trimTimer;
48
+ get inUse(): ReadonlySet<T>;
49
+ constructor(_itemFactory: () => T, _options?: IResourcePoolOptions | undefined);
50
+ get(key: string): T;
51
+ release(item: T, key: string): void;
52
+ private _scheduleTrim;
53
+ private _trimIdle;
54
+ private _removeFromMaps;
55
+ clear(): void;
56
+ dispose(): void;
57
+ }
16
58
  export interface IDisposableReference<T> extends IDisposable {
17
59
  object: T;
18
60
  isStale: () => boolean;
@@ -4,8 +4,9 @@ class ResourcePool {
4
4
  get inUse() {
5
5
  return this._inUse;
6
6
  }
7
- constructor(_itemFactory) {
7
+ constructor(_itemFactory, _options) {
8
8
  this._itemFactory = _itemFactory;
9
+ this._options = _options;
9
10
  this.pool = [];
10
11
  this._inUse = ( new Set());
11
12
  }
@@ -22,8 +23,37 @@ class ResourcePool {
22
23
  release(item) {
23
24
  this._inUse.delete(item);
24
25
  this.pool.push(item);
26
+ this._scheduleTrim();
27
+ }
28
+ _scheduleTrim() {
29
+ const maxIdle = this._options?.maxIdleSize;
30
+ if (maxIdle === undefined || this.pool.length <= maxIdle) {
31
+ return;
32
+ }
33
+ if (this._trimTimer !== undefined) {
34
+ clearTimeout(this._trimTimer);
35
+ }
36
+ const delay = this._options?.trimIdleDelay ?? 10_000;
37
+ this._trimTimer = setTimeout(() => {
38
+ this._trimTimer = undefined;
39
+ this._trimIdle();
40
+ }, delay);
41
+ }
42
+ _trimIdle() {
43
+ const maxIdle = this._options?.maxIdleSize;
44
+ if (maxIdle === undefined) {
45
+ return;
46
+ }
47
+ while (this.pool.length > maxIdle) {
48
+ const item = this.pool.pop();
49
+ item.dispose();
50
+ }
25
51
  }
26
52
  clear() {
53
+ if (this._trimTimer !== undefined) {
54
+ clearTimeout(this._trimTimer);
55
+ this._trimTimer = undefined;
56
+ }
27
57
  for (const item of this.pool) {
28
58
  item.dispose();
29
59
  }
@@ -37,5 +67,120 @@ class ResourcePool {
37
67
  this._inUse.clear();
38
68
  }
39
69
  }
70
+ class KeyedResourcePool {
71
+ get inUse() {
72
+ return this._inUse;
73
+ }
74
+ constructor(_itemFactory, _options) {
75
+ this._itemFactory = _itemFactory;
76
+ this._options = _options;
77
+ this._idle = [];
78
+ this._inUse = ( new Set());
79
+ this._keyToItems = ( new Map());
80
+ this._itemToKey = ( new Map());
81
+ }
82
+ get(key) {
83
+ const candidates = this._keyToItems.get(key);
84
+ if (candidates) {
85
+ for (const item of candidates) {
86
+ if (!( this._inUse.has(item))) {
87
+ const idx = this._idle.indexOf(item);
88
+ if (idx !== -1) {
89
+ this._idle.splice(idx, 1);
90
+ this._inUse.add(item);
91
+ return item;
92
+ }
93
+ }
94
+ }
95
+ }
96
+ if (this._idle.length > 0) {
97
+ const item = this._idle.pop();
98
+ this._inUse.add(item);
99
+ return item;
100
+ }
101
+ const item = this._itemFactory();
102
+ this._inUse.add(item);
103
+ return item;
104
+ }
105
+ release(item, key) {
106
+ this._inUse.delete(item);
107
+ this._idle.push(item);
108
+ const oldKey = this._itemToKey.get(item);
109
+ if (oldKey !== undefined && oldKey !== key) {
110
+ const oldSet = this._keyToItems.get(oldKey);
111
+ if (oldSet) {
112
+ oldSet.delete(item);
113
+ if (oldSet.size === 0) {
114
+ this._keyToItems.delete(oldKey);
115
+ }
116
+ }
117
+ }
118
+ this._itemToKey.set(item, key);
119
+ let keySet = this._keyToItems.get(key);
120
+ if (!keySet) {
121
+ keySet = ( new Set());
122
+ this._keyToItems.set(key, keySet);
123
+ }
124
+ keySet.add(item);
125
+ this._scheduleTrim();
126
+ }
127
+ _scheduleTrim() {
128
+ const maxIdle = this._options?.maxIdleSize;
129
+ if (maxIdle === undefined || this._idle.length <= maxIdle) {
130
+ return;
131
+ }
132
+ if (this._trimTimer !== undefined) {
133
+ clearTimeout(this._trimTimer);
134
+ }
135
+ const delay = this._options?.trimIdleDelay ?? 10_000;
136
+ this._trimTimer = setTimeout(() => {
137
+ this._trimTimer = undefined;
138
+ this._trimIdle();
139
+ }, delay);
140
+ }
141
+ _trimIdle() {
142
+ const maxIdle = this._options?.maxIdleSize;
143
+ if (maxIdle === undefined) {
144
+ return;
145
+ }
146
+ while (this._idle.length > maxIdle) {
147
+ const item = this._idle.pop();
148
+ this._removeFromMaps(item);
149
+ item.dispose();
150
+ }
151
+ }
152
+ _removeFromMaps(item) {
153
+ const key = this._itemToKey.get(item);
154
+ if (key !== undefined) {
155
+ const keySet = this._keyToItems.get(key);
156
+ if (keySet) {
157
+ keySet.delete(item);
158
+ if (keySet.size === 0) {
159
+ this._keyToItems.delete(key);
160
+ }
161
+ }
162
+ this._itemToKey.delete(item);
163
+ }
164
+ }
165
+ clear() {
166
+ if (this._trimTimer !== undefined) {
167
+ clearTimeout(this._trimTimer);
168
+ this._trimTimer = undefined;
169
+ }
170
+ for (const item of this._idle) {
171
+ item.dispose();
172
+ }
173
+ this._idle.length = 0;
174
+ this._keyToItems.clear();
175
+ this._itemToKey.clear();
176
+ }
177
+ dispose() {
178
+ this.clear();
179
+ for (const item of this._inUse) {
180
+ item.dispose();
181
+ }
182
+ this._inUse.clear();
183
+ }
184
+ }
40
185
 
41
- export { ResourcePool };
186
+ export { KeyedResourcePool, ResourcePool };
@@ -23,7 +23,7 @@ let ChatCommandButtonContentPart = class ChatCommandButtonContentPart extends Di
23
23
  }
24
24
  }
25
25
  renderButton(container, command, enabled, secondary) {
26
- const tooltip = enabled ? command.tooltip : ( localize(6722, "Button not available in restored chat"));
26
+ const tooltip = enabled ? command.tooltip : ( localize(6808, "Button not available in restored chat"));
27
27
  const button = this._register(( new Button(container, {
28
28
  ...defaultButtonStyles,
29
29
  supportIcons: true,
@@ -26,10 +26,10 @@ let ChatConfirmationContentPart = class ChatConfirmationContentPart extends Disp
26
26
  data: confirmation.data,
27
27
  isSecondary: button !== confirmation.buttons?.[0]
28
28
  }))) : [{
29
- label: ( localize(6723, "Accept")),
29
+ label: ( localize(6809, "Accept")),
30
30
  data: confirmation.data
31
31
  }, {
32
- label: ( localize(6724, "Dismiss")),
32
+ label: ( localize(6810, "Dismiss")),
33
33
  data: confirmation.data,
34
34
  isSecondary: true
35
35
  }];
@@ -51,6 +51,8 @@ declare abstract class BaseSimpleChatConfirmationWidget<T> extends Disposable {
51
51
  get domNode(): HTMLElement;
52
52
  setShowButtons(showButton: boolean): void;
53
53
  private readonly messageElement;
54
+ private readonly messageScrollable;
55
+ private readonly messageContentDisposables;
54
56
  constructor(context: IChatContentPartRenderContext, options: IChatConfirmationWidgetOptions<T>, instantiationService: IInstantiationService, _markdownRendererService: IMarkdownRendererService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService);
55
57
  protected renderMessage(element: HTMLElement): void;
56
58
  }
@@ -85,6 +87,8 @@ declare abstract class BaseChatConfirmationWidget<T> extends Disposable {
85
87
  private _buttonsDomNode;
86
88
  setShowButtons(showButton: boolean): void;
87
89
  private readonly messageElement;
90
+ private readonly messageScrollable;
91
+ private readonly messageContentDisposables;
88
92
  private readonly markdownContentPart;
89
93
  get codeblocksPartId(): string | undefined;
90
94
  get codeblocks(): import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat").IChatCodeBlockInfo[] | undefined;
@@ -1,12 +1,14 @@
1
1
 
2
2
  import { registerCss } from '@codingame/monaco-vscode-api/css';
3
3
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
- import { createElement, h, isHTMLElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
+ import { createElement, h, DisposableResizeObserver, isHTMLElement, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
5
  import { ButtonWithDropdown, Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
6
+ import { DomScrollableElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
6
7
  import { Separator, Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
7
8
  import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
8
9
  import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
9
- import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
10
+ import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
11
+ import { ScrollbarVisibility } from '@codingame/monaco-vscode-api/vscode/vs/base/common/scrollable';
10
12
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
11
13
  import { MenuWorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
12
14
  import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
@@ -99,6 +101,7 @@ let BaseSimpleChatConfirmationWidget = class BaseSimpleChatConfirmationWidget ex
99
101
  this.instantiationService = instantiationService;
100
102
  this._markdownRendererService = _markdownRendererService;
101
103
  this._onDidClick = this._register(( new Emitter()));
104
+ this.messageContentDisposables = this._register(( new MutableDisposable()));
102
105
  const {
103
106
  title,
104
107
  subtitle,
@@ -121,6 +124,20 @@ let BaseSimpleChatConfirmationWidget = class BaseSimpleChatConfirmationWidget ex
121
124
  instantiationService.createInstance(ChatQueryTitlePart, elements.title, title, subtitle)
122
125
  );
123
126
  this.messageElement = elements.message;
127
+ const messageParent = this.messageElement.parentElement;
128
+ const messageNextSibling = this.messageElement.nextSibling;
129
+ this.messageScrollable = this._register(( new DomScrollableElement(this.messageElement, {
130
+ vertical: ScrollbarVisibility.Auto,
131
+ horizontal: ScrollbarVisibility.Hidden,
132
+ consumeMouseWheelIfScrollbarIsNeeded: true
133
+ })));
134
+ this.messageScrollable.getDomNode().classList.add("chat-confirmation-widget-message-scrollable");
135
+ messageParent?.insertBefore(this.messageScrollable.getDomNode(), messageNextSibling);
136
+ const messageResizeObserver = this._register(
137
+ new DisposableResizeObserver(() => this.messageScrollable.scanDomNode())
138
+ );
139
+ this._register(messageResizeObserver.observe(this.messageElement));
140
+ this._register(messageResizeObserver.observe(this.messageScrollable.getDomNode()));
124
141
  buttons.forEach(buttonData => {
125
142
  const buttonOptions = {
126
143
  ...defaultButtonStyles,
@@ -172,7 +189,14 @@ let BaseSimpleChatConfirmationWidget = class BaseSimpleChatConfirmationWidget ex
172
189
  }
173
190
  }
174
191
  renderMessage(element) {
192
+ const store = ( new DisposableStore());
193
+ const messageContentResizeObserver = store.add(
194
+ new DisposableResizeObserver(() => this.messageScrollable.scanDomNode())
195
+ );
196
+ store.add(messageContentResizeObserver.observe(element));
197
+ this.messageContentDisposables.value = store;
175
198
  this.messageElement.append(element);
199
+ this.messageScrollable.scanDomNode();
176
200
  }
177
201
  };
178
202
  BaseSimpleChatConfirmationWidget = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IMarkdownRendererService)), ( __param(4, IContextMenuService)), ( __param(5, IContextKeyService))], BaseSimpleChatConfirmationWidget));
@@ -237,6 +261,7 @@ let BaseChatConfirmationWidget = class BaseChatConfirmationWidget extends Dispos
237
261
  this.contextMenuService = contextMenuService;
238
262
  this.chatMarkdownAnchorService = chatMarkdownAnchorService;
239
263
  this._onDidClick = this._register(( new Emitter()));
264
+ this.messageContentDisposables = this._register(( new MutableDisposable()));
240
265
  this.markdownContentPart = this._register(( new MutableDisposable()));
241
266
  const {
242
267
  title,
@@ -265,6 +290,20 @@ let BaseChatConfirmationWidget = class BaseChatConfirmationWidget extends Dispos
265
290
  )), subtitle)
266
291
  );
267
292
  this.messageElement = elements.message;
293
+ const messageParent = this.messageElement.parentElement;
294
+ const messageNextSibling = this.messageElement.nextSibling;
295
+ this.messageScrollable = this._register(( new DomScrollableElement(this.messageElement, {
296
+ vertical: ScrollbarVisibility.Auto,
297
+ horizontal: ScrollbarVisibility.Hidden,
298
+ consumeMouseWheelIfScrollbarIsNeeded: true
299
+ })));
300
+ this.messageScrollable.getDomNode().classList.add("chat-confirmation-widget-message-scrollable");
301
+ messageParent?.insertBefore(this.messageScrollable.getDomNode(), messageNextSibling);
302
+ const messageResizeObserver = this._register(
303
+ new DisposableResizeObserver(() => this.messageScrollable.scanDomNode())
304
+ );
305
+ this._register(messageResizeObserver.observe(this.messageElement));
306
+ this._register(messageResizeObserver.observe(this.messageScrollable.getDomNode()));
268
307
  this.updateButtons(buttons);
269
308
  if (options?.toolbarData) {
270
309
  const overlay = contextKeyService.createOverlay([
@@ -327,7 +366,7 @@ let BaseChatConfirmationWidget = class BaseChatConfirmationWidget extends Dispos
327
366
  const part = this._register(this.instantiationService.createInstance(ChatMarkdownContentPart, {
328
367
  kind: "markdownContent",
329
368
  content: typeof element === "string" ? ( new MarkdownString()).appendMarkdown(element) : element
330
- }, this._context, this._context.editorPool, false, this._context.codeBlockStartIndex, this.markdownRendererService, undefined, this._context.currentWidth.get(), this._context.codeBlockModelCollection, {
369
+ }, this._context, this._context.editorPool, false, this._context.codeBlockStartIndex, this.markdownRendererService, undefined, this._context.currentWidth.get(), {
331
370
  allowInlineDiffs: true,
332
371
  horizontalPadding: 6
333
372
  }));
@@ -340,10 +379,20 @@ let BaseChatConfirmationWidget = class BaseChatConfirmationWidget extends Dispos
340
379
  this.markdownContentPart.value = part;
341
380
  element = part.domNode;
342
381
  }
343
- for (const child of this.messageElement.children) {
344
- child.remove();
382
+ clearNode(this.messageElement);
383
+ const store = ( new DisposableStore());
384
+ const messageContentResizeObserver = store.add(
385
+ new DisposableResizeObserver(() => this.messageScrollable.scanDomNode())
386
+ );
387
+ store.add(messageContentResizeObserver.observe(element));
388
+ if (this.markdownContentPart.value) {
389
+ store.add(
390
+ this.markdownContentPart.value.onDidChangeHeight(() => this.messageScrollable.scanDomNode())
391
+ );
345
392
  }
393
+ this.messageContentDisposables.value = store;
346
394
  this.messageElement.append(element);
395
+ this.messageScrollable.scanDomNode();
347
396
  }
348
397
  };
349
398
  BaseChatConfirmationWidget = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IMarkdownRendererService)), ( __param(4, IContextMenuService)), ( __param(5, IContextKeyService)), ( __param(6, IChatMarkdownAnchorService))], BaseChatConfirmationWidget));
@@ -405,7 +454,7 @@ function configureAccessibilityContainer(container, title, message) {
405
454
  container.tabIndex = 0;
406
455
  const titleAsString = typeof title === "string" ? title : title.value;
407
456
  const messageAsString = typeof message === "string" ? message : message && "value" in message ? message.value : message && "textContent" in message ? message.textContent : "";
408
- container.setAttribute("aria-label", ( localize(6725, "Chat Confirmation Dialog {0} {1}", titleAsString, messageAsString)));
457
+ container.setAttribute("aria-label", ( localize(6811, "Chat Confirmation Dialog {0} {1}", titleAsString, messageAsString)));
409
458
  container.classList.add("chat-confirmation-widget-container");
410
459
  }
411
460
 
@@ -9,7 +9,7 @@ export declare class EditorPool extends Disposable {
9
9
  private readonly _pool;
10
10
  inUse(): Iterable<CodeBlockPart>;
11
11
  constructor(options: ChatEditorOptions, delegate: IChatRendererDelegate, overflowWidgetsDomNode: HTMLElement | undefined, isSimpleWidget: boolean | undefined, instantiationService: IInstantiationService);
12
- get(): IDisposableReference<CodeBlockPart>;
12
+ get(key: string): IDisposableReference<CodeBlockPart>;
13
13
  clear(): void;
14
14
  }
15
15
  export declare class DiffEditorPool extends Disposable {
@@ -4,7 +4,7 @@ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/l
4
4
  import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
5
5
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
6
6
  import { CodeBlockPart, CodeCompareBlockPart } from './codeBlockPart.js';
7
- import { ResourcePool } from './chatCollections.js';
7
+ import { KeyedResourcePool, ResourcePool } from './chatCollections.js';
8
8
  import { createSingleCallFunction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/functional';
9
9
 
10
10
  let EditorPool = class EditorPool extends Disposable {
@@ -20,7 +20,7 @@ let EditorPool = class EditorPool extends Disposable {
20
20
  ) {
21
21
  super();
22
22
  this.isSimpleWidget = isSimpleWidget;
23
- this._pool = this._register(( new ResourcePool(() => {
23
+ this._pool = this._register(( new KeyedResourcePool(() => {
24
24
  return instantiationService.createInstance(
25
25
  CodeBlockPart,
26
26
  options,
@@ -29,10 +29,12 @@ let EditorPool = class EditorPool extends Disposable {
29
29
  overflowWidgetsDomNode,
30
30
  this.isSimpleWidget
31
31
  );
32
+ }, {
33
+ maxIdleSize: 2
32
34
  })));
33
35
  }
34
- get() {
35
- const codeBlock = this._pool.get();
36
+ get(key) {
37
+ const codeBlock = this._pool.get(key);
36
38
  let stale = false;
37
39
  return {
38
40
  object: codeBlock,
@@ -40,7 +42,7 @@ let EditorPool = class EditorPool extends Disposable {
40
42
  dispose: createSingleCallFunction(() => {
41
43
  codeBlock.reset();
42
44
  stale = true;
43
- this._pool.release(codeBlock);
45
+ this._pool.release(codeBlock, key);
44
46
  })
45
47
  };
46
48
  }