@codingame/monaco-vscode-katex-common 34.1.2 → 35.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 (244) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/base/browser/animationSync.d.ts +36 -0
  3. package/vscode/src/vs/base/browser/animationSync.js +23 -0
  4. package/vscode/src/vs/base/browser/ui/pixelSpinner/pixelSpinner.js +23 -2
  5. package/vscode/src/vs/platform/actions/browser/buttonbar.js +3 -2
  6. package/vscode/src/vs/platform/agentHost/common/claudeSessionConfigKeys.d.ts +5 -5
  7. package/vscode/src/vs/platform/agentHost/common/fileEditDiff.d.ts +32 -0
  8. package/vscode/src/vs/platform/agentHost/common/fileEditDiff.js +33 -0
  9. package/vscode/src/vs/platform/agentHost/common/meta/agentFeedbackAnnotations.d.ts +90 -0
  10. package/vscode/src/vs/platform/agentHost/common/meta/agentFeedbackAttachments.d.ts +30 -0
  11. package/vscode/src/vs/platform/agentHost/common/meta/agentToolCallMeta.d.ts +65 -0
  12. package/vscode/src/vs/platform/agentHost/common/sessionConfigKeys.d.ts +16 -5
  13. package/vscode/src/vs/platform/agentHost/common/sessionConfigKeys.js +3 -2
  14. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-resource-watch/reducer.d.ts +21 -0
  15. package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +8 -0
  16. package/vscode/src/vs/platform/agentHost/common/state/sessionReducers.d.ts +9 -0
  17. package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +2 -2
  18. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +29 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +105 -28
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +15 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +74 -44
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +2 -2
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +98 -24
  28. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution.d.ts +8 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution.js +31 -4
  30. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.d.ts +45 -4
  31. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.js +163 -37
  32. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostFolderPickerActionItem.d.ts +47 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostFolderPickerActionItem.js +172 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostGenericConfigChips.d.ts +3 -1
  35. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostGenericConfigChips.js +7 -4
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionReferenceAttachment.d.ts +12 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSnapshotController.d.ts +116 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSnapshotController.js +348 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/media/agentHostChatInputPicker.css +1 -1
  40. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.d.ts +211 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.js +64 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +18 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +13 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +1 -1
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +30 -18
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +4 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +29 -4
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +9 -9
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +24 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +119 -41
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +27 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionTypeAvailability.d.ts +63 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionTypeAvailability.js +97 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +5 -6
  56. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +105 -88
  57. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +13 -13
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +1 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +46 -48
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +28 -0
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +98 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +3 -3
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +9 -7
  64. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatTurnPills.css +162 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.d.ts +9 -2
  66. package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.js +95 -24
  67. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +22 -1
  68. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +151 -20
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +10 -10
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +20 -2
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +5 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +61 -17
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAutoModeResolutionContentPart.d.ts +20 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAutoModeResolutionContentPart.js +55 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +6 -2
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +81 -30
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +2 -2
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatEditPillElement.d.ts +11 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatEditPillElement.js +13 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +9 -33
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExternalEditContentPart.d.ts +6 -2
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExternalEditContentPart.js +21 -11
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +6 -2
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +40 -19
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpAuthenticationContentPart.d.ts +35 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpAuthenticationContentPart.js +140 -0
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersStartingContentPart.d.ts +24 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersStartingContentPart.js +58 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +3 -1
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +29 -8
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +30 -30
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +1 -1
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +44 -44
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +1 -2
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +12 -66
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +6 -6
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +39 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +167 -43
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.d.ts +1 -15
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +9 -86
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSystemNotificationContentPart.d.ts +12 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSystemNotificationContentPart.js +23 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +9 -1
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +141 -72
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +2 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +17 -3
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTurnPillsPart.d.ts +29 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTurnPillsPart.js +110 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatAgentFeedbackReviewConfirmation.css +133 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatAutoModeResolution.css +30 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +4 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +18 -8
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css +23 -7
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +33 -18
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +23 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +44 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +2 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatToolConfirmationCarousel.css +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +9 -1
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +21 -4
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatAgentFeedbackReviewConfirmationSubPart.d.ts +48 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatAgentFeedbackReviewConfirmationSubPart.js +279 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +43 -1
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +53 -15
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +7 -9
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.d.ts +4 -1
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +24 -10
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/{chatMissingSandboxDepsConfirmationSubPart.d.ts → chatSandboxPrerequisiteConfirmationSubPart.d.ts} +3 -2
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/{chatMissingSandboxDepsConfirmationSubPart.js → chatSandboxPrerequisiteConfirmationSubPart.js} +14 -10
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +0 -1
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +30 -59
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +2 -1
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +41 -29
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +8 -8
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +2 -1
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +12 -9
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +1 -1
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +43 -35
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +5 -5
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +2 -1
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +11 -8
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeHelper.d.ts +18 -0
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeHelper.js +51 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.js +4 -4
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +18 -3
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +266 -98
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +1 -0
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +8 -3
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatRestoreCheckpointActionViewItem.d.ts +32 -0
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatRestoreCheckpointActionViewItem.js +135 -0
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatTurnPills.d.ts +85 -0
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatTurnPills.js +275 -0
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +18 -1
  176. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +84 -37
  177. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  178. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatGoalBannerWidget.js +4 -4
  179. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +14 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.d.ts +6 -1
  181. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.js +52 -4
  182. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +187 -13
  183. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +435 -139
  184. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatePersistence.d.ts +6 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatePersistence.js +21 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationLogic.d.ts +50 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationLogic.js +49 -0
  188. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationStore.d.ts +79 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationStore.js +127 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +84 -8
  191. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +658 -430
  192. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +72 -8
  193. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +82 -7
  194. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.js +2 -2
  195. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +3 -3
  196. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +6 -3
  197. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +2 -1
  198. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +23 -9
  199. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatGoalBannerWidget.css +2 -2
  200. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatInputNotificationWidget.css +28 -12
  201. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +3 -0
  202. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +15 -14
  203. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +60 -0
  204. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +18 -7
  205. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +49 -1
  206. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +141 -81
  207. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +7 -15
  208. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +30 -47
  209. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
  210. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerInputActionItem.d.ts +20 -0
  211. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerInputActionItem.js +18 -0
  212. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +469 -148
  213. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +11 -2
  214. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +79 -28
  215. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +71 -2
  216. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +107 -45
  217. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +20 -0
  218. package/vscode/src/vs/workbench/contrib/chat/common/chatErrorMessages.d.ts +110 -0
  219. package/vscode/src/vs/workbench/contrib/chat/common/chatErrorMessages.js +37 -0
  220. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +4 -1
  221. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +13 -11
  222. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.d.ts +8 -1
  223. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.js +57 -21
  224. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +18 -18
  225. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +4 -4
  226. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
  227. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
  228. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +30 -30
  229. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  230. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +39 -8
  231. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +168 -72
  232. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
  239. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
  240. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
  241. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  242. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  243. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatusActionViewItem.d.ts +0 -30
  244. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatusActionViewItem.js +0 -147
@@ -3,6 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { isFalsyOrEmpty } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
4
4
  import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
5
5
  import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
6
+ import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
6
7
  import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
7
8
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
8
9
  import { basename, joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
@@ -19,7 +20,7 @@ import { LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench
19
20
  import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
20
21
  import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
21
22
  import { CHAT_CONFIG_MENU_ID, CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
22
- import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
23
+ import { ToolDataSource, isToolSet, ToolAndToolSetEnablementMap } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
23
24
  import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
24
25
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
25
26
  import { getAllCodicons, Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
@@ -30,6 +31,7 @@ import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/json
30
31
  import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
31
32
  import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
32
33
  import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
34
+ import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
33
35
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
34
36
  import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
35
37
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
@@ -44,7 +46,7 @@ const toolSetsSchema = {
44
46
  allowComments: true,
45
47
  allowTrailingCommas: true,
46
48
  defaultSnippets: [{
47
- label: ( localize(7214, "Empty tool set")),
49
+ label: ( localize(7732, "Empty tool set")),
48
50
  body: {
49
51
  "${1:toolSetName}": {
50
52
  "tools": ["${2:someTool}", "${3:anotherTool}"],
@@ -54,7 +56,7 @@ const toolSetsSchema = {
54
56
  }
55
57
  }],
56
58
  type: "object",
57
- description: ( localize(7215, "User tool sets configuration")),
59
+ description: ( localize(7733, "User tool sets configuration")),
58
60
  additionalProperties: {
59
61
  type: "object",
60
62
  required: ["tools"],
@@ -62,7 +64,7 @@ const toolSetsSchema = {
62
64
  properties: {
63
65
  tools: {
64
66
  description: ( localize(
65
- 7216,
67
+ 7734,
66
68
  "A list of tools or tool sets to include in this tool set. Cannot be empty and must reference tools the way they are referenced in prompts."
67
69
  )),
68
70
  type: "array",
@@ -75,7 +77,7 @@ const toolSetsSchema = {
75
77
  },
76
78
  icon: {
77
79
  description: ( localize(
78
- 7217,
80
+ 7735,
79
81
  "Icon to use for this tool set in the UI. Uses the \"\\$(name)\"-syntax, like \"\\$(zap)\""
80
82
  )),
81
83
  type: "string",
@@ -83,7 +85,7 @@ const toolSetsSchema = {
83
85
  markdownEnumDescriptions: Array.from(getAllCodicons(), icon => `$(${icon.id})`)
84
86
  },
85
87
  description: {
86
- description: ( localize(7218, "A short description of this tool set.")),
88
+ description: ( localize(7736, "A short description of this tool set.")),
87
89
  type: "string"
88
90
  }
89
91
  }
@@ -156,7 +158,7 @@ let UserToolSetsContributions = class UserToolSetsContributions extends Disposab
156
158
  for (const tool of tools) {
157
159
  if (tool.canBeReferencedInPrompt) {
158
160
  data.push({
159
- name: tool.toolReferenceName ?? tool.displayName,
161
+ name: this._languageModelToolsService.getFullReferenceName(tool),
160
162
  sourceLabel: ToolDataSource.classify(tool.source).label,
161
163
  sourceOrdinal: ToolDataSource.classify(tool.source).ordinal,
162
164
  description: tool.userDescription ?? tool.modelDescription
@@ -165,7 +167,7 @@ let UserToolSetsContributions = class UserToolSetsContributions extends Disposab
165
167
  }
166
168
  for (const toolSet of toolSets) {
167
169
  data.push({
168
- name: toolSet.referenceName,
170
+ name: this._languageModelToolsService.getFullReferenceName(toolSet),
169
171
  sourceLabel: ToolDataSource.classify(toolSet.source).label,
170
172
  sourceOrdinal: ToolDataSource.classify(toolSet.source).ordinal,
171
173
  description: toolSet.description
@@ -184,7 +186,7 @@ let UserToolSetsContributions = class UserToolSetsContributions extends Disposab
184
186
  });
185
187
  for (const item of data) {
186
188
  toolEnumValues.push(item.name);
187
- toolEnumDescriptions.push(( localize(7219, "{1} ({0})\n\n{2}", item.sourceLabel, item.name, item.description)));
189
+ toolEnumDescriptions.push(( localize(7737, "{1} ({0})\n\n{2}", item.sourceLabel, item.name, item.description)));
188
190
  }
189
191
  store.clear();
190
192
  reg.registerSchema(toolSetSchemaId, toolSetsSchema, store);
@@ -241,6 +243,14 @@ let UserToolSetsContributions = class UserToolSetsContributions extends Disposab
241
243
  const tools = [];
242
244
  const toolSets = [];
243
245
  value.tools.forEach(name => {
246
+ const toolOrToolSet = this._languageModelToolsService.getToolByFullReferenceName(name);
247
+ if (isToolSet(toolOrToolSet)) {
248
+ toolSets.push(toolOrToolSet);
249
+ return;
250
+ } else if (toolOrToolSet) {
251
+ tools.push(toolOrToolSet);
252
+ return;
253
+ }
244
254
  const tool = this._languageModelToolsService.getToolByName(name);
245
255
  if (tool) {
246
256
  tools.push(tool);
@@ -261,7 +271,8 @@ let UserToolSetsContributions = class UserToolSetsContributions extends Disposab
261
271
  label: basename(entry.resource)
262
272
  }, `user/${( entry.resource.toString())}/${name}`, name, {
263
273
  icon: value.icon ? ThemeIcon.fromId(value.icon) : undefined,
264
- description: value.description
274
+ description: value.description,
275
+ deprecated: true
265
276
  });
266
277
  transaction(tx => {
267
278
  store.add(toolset);
@@ -274,6 +285,90 @@ let UserToolSetsContributions = class UserToolSetsContributions extends Disposab
274
285
  }
275
286
  };
276
287
  UserToolSetsContributions = ( __decorate([( __param(0, IExtensionService)), ( __param(1, ILifecycleService)), ( __param(2, ILanguageModelToolsService)), ( __param(3, IUserDataProfileService)), ( __param(4, IFileService)), ( __param(5, ILogService))], UserToolSetsContributions));
288
+ function getSelectionFromArg(arg) {
289
+ if (!isObject(arg)) {
290
+ return undefined;
291
+ }
292
+ const selection = arg.selection;
293
+ if (!(selection instanceof ToolAndToolSetEnablementMap)) {
294
+ return undefined;
295
+ }
296
+ return selection;
297
+ }
298
+ function getEnabledSelectionReferences(selection, toolsService) {
299
+ const enabledToolSets = [];
300
+ const enabledTools = [];
301
+ for (const [item, enabled] of selection) {
302
+ if (!enabled) {
303
+ continue;
304
+ }
305
+ if (isToolSet(item)) {
306
+ if (Iterable.every(item.getTools(), tool => selection.get(tool) !== false)) {
307
+ enabledToolSets.push(item);
308
+ }
309
+ } else {
310
+ enabledTools.push(item);
311
+ }
312
+ }
313
+ const coveredToolIds = ( new Set());
314
+ for (const toolSet of enabledToolSets) {
315
+ for (const tool of toolSet.getTools()) {
316
+ coveredToolIds.add(tool.id);
317
+ }
318
+ }
319
+ const references = [];
320
+ const seen = ( new Set());
321
+ const addReference = referenceName => {
322
+ if (( seen.has(referenceName))) {
323
+ return;
324
+ }
325
+ seen.add(referenceName);
326
+ references.push(referenceName);
327
+ };
328
+ for (const toolSet of enabledToolSets) {
329
+ addReference(toolsService.getFullReferenceName(toolSet));
330
+ }
331
+ for (const tool of enabledTools) {
332
+ if (( coveredToolIds.has(tool.id))) {
333
+ continue;
334
+ }
335
+ const referenceName = toolsService.getFullReferenceName(tool);
336
+ if (toolsService.getToolByFullReferenceName(referenceName) !== tool) {
337
+ continue;
338
+ }
339
+ addReference(referenceName);
340
+ }
341
+ return references;
342
+ }
343
+ function createToolSetFileContents(toolSetName, toolReferences) {
344
+ const serializedReferences = ( toolReferences.map(reference => `\t\t\t${JSON.stringify(reference)}`)).join(",\n");
345
+ return [
346
+ "{",
347
+ `\t${JSON.stringify(toolSetName)}: {`,
348
+ "\t\t\"tools\": [",
349
+ serializedReferences,
350
+ "\t\t],",
351
+ "\t\t\"description\": \"\",",
352
+ "\t\t\"icon\": \"tools\"",
353
+ "\t}",
354
+ "}"
355
+ ].join("\n");
356
+ }
357
+ function deleteToolSetFromFileContents(rawContents, toolSetName) {
358
+ const parsed = parse(rawContents);
359
+ if (!isObject(parsed)) {
360
+ return undefined;
361
+ }
362
+ const record = parsed;
363
+ if (!Object.hasOwn(record, toolSetName)) {
364
+ return undefined;
365
+ }
366
+ delete record[toolSetName];
367
+ return {
368
+ contents: JSON.stringify(record, undefined, "\t"),
369
+ isEmpty: ( Object.keys(record)).length === 0
370
+ };
371
+ }
277
372
  class ConfigureToolSets extends Action2 {
278
373
  static {
279
374
  this.ID = "chat.configureToolSets";
@@ -281,8 +376,8 @@ class ConfigureToolSets extends Action2 {
281
376
  constructor() {
282
377
  super({
283
378
  id: ConfigureToolSets.ID,
284
- title: ( localize2(7220, "Configure Tool Sets...")),
285
- shortTitle: ( localize(7221, "Tool Sets")),
379
+ title: ( localize2(7738, "Configure Tool Sets...")),
380
+ shortTitle: ( localize(7739, "Tool Sets")),
286
381
  category: CHAT_CATEGORY,
287
382
  f1: true,
288
383
  precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.Tools.toolsCount.greater(0))),
@@ -299,16 +394,28 @@ class ConfigureToolSets extends Action2 {
299
394
  }]
300
395
  });
301
396
  }
302
- async run(accessor) {
397
+ async run(accessor, options) {
303
398
  const toolsService = accessor.get(ILanguageModelToolsService);
304
399
  const quickInputService = accessor.get(IQuickInputService);
305
400
  const editorService = accessor.get(IEditorService);
306
401
  const userDataProfileService = accessor.get(IUserDataProfileService);
307
402
  const fileService = accessor.get(IFileService);
308
403
  const textFileService = accessor.get(ITextFileService);
404
+ const chatWidgetService = accessor.get(IChatWidgetService);
309
405
  const picks = [];
406
+ const currentSelection = getSelectionFromArg(options) ?? chatWidgetService.lastFocusedWidget?.input.selectedToolsModel.entriesMap.get() ?? ToolAndToolSetEnablementMap.fromEntries([]);
407
+ const selectedReferences = getEnabledSelectionReferences(currentSelection, toolsService);
408
+ if (selectedReferences.length > 0) {
409
+ picks.push({
410
+ label: ( localize(7740, "Create from current selection...")),
411
+ kind: "createFromSelection",
412
+ alwaysShow: true,
413
+ iconClass: ThemeIcon.asClassName(Codicon.plus)
414
+ });
415
+ }
310
416
  picks.push({
311
- label: ( localize(7222, "Create new tool sets file...")),
417
+ label: ( localize(7741, "Create new tool sets file...")),
418
+ kind: "createNewFile",
312
419
  alwaysShow: true,
313
420
  iconClass: ThemeIcon.asClassName(Codicon.plus)
314
421
  });
@@ -318,6 +425,7 @@ class ConfigureToolSets extends Action2 {
318
425
  }
319
426
  picks.push({
320
427
  label: toolSet.referenceName,
428
+ kind: "existing",
321
429
  toolset: toolSet,
322
430
  tooltip: toolSet.description,
323
431
  iconClass: ThemeIcon.asClassName(toolSet.icon)
@@ -325,7 +433,7 @@ class ConfigureToolSets extends Action2 {
325
433
  }
326
434
  const pick = await quickInputService.pick(picks, {
327
435
  canPickMany: false,
328
- placeHolder: ( localize(7223, "Select a tool set to configure"))
436
+ placeHolder: ( localize(7742, "Select a tool set to configure"))
329
437
  });
330
438
  if (!pick) {
331
439
  return;
@@ -333,13 +441,22 @@ class ConfigureToolSets extends Action2 {
333
441
  let resource;
334
442
  if (!pick.toolset) {
335
443
  const name = await quickInputService.input({
336
- placeHolder: ( localize(7224, "Type tool sets file name")),
444
+ placeHolder: ( localize(7743, "Type tool sets file name")),
337
445
  validateInput: async input => {
338
446
  if (!input) {
339
- return localize(7225, "Invalid file name");
447
+ return localize(7744, "Invalid file name");
340
448
  }
341
449
  if (!isValidBasename(input)) {
342
- return localize(7226, "'{0}' is not a valid file name", input);
450
+ return localize(7745, "'{0}' is not a valid file name", input);
451
+ }
452
+ if (pick.kind === "createFromSelection") {
453
+ const candidate = joinPath(
454
+ userDataProfileService.currentProfile.promptsHome,
455
+ `${input}${RawToolSetsShape.suffix}`
456
+ );
457
+ if (await fileService.exists(candidate)) {
458
+ return localize(7746, "A file with this name already exists");
459
+ }
343
460
  }
344
461
  return undefined;
345
462
  }
@@ -351,7 +468,21 @@ class ConfigureToolSets extends Action2 {
351
468
  userDataProfileService.currentProfile.promptsHome,
352
469
  `${name}${RawToolSetsShape.suffix}`
353
470
  );
354
- if (!(await fileService.exists(resource))) {
471
+ if (pick.kind === "createFromSelection") {
472
+ const toolSetName = await quickInputService.input({
473
+ placeHolder: ( localize(7747, "Type new tool set name")),
474
+ validateInput: async input => {
475
+ if (isFalsyOrWhitespace(input)) {
476
+ return localize(7748, "Tool set name cannot be empty");
477
+ }
478
+ return undefined;
479
+ }
480
+ });
481
+ if (!toolSetName || isFalsyOrWhitespace(toolSetName)) {
482
+ return;
483
+ }
484
+ await textFileService.write(resource, createToolSetFileContents(toolSetName, selectedReferences));
485
+ } else if (!(await fileService.exists(resource))) {
355
486
  await textFileService.write(resource, [
356
487
  "// Place your tool sets here...",
357
488
  "// Example:",
@@ -380,4 +511,4 @@ class ConfigureToolSets extends Action2 {
380
511
  }
381
512
  }
382
513
 
383
- export { ConfigureToolSets, UserToolSetsContributions };
514
+ export { ConfigureToolSets, RawToolSetsShape, UserToolSetsContributions, createToolSetFileContents, deleteToolSetFromFileContents, getEnabledSelectionReferences };
@@ -49,7 +49,7 @@ let ChatAgentHover = class ChatAgentHover extends Disposable {
49
49
  this.publisherName = $("span.chat-agent-hover-publisher-name");
50
50
  append(hoverElement.publisher, verifiedBadge, this.publisherName);
51
51
  hoverElement.warning.appendChild(renderIcon(Codicon.warning));
52
- hoverElement.warning.appendChild($("span", undefined, ( localize(7240, "This chat extension is using a reserved name."))));
52
+ hoverElement.warning.appendChild($("span", undefined, ( localize(7774, "This chat extension is using a reserved name."))));
53
53
  }
54
54
  setAgent(id) {
55
55
  const agent = this.chatAgentService.getAgent(id);
@@ -94,7 +94,7 @@ ChatAgentHover = ( __decorate([( __param(0, IChatAgentService)), ( __param(1, IE
94
94
  function getChatAgentHoverOptions(getAgent, commandService) {
95
95
  const viewExtensionAction = {
96
96
  commandId: showExtensionsWithIdsCommandId,
97
- label: ( localize(7241, "View Extension")),
97
+ label: ( localize(7775, "View Extension")),
98
98
  run: () => {
99
99
  const agent = getAgent();
100
100
  if (agent) {
@@ -152,7 +152,7 @@ let ChatArtifactsWidget = class ChatArtifactsWidget extends Disposable {
152
152
  return;
153
153
  }
154
154
  this.domNode.style.display = "";
155
- titleElement.textContent = data.totalCount === 1 ? ( localize(7242, "1 Artifact")) : ( localize(7243, "{0} Artifacts", data.totalCount));
155
+ titleElement.textContent = data.totalCount === 1 ? ( localize(7776, "1 Artifact")) : ( localize(7777, "{0} Artifacts", data.totalCount));
156
156
  tree.layout(data.treeHeight);
157
157
  tree.getHTMLElement().style.height = `${data.treeHeight}px`;
158
158
  tree.setChildren(null, data.treeElements);
@@ -233,7 +233,7 @@ let ChatArtifactsWidget = class ChatArtifactsWidget extends Disposable {
233
233
  const defaultUri = URI.joinPath(defaultPath, defaultFileName);
234
234
  const targetUri = await this._fileDialogService.showSaveDialog({
235
235
  defaultUri,
236
- title: ( localize(7244, "Save Artifact"))
236
+ title: ( localize(7778, "Save Artifact"))
237
237
  });
238
238
  if (targetUri) {
239
239
  const content = await this._fileService.readFile(sourceUri);
@@ -245,11 +245,11 @@ ChatArtifactsWidget = ChatArtifactsWidget_1 = ( __decorate([( __param(0, IChatAr
245
245
  function sourceDisplayName(source) {
246
246
  switch (source.kind) {
247
247
  case "rules":
248
- return localize(7245, "Rules");
248
+ return localize(7779, "Rules");
249
249
  case "agent":
250
- return localize(7246, "Agent");
250
+ return localize(7780, "Agent");
251
251
  case "subagent":
252
- return source.name ?? ( localize(7247, "Subagent"));
252
+ return source.name ?? ( localize(7781, "Subagent"));
253
253
  }
254
254
  }
255
255
  function buildTreeElementsFromGroups(sourceGroups, multiSource, onClearSource) {
@@ -383,12 +383,12 @@ class ChatArtifactsTreeDelegate {
383
383
  class ChatArtifactsAccessibilityProvider {
384
384
  getAriaLabel(element) {
385
385
  if (isGroupNode(element)) {
386
- return localize(7248, "{0} ({1} items)", element.groupName, element.artifacts.length);
386
+ return localize(7782, "{0} ({1} items)", element.groupName, element.artifacts.length);
387
387
  }
388
388
  return element.artifact.label;
389
389
  }
390
390
  getWidgetAriaLabel() {
391
- return localize(7249, "Chat Artifacts");
391
+ return localize(7783, "Chat Artifacts");
392
392
  }
393
393
  }
394
394
  class ChatArtifactGroupRenderer {
@@ -429,7 +429,7 @@ class ChatArtifactGroupRenderer {
429
429
  const clearFn = group.onClear;
430
430
  templateData.actionBar.push(toAction({
431
431
  id: "chatArtifacts.clearSource",
432
- label: ( localize(7250, "Clear")),
432
+ label: ( localize(7784, "Clear")),
433
433
  class: ThemeIcon.asClassName(Codicon.close),
434
434
  run: () => clearFn()
435
435
  }), {
@@ -493,14 +493,14 @@ class ChatArtifactLeafRenderer {
493
493
  const clearFn = onClear;
494
494
  actions.push(toAction({
495
495
  id: "chatArtifacts.clearSource",
496
- label: ( localize(7250, "Clear")),
496
+ label: ( localize(7784, "Clear")),
497
497
  class: ThemeIcon.asClassName(Codicon.close),
498
498
  run: () => clearFn()
499
499
  }));
500
500
  }
501
501
  actions.push(toAction({
502
502
  id: "chatArtifacts.save",
503
- label: ( localize(7251, "Save artifact")),
503
+ label: ( localize(7785, "Save artifact")),
504
504
  class: ThemeIcon.asClassName(Codicon.save),
505
505
  run: () => this._onSave(artifact)
506
506
  }));
@@ -13,12 +13,29 @@ import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/netw
13
13
  import { AGENT_HOST_SCHEME } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
14
14
 
15
15
  const _remoteImageDisallowed = () => false;
16
- const nonPlainTextMarkdownSyntax = /[\\`*_[\]<>|&$~]/;
16
+ const nonPlainTextMarkdownSyntax = /[\\`*_[\]<>|&$]/;
17
17
  const gfmAutolink = /\b(?:https?:\/\/|www\.)/i;
18
+ const gfmStrikethrough = /~~/;
18
19
  const blockMarkdownSyntax = /(^|\n)\s{0,3}(?:#{1,6}\s|>\s?|[-+]\s|\d+[.)]\s|---+\s*$)/;
20
+ const literalSingleTildeExtension = {
21
+ extensions: [{
22
+ name: "literalSingleTilde",
23
+ level: "inline",
24
+ tokenizer: source => {
25
+ if (source[0] === "~" && source[1] !== "~") {
26
+ return {
27
+ type: "text",
28
+ raw: "~",
29
+ text: "~"
30
+ };
31
+ }
32
+ return undefined;
33
+ }
34
+ }]
35
+ };
19
36
  function renderPlainTextMarkdown(markdown, outElement) {
20
37
  const value = markdown.value;
21
- if (!value || value.includes("\n") || nonPlainTextMarkdownSyntax.test(value) || gfmAutolink.test(value) || blockMarkdownSyntax.test(value)) {
38
+ if (!value || value.includes("\n") || nonPlainTextMarkdownSyntax.test(value) || gfmAutolink.test(value) || gfmStrikethrough.test(value) || blockMarkdownSyntax.test(value)) {
22
39
  return undefined;
23
40
  }
24
41
  const element = outElement ?? $("div");
@@ -73,6 +90,7 @@ const allowedChatMarkdownHtmlTags = ( Object.freeze([
73
90
  function getChatMarkdownRenderOptions(options) {
74
91
  return {
75
92
  ...options,
93
+ markedExtensions: options?.markedExtensions?.includes(literalSingleTildeExtension) ? options.markedExtensions : [...(options?.markedExtensions ?? []), literalSingleTildeExtension],
76
94
  sanitizerConfig: {
77
95
  replaceWithPlaintext: true,
78
96
  allowedTags: {
@@ -28,7 +28,7 @@ let ChatAgentCommandContentPart = class ChatAgentCommandContentPart extends Disp
28
28
  }, {
29
29
  groupId
30
30
  }));
31
- const rerun = ( localize(7252, "Rerun without {0}{1}", chatSubcommandLeader, cmd.name));
31
+ const rerun = ( localize(7786, "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
- 7253,
24
+ 7787,
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(7254, "Enable more AI features"));
31
+ signInButton.label = ( localize(7788, "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";
@@ -8,6 +8,7 @@ export interface IChatAttachmentsContentPartOptions {
8
8
  readonly variables: readonly IChatRequestVariableEntry[];
9
9
  readonly contentReferences?: ReadonlyArray<IChatContentReference>;
10
10
  readonly modelId?: string;
11
+ readonly resolvedModelId?: string;
11
12
  readonly domNode?: HTMLElement;
12
13
  readonly limit?: number;
13
14
  }
@@ -22,6 +23,7 @@ export declare class ChatAttachmentsContentPart extends Disposable {
22
23
  private _variables;
23
24
  private readonly contentReferences;
24
25
  private readonly modelId?;
26
+ private readonly resolvedModelId?;
25
27
  private readonly limit?;
26
28
  readonly domNode: HTMLElement | undefined;
27
29
  contextMenuHandler?: (attachment: IChatRequestVariableEntry, event: MouseEvent) => void;
@@ -31,7 +33,9 @@ export declare class ChatAttachmentsContentPart extends Disposable {
31
33
  */
32
34
  updateVariables(variables: readonly IChatRequestVariableEntry[]): void;
33
35
  private initAttachedContext;
36
+ private getRenderableAttachments;
34
37
  private getVisibleAttachments;
38
+ private currentModelDoesNotSupportImages;
35
39
  /**
36
40
  * When the total number of image attachments exceeds the model-specific
37
41
  * per-request limit, mark the oldest images (those dropped by the backend)
@@ -39,6 +43,7 @@ export declare class ChatAttachmentsContentPart extends Disposable {
39
43
  */
40
44
  private markImageLimitExceeded;
41
45
  private getImageLimitForCurrentModel;
46
+ private getCurrentLanguageModel;
42
47
  private renderShowMoreButton;
43
48
  private renderAttachment;
44
49
  }
@@ -8,8 +8,9 @@ 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, OmittedState, getImageAttachmentLimit, isElementVariableEntry, isPromptFileVariableEntry, isPromptTextVariableEntry, isTerminalVariableEntry, isPasteVariableEntry, isNotebookOutputVariableEntry, isSCMHistoryItemVariableEntry, isSCMHistoryItemChangeVariableEntry, isSCMHistoryItemChangeRangeVariableEntry, isBrowserViewVariableEntry, isWorkspaceVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
11
+ import { isAgentHostCompletionVariableEntry, isImageVariableEntry, OmittedState, getImageAttachmentLimit, isElementVariableEntry, isPromptFileVariableEntry, isPromptTextVariableEntry, isTerminalVariableEntry, isPasteVariableEntry, isNotebookOutputVariableEntry, isSCMHistoryItemVariableEntry, isSCMHistoryItemChangeVariableEntry, isSCMHistoryItemChangeRangeVariableEntry, isBrowserViewVariableEntry, 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 { isAutoLanguageModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
13
14
  import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
14
15
  import { ToolSetOrToolItemAttachmentWidget, ElementChatAttachmentWidget, ImageAttachmentWidget, PromptFileAttachmentWidget, PromptTextAttachmentWidget, FileAttachmentWidget, TerminalCommandAttachmentWidget, PasteAttachmentWidget, NotebookCellOutputChatAttachmentWidget, SCMHistoryItemAttachmentWidget, SCMHistoryItemChangeAttachmentWidget, SCMHistoryItemChangeRangeAttachmentWidget, BrowserViewAttachmentWidget, DefaultChatAttachmentWidget } from '../../attachments/chatAttachmentWidgets.js';
15
16
  import { IChatAttachmentWidgetRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.service';
@@ -31,6 +32,7 @@ let ChatAttachmentsContentPart = class ChatAttachmentsContentPart extends Dispos
31
32
  this._variables = options.variables;
32
33
  this.contentReferences = options.contentReferences ?? [];
33
34
  this.modelId = options.modelId;
35
+ this.resolvedModelId = options.resolvedModelId;
34
36
  this.limit = options.limit;
35
37
  this.domNode = options.domNode ?? $(".chat-attached-context");
36
38
  this._contextResourceLabels = this._register(this.instantiationService.createInstance(ResourceLabels, {
@@ -50,21 +52,30 @@ let ChatAttachmentsContentPart = class ChatAttachmentsContentPart extends Dispos
50
52
  initAttachedContext(container) {
51
53
  clearNode(container);
52
54
  this.attachedContextDisposables.clear();
53
- const visibleAttachments = this.getVisibleAttachments();
54
- const hasMoreAttachments = this.limit && this._variables.length > this.limit && !this._showingAll;
55
+ const renderableAttachments = this.getRenderableAttachments();
56
+ const visibleAttachments = this.getVisibleAttachments(renderableAttachments);
57
+ const remainingCount = renderableAttachments.length - visibleAttachments.length;
58
+ const hasMoreAttachments = remainingCount > 0 && !this._showingAll;
55
59
  this.markImageLimitExceeded(this._variables);
56
60
  for (const attachment of visibleAttachments) {
57
61
  this.renderAttachment(attachment, container);
58
62
  }
59
63
  if (hasMoreAttachments) {
60
- this.renderShowMoreButton(container);
64
+ this.renderShowMoreButton(container, remainingCount);
61
65
  }
62
66
  }
63
- getVisibleAttachments() {
67
+ getRenderableAttachments() {
68
+ return this._variables.filter(attachment => !isAgentHostCompletionVariableEntry(attachment));
69
+ }
70
+ getVisibleAttachments(visibleAttachments) {
64
71
  if (!this.limit || this._showingAll) {
65
- return this._variables;
72
+ return visibleAttachments;
66
73
  }
67
- return this._variables.slice(0, this.limit);
74
+ return visibleAttachments.slice(0, this.limit);
75
+ }
76
+ currentModelDoesNotSupportImages() {
77
+ const model = this.getCurrentLanguageModel();
78
+ return !!model && !isAutoLanguageModel(model) && model.metadata.capabilities?.vision === false;
68
79
  }
69
80
  markImageLimitExceeded(attachments) {
70
81
  const imageAttachments = attachments.filter(isImageVariableEntry);
@@ -93,13 +104,35 @@ let ChatAttachmentsContentPart = class ChatAttachmentsContentPart extends Dispos
93
104
  }
94
105
  }
95
106
  getImageLimitForCurrentModel() {
96
- if (!this.modelId) {
97
- return undefined;
107
+ return getImageAttachmentLimit(this.getCurrentLanguageModel()?.metadata);
108
+ }
109
+ getCurrentLanguageModel() {
110
+ const selectedMetadata = this.modelId ? this.languageModelsService.lookupLanguageModel(this.modelId) : undefined;
111
+ if (!this.resolvedModelId) {
112
+ return this.modelId && selectedMetadata ? {
113
+ identifier: this.modelId,
114
+ metadata: selectedMetadata
115
+ } : undefined;
98
116
  }
99
- return getImageAttachmentLimit(this.languageModelsService.lookupLanguageModel(this.modelId));
117
+ const directMetadata = this.languageModelsService.lookupLanguageModel(this.resolvedModelId);
118
+ if (directMetadata) {
119
+ return {
120
+ identifier: this.resolvedModelId,
121
+ metadata: directMetadata
122
+ };
123
+ }
124
+ for (const identifier of this.languageModelsService.getLanguageModelIds()) {
125
+ const metadata = this.languageModelsService.lookupLanguageModel(identifier);
126
+ if (metadata?.id === this.resolvedModelId && (!selectedMetadata || metadata.vendor === selectedMetadata.vendor)) {
127
+ return {
128
+ identifier,
129
+ metadata
130
+ };
131
+ }
132
+ }
133
+ return undefined;
100
134
  }
101
- renderShowMoreButton(container) {
102
- const remainingCount = this._variables.length - (this.limit ?? 0);
135
+ renderShowMoreButton(container, remainingCount) {
103
136
  const showMoreButton = $("div.chat-attached-context-attachment.chat-attachments-show-more-button");
104
137
  showMoreButton.setAttribute("role", "button");
105
138
  showMoreButton.setAttribute("tabindex", "0");
@@ -149,11 +182,22 @@ let ChatAttachmentsContentPart = class ChatAttachmentsContentPart extends Dispos
149
182
  supportsDeletion: false
150
183
  }, container, this._contextResourceLabels);
151
184
  } else if (isImageVariableEntry(attachment)) {
152
- attachment.omittedState = isAttachmentPartialOrOmitted ? OmittedState.Full : attachment.omittedState;
153
- widget = this.instantiationService.createInstance(ImageAttachmentWidget, resource, attachment, undefined, {
154
- shouldFocusClearButton: false,
155
- supportsDeletion: false
156
- }, container, this._contextResourceLabels);
185
+ const renderedAttachment = isAttachmentPartialOrOmitted || this.currentModelDoesNotSupportImages() ? {
186
+ ...attachment,
187
+ omittedState: OmittedState.Full
188
+ } : attachment;
189
+ widget = this.instantiationService.createInstance(
190
+ ImageAttachmentWidget,
191
+ resource,
192
+ renderedAttachment,
193
+ this.getCurrentLanguageModel(),
194
+ {
195
+ shouldFocusClearButton: false,
196
+ supportsDeletion: false
197
+ },
198
+ container,
199
+ this._contextResourceLabels
200
+ );
157
201
  } else if (isPromptFileVariableEntry(attachment)) {
158
202
  if (attachment.automaticallyAdded) {
159
203
  return;