@codingame/monaco-vscode-katex-common 27.0.0 → 28.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 (181) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +2 -0
  3. package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -2
  4. package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +30 -2
  5. package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.js +1 -0
  6. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +15 -15
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +17 -11
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +5 -0
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +90 -43
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
  12. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +26 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +106 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
  15. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +6 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +63 -10
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +1 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +13 -10
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +2 -2
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +28 -2
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +133 -28
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +69 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +55 -46
  24. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +10 -10
  25. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +38 -37
  26. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  27. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +5 -5
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +1 -1
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +2 -2
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +72 -57
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
  35. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +1 -16
  36. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -110
  37. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
  38. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.d.ts +1 -1
  39. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  40. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.d.ts +1 -1
  41. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  42. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +1 -1
  43. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
  44. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.d.ts +1 -1
  45. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  46. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +1 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +1 -1
  48. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  50. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +1 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
  52. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
  54. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +59 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.js +29 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.d.ts +1 -1
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +2 -2
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +1 -1
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +1 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.d.ts +1 -1
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +1 -1
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.d.ts +1 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +3 -3
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +1 -1
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +8 -6
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.d.ts +15 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.js +55 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +1 -1
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +6 -6
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +1 -1
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +6 -4
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +1 -1
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +26 -6
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +290 -126
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +1 -1
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +1 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +9 -7
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +22 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +263 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +1 -1
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +6 -6
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +1 -1
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +1 -1
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +1 -1
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +22 -13
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +12 -18
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +1 -1
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +3 -13
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +6 -260
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +1 -1
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +1 -1
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +17 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +129 -117
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +0 -1
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +1 -1
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +1 -1
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +1 -1
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +8 -1
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +56 -3
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +5 -1
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +20 -4
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +1 -1
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.d.ts +1 -1
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +1 -1
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -15
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +43 -1
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +42 -41
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +2 -4
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +14 -14
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +1 -1
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +1 -1
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +3 -3
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -1
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +1 -1
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +1 -1
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +4 -2
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +61 -39
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +7 -8
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +1 -10
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +81 -191
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +31 -17
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +334 -181
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +1 -1
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +7 -1
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +3 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +51 -55
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +104 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +127 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +5 -5
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +2 -1
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +16 -9
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +2 -1
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +22 -0
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +213 -0
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +1 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +10 -16
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +6 -4
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +174 -10
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +2 -12
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +12 -16
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +1 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +5 -1
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +36 -50
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +19 -4
  163. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +22 -6
  164. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
  165. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +3 -1
  166. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +24 -4
  167. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +3 -3
  168. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
  169. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
  170. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
  171. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +2 -2
  172. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +1 -1
  173. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +3 -3
  174. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +1 -1
  175. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +38 -46
  176. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  177. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  178. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  179. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  180. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  181. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +6 -10
@@ -10,7 +10,6 @@ import { isEmptyObject } from '@codingame/monaco-vscode-api/vscode/vs/base/commo
10
10
  import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
11
11
  import { ElementSizeObserver } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/config/elementSizeObserver';
12
12
  import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
13
- import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
14
13
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
15
14
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
16
15
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
@@ -44,7 +43,6 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
44
43
  codeBlockStartIndex,
45
44
  instantiationService,
46
45
  keybindingService,
47
- modelService,
48
46
  languageService,
49
47
  contextKeyService,
50
48
  chatWidgetService,
@@ -72,7 +70,6 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
72
70
  this.currentWidthDelegate = currentWidthDelegate;
73
71
  this.codeBlockModelCollection = codeBlockModelCollection;
74
72
  this.codeBlockStartIndex = codeBlockStartIndex;
75
- this.modelService = modelService;
76
73
  this.languageService = languageService;
77
74
  this.commandService = commandService;
78
75
  this.markerService = markerService;
@@ -82,8 +79,8 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
82
79
  this.render({
83
80
  allowActionId: AcceptToolConfirmationActionId,
84
81
  skipActionId: SkipToolConfirmationActionId,
85
- allowLabel: state.confirmationMessages.confirmResults ? ( localize(6601, "Allow and Review Once")) : ( localize(6602, "Allow Once")),
86
- skipLabel: ( localize(6603, "Proceed without running this tool")),
82
+ allowLabel: state.confirmationMessages.confirmResults ? ( localize(6697, "Allow and Review Once")) : ( localize(6698, "Allow Once")),
83
+ skipLabel: ( localize(6699, "Proceed without running this tool")),
87
84
  partType: "chatToolConfirmation",
88
85
  subtitle: typeof toolInvocation.originMessage === "string" ? toolInvocation.originMessage : toolInvocation.originMessage?.value
89
86
  });
@@ -122,7 +119,7 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
122
119
  }
123
120
  if (state.confirmationMessages?.confirmResults) {
124
121
  actions.unshift({
125
- label: ( localize(6604, "Allow and Skip Reviewing Result")),
122
+ label: ( localize(6700, "Allow and Skip Reviewing Result")),
126
123
  data: () => {
127
124
  state.confirmationMessages.confirmResults = undefined;
128
125
  this.confirmWith(this.toolInvocation, {
@@ -157,11 +154,11 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
157
154
  };
158
155
  const elements = h("div", [h(".message@messageContainer", [
159
156
  h(".message-wrapper@message"),
160
- h(".see-more@showMore", [h("a", [( localize(6605, "Show More"))])])
157
+ h(".see-more@showMore", [h("a", [( localize(6701, "Show More"))])])
161
158
  ]), h(".editor@editor"), h(".disclaimer@disclaimer")]);
162
159
  if (toolInvocation.toolSpecificData?.kind === "input" && toolInvocation.toolSpecificData.rawInput && !isEmptyObject(toolInvocation.toolSpecificData.rawInput)) {
163
160
  const titleEl = createElement("h3");
164
- titleEl.textContent = ( localize(6606, "Input"));
161
+ titleEl.textContent = ( localize(6702, "Input"));
165
162
  elements.editor.appendChild(titleEl);
166
163
  const inputData = toolInvocation.toolSpecificData;
167
164
  const codeBlockRenderOptions = {
@@ -178,10 +175,13 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
178
175
  const langId = this.languageService.getLanguageIdByLanguageName("json");
179
176
  const rawJsonInput = JSON.stringify(inputData.rawInput ?? {}, null, 1);
180
177
  const canSeeMore = count(rawJsonInput, "\n") > 2;
181
- const model = this._register(
182
- this.modelService.createModel(
183
- rawJsonInput.replace(/\n */g, " "), this.languageService.createById(langId), createToolInputUri(toolInvocation.toolCallId), true)
184
- );
178
+ const modelRef = this._register(this.context.inlineTextModels.acquire(
179
+ createToolInputUri(toolInvocation.toolCallId),
180
+ rawJsonInput.replace(/\n */g, " "),
181
+ this.languageService.createById(langId),
182
+ true
183
+ ));
184
+ const model = modelRef.object;
185
185
  const markerOwner = generateUuid();
186
186
  const schemaUri = createToolSchemaUri(toolInvocation.toolId);
187
187
  const validator = ( new RunOnceScheduler(async () => {
@@ -234,7 +234,7 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
234
234
  elements.editor.append(editor.object.element);
235
235
  if (canSeeMore) {
236
236
  const seeMore = h("div.see-more", [h("a@link")]);
237
- seeMore.link.textContent = ( localize(6607, "See more"));
237
+ seeMore.link.textContent = ( localize(6703, "See more"));
238
238
  this._register(addDisposableGenericMouseDownListener(seeMore.link, () => {
239
239
  try {
240
240
  const parsed = JSON.parse(model.getValue());
@@ -301,6 +301,6 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
301
301
  return part;
302
302
  }
303
303
  };
304
- ToolConfirmationSubPart = ( __decorate([( __param(7, IInstantiationService)), ( __param(8, IKeybindingService)), ( __param(9, IModelService)), ( __param(10, ILanguageService)), ( __param(11, IContextKeyService)), ( __param(12, IChatWidgetService)), ( __param(13, ICommandService)), ( __param(14, IMarkerService)), ( __param(15, ILanguageModelToolsService)), ( __param(16, IChatMarkdownAnchorService)), ( __param(17, ILanguageModelToolsConfirmationService))], ToolConfirmationSubPart));
304
+ ToolConfirmationSubPart = ( __decorate([( __param(7, IInstantiationService)), ( __param(8, IKeybindingService)), ( __param(9, ILanguageService)), ( __param(10, IContextKeyService)), ( __param(11, IChatWidgetService)), ( __param(12, ICommandService)), ( __param(13, IMarkerService)), ( __param(14, ILanguageModelToolsService)), ( __param(15, IChatMarkdownAnchorService)), ( __param(16, ILanguageModelToolsConfirmationService))], ToolConfirmationSubPart));
305
305
 
306
306
  export { ToolConfirmationSubPart };
@@ -7,7 +7,7 @@ import { IChatTodoListService } from "@codingame/monaco-vscode-api/vscode/vs/wor
7
7
  import { CodeBlockModelCollection } from "../../../../common/widget/codeBlockModelCollection.js";
8
8
  import { ChatTreeItem, IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
9
9
  import { EditorPool } from "../chatContentCodePools.js";
10
- import { IChatContentPart, IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
10
+ import { IChatContentPart, IChatContentPartRenderContext } from "../chatContentParts.js";
11
11
  import { CollapsibleListPool } from "../chatReferencesContentPart.js";
12
12
  export declare class ChatToolInvocationPart extends Disposable implements IChatContentPart {
13
13
  private readonly toolInvocation;
@@ -4,7 +4,7 @@ import { IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/m
4
4
  import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
5
5
  import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
6
6
  import { IChatOutputRendererService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service";
7
- import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
7
+ import { IChatContentPartRenderContext } from "../chatContentParts.js";
8
8
  import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
9
9
  import { IChatToolOutputStateCache } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.service";
10
10
  export declare class ChatToolOutputSubPart extends BaseChatToolInvocationSubPart {
@@ -75,7 +75,7 @@ let ChatToolOutputSubPart = class ChatToolOutputSubPart extends BaseChatToolInvo
75
75
  partState.webviewOrigin = partState.webviewOrigin;
76
76
  }
77
77
  const progressMessage = $("span");
78
- progressMessage.textContent = ( localize(6608, "Rendering tool output..."));
78
+ progressMessage.textContent = ( localize(6704, "Rendering tool output..."));
79
79
  const progressPart = this._register(this.instantiationService.createInstance(
80
80
  ChatProgressSubPart,
81
81
  progressMessage,
@@ -125,7 +125,7 @@ let ChatToolOutputSubPart = class ChatToolOutputSubPart extends BaseChatToolInvo
125
125
  iconElement.classList.add(...ThemeIcon.asClassNameArray(Codicon.error));
126
126
  errorHeaderNode.append(iconElement);
127
127
  const errorTitleNode = $(".output-error-title");
128
- errorTitleNode.textContent = ( localize(6609, "Error rendering the tool output"));
128
+ errorTitleNode.textContent = ( localize(6705, "Error rendering the tool output"));
129
129
  errorHeaderNode.append(errorTitleNode);
130
130
  const errorMessageNode = $(".output-error-details");
131
131
  errorMessageNode.textContent = error?.message || String(error);
@@ -14,16 +14,16 @@ function getApprovalMessageFromReason(reason) {
14
14
  let md;
15
15
  switch (reason.type) {
16
16
  case ToolConfirmKind.Setting:
17
- md = ( localize(6610, "Auto approved by {0}", createMarkdownCommandLink({
17
+ md = ( localize(6706, "Auto approved by {0}", createMarkdownCommandLink({
18
18
  title: "`" + reason.id + "`",
19
19
  id: "workbench.action.openSettings",
20
20
  arguments: [reason.id]
21
21
  }, false)));
22
22
  break;
23
23
  case ToolConfirmKind.LmServicePerTool:
24
- md = reason.scope === "session" ? ( localize(6611, "Auto approved for this session")) : reason.scope === "workspace" ? ( localize(6612, "Auto approved for this workspace")) : ( localize(6613, "Auto approved for this profile"));
24
+ md = reason.scope === "session" ? ( localize(6707, "Auto approved for this session")) : reason.scope === "workspace" ? ( localize(6708, "Auto approved for this workspace")) : ( localize(6709, "Auto approved for this profile"));
25
25
  md += " (" + createMarkdownCommandLink({
26
- title: ( localize(6614, "Edit")),
26
+ title: ( localize(6710, "Edit")),
27
27
  id: "workbench.action.chat.editToolApproval",
28
28
  arguments: [reason.scope]
29
29
  }) + ")";
@@ -7,7 +7,7 @@ import { ILanguageModelToolsConfirmationService } from "@codingame/monaco-vscode
7
7
  import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
8
8
  import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
9
9
  import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
10
- import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
10
+ import { IChatContentPartRenderContext } from "../chatContentParts.js";
11
11
  import { AbstractToolConfirmationSubPart } from "./abstractToolConfirmationSubPart.js";
12
12
  export declare class ChatToolPostExecuteConfirmationPart extends AbstractToolConfirmationSubPart {
13
13
  private readonly confirmationService;
@@ -46,8 +46,8 @@ let ChatToolPostExecuteConfirmationPart = class ChatToolPostExecuteConfirmationP
46
46
  this.render({
47
47
  allowActionId: AcceptToolPostConfirmationActionId,
48
48
  skipActionId: SkipToolPostConfirmationActionId,
49
- allowLabel: ( localize(6615, "Allow Once")),
50
- skipLabel: ( localize(6616, "Skip Results")),
49
+ allowLabel: ( localize(6711, "Allow Once")),
50
+ skipLabel: ( localize(6712, "Skip Results")),
51
51
  partType: "chatToolPostConfirmation",
52
52
  subtitle: typeof subtitle === "string" ? subtitle : subtitle?.value
53
53
  });
@@ -63,7 +63,7 @@ let ChatToolPostExecuteConfirmationPart = class ChatToolPostExecuteConfirmationP
63
63
  return this.createResultsDisplay(this.toolInvocation, state.contentForModel);
64
64
  }
65
65
  getTitle() {
66
- return localize(6617, "Approve Tool Result");
66
+ return localize(6713, "Approve Tool Result");
67
67
  }
68
68
  additionalPrimaryActions() {
69
69
  const actions = super.additionalPrimaryActions();
@@ -99,7 +99,7 @@ let ChatToolPostExecuteConfirmationPart = class ChatToolPostExecuteConfirmationP
99
99
  createResultsDisplay(toolInvocation, contentForModel) {
100
100
  const container = $(".tool-postconfirm-display");
101
101
  if (!contentForModel || contentForModel.length === 0) {
102
- container.textContent = ( localize(6618, "No results to display"));
102
+ container.textContent = ( localize(6714, "No results to display"));
103
103
  return container;
104
104
  }
105
105
  const parts = [];
@@ -214,7 +214,7 @@ let ChatToolPostExecuteConfirmationPart = class ChatToolPostExecuteConfirmationP
214
214
  outputSubPart.domNode.classList.add("tool-postconfirm-display");
215
215
  return outputSubPart.domNode;
216
216
  }
217
- container.textContent = ( localize(6619, "No displayable results"));
217
+ container.textContent = ( localize(6715, "No displayable results"));
218
218
  return container;
219
219
  }
220
220
  };
@@ -3,7 +3,7 @@ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
3
3
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
4
4
  import { IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
5
5
  import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
6
- import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
6
+ import { IChatContentPartRenderContext } from "../chatContentParts.js";
7
7
  import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
8
8
  export declare class ChatToolProgressSubPart extends BaseChatToolInvocationSubPart {
9
9
  private readonly context;
@@ -2,7 +2,7 @@ import { IMarkdownRenderer } from "@codingame/monaco-vscode-api/vscode/vs/platfo
2
2
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
3
3
  import { IChatToolInvocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
4
4
  import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
5
- import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
5
+ import { IChatContentPartRenderContext } from "../chatContentParts.js";
6
6
  import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
7
7
  /**
8
8
  * Sub-part for rendering a tool invocation in the streaming state.
@@ -209,23 +209,23 @@ let ChatDragAndDrop = class ChatDragAndDrop extends Themable {
209
209
  getDropTypeName(type) {
210
210
  switch (type) {
211
211
  case ChatDragAndDropType.FILE_INTERNAL:
212
- return localize(6620, "File");
212
+ return localize(6716, "File");
213
213
  case ChatDragAndDropType.FILE_EXTERNAL:
214
- return localize(6620, "File");
214
+ return localize(6716, "File");
215
215
  case ChatDragAndDropType.FOLDER:
216
- return localize(6621, "Folder");
216
+ return localize(6717, "Folder");
217
217
  case ChatDragAndDropType.IMAGE:
218
- return localize(6622, "Image");
218
+ return localize(6718, "Image");
219
219
  case ChatDragAndDropType.SYMBOL:
220
- return localize(6623, "Symbol");
220
+ return localize(6719, "Symbol");
221
221
  case ChatDragAndDropType.MARKER:
222
- return localize(6624, "Problem");
222
+ return localize(6720, "Problem");
223
223
  case ChatDragAndDropType.HTML:
224
- return localize(6625, "URL");
224
+ return localize(6721, "URL");
225
225
  case ChatDragAndDropType.NOTEBOOK_CELL_OUTPUT:
226
- return localize(6626, "Output");
226
+ return localize(6722, "Output");
227
227
  case ChatDragAndDropType.SCM_HISTORY_ITEM:
228
- return localize(6627, "Change");
228
+ return localize(6723, "Change");
229
229
  }
230
230
  }
231
231
  async resolveAttachmentsFromDragEvent(e) {
@@ -297,7 +297,7 @@ let ChatDragAndDrop = class ChatDragAndDrop extends Themable {
297
297
  async resolveHTMLAttachContext(e) {
298
298
  const existingAttachmentNames = ( new Set(( this.attachmentModel.attachments.map(attachment => attachment.name))));
299
299
  const createDisplayName = () => {
300
- const baseName = ( localize(6628, "Image from URL"));
300
+ const baseName = ( localize(6724, "Image from URL"));
301
301
  let uniqueName = baseName;
302
302
  let baseNameInstance = 1;
303
303
  while (( existingAttachmentNames.has(uniqueName))) {
@@ -375,7 +375,7 @@ let ChatDragAndDrop = class ChatDragAndDrop extends Themable {
375
375
  }
376
376
  getOverlayText(type) {
377
377
  const typeName = this.getDropTypeName(type);
378
- return localize(6629, "Attach {0} as Context", typeName);
378
+ return localize(6725, "Attach {0} as Context", typeName);
379
379
  }
380
380
  updateOverlayStyles(overlay) {
381
381
  overlay.style.backgroundColor = this.getColor(this.styles.overlayBackground) || "";
@@ -27,7 +27,7 @@ import { ChatModeKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/c
27
27
  import { ChatTreeItem, IChatCodeBlockInfo, IChatFileTreeInfo, IChatListItemRendererOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
28
28
  import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
29
29
  import { ChatAgentHover } from "./chatAgentHover.js";
30
- import { IChatContentPart, IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
30
+ import { IChatContentPart, IChatContentPartRenderContext } from "./chatContentParts/chatContentParts.js";
31
31
  import { ChatEditorOptions } from "./chatOptions.js";
32
32
  import { CodeBlockPart } from "./chatContentParts/codeBlockPart.js";
33
33
  import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service";
@@ -141,6 +141,7 @@ export declare class ChatListItemRenderer extends Disposable implements ITreeRen
141
141
  * TODO@roblourens shouldn't use the CodeBlockModelCollection at all
142
142
  */
143
143
  private readonly _toolInvocationCodeBlockCollection;
144
+ private readonly _inlineTextModels;
144
145
  /**
145
146
  * Prevents re-announcement of already rendered chat progress
146
147
  * by screen readers
@@ -196,7 +197,7 @@ export declare class ChatListItemRenderer extends Disposable implements ITreeRen
196
197
  private getDataForProgressiveRender;
197
198
  private diff;
198
199
  private isRenderedPartInsideThinking;
199
- private hasCodeblockUri;
200
+ private hasEditCodeblockUri;
200
201
  private isCodeblockComplete;
201
202
  private shouldPinPart;
202
203
  private getLastThinkingPart;
@@ -234,6 +235,7 @@ export declare class ChatListItemRenderer extends Disposable implements ITreeRen
234
235
  private _notifyOnQuestionCarousel;
235
236
  private maybeAutoReplyToQuestionCarousel;
236
237
  private getRequestMessageText;
238
+ private _isAutopilotForContext;
237
239
  private removeCarouselFromTracking;
238
240
  private renderChangesSummary;
239
241
  private renderAttachments;
@@ -54,7 +54,7 @@ import { getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workb
54
54
  import { isResponseVM, isPendingDividerVM, isRequestVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
55
55
  import { getNWords } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatWordCounter';
56
56
  import { CodeBlockModelCollection } from '../../common/widget/codeBlockModelCollection.js';
57
- import { ChatAgentLocation, ChatConfiguration, CollapsedToolsDisplayMode, ThinkingDisplayMode, ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
57
+ import { ChatAgentLocation, ChatConfiguration, CollapsedToolsDisplayMode, ThinkingDisplayMode, ChatModeKind, ChatPermissionLevel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
58
58
  import { ClickAnimation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/animations/animations';
59
59
  import { MarkUnhelpfulActionId, MarkHelpfulActionId } from '../actions/chatTitleActions.js';
60
60
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
@@ -68,6 +68,7 @@ import { ChatCodeCitationContentPart } from './chatContentParts/chatCodeCitation
68
68
  import { ChatCommandButtonContentPart } from './chatContentParts/chatCommandContentPart.js';
69
69
  import { ChatConfirmationContentPart } from './chatContentParts/chatConfirmationContentPart.js';
70
70
  import { EditorPool, DiffEditorPool } from './chatContentParts/chatContentCodePools.js';
71
+ import { InlineTextModelCollection } from './chatContentParts/chatContentParts.js';
71
72
  import { ChatElicitationContentPart } from './chatContentParts/chatElicitationContentPart.js';
72
73
  import { ChatErrorConfirmationContentPart } from './chatContentParts/chatErrorConfirmationPart.js';
73
74
  import { ChatErrorContentPart } from './chatContentParts/chatErrorContentPart.js';
@@ -94,7 +95,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/in
94
95
  import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
95
96
  import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
96
97
  import { ChatHookContentPart } from './chatContentParts/chatHookContentPart.js';
97
- import { HookType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
98
+ import { HookType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
98
99
  import { ChatQuestionCarouselAutoReply } from './chatQuestionCarouselAutoReply.js';
99
100
  import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
100
101
  import { AccessibilityWorkbenchSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
@@ -214,6 +215,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
214
215
  undefined
215
216
  ));
216
217
  this._register(this.instantiationService.createInstance(ChatCodeBlockContentProvider));
218
+ this._inlineTextModels = this._register(this.instantiationService.createInstance(InlineTextModelCollection));
217
219
  this._toolInvocationCodeBlockCollection = this._register(
218
220
  this.instantiationService.createInstance(CodeBlockModelCollection, "tools")
219
221
  );
@@ -429,7 +431,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
429
431
  }
430
432
  const footerToolbar = templateDisposables.add(
431
433
  scopedInstantiationService.createInstance(MenuWorkbenchToolBar, footerToolbarContainer, MenuId.ChatMessageFooter, {
432
- eventDebounceDelay: 0,
433
434
  menuOptions: {
434
435
  shouldForwardArgs: true,
435
436
  renderShortTitle: true
@@ -457,7 +458,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
457
458
  const checkpointRestoreContainer = append(rowContainer, $(".checkpoint-restore-container"));
458
459
  append(checkpointRestoreContainer, $(".checkpoint-line-left"));
459
460
  const label = append(checkpointRestoreContainer, $("span.checkpoint-label-text"));
460
- label.textContent = ( localize(6630, "Checkpoint Restored"));
461
+ label.textContent = ( localize(6726, "Checkpoint Restored"));
461
462
  const dot = append(checkpointRestoreContainer, $("span.checkpoint-dot-separator"));
462
463
  dot.textContent = "·";
463
464
  dot.setAttribute("aria-hidden", "true");
@@ -675,6 +676,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
675
676
  const checkpointEnabled = this.configService.getValue(ChatConfiguration.CheckpointsEnabled) && (this.rendererOptions.restorable ?? true);
676
677
  const isPendingRequest = isRequestVM(element) && !!element.pendingKind;
677
678
  templateData.checkpointContainer.classList.toggle("hidden", isResponseVM(element) || isPendingRequest || !checkpointEnabled);
679
+ templateData.footerToolbar.refresh();
680
+ templateData.checkpointToolbar.refresh();
681
+ templateData.checkpointRestoreToolbar.refresh();
678
682
  if (isResponseVM(element)) {
679
683
  this.responseTemplateDataByRequestId.set(element.requestId, templateData);
680
684
  templateData.elementDisposables.add(
@@ -786,11 +790,11 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
786
790
  const dividerContent = $$1(".pending-divider-content");
787
791
  const label = append(dividerContent, $$1("span.pending-divider-label"));
788
792
  if (element.dividerKind === ChatRequestQueueKind.Steering) {
789
- label.textContent = ( localize(6631, "Steering"));
790
- label.title = ( localize(6632, "Steering message will be sent after the next tool call happens"));
793
+ label.textContent = ( localize(6727, "Steering"));
794
+ label.title = ( localize(6728, "Steering message will be sent after the next tool call happens"));
791
795
  } else {
792
- label.textContent = ( localize(6633, "Queued"));
793
- label.title = ( localize(6634, "Queued messages will be sent after the current request completes"));
796
+ label.textContent = ( localize(6729, "Queued"));
797
+ label.title = ( localize(6730, "Queued messages will be sent after the current request completes"));
794
798
  }
795
799
  templateData.value.appendChild(dividerContent);
796
800
  }
@@ -798,10 +802,10 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
798
802
  clearNode(templateData.detail);
799
803
  if (element.agentOrSlashCommandDetected) {
800
804
  const msg = element.slashCommand ? ( localize(
801
- 6635,
805
+ 6731,
802
806
  "used {0} [[(rerun without)]]",
803
807
  `${chatSubcommandLeader}${element.slashCommand.name}`
804
- )) : ( localize(6636, "[[(rerun without)]]"));
808
+ )) : ( localize(6732, "[[(rerun without)]]"));
805
809
  reset(templateData.detail, renderFormattedText(msg, {
806
810
  actionHandler: {
807
811
  disposables: templateData.elementDisposables,
@@ -814,7 +818,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
814
818
  this.delegate.currentChatMode(),
815
819
  this.rendererOptions.progressMessageAtBottomOfResponse
816
820
  )) {
817
- templateData.detail.textContent = ( localize(6637, "Working"));
821
+ templateData.detail.textContent = ( localize(6733, "Working"));
818
822
  }
819
823
  }
820
824
  renderConfirmationAction(element, templateData) {
@@ -823,7 +827,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
823
827
  append(templateData.detail, $("span.codicon.codicon-check", {
824
828
  "aria-hidden": "true"
825
829
  }));
826
- append(templateData.detail, $("span.confirmation-text", undefined, ( localize(6638, "Selected \"{0}\"", element.confirmation))));
830
+ append(templateData.detail, $("span.confirmation-text", undefined, ( localize(6734, "Selected \"{0}\"", element.confirmation))));
827
831
  templateData.header?.classList.remove("header-disabled");
828
832
  templateData.header?.classList.add("partially-disabled");
829
833
  const updateCheckmarks = () => templateData.detail.classList.toggle(
@@ -939,7 +943,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
939
943
  return false;
940
944
  }
941
945
  const hasRenderedThinkingPart = ( (templateData.renderedParts ?? []).some(part => part instanceof ChatThinkingContentPart));
942
- const hasEditPillMarkdown = ( partsToRender.some(part => part.kind === "markdownContent" && this.hasCodeblockUri(part)));
946
+ const hasEditPillMarkdown = ( partsToRender.some(part => part.kind === "markdownContent" && this.hasEditCodeblockUri(part)));
943
947
  if (hasRenderedThinkingPart && hasEditPillMarkdown) {
944
948
  return false;
945
949
  }
@@ -1037,6 +1041,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1037
1041
  codeBlockModelCollection: this.codeBlockModelCollection,
1038
1042
  currentWidth: this._currentLayoutWidth,
1039
1043
  onDidChangeVisibility: this._onDidChangeVisibility.event,
1044
+ inlineTextModels: this._inlineTextModels,
1040
1045
  get codeBlockStartIndex() {
1041
1046
  return parts.reduce((acc, part) => acc + (part.codeblocks?.length ?? 0), 0);
1042
1047
  },
@@ -1170,6 +1175,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1170
1175
  codeBlockModelCollection: this.codeBlockModelCollection,
1171
1176
  currentWidth: this._currentLayoutWidth,
1172
1177
  onDidChangeVisibility: this._onDidChangeVisibility.event,
1178
+ inlineTextModels: this._inlineTextModels,
1173
1179
  get codeBlockStartIndex() {
1174
1180
  return preceedingContentParts.reduce((acc, part) => acc + (part.codeblocks?.length ?? 0), 0);
1175
1181
  },
@@ -1348,7 +1354,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1348
1354
  }
1349
1355
  return !!findParentWithClass(renderedPart.domNode, "chat-thinking-box");
1350
1356
  }
1351
- hasCodeblockUri(part) {
1357
+ hasEditCodeblockUri(part) {
1352
1358
  if (part.kind !== "markdownContent") {
1353
1359
  return false;
1354
1360
  }
@@ -1377,7 +1383,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1377
1383
  if (collapsedToolsMode === CollapsedToolsDisplayMode.Off) {
1378
1384
  return false;
1379
1385
  }
1380
- if (this.hasCodeblockUri(part) || part.kind === "textEditGroup") {
1386
+ if (this.hasEditCodeblockUri(part) || part.kind === "textEditGroup") {
1381
1387
  return true;
1382
1388
  }
1383
1389
  const isMcpTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.source?.type === "mcp";
@@ -1579,7 +1585,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1579
1585
  } else if (content.kind === "markdownContent") {
1580
1586
  return this.renderMarkdown(content, templateData, context);
1581
1587
  } else if (content.kind === "references") {
1582
- if (isResponseVM(context.element) && context.element.model.request?.modeInfo?.modeId === ChatModeKind.Agent) {
1588
+ if (isResponseVM(context.element) && context.element.agent?.isDefault && !context.element.agent.modes.includes(ChatModeKind.Ask)) {
1583
1589
  return this.renderNoContent(other => other.kind === content.kind);
1584
1590
  }
1585
1591
  return this.renderContentReferencesListData(content, undefined, context, templateData);
@@ -1622,7 +1628,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1622
1628
  "ChatListItemRenderer#renderChatContentPart: error rendering content",
1623
1629
  toErrorMessage(err, true)
1624
1630
  );
1625
- const errorPart = this.instantiationService.createInstance(ChatErrorContentPart, ChatErrorLevel.Error, ( new MarkdownString(( localize(6639, "Failed to render content")) + `: ${toErrorMessage(err, false)}`)), content, this.chatContentMarkdownRenderer);
1631
+ const errorPart = this.instantiationService.createInstance(ChatErrorContentPart, ChatErrorLevel.Error, ( new MarkdownString(( localize(6735, "Failed to render content")) + `: ${toErrorMessage(err, false)}`)), content, this.chatContentMarkdownRenderer);
1626
1632
  return {
1627
1633
  dispose: () => errorPart.dispose(),
1628
1634
  domNode: errorPart.domNode,
@@ -1898,7 +1904,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1898
1904
  }
1899
1905
  const shouldPinToThinking = hookPart.hookType === HookType.PreToolUse || hookPart.hookType === HookType.PostToolUse;
1900
1906
  if (shouldPinToThinking) {
1901
- const hookTitle = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(6640, "Blocked {0}", hookPart.toolDisplayName)) : ( localize(6641, "Blocked by hook"))) : (hookPart.toolDisplayName ? ( localize(6642, "Used {0}, but received a warning", hookPart.toolDisplayName)) : ( localize(6643, "Tool call received a warning")));
1907
+ const hookTitle = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(6736, "Blocked {0}", hookPart.toolDisplayName)) : ( localize(6737, "Blocked by hook"))) : (hookPart.toolDisplayName ? ( localize(6738, "Used {0}, but received a warning", hookPart.toolDisplayName)) : ( localize(6739, "Tool call received a warning")));
1902
1908
  let thinkingPart = this.getLastThinkingPart(templateData.renderedParts);
1903
1909
  if (!thinkingPart) {
1904
1910
  const newThinking = this.renderThinkingPart({
@@ -1961,11 +1967,11 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1961
1967
  const requestMessageText = isResponseVM(context.element) ? this.getRequestMessageText(context.element) : undefined;
1962
1968
  const handleSubmit = async (answers, part) => {
1963
1969
  const answersRecord = answers ? Object.fromEntries(answers) : undefined;
1964
- if (answersRecord) {
1965
- carousel.data = answersRecord;
1966
- }
1970
+ carousel.data = answersRecord ?? {};
1967
1971
  carousel.isUsed = true;
1968
1972
  if (carousel instanceof ChatQuestionCarouselData) {
1973
+ carousel.draftAnswers = undefined;
1974
+ carousel.draftCurrentIndex = undefined;
1969
1975
  carousel.completion.complete({
1970
1976
  answers: answersRecord
1971
1977
  });
@@ -1974,15 +1980,18 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1974
1980
  this.chatService.notifyQuestionCarouselAnswer(context.element.requestId, carousel.resolveId, answersRecord);
1975
1981
  }
1976
1982
  this.removeCarouselFromTracking(context, part);
1977
- widget?.input.clearQuestionCarousel();
1983
+ const carouselKey = carousel.resolveId ?? `${responseId}_${context.contentIndex}`;
1984
+ widget?.input.clearQuestionCarousel(undefined, carouselKey);
1978
1985
  };
1979
1986
  const responseIsComplete = isResponseVM(context.element) && context.element.isComplete;
1980
1987
  const inputPartHasCarousel = widget?.input.questionCarousel !== undefined;
1981
1988
  if (carousel.isUsed || responseIsComplete) {
1982
- if (responseIsComplete && !carousel.isUsed && isResponseVM(context.element) && carousel.resolveId && carousel.data === undefined) {
1989
+ if (responseIsComplete && !carousel.isUsed && isResponseVM(context.element) && carousel.resolveId) {
1983
1990
  carousel.data = {};
1984
1991
  carousel.isUsed = true;
1985
1992
  if (carousel instanceof ChatQuestionCarouselData) {
1993
+ carousel.draftAnswers = undefined;
1994
+ carousel.draftCurrentIndex = undefined;
1986
1995
  carousel.completion.complete({
1987
1996
  answers: undefined
1988
1997
  });
@@ -2070,10 +2079,10 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
2070
2079
  return;
2071
2080
  }
2072
2081
  const questionCount = carousel.questions.length;
2073
- const question = carousel.questions.length > 0 && carousel.questions[0].message ? carousel.questions[0].message : ( localize(6644, "Chat input required."));
2082
+ const question = carousel.questions.length > 0 && carousel.questions[0].message ? carousel.questions[0].message : ( localize(6740, "Chat input required."));
2074
2083
  const stringQuestion = typeof question === "string" ? question : question.value;
2075
- const alertMessage = questionCount === 1 ? ( localize(6645, "Chat input required (1 question): {0}", stringQuestion)) : ( localize(
2076
- 6646,
2084
+ const alertMessage = questionCount === 1 ? ( localize(6741, "Chat input required (1 question): {0}", stringQuestion)) : ( localize(
2085
+ 6742,
2077
2086
  "Chat input required ({0} questions): {1}",
2078
2087
  questionCount,
2079
2088
  stringQuestion
@@ -2082,7 +2091,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
2082
2091
  if (stableKey) {
2083
2092
  this._notifiedQuestionCarousels.add(stableKey);
2084
2093
  }
2085
- const signalMessage = questionCount === 1 ? ( localize(6647, "Chat needs your input (1 question).")) : ( localize(6648, "Chat needs your input ({0} questions).", questionCount));
2094
+ const signalMessage = questionCount === 1 ? ( localize(6743, "Chat needs your input (1 question).")) : ( localize(6744, "Chat needs your input ({0} questions).", questionCount));
2086
2095
  this.accessibilitySignalService.playSignal(AccessibilitySignal.chatUserActionRequired, {
2087
2096
  allowManyInParallel: true,
2088
2097
  customAlertMessage: signalMessage
@@ -2100,7 +2109,8 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
2100
2109
  this._autoRepliedQuestionCarousels.add(stableKey);
2101
2110
  }
2102
2111
  void this._autoReply.shouldAutoReply().then(shouldAutoReply => {
2103
- if (!shouldAutoReply) {
2112
+ const isAutopilot = this._isAutopilotForContext(context);
2113
+ if (!shouldAutoReply && !isAutopilot) {
2104
2114
  if (stableKey) {
2105
2115
  this._autoRepliedQuestionCarousels.delete(stableKey);
2106
2116
  }
@@ -2122,6 +2132,18 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
2122
2132
  const request = items.find(item => isRequestVM(item) && item.id === requestId);
2123
2133
  return request?.messageText;
2124
2134
  }
2135
+ _isAutopilotForContext(context) {
2136
+ if (isResponseVM(context.element) && context.element.model.request?.modeInfo?.permissionLevel === ChatPermissionLevel.Autopilot) {
2137
+ return true;
2138
+ }
2139
+ if (isResponseVM(context.element)) {
2140
+ const widget = this.chatWidgetService.getWidgetBySessionResource(context.element.sessionResource) ?? this.chatWidgetService.lastFocusedWidget;
2141
+ if (widget?.input.currentModeInfo.permissionLevel === ChatPermissionLevel.Autopilot) {
2142
+ return true;
2143
+ }
2144
+ }
2145
+ return false;
2146
+ }
2125
2147
  removeCarouselFromTracking(context, part) {
2126
2148
  if (isResponseVM(context.element)) {
2127
2149
  const carousels = this.pendingQuestionCarousels.get(context.element.sessionResource);
@@ -2159,7 +2181,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
2159
2181
  c => c.kind === "thinking" || c.kind === "toolInvocation" || c.kind === "toolInvocationSerialized"
2160
2182
  ) : -1;
2161
2183
  const isFinalAnswerPart = isFinalRenderPass && context.contentIndex > lastPinnedPartIndex;
2162
- if (!this.hasCodeblockUri(markdown) || isFinalAnswerPart) {
2184
+ if (!this.hasEditCodeblockUri(markdown) || isFinalAnswerPart) {
2163
2185
  this.finalizeCurrentThinkingPart(context, templateData);
2164
2186
  }
2165
2187
  const fillInIncompleteTokens = isResponseVM(element) && (!element.isComplete || element.isCanceled || element.errorDetails?.responseIsFiltered || element.errorDetails?.responseIsIncomplete || !!element.renderData);
@@ -2210,7 +2232,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
2210
2232
  })
2211
2233
  );
2212
2234
  markdownPart.addDisposable(
2213
- this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), markdownPart.domNode, ( localize(6649, "Click to Edit")), {
2235
+ this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), markdownPart.domNode, ( localize(6745, "Click to Edit")), {
2214
2236
  trapFocus: true
2215
2237
  })
2216
2238
  );
@@ -2372,15 +2394,15 @@ class ChatListDelegate extends CachedListVirtualDelegate {
2372
2394
  }
2373
2395
  }
2374
2396
  const voteDownDetailLabels = {
2375
- [ChatAgentVoteDownReason.IncorrectCode]: ( localize(6650, "Suggested incorrect code")),
2376
- [ChatAgentVoteDownReason.DidNotFollowInstructions]: ( localize(6651, "Didn't follow instructions")),
2377
- [ChatAgentVoteDownReason.MissingContext]: ( localize(6652, "Missing context")),
2378
- [ChatAgentVoteDownReason.OffensiveOrUnsafe]: ( localize(6653, "Offensive or unsafe")),
2379
- [ChatAgentVoteDownReason.PoorlyWrittenOrFormatted]: ( localize(6654, "Poorly written or formatted")),
2380
- [ChatAgentVoteDownReason.RefusedAValidRequest]: ( localize(6655, "Refused a valid request")),
2381
- [ChatAgentVoteDownReason.IncompleteCode]: ( localize(6656, "Incomplete code")),
2382
- [ChatAgentVoteDownReason.WillReportIssue]: ( localize(6657, "Report an issue")),
2383
- [ChatAgentVoteDownReason.Other]: ( localize(6658, "Other"))
2397
+ [ChatAgentVoteDownReason.IncorrectCode]: ( localize(6746, "Suggested incorrect code")),
2398
+ [ChatAgentVoteDownReason.DidNotFollowInstructions]: ( localize(6747, "Didn't follow instructions")),
2399
+ [ChatAgentVoteDownReason.MissingContext]: ( localize(6748, "Missing context")),
2400
+ [ChatAgentVoteDownReason.OffensiveOrUnsafe]: ( localize(6749, "Offensive or unsafe")),
2401
+ [ChatAgentVoteDownReason.PoorlyWrittenOrFormatted]: ( localize(6750, "Poorly written or formatted")),
2402
+ [ChatAgentVoteDownReason.RefusedAValidRequest]: ( localize(6751, "Refused a valid request")),
2403
+ [ChatAgentVoteDownReason.IncompleteCode]: ( localize(6752, "Incomplete code")),
2404
+ [ChatAgentVoteDownReason.WillReportIssue]: ( localize(6753, "Report an issue")),
2405
+ [ChatAgentVoteDownReason.Other]: ( localize(6754, "Other"))
2384
2406
  };
2385
2407
  let ChatVoteDownButton = class ChatVoteDownButton extends DropdownMenuActionViewItem {
2386
2408
  constructor(