@codingame/monaco-vscode-katex-common 34.1.3 → 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
@@ -29,7 +29,7 @@ var InlineChatConfigKeys;
29
29
  id: "editor",
30
30
  properties: {
31
31
  [InlineChatConfigKeys.NotebookAgent]: {
32
- markdownDescription: ( localize(10731, "Enable agent-like behavior for inline chat widget in notebooks.")),
32
+ markdownDescription: ( localize(11347, "Enable agent-like behavior for inline chat widget in notebooks.")),
33
33
  default: false,
34
34
  type: "boolean",
35
35
  tags: ["experimental"],
@@ -39,13 +39,13 @@ var InlineChatConfigKeys;
39
39
  },
40
40
  [InlineChatConfigKeys.Affordance]: {
41
41
  description: ( localize(
42
- 10732,
42
+ 11348,
43
43
  "Controls whether an inline chat affordance is shown when text is selected."
44
44
  )),
45
45
  default: "off",
46
46
  type: "string",
47
47
  enum: ["off", "editor"],
48
- enumDescriptions: [( localize(10733, "No affordance is shown.")), ( localize(10734, "Show an affordance in the editor at the cursor position."))],
48
+ enumDescriptions: [( localize(11349, "No affordance is shown.")), ( localize(11350, "Show an affordance in the editor at the cursor position."))],
49
49
  experiment: {
50
50
  mode: "auto"
51
51
  },
@@ -56,7 +56,7 @@ var InlineChatConfigKeys;
56
56
  },
57
57
  [InlineChatConfigKeys.FixDiagnostics]: {
58
58
  description: ( localize(
59
- 10735,
59
+ 11351,
60
60
  "Controls whether the Fix action is shown for diagnostics in the editor."
61
61
  )),
62
62
  default: true,
@@ -68,7 +68,7 @@ var InlineChatConfigKeys;
68
68
  },
69
69
  [InlineChatConfigKeys.AskInChat]: {
70
70
  description: ( localize(
71
- 10736,
71
+ 11352,
72
72
  "Controls whether files in a chat editing session use Ask in Chat instead of Inline Chat."
73
73
  )),
74
74
  default: true,
@@ -78,23 +78,23 @@ var InlineChatConfigKeys;
78
78
  });
79
79
  const INLINE_CHAT_ID = "editor.contrib.inlineChatController";
80
80
  const CTX_INLINE_CHAT_POSSIBLE = ( new RawContextKey("inlineChatPossible", false, ( localize(
81
- 10737,
81
+ 11353,
82
82
  "Whether a provider for inline chat exists and whether an editor for inline chat is open"
83
83
  ))));
84
- const CTX_INLINE_CHAT_HAS_AGENT = ( new RawContextKey("inlineChatHasEditsAgent", false, ( localize(10738, "Whether an agent for inline chat in interactive editors exists"))));
85
- const CTX_INLINE_CHAT_HAS_NOTEBOOK_INLINE = ( new RawContextKey("inlineChatHasNotebookInline", false, ( localize(10739, "Whether an agent for notebook cells exists"))));
86
- const CTX_INLINE_CHAT_HAS_NOTEBOOK_AGENT = ( new RawContextKey("inlineChatHasNotebookAgent", false, ( localize(10740, "Whether an agent for notebook cells exists"))));
87
- const CTX_INLINE_CHAT_VISIBLE = ( new RawContextKey("inlineChatVisible", false, ( localize(10741, "Whether the interactive editor input is visible"))));
88
- const CTX_INLINE_CHAT_FOCUSED = ( new RawContextKey("inlineChatFocused", false, ( localize(10742, "Whether the interactive editor input is focused"))));
89
- const CTX_INLINE_CHAT_RESPONSE_FOCUSED = ( new RawContextKey("inlineChatResponseFocused", false, ( localize(10743, "Whether the interactive widget's response is focused"))));
84
+ const CTX_INLINE_CHAT_HAS_AGENT = ( new RawContextKey("inlineChatHasEditsAgent", false, ( localize(11354, "Whether an agent for inline chat in interactive editors exists"))));
85
+ const CTX_INLINE_CHAT_HAS_NOTEBOOK_INLINE = ( new RawContextKey("inlineChatHasNotebookInline", false, ( localize(11355, "Whether an agent for notebook cells exists"))));
86
+ const CTX_INLINE_CHAT_HAS_NOTEBOOK_AGENT = ( new RawContextKey("inlineChatHasNotebookAgent", false, ( localize(11356, "Whether an agent for notebook cells exists"))));
87
+ const CTX_INLINE_CHAT_VISIBLE = ( new RawContextKey("inlineChatVisible", false, ( localize(11357, "Whether the interactive editor input is visible"))));
88
+ const CTX_INLINE_CHAT_FOCUSED = ( new RawContextKey("inlineChatFocused", false, ( localize(11358, "Whether the interactive editor input is focused"))));
89
+ const CTX_INLINE_CHAT_RESPONSE_FOCUSED = ( new RawContextKey("inlineChatResponseFocused", false, ( localize(11359, "Whether the interactive widget's response is focused"))));
90
90
  const CTX_INLINE_CHAT_OUTER_CURSOR_POSITION = ( new RawContextKey("inlineChatOuterCursorPosition", "", ( localize(
91
- 10744,
91
+ 11360,
92
92
  "Whether the cursor of the outer editor is above or below the interactive editor input"
93
93
  ))));
94
- const CTX_INLINE_CHAT_REQUEST_IN_PROGRESS = ( new RawContextKey("inlineChatRequestInProgress", false, ( localize(10745, "Whether an inline chat request is currently in progress"))));
95
- const CTX_INLINE_CHAT_FILE_BELONGS_TO_CHAT = ( new RawContextKey("inlineChatFileBelongsToChat", false, ( localize(10746, "Whether the current file belongs to a chat editing session"))));
96
- const CTX_INLINE_CHAT_TERMINATED = ( new RawContextKey("inlineChatTerminated", false, ( localize(10747, "Whether the current inline chat session is terminated"))));
97
- const CTX_INLINE_CHAT_AFFORDANCE_VISIBLE = ( new RawContextKey("inlineChatAffordanceVisible", false, ( localize(10748, "Whether an inline chat affordance widget is visible"))));
94
+ const CTX_INLINE_CHAT_REQUEST_IN_PROGRESS = ( new RawContextKey("inlineChatRequestInProgress", false, ( localize(11361, "Whether an inline chat request is currently in progress"))));
95
+ const CTX_INLINE_CHAT_FILE_BELONGS_TO_CHAT = ( new RawContextKey("inlineChatFileBelongsToChat", false, ( localize(11362, "Whether the current file belongs to a chat editing session"))));
96
+ const CTX_INLINE_CHAT_TERMINATED = ( new RawContextKey("inlineChatTerminated", false, ( localize(11363, "Whether the current inline chat session is terminated"))));
97
+ const CTX_INLINE_CHAT_AFFORDANCE_VISIBLE = ( new RawContextKey("inlineChatAffordanceVisible", false, ( localize(11364, "Whether an inline chat affordance widget is visible"))));
98
98
  const CTX_INLINE_CHAT_V2_ENABLED = ( ContextKeyExpr.or(CTX_INLINE_CHAT_HAS_AGENT, ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, CTX_INLINE_CHAT_HAS_NOTEBOOK_AGENT))));
99
99
  const CTX_FIX_DIAGNOSTICS_ENABLED = ( ContextKeyExpr.equals("config.inlineChat.fixDiagnostics", true));
100
100
  const CTX_ASK_IN_CHAT_ENABLED = ( ContextKeyExpr.equals("config.inlineChat.askInChat", true));
@@ -102,37 +102,37 @@ const ACTION_START = "inlineChat.start";
102
102
  const ACTION_ASK_IN_CHAT = "inlineChat.askInChat";
103
103
  const MENU_INLINE_CHAT_WIDGET_SECONDARY = MenuId.for("inlineChatWidget.secondary");
104
104
  const MENU_INLINE_CHAT_SIDE = MenuId.for("inlineChatWidget.side");
105
- const inlineChatForeground = registerColor("inlineChat.foreground", editorWidgetForeground, ( localize(10749, "Foreground color of the interactive editor widget")));
106
- const inlineChatBackground = registerColor("inlineChat.background", editorWidgetBackground, ( localize(10750, "Background color of the interactive editor widget")));
107
- registerColor("inlineChat.border", editorWidgetBorder, ( localize(10751, "Border color of the interactive editor widget")));
108
- registerColor("inlineChat.shadow", widgetShadow, ( localize(10752, "Shadow color of the interactive editor widget")));
109
- registerColor("inlineChatInput.border", editorWidgetBorder, ( localize(10753, "Border color of the interactive editor input")));
110
- registerColor("inlineChatInput.focusBorder", focusBorder, ( localize(10754, "Border color of the interactive editor input when focused")));
105
+ const inlineChatForeground = registerColor("inlineChat.foreground", editorWidgetForeground, ( localize(11365, "Foreground color of the interactive editor widget")));
106
+ const inlineChatBackground = registerColor("inlineChat.background", editorWidgetBackground, ( localize(11366, "Background color of the interactive editor widget")));
107
+ registerColor("inlineChat.border", editorWidgetBorder, ( localize(11367, "Border color of the interactive editor widget")));
108
+ registerColor("inlineChat.shadow", widgetShadow, ( localize(11368, "Shadow color of the interactive editor widget")));
109
+ registerColor("inlineChatInput.border", editorWidgetBorder, ( localize(11369, "Border color of the interactive editor input")));
110
+ registerColor("inlineChatInput.focusBorder", focusBorder, ( localize(11370, "Border color of the interactive editor input when focused")));
111
111
  registerColor(
112
112
  "inlineChatInput.placeholderForeground",
113
113
  inputPlaceholderForeground,
114
- ( localize(10755, "Foreground color of the interactive editor input placeholder"))
114
+ ( localize(11371, "Foreground color of the interactive editor input placeholder"))
115
115
  );
116
- registerColor("inlineChatInput.background", inputBackground, ( localize(10756, "Background color of the interactive editor input")));
117
- registerColor("inlineChatDiff.inserted", ( transparent(diffInserted, .5)), ( localize(10757, "Background color of inserted text in the interactive editor input")));
116
+ registerColor("inlineChatInput.background", inputBackground, ( localize(11372, "Background color of the interactive editor input")));
117
+ registerColor("inlineChatDiff.inserted", ( transparent(diffInserted, .5)), ( localize(11373, "Background color of inserted text in the interactive editor input")));
118
118
  registerColor("editorOverviewRuler.inlineChatInserted", {
119
119
  dark: ( transparent(diffInserted, 0.6)),
120
120
  light: ( transparent(diffInserted, 0.8)),
121
121
  hcDark: ( transparent(diffInserted, 0.6)),
122
122
  hcLight: ( transparent(diffInserted, 0.8))
123
- }, ( localize(10758, "Overview ruler marker color for inline chat inserted content.")));
123
+ }, ( localize(11374, "Overview ruler marker color for inline chat inserted content.")));
124
124
  registerColor("editorMinimap.inlineChatInserted", {
125
125
  dark: ( transparent(diffInserted, 0.6)),
126
126
  light: ( transparent(diffInserted, 0.8)),
127
127
  hcDark: ( transparent(diffInserted, 0.6)),
128
128
  hcLight: ( transparent(diffInserted, 0.8))
129
- }, ( localize(10759, "Minimap marker color for inline chat inserted content.")));
130
- registerColor("inlineChatDiff.removed", ( transparent(diffRemoved, .5)), ( localize(10760, "Background color of removed text in the interactive editor input")));
129
+ }, ( localize(11375, "Minimap marker color for inline chat inserted content.")));
130
+ registerColor("inlineChatDiff.removed", ( transparent(diffRemoved, .5)), ( localize(11376, "Background color of removed text in the interactive editor input")));
131
131
  registerColor("editorOverviewRuler.inlineChatRemoved", {
132
132
  dark: ( transparent(diffRemoved, 0.6)),
133
133
  light: ( transparent(diffRemoved, 0.8)),
134
134
  hcDark: ( transparent(diffRemoved, 0.6)),
135
135
  hcLight: ( transparent(diffRemoved, 0.8))
136
- }, ( localize(10761, "Overview ruler marker color for inline chat removed content.")));
136
+ }, ( localize(11377, "Overview ruler marker color for inline chat removed content.")));
137
137
 
138
138
  export { ACTION_ASK_IN_CHAT, ACTION_START, CTX_ASK_IN_CHAT_ENABLED, CTX_FIX_DIAGNOSTICS_ENABLED, CTX_INLINE_CHAT_AFFORDANCE_VISIBLE, CTX_INLINE_CHAT_FILE_BELONGS_TO_CHAT, CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_HAS_AGENT, CTX_INLINE_CHAT_HAS_NOTEBOOK_AGENT, CTX_INLINE_CHAT_HAS_NOTEBOOK_INLINE, CTX_INLINE_CHAT_OUTER_CURSOR_POSITION, CTX_INLINE_CHAT_POSSIBLE, CTX_INLINE_CHAT_REQUEST_IN_PROGRESS, CTX_INLINE_CHAT_RESPONSE_FOCUSED, CTX_INLINE_CHAT_TERMINATED, CTX_INLINE_CHAT_V2_ENABLED, CTX_INLINE_CHAT_VISIBLE, INLINE_CHAT_ID, InlineChatConfigKeys, MENU_INLINE_CHAT_SIDE, MENU_INLINE_CHAT_WIDGET_SECONDARY, inlineChatBackground, inlineChatForeground };
@@ -88,7 +88,7 @@ let ReplInputHintContentWidget = class ReplInputHintContentWidget extends Dispos
88
88
  const keybinding = this.getKeybinding();
89
89
  const keybindingHintLabel = keybinding?.getLabel();
90
90
  if (keybinding && keybindingHintLabel) {
91
- const actionPart = ( localize(10784, "Press {0} to execute. ", keybindingHintLabel));
91
+ const actionPart = ( localize(11400, "Press {0} to execute. ", keybindingHintLabel));
92
92
  const [before, after] = ( actionPart.split(keybindingHintLabel).map(fragment => {
93
93
  const hintPart = $("span", undefined, fragment);
94
94
  hintPart.style.fontStyle = "italic";
@@ -105,9 +105,9 @@ let ReplInputHintContentWidget = class ReplInputHintContentWidget extends Dispos
105
105
  hintElement.appendChild(after);
106
106
  this.domNode.append(hintElement);
107
107
  const helpKeybinding = this.keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibilityHelp)?.getLabel();
108
- const helpInfo = helpKeybinding ? ( localize(10785, "Use {0} for accessibility help. ", helpKeybinding)) : ( localize(10786, "Run the Open Accessibility Help command for more information. "));
108
+ const helpInfo = helpKeybinding ? ( localize(11401, "Use {0} for accessibility help. ", helpKeybinding)) : ( localize(11402, "Run the Open Accessibility Help command for more information. "));
109
109
  this.ariaLabel = actionPart.concat(helpInfo, ( localize(
110
- 10787,
110
+ 11403,
111
111
  " Toggle {0} in settings to disable this hint.",
112
112
  AccessibilityVerbositySettingId.ReplEditor
113
113
  )));
@@ -1,9 +1,10 @@
1
1
  import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
3
+ import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
4
  import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
5
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
4
6
  import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
5
7
  import { IMcpToolCallUIData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
6
- import { IMcpService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service";
7
8
  import { MCP } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/modelContextProtocol";
8
9
  import { McpApps } from "../common/modelContextProtocolApps.js";
9
10
  /**
@@ -15,19 +16,47 @@ export interface IMcpAppResourceContent extends McpApps.McpUiResourceMeta {
15
16
  /** MIME type of the content */
16
17
  readonly mimeType: string;
17
18
  }
19
+ /**
20
+ * Transport abstraction for the constrained subset of MCP requests an MCP
21
+ * App's webview makes back to the host. Two implementations exist: one
22
+ * routes through {@link IMcpService} (local servers), the other through
23
+ * {@link IAgentHostService.handleMcpRequest} on an `mcp://` AHP side
24
+ * channel (agent-host-resident servers).
25
+ */
26
+ export interface IMcpAppCallTransport extends IDisposable {
27
+ /** Forwarded MCP server notifications (`notifications/*`) for this server. */
28
+ readonly onNotification: Event<{
29
+ readonly method: string;
30
+ readonly params?: unknown;
31
+ }>;
32
+ loadResource(token: CancellationToken): Promise<IMcpAppResourceContent>;
33
+ callTool(name: string, params: Record<string, unknown>, token: CancellationToken): Promise<MCP.CallToolResult>;
34
+ readResource(uri: string, token: CancellationToken): Promise<MCP.ReadResourceResult>;
35
+ sampling(params: MCP.CreateMessageRequest["params"], token: CancellationToken): Promise<MCP.CreateMessageResult>;
36
+ log(params: MCP.LoggingMessageNotificationParams): Promise<void>;
37
+ }
18
38
  /**
19
39
  * Wrapper class that "upgrades" serializable IMcpToolCallUIData into a functional
20
40
  * object that can load UI resources and proxy tool/resource calls back to the MCP server.
41
+ *
42
+ * Selects the underlying transport based on whether the renderer was given
43
+ * an AHP `mcp://` channel — agent-host-resident servers route through
44
+ * {@link IAgentHostService}, everything else uses the local {@link IMcpService}.
21
45
  */
22
46
  export declare class McpToolCallUI extends Disposable {
23
47
  private readonly _uiData;
24
- private readonly _mcpService;
25
48
  /**
26
49
  * Basic host context reflecting the current UI and theme. Notably lacks
27
50
  * the `toolInfo` or `viewport` sizes.
28
51
  */
29
52
  readonly hostContext: IObservable<McpApps.McpUiHostContext>;
30
- constructor(_uiData: IMcpToolCallUIData, _mcpService: IMcpService, themeService: IThemeService);
53
+ private readonly _transport;
54
+ /** Forwarded MCP server notifications scoped to this App's server. */
55
+ readonly onNotification: Event<{
56
+ readonly method: string;
57
+ readonly params?: unknown;
58
+ }>;
59
+ constructor(_uiData: IMcpToolCallUIData, instantiationService: IInstantiationService, themeService: IThemeService);
31
60
  /**
32
61
  * Gets the underlying UI data.
33
62
  */
@@ -36,10 +65,6 @@ export declare class McpToolCallUI extends Disposable {
36
65
  * Logs a message to the MCP server's logger.
37
66
  */
38
67
  log(log: MCP.LoggingMessageNotificationParams): Promise<void>;
39
- /**
40
- * Gets or finds the MCP server for this UI.
41
- */
42
- private _getServer;
43
68
  /**
44
69
  * Loads the UI resource from the MCP server.
45
70
  * @param token Cancellation token
@@ -61,4 +86,10 @@ export declare class McpToolCallUI extends Disposable {
61
86
  * @returns The resource content
62
87
  */
63
88
  readResource(uri: string, token: CancellationToken): Promise<MCP.ReadResourceResult>;
89
+ /**
90
+ * Issues a `sampling/createMessage` request against the MCP server's
91
+ * host-side sampling implementation. Only supported when the App
92
+ * server runs inside an agent host that has opted into sampling.
93
+ */
94
+ sampling(params: MCP.CreateMessageRequest["params"], token: CancellationToken): Promise<MCP.CreateMessageResult>;
64
95
  }
@@ -3,24 +3,177 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { Gesture } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/touch';
4
4
  import { decodeBase64 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
5
5
  import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
6
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
6
7
  import { Disposable } 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 { locale, isWeb, isMobile } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
9
10
  import { hasKey } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
11
+ import { IAgentHostService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service';
12
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
10
13
  import { ColorScheme } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/theme';
11
14
  import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
12
15
  import { McpServer } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpServer';
13
16
  import { McpToolVisibility } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
14
- import { IMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
15
- import { translateMcpLogMessage, findMcpServer, startServerAndWaitForLiveTools } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypesUtils';
17
+ import { IMcpService, IMcpSamplingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
18
+ import { findMcpServer, translateMcpLogMessage, startServerAndWaitForLiveTools } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypesUtils';
16
19
  import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
17
20
  import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
18
21
 
19
- let McpToolCallUI = class McpToolCallUI extends Disposable {
20
- constructor(_uiData, _mcpService, themeService) {
22
+ function readResourceContentToHtml(contents) {
23
+ if (!contents || contents.length === 0) {
24
+ throw ( new Error("UI resource not found on server"));
25
+ }
26
+ const content = contents[0];
27
+ let html;
28
+ const mimeType = content.mimeType || "text/html";
29
+ if (hasKey(content, {
30
+ text: true
31
+ })) {
32
+ html = content.text;
33
+ } else if (hasKey(content, {
34
+ blob: true
35
+ })) {
36
+ html = ( decodeBase64(content.blob).toString());
37
+ } else {
38
+ throw ( new Error("UI resource has no content"));
39
+ }
40
+ const meta = content._meta?.ui;
41
+ return {
42
+ ...meta,
43
+ html,
44
+ mimeType
45
+ };
46
+ }
47
+ let LocalMcpAppCallTransport = class LocalMcpAppCallTransport extends Disposable {
48
+ constructor(_uiData, _mcpService, _samplingService) {
21
49
  super();
22
50
  this._uiData = _uiData;
23
51
  this._mcpService = _mcpService;
52
+ this._samplingService = _samplingService;
53
+ this._onNotification = this._register(( new Emitter()));
54
+ this.onNotification = this._onNotification.event;
55
+ }
56
+ async _getServer(token) {
57
+ return findMcpServer(
58
+ this._mcpService,
59
+ s => s.definition.id === this._uiData.serverDefinitionId && s.collection.id === this._uiData.collectionId,
60
+ token
61
+ );
62
+ }
63
+ async log(params) {
64
+ const server = await this._getServer(CancellationToken.None);
65
+ if (server) {
66
+ translateMcpLogMessage(server.logger, params, `[App UI]`);
67
+ }
68
+ }
69
+ async loadResource(token) {
70
+ const server = await this._getServer(token);
71
+ if (!server) {
72
+ throw ( new Error("MCP server not found for UI resource"));
73
+ }
74
+ const resourceResult = await McpServer.callOn(server, h => h.readResource({
75
+ uri: this._uiData.resourceUri
76
+ }, token), token);
77
+ return readResourceContentToHtml(resourceResult.contents);
78
+ }
79
+ async callTool(name, params, token) {
80
+ const server = await this._getServer(token);
81
+ if (!server) {
82
+ throw ( new Error("MCP server not found for tool call"));
83
+ }
84
+ await startServerAndWaitForLiveTools(server, undefined, token);
85
+ const tool = server.tools.get().find(t => t.definition.name === name);
86
+ if (!tool || !(tool.visibility & McpToolVisibility.App)) {
87
+ throw ( new Error(`Tool not found on server: ${name}`));
88
+ }
89
+ const res = await tool.call(params, undefined, token);
90
+ return {
91
+ content: res.content,
92
+ isError: res.isError,
93
+ _meta: res._meta,
94
+ structuredContent: res.structuredContent
95
+ };
96
+ }
97
+ async readResource(uri, token) {
98
+ const server = await this._getServer(token);
99
+ if (!server) {
100
+ throw ( new Error("MCP server not found"));
101
+ }
102
+ return await McpServer.callOn(server, h => h.readResource({
103
+ uri
104
+ }, token), token);
105
+ }
106
+ async sampling(params, token) {
107
+ const server = await this._getServer(token);
108
+ if (!server) {
109
+ throw ( new Error("MCP server not found for sampling"));
110
+ }
111
+ const {
112
+ sample
113
+ } = await this._samplingService.sample({
114
+ server,
115
+ isDuringToolCall: true,
116
+ params
117
+ }, token);
118
+ return sample;
119
+ }
120
+ };
121
+ LocalMcpAppCallTransport = ( __decorate([( __param(1, IMcpService)), ( __param(2, IMcpSamplingService))], LocalMcpAppCallTransport));
122
+ let AhpMcpAppCallTransport = class AhpMcpAppCallTransport extends Disposable {
123
+ constructor(_uiData, _channel, _agentHostService) {
124
+ super();
125
+ this._uiData = _uiData;
126
+ this._channel = _channel;
127
+ this._agentHostService = _agentHostService;
128
+ this._onNotification = this._register(( new Emitter()));
129
+ this.onNotification = this._onNotification.event;
130
+ this._register(this._agentHostService.onMcpNotification(n => {
131
+ if (n.channel === this._channel) {
132
+ this._onNotification.fire({
133
+ method: n.method,
134
+ params: n.params
135
+ });
136
+ }
137
+ }));
138
+ }
139
+ async log(params) {
140
+ try {
141
+ await this._agentHostService.handleMcpRequest(this._channel, "notifications/message", params);
142
+ } catch {}
143
+ }
144
+ async loadResource(_token) {
145
+ const result = await this._agentHostService.handleMcpRequest(this._channel, "resources/read", {
146
+ uri: this._uiData.resourceUri
147
+ });
148
+ return readResourceContentToHtml(result.contents);
149
+ }
150
+ async callTool(name, params, _token) {
151
+ const result = await this._agentHostService.handleMcpRequest(this._channel, "tools/call", {
152
+ name,
153
+ arguments: params
154
+ });
155
+ return result;
156
+ }
157
+ async readResource(uri, _token) {
158
+ const result = await this._agentHostService.handleMcpRequest(this._channel, "resources/read", {
159
+ uri
160
+ });
161
+ return result;
162
+ }
163
+ async sampling(params, _token) {
164
+ const result = await this._agentHostService.handleMcpRequest(this._channel, "sampling/createMessage", params);
165
+ return result;
166
+ }
167
+ };
168
+ AhpMcpAppCallTransport = ( __decorate([( __param(2, IAgentHostService))], AhpMcpAppCallTransport));
169
+ let McpToolCallUI = class McpToolCallUI extends Disposable {
170
+ constructor(_uiData, instantiationService, themeService) {
171
+ super();
172
+ this._uiData = _uiData;
173
+ this._transport = this._register(
174
+ _uiData.kind === "agentHost" ? instantiationService.createInstance(AhpMcpAppCallTransport, _uiData, _uiData.channel) : instantiationService.createInstance(LocalMcpAppCallTransport, _uiData)
175
+ );
176
+ this.onNotification = this._transport.onNotification;
24
177
  const colorTheme = observableFromEvent(themeService.onDidColorThemeChange, () => {
25
178
  const type = themeService.getColorTheme().type;
26
179
  return type === ColorScheme.DARK || type === ColorScheme.HIGH_CONTRAST_DARK ? "dark" : "light";
@@ -122,79 +275,22 @@ let McpToolCallUI = class McpToolCallUI extends Disposable {
122
275
  get uiData() {
123
276
  return this._uiData;
124
277
  }
125
- async log(log) {
126
- const server = await this._getServer(CancellationToken.None);
127
- if (server) {
128
- translateMcpLogMessage(server.logger, log, `[App UI]`);
129
- }
278
+ log(log) {
279
+ return this._transport.log(log);
130
280
  }
131
- async _getServer(token) {
132
- return findMcpServer(
133
- this._mcpService,
134
- s => s.definition.id === this._uiData.serverDefinitionId && s.collection.id === this._uiData.collectionId,
135
- token
136
- );
281
+ loadResource(token) {
282
+ return this._transport.loadResource(token);
137
283
  }
138
- async loadResource(token) {
139
- const server = await this._getServer(token);
140
- if (!server) {
141
- throw ( new Error("MCP server not found for UI resource"));
142
- }
143
- const resourceResult = await McpServer.callOn(server, h => h.readResource({
144
- uri: this._uiData.resourceUri
145
- }, token), token);
146
- if (!resourceResult.contents || resourceResult.contents.length === 0) {
147
- throw ( new Error("UI resource not found on server"));
148
- }
149
- const content = resourceResult.contents[0];
150
- let html;
151
- const mimeType = content.mimeType || "text/html";
152
- if (hasKey(content, {
153
- text: true
154
- })) {
155
- html = content.text;
156
- } else if (hasKey(content, {
157
- blob: true
158
- })) {
159
- html = ( decodeBase64(content.blob).toString());
160
- } else {
161
- throw ( new Error("UI resource has no content"));
162
- }
163
- const meta = content._meta?.ui;
164
- return {
165
- ...meta,
166
- html,
167
- mimeType
168
- };
284
+ callTool(name, params, token) {
285
+ return this._transport.callTool(name, params, token);
169
286
  }
170
- async callTool(name, params, token) {
171
- const server = await this._getServer(token);
172
- if (!server) {
173
- throw ( new Error("MCP server not found for tool call"));
174
- }
175
- await startServerAndWaitForLiveTools(server, undefined, token);
176
- const tool = server.tools.get().find(t => t.definition.name === name);
177
- if (!tool || !(tool.visibility & McpToolVisibility.App)) {
178
- throw ( new Error(`Tool not found on server: ${name}`));
179
- }
180
- const res = await tool.call(params, undefined, token);
181
- return {
182
- content: res.content,
183
- isError: res.isError,
184
- _meta: res._meta,
185
- structuredContent: res.structuredContent
186
- };
287
+ readResource(uri, token) {
288
+ return this._transport.readResource(uri, token);
187
289
  }
188
- async readResource(uri, token) {
189
- const server = await this._getServer(token);
190
- if (!server) {
191
- throw ( new Error("MCP server not found"));
192
- }
193
- return await McpServer.callOn(server, h => h.readResource({
194
- uri
195
- }, token), token);
290
+ sampling(params, token) {
291
+ return this._transport.sampling(params, token);
196
292
  }
197
293
  };
198
- McpToolCallUI = ( __decorate([( __param(1, IMcpService)), ( __param(2, IThemeService))], McpToolCallUI));
294
+ McpToolCallUI = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IThemeService))], McpToolCallUI));
199
295
 
200
296
  export { McpToolCallUI };
@@ -144,7 +144,7 @@ let ExecutionStateCellStatusBarItem = class ExecutionStateCellStatusBarItem exte
144
144
  return [{
145
145
  text: `$(${successStateIcon.id})`,
146
146
  color: themeColorFromId(cellStatusIconSuccess),
147
- tooltip: ( localize(11748, "Success")),
147
+ tooltip: ( localize(12379, "Success")),
148
148
  alignment: CellStatusbarAlignment.Left,
149
149
  priority: Number.MAX_SAFE_INTEGER
150
150
  }];
@@ -152,14 +152,14 @@ let ExecutionStateCellStatusBarItem = class ExecutionStateCellStatusBarItem exte
152
152
  return [{
153
153
  text: `$(${errorStateIcon.id})`,
154
154
  color: themeColorFromId(cellStatusIconError),
155
- tooltip: ( localize(11749, "Failed")),
155
+ tooltip: ( localize(12380, "Failed")),
156
156
  alignment: CellStatusbarAlignment.Left,
157
157
  priority: Number.MAX_SAFE_INTEGER
158
158
  }];
159
159
  } else if (state === NotebookCellExecutionState.Pending || state === NotebookCellExecutionState.Unconfirmed) {
160
160
  return [{
161
161
  text: `$(${pendingStateIcon.id})`,
162
- tooltip: ( localize(11750, "Pending")),
162
+ tooltip: ( localize(12381, "Pending")),
163
163
  alignment: CellStatusbarAlignment.Left,
164
164
  priority: Number.MAX_SAFE_INTEGER
165
165
  }];
@@ -167,7 +167,7 @@ let ExecutionStateCellStatusBarItem = class ExecutionStateCellStatusBarItem exte
167
167
  const icon = runState?.didPause ? executingStateIcon : ThemeIcon.modify(executingStateIcon, "spin");
168
168
  return [{
169
169
  text: `$(${icon.id})`,
170
- tooltip: ( localize(11751, "Executing")),
170
+ tooltip: ( localize(12382, "Executing")),
171
171
  alignment: CellStatusbarAlignment.Left,
172
172
  priority: Number.MAX_SAFE_INTEGER
173
173
  }];
@@ -298,10 +298,10 @@ let TimerCellStatusBarItem = class TimerCellStatusBarItem extends Disposable {
298
298
  const rendererTitle = renderIssueLink ? `[${linkText}](command:workbench.action.openIssueReporter?${args})` : `**${linkText}**`;
299
299
  renderTimes += `- ${rendererTitle} ${formatCellDuration(renderDuration[key])}\n`;
300
300
  }
301
- renderTimes += `\n*${( localize(11752, "Use the links above to file an issue using the issue reporter."))}*\n`;
301
+ renderTimes += `\n*${( localize(12383, "Use the links above to file an issue using the issue reporter."))}*\n`;
302
302
  tooltip = {
303
303
  value: ( localize(
304
- 11753,
304
+ 12384,
305
305
  "**Last Execution** {0}\n\n**Execution Time** {1}\n\n**Overhead Time** {2}\n\n**Render Times**\n\n{3}",
306
306
  lastExecution,
307
307
  formatCellDuration(executionDuration),
@@ -312,7 +312,7 @@ let TimerCellStatusBarItem = class TimerCellStatusBarItem extends Disposable {
312
312
  };
313
313
  }
314
314
  const executionText = this._isVerbose ? ( localize(
315
- 11754,
315
+ 12385,
316
316
  "Last Execution: {0}, Duration: {1}",
317
317
  lastExecution,
318
318
  formatCellDuration(duration, false)
@@ -348,9 +348,9 @@ let NotebookFindWidget = class NotebookFindWidget extends SimpleFindReplaceWidge
348
348
  }
349
349
  _getAriaLabel(label, currentMatch, searchString) {
350
350
  if (label === NLS_NO_RESULTS) {
351
- return searchString === "" ? ( localize(11795, "{0} found", label)) : ( localize(11796, "{0} found for '{1}'", label, searchString));
351
+ return searchString === "" ? ( localize(12426, "{0} found", label)) : ( localize(12427, "{0} found for '{1}'", label, searchString));
352
352
  }
353
- return localize(11797, "{0} found for '{1}'", label, searchString);
353
+ return localize(12428, "{0} found for '{1}'", label, searchString);
354
354
  }
355
355
  dispose() {
356
356
  this._notebookEditor?.removeClassName(FIND_SHOW_TRANSITION);
@@ -402,7 +402,7 @@ async function joinSelectedCells(bulkEditService, notificationService, context)
402
402
  const cellKind = cells[0].cellKind;
403
403
  const isSameKind = cells.every(cell => cell.cellKind === cellKind);
404
404
  if (!isSameKind) {
405
- const message = ( localize(11853, "Cannot join cells of different kinds"));
405
+ const message = ( localize(12484, "Cannot join cells of different kinds"));
406
406
  return notificationService.warn(message);
407
407
  }
408
408
  const firstCell = cells[0];
@@ -431,7 +431,7 @@ async function joinSelectedCells(bulkEditService, notificationService, context)
431
431
  }
432
432
  if (edits.length) {
433
433
  await bulkEditService.apply(edits, {
434
- quotableLabel: ( localize(11854, "Join Notebook Cells"))
434
+ quotableLabel: ( localize(12485, "Join Notebook Cells"))
435
435
  });
436
436
  }
437
437
  }