@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
@@ -1,11 +1,30 @@
1
1
  import { BaseActionViewItem } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems";
2
2
  import { IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
3
+ import { IStringDictionary } from "@codingame/monaco-vscode-api/vscode/vs/base/common/collections";
4
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
3
5
  import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
4
6
  import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
5
7
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
6
8
  import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
7
9
  import { ILanguageModelChatMetadataAndIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
8
10
  import { IChatInputPickerOptions } from "./chatInputPickerActionItem.js";
11
+ /**
12
+ * Read/write access to a model's configuration (e.g. context size, thinking
13
+ * effort). Implemented either by the global {@link ILanguageModelsService} or by
14
+ * a per-editor override layer so that one editor's changes do not sync to other
15
+ * already-open editors. Structurally satisfied by `ILanguageModelsService`.
16
+ */
17
+ export interface IModelConfigurationAccess {
18
+ getModelConfiguration(modelId: string): IStringDictionary<unknown> | undefined;
19
+ setModelConfiguration(modelId: string, values: IStringDictionary<unknown>): Promise<void>;
20
+ getModelConfigurationActions(modelId: string): IAction[];
21
+ /**
22
+ * Fires when this access layer's configuration changes (e.g. user picks a
23
+ * new context size). Implementations that always read the global value can
24
+ * omit this and rely on `ILanguageModelsService.onDidChangeLanguageModels`.
25
+ */
26
+ readonly onDidChange?: Event<string>;
27
+ }
9
28
  export interface IModelPickerDelegate {
10
29
  readonly currentModel: IObservable<ILanguageModelChatMetadataAndIdentifier | undefined>;
11
30
  setModel(model: ILanguageModelChatMetadataAndIdentifier): void;
@@ -14,6 +33,34 @@ export interface IModelPickerDelegate {
14
33
  showManageModelsAction(): boolean;
15
34
  showUnavailableFeatured(): boolean;
16
35
  showFeatured(): boolean;
36
+ /**
37
+ * Whether the synthetic "Auto" model is available for the current session,
38
+ * so it can fall back to Auto. Defaults to `true` when omitted. When this
39
+ * returns `false` and {@link getModels} is empty, the picker shows a
40
+ * "No models available" entry (and an upgrade prompt for Copilot Free /
41
+ * Student users) instead of an Auto entry.
42
+ */
43
+ showAutoModel?(): boolean;
44
+ /**
45
+ * The id of the current chat session, used to correlate model-picker
46
+ * changes with the session in telemetry. Matches the `chatSessionId`
47
+ * reported by other chat telemetry events (e.g. the chat request event).
48
+ * Returns `undefined` when no session is active.
49
+ */
50
+ getChatSessionId?(): string | undefined;
51
+ /**
52
+ * UI hint flag controlling whether the picker shows the cache-break hint.
53
+ * Returns `true` when the session has likely warmed the prompt cache (e.g. it
54
+ * has sent a request), inferred from request history / session status rather
55
+ * than the provider's actual cache state — so it does not account for cache
56
+ * expiry or a cache that was already reset. Defaults to `false` when omitted.
57
+ */
58
+ isCacheWarm?(): boolean;
59
+ /**
60
+ * Per-editor model configuration access. When omitted, the picker reads and
61
+ * writes configuration through the global {@link ILanguageModelsService}.
62
+ */
63
+ readonly modelConfiguration?: IModelConfigurationAccess;
17
64
  }
18
65
  /**
19
66
  * Action view item for selecting a language model in the chat interface.
@@ -33,6 +80,19 @@ export declare class ModelPickerActionItem extends BaseActionViewItem {
33
80
  openModelPicker(): void;
34
81
  show(): void;
35
82
  setEnabled(enabled: boolean): void;
83
+ /**
84
+ * Whether the picker has no usable model because the workspace is untrusted
85
+ * (Restricted Mode). Lets a host (e.g. the sessions picker) keep the picker
86
+ * visible to surface the "Models" placeholder and Trust Workspace action
87
+ * instead of hiding it as an empty/no-model picker.
88
+ */
89
+ isRestrictedMode(): boolean;
90
+ /**
91
+ * Whether the picker has no usable model because Chat still needs sign-in /
92
+ * setup. Like {@link isRestrictedMode}, lets a host keep the picker visible to
93
+ * surface the "Models" placeholder and Sign In action.
94
+ */
95
+ isSetupRequired(): boolean;
36
96
  private _showPicker;
37
97
  private _updateTooltip;
38
98
  private _getHoverContents;
@@ -58,6 +58,12 @@ let ModelPickerActionItem = class ModelPickerActionItem extends BaseActionViewIt
58
58
  setEnabled(enabled) {
59
59
  this._pickerWidget.setEnabled(enabled);
60
60
  }
61
+ isRestrictedMode() {
62
+ return this._pickerWidget.isRestrictedMode();
63
+ }
64
+ isSetupRequired() {
65
+ return this._pickerWidget.isSetupRequired();
66
+ }
61
67
  _showPicker() {
62
68
  this._pickerWidget.show(this._getAnchorElement());
63
69
  }
@@ -66,19 +72,24 @@ let ModelPickerActionItem = class ModelPickerActionItem extends BaseActionViewIt
66
72
  if (!target) {
67
73
  return;
68
74
  }
69
- const hoverContent = this._getHoverContents();
70
- if (typeof hoverContent === "string" && hoverContent) {
71
- this._managedHover.value = getBaseLayerHoverDelegate().setupManagedHover(getDefaultHoverDelegate("mouse"), target, hoverContent);
72
- } else {
73
- this._managedHover.clear();
74
- }
75
+ this._managedHover.value = getBaseLayerHoverDelegate().setupManagedHover(getDefaultHoverDelegate("mouse"), target, () => this._getHoverContents());
75
76
  }
76
77
  _getHoverContents() {
77
- let label = ( localize(7774, "Pick Model"));
78
+ let label = ( localize(8354, "Models"));
78
79
  const keybindingLabel = this.keybindingService.lookupKeybinding(this._action.id, this._contextKeyService)?.getLabel();
79
80
  if (keybindingLabel) {
80
81
  label += ` (${keybindingLabel})`;
81
82
  }
83
+ if (this._pickerWidget.isRestrictedMode()) {
84
+ return localize(
85
+ 8355,
86
+ "{0} • Unavailable while in Restricted mode. Trust Workspace to enable models.",
87
+ label
88
+ );
89
+ }
90
+ if (this._pickerWidget.isSetupRequired()) {
91
+ return localize(8356, "{0} • Sign in to GitHub Copilot to choose a model.", label);
92
+ }
82
93
  const {
83
94
  statusIcon,
84
95
  tooltip
@@ -1,6 +1,7 @@
1
1
  import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
2
  import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
3
  import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
4
+ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
4
5
  import { IActionWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service";
5
6
  import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
6
7
  import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
@@ -10,6 +11,7 @@ import { IChatSessionProviderOptionItem } from "@codingame/monaco-vscode-api/vsc
10
11
  import { MenuItemAction } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
11
12
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
12
13
  import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
14
+ import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
13
15
  import { ChatInputPickerActionViewItem, IChatInputPickerOptions } from "./chatInputPickerActionItem.js";
14
16
  import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
15
17
  import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
@@ -23,20 +25,66 @@ export interface IExtensionPermissionState {
23
25
  export interface IPermissionPickerDelegate {
24
26
  readonly currentPermissionLevel: IObservable<ChatPermissionLevel>;
25
27
  readonly setPermissionLevel: (level: ChatPermissionLevel) => void;
28
+ /**
29
+ * The ordered set of permission levels the picker should offer. When
30
+ * omitted, the built-in Default/Bypass/Autopilot set is used. Agent-host
31
+ * sessions override this to Default/Bypass (Autopilot lives on the
32
+ * orthogonal mode axis there).
33
+ */
34
+ readonly availableLevels?: readonly ChatPermissionLevel[];
35
+ /**
36
+ * The setting id the elevated-level warning dialog links to as "make this
37
+ * the default". Defaults to `chat.permissions.default`; agent-host sessions
38
+ * pass `chat.defaultConfiguration`.
39
+ */
40
+ readonly defaultSettingKey?: string;
26
41
  /**
27
42
  * When defined and returns a non-empty state, the picker shows the extension-contributed
28
43
  * items in place of the built-in {@link ChatPermissionLevel} items.
29
44
  */
30
45
  readonly getExtensionPermissions?: () => IExtensionPermissionState | undefined;
31
46
  readonly setExtensionPermission?: (groupId: string, item: IChatSessionProviderOptionItem) => void;
47
+ readonly getPermissionLevelHover?: (level: ChatPermissionLevel, meta: IPermissionLevelMeta) => string | undefined;
48
+ /**
49
+ * Whether the experimental "Sandboxing for terminal" toggle may be shown on
50
+ * the Default Approvals option. The toggle is specific to the local harness
51
+ * (which runs the built-in terminal tool); agent-host harnesses such as
52
+ * Copilot CLI and Claude Code do not implement this and never show it.
53
+ * Evaluated each time the picker opens so a harness switch is reflected.
54
+ */
55
+ readonly isSandboxToggleApplicable?: () => boolean;
56
+ }
57
+ interface IPermissionLevelMeta {
58
+ readonly id: string;
59
+ readonly label: string;
60
+ readonly shortLabel: string;
61
+ readonly detail: string;
62
+ readonly icon: ThemeIcon;
63
+ readonly description: string;
64
+ /** Elevated levels are disabled when enterprise policy turns off auto-approval and need a warning dialog. */
65
+ readonly elevated: boolean;
32
66
  }
33
67
  export declare class PermissionPickerActionItem extends ChatInputPickerActionViewItem {
34
68
  private readonly delegate;
69
+ private readonly configurationService;
35
70
  private readonly dialogService;
71
+ private readonly hoverService;
36
72
  private readonly _onDidDispose;
37
73
  readonly onDidDispose: Event<void>;
38
- constructor(action: MenuItemAction, delegate: IPermissionPickerDelegate, pickerOptions: IChatInputPickerOptions, actionWidgetService: IActionWidgetService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, telemetryService: ITelemetryService, configurationService: IConfigurationService, dialogService: IDialogService, openerService: IOpenerService, storageService: IStorageService);
74
+ private _currentTooltip;
75
+ private _hoverElement;
76
+ private readonly _hover;
77
+ constructor(action: MenuItemAction, delegate: IPermissionPickerDelegate, pickerOptions: IChatInputPickerOptions, actionWidgetService: IActionWidgetService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, telemetryService: ITelemetryService, configurationService: IConfigurationService, dialogService: IDialogService, openerService: IOpenerService, storageService: IStorageService, hoverService: IHoverService);
78
+ private isSandboxingEnabled;
79
+ private isSandboxToggleSettingEnabled;
80
+ /**
81
+ * Whether the sandbox toggle should surface for the current harness: the
82
+ * experimental setting must be on and the delegate must opt in (only the
83
+ * local harness does).
84
+ */
85
+ private isSandboxToggleAvailable;
39
86
  protected renderLabel(element: HTMLElement): IDisposable | null;
40
87
  refresh(): void;
41
88
  dispose(): void;
42
89
  }
90
+ export {};
@@ -4,25 +4,75 @@ import { $, reset } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/do
4
4
  import { renderLabelWithIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
5
5
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
6
6
  import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
7
+ import { MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
8
+ import { isWindows } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
7
9
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
8
10
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
9
11
  import { IActionWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actionWidget/browser/actionWidget.service';
10
12
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
11
13
  import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
12
14
  import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
13
- import { ChatConfiguration, ChatPermissionLevel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
15
+ import { ChatPermissionLevel, ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
14
16
  import { SessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
15
17
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
16
18
  import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
19
+ import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
17
20
  import { ChatInputPickerActionViewItem } from './chatInputPickerActionItem.js';
18
21
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
19
22
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
20
23
  import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
21
24
  import { maybeConfirmElevatedPermissionLevel } from '../../../common/chatPermissionWarnings.js';
25
+ import { AgentSandboxSettingId, AgentSandboxEnabledValue, isAgentSandboxEnabledValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/settings';
22
26
 
27
+ const DEFAULT_PERMISSION_LEVELS = [
28
+ ChatPermissionLevel.Default,
29
+ ChatPermissionLevel.AutoApprove,
30
+ ChatPermissionLevel.Autopilot
31
+ ];
32
+ function getPermissionLevelMeta(level) {
33
+ switch (level) {
34
+ case ChatPermissionLevel.AutoApprove:
35
+ return {
36
+ id: "chat.permissions.autoApprove",
37
+ label: ( localize(8357, "Bypass Approvals")),
38
+ shortLabel: ( localize(8358, "Bypass Approvals")),
39
+ detail: ( localize(8359, "All tool calls are auto-approved")),
40
+ icon: ThemeIcon.fromId(Codicon.warning.id),
41
+ description: ( localize(8360, "Auto-approve all tool calls and retry on errors")),
42
+ elevated: true
43
+ };
44
+ case ChatPermissionLevel.Autopilot:
45
+ return {
46
+ id: "chat.permissions.autopilot",
47
+ label: ( localize(8361, "Autopilot (Preview)")),
48
+ shortLabel: ( localize(8362, "Autopilot (Preview)")),
49
+ detail: ( localize(8363, "Autonomously iterates from start to finish")),
50
+ icon: ThemeIcon.fromId(Codicon.rocket.id),
51
+ description: ( localize(
52
+ 8364,
53
+ "Auto-approve all tool calls and continue until the task is done. Autopilot may increase costs."
54
+ )),
55
+ elevated: true
56
+ };
57
+ case ChatPermissionLevel.Default:
58
+ default:
59
+ return {
60
+ id: "chat.permissions.default",
61
+ label: ( localize(8365, "Default Approvals")),
62
+ shortLabel: ( localize(8366, "Default Approvals")),
63
+ detail: ( localize(8367, "Copilot uses your configured settings")),
64
+ icon: ThemeIcon.fromId(Codicon.shield.id),
65
+ description: ( localize(8368, "Use configured approval settings")),
66
+ elevated: false
67
+ };
68
+ }
69
+ }
23
70
  function sanitizeIdSegment(value) {
24
71
  return value.replace(/[^a-zA-Z0-9_-]/g, "_");
25
72
  }
73
+ function getSandboxEnabledSettingId() {
74
+ return isWindows ? AgentSandboxSettingId.AgentSandboxWindowsEnabled : AgentSandboxSettingId.AgentSandboxEnabled;
75
+ }
26
76
  let PermissionPickerActionItem = class PermissionPickerActionItem extends ChatInputPickerActionViewItem {
27
77
  constructor(
28
78
  action,
@@ -35,7 +85,8 @@ let PermissionPickerActionItem = class PermissionPickerActionItem extends ChatIn
35
85
  configurationService,
36
86
  dialogService,
37
87
  openerService,
38
- storageService
88
+ storageService,
89
+ hoverService
39
90
  ) {
40
91
  const isAutoApprovePolicyRestricted = () => configurationService.inspect(ChatConfiguration.GlobalAutoApprove).policyValue === false;
41
92
  const actionProvider = {
@@ -52,7 +103,7 @@ let PermissionPickerActionItem = class PermissionPickerActionItem extends ChatIn
52
103
  icon: item.icon,
53
104
  checked: ext.selectedId === item.id,
54
105
  enabled: !item.locked,
55
- tooltip: item.locked ? ( localize(7775, "This option is locked")) : "",
106
+ tooltip: item.locked ? ( localize(8369, "This option is locked")) : "",
56
107
  hover: item.description ? {
57
108
  content: item.description
58
109
  } : undefined,
@@ -66,70 +117,55 @@ let PermissionPickerActionItem = class PermissionPickerActionItem extends ChatIn
66
117
  }
67
118
  const currentLevel = delegate.currentPermissionLevel.get();
68
119
  const policyRestricted = isAutoApprovePolicyRestricted();
69
- const actions = [{
70
- ...action,
71
- id: "chat.permissions.default",
72
- label: ( localize(7776, "Default Approvals")),
73
- detail: ( localize(7777, "Copilot uses your configured settings")),
74
- icon: ThemeIcon.fromId(Codicon.shield.id),
75
- checked: currentLevel === ChatPermissionLevel.Default,
76
- tooltip: "",
77
- hover: {
78
- content: ( localize(7778, "Use configured approval settings"))
79
- },
80
- run: async () => {
81
- delegate.setPermissionLevel(ChatPermissionLevel.Default);
82
- if (this.element) {
83
- this.renderLabel(this.element);
84
- }
120
+ const sandboxToggleEnabled = this.isSandboxToggleAvailable();
121
+ const setSandboxEnabled = async enableSandbox => {
122
+ const target = enableSandbox ? AgentSandboxEnabledValue.On : AgentSandboxEnabledValue.Off;
123
+ if (this.isSandboxingEnabled() !== enableSandbox) {
124
+ await configurationService.updateValue(getSandboxEnabledSettingId(), target);
85
125
  }
86
- }, {
87
- ...action,
88
- id: "chat.permissions.autoApprove",
89
- label: ( localize(7779, "Bypass Approvals")),
90
- detail: ( localize(7780, "All tool calls are auto-approved")),
91
- icon: ThemeIcon.fromId(Codicon.warning.id),
92
- checked: currentLevel === ChatPermissionLevel.AutoApprove,
93
- enabled: !policyRestricted,
94
- tooltip: policyRestricted ? ( localize(7781, "Disabled by enterprise policy")) : "",
95
- hover: {
96
- content: policyRestricted ? ( localize(7782, "Disabled by enterprise policy")) : ( localize(7783, "Auto-approve all tool calls and retry on errors"))
97
- },
98
- run: async () => {
99
- if (!(await maybeConfirmElevatedPermissionLevel(ChatPermissionLevel.AutoApprove, this.dialogService, storageService))) {
100
- return;
101
- }
102
- delegate.setPermissionLevel(ChatPermissionLevel.AutoApprove);
103
- if (this.element) {
104
- this.renderLabel(this.element);
126
+ };
127
+ const levels = delegate.availableLevels ?? DEFAULT_PERMISSION_LEVELS;
128
+ const actions = ( levels.map(level => {
129
+ const meta = getPermissionLevelMeta(level);
130
+ const disabledByPolicy = meta.elevated && policyRestricted;
131
+ const hover = disabledByPolicy ? ( localize(8370, "Disabled by enterprise policy")) : delegate.getPermissionLevelHover?.(level, meta) ?? meta.description;
132
+ const inlineToggle = sandboxToggleEnabled && level === ChatPermissionLevel.Default ? {
133
+ label: ( localize(8371, "Sandboxing for terminal")),
134
+ title: ( localize(
135
+ 8372,
136
+ "Run terminal commands inside a sandbox that restricts file system and network access"
137
+ )),
138
+ checked: this.isSandboxingEnabled(),
139
+ onChange: checked => {
140
+ void setSandboxEnabled(checked);
105
141
  }
106
- }
107
- }];
108
- actions.push({
109
- ...action,
110
- id: "chat.permissions.autopilot",
111
- label: ( localize(7784, "Autopilot (Preview)")),
112
- detail: ( localize(7785, "Autonomously iterates from start to finish")),
113
- icon: ThemeIcon.fromId(Codicon.rocket.id),
114
- checked: currentLevel === ChatPermissionLevel.Autopilot,
115
- enabled: !policyRestricted,
116
- tooltip: policyRestricted ? ( localize(7786, "Disabled by enterprise policy")) : "",
117
- hover: {
118
- content: policyRestricted ? ( localize(7787, "Disabled by enterprise policy")) : ( localize(
119
- 7788,
120
- "Auto-approve all tool calls and continue until the task is done. Autopilot may increase costs."
121
- ))
122
- },
123
- run: async () => {
124
- if (!(await maybeConfirmElevatedPermissionLevel(ChatPermissionLevel.Autopilot, this.dialogService, storageService))) {
125
- return;
126
- }
127
- delegate.setPermissionLevel(ChatPermissionLevel.Autopilot);
128
- if (this.element) {
129
- this.renderLabel(this.element);
142
+ } : undefined;
143
+ return {
144
+ ...action,
145
+ id: meta.id,
146
+ label: meta.label,
147
+ detail: meta.detail,
148
+ icon: meta.icon,
149
+ checked: currentLevel === level,
150
+ enabled: !disabledByPolicy,
151
+ inlineToggle,
152
+ tooltip: disabledByPolicy ? ( localize(8373, "Disabled by enterprise policy")) : "",
153
+ hover: {
154
+ content: hover
155
+ },
156
+ run: async () => {
157
+ if (meta.elevated && !(await maybeConfirmElevatedPermissionLevel(level, this.dialogService, storageService, {
158
+ defaultSettingKey: delegate.defaultSettingKey
159
+ }))) {
160
+ return;
161
+ }
162
+ delegate.setPermissionLevel(level);
163
+ if (this.element) {
164
+ this.renderLabel(this.element);
165
+ }
130
166
  }
131
- }
132
- });
167
+ };
168
+ }));
133
169
  return actions;
134
170
  }
135
171
  };
@@ -137,8 +173,8 @@ let PermissionPickerActionItem = class PermissionPickerActionItem extends ChatIn
137
173
  actionProvider,
138
174
  actionBarActions: [{
139
175
  id: "chat.permissions.learnMore",
140
- label: ( localize(7789, "Learn more about permissions")),
141
- tooltip: ( localize(7789, "Learn more about permissions")),
176
+ label: ( localize(8374, "Learn more about permissions")),
177
+ tooltip: ( localize(8374, "Learn more about permissions")),
142
178
  class: undefined,
143
179
  enabled: true,
144
180
  run: async () => {
@@ -158,34 +194,48 @@ let PermissionPickerActionItem = class PermissionPickerActionItem extends ChatIn
158
194
  }
159
195
  }, pickerOptions, actionWidgetService, keybindingService, contextKeyService, telemetryService);
160
196
  this.delegate = delegate;
197
+ this.configurationService = configurationService;
161
198
  this.dialogService = dialogService;
199
+ this.hoverService = hoverService;
162
200
  this._onDidDispose = this._register(( new Emitter()));
163
201
  this.onDidDispose = this._onDidDispose.event;
202
+ this._currentTooltip = "";
203
+ this._hover = this._register(( new MutableDisposable()));
204
+ this._register(configurationService.onDidChangeConfiguration(e => {
205
+ if ((e.affectsConfiguration(getSandboxEnabledSettingId()) || e.affectsConfiguration(ChatConfiguration.PermissionsSandboxToggleEnabled)) && this.element) {
206
+ this.renderLabel(this.element);
207
+ }
208
+ }));
209
+ }
210
+ isSandboxingEnabled() {
211
+ const value = this.configurationService.getValue(getSandboxEnabledSettingId());
212
+ return isAgentSandboxEnabledValue(value);
213
+ }
214
+ isSandboxToggleSettingEnabled() {
215
+ return this.configurationService.getValue(ChatConfiguration.PermissionsSandboxToggleEnabled) === true;
216
+ }
217
+ isSandboxToggleAvailable() {
218
+ return this.isSandboxToggleSettingEnabled() && this.delegate.isSandboxToggleApplicable?.() === true;
164
219
  }
165
220
  renderLabel(element) {
166
221
  this.setAriaLabelAttributes(element);
167
222
  const ext = this.delegate.getExtensionPermissions?.();
168
223
  let icon;
169
224
  let label;
225
+ let tooltip;
170
226
  const level = this.delegate.currentPermissionLevel.get();
171
227
  if (ext && ext.items.length > 0) {
172
228
  const selected = ext.items.find(i => i.id === ext.selectedId) ?? ext.items.find(i => i.default) ?? ext.items[0];
173
229
  icon = selected.icon ?? Codicon.lock;
174
230
  label = selected.name;
231
+ tooltip = selected.description ?? selected.name;
175
232
  } else {
176
- switch (level) {
177
- case ChatPermissionLevel.Autopilot:
178
- icon = Codicon.rocket;
179
- label = ( localize(7790, "Autopilot (Preview)"));
180
- break;
181
- case ChatPermissionLevel.AutoApprove:
182
- icon = Codicon.warning;
183
- label = ( localize(7791, "Bypass Approvals"));
184
- break;
185
- default:
186
- icon = Codicon.shield;
187
- label = ( localize(7792, "Default Approvals"));
188
- break;
233
+ const meta = getPermissionLevelMeta(level);
234
+ icon = meta.icon;
235
+ label = meta.shortLabel;
236
+ tooltip = this.delegate.getPermissionLevelHover?.(level, meta) ?? meta.description;
237
+ if (level === ChatPermissionLevel.Default && this.isSandboxToggleAvailable() && this.isSandboxingEnabled()) {
238
+ label = ( localize(8375, "Default Approvals (Sandboxed)"));
189
239
  }
190
240
  }
191
241
  const labelElements = [];
@@ -194,7 +244,17 @@ let PermissionPickerActionItem = class PermissionPickerActionItem extends ChatIn
194
244
  reset(element, ...labelElements);
195
245
  element.classList.toggle("warning", !ext && level === ChatPermissionLevel.Autopilot);
196
246
  element.classList.toggle("info", !ext && level === ChatPermissionLevel.AutoApprove);
197
- element.setAttribute("aria-label", ( localize(7793, "Permission picker, {0}", label)));
247
+ this._currentTooltip = tooltip;
248
+ element.setAttribute(
249
+ "aria-label",
250
+ !ext && this.delegate.getPermissionLevelHover ? ( localize(8376, "Permission picker, {0}, {1}", label, tooltip)) : ( localize(8377, "Permission picker, {0}", label))
251
+ );
252
+ if (this._hoverElement !== element) {
253
+ this._hoverElement = element;
254
+ this._hover.value = this.hoverService.setupDelayedHover(element, () => ({
255
+ content: this._currentTooltip
256
+ }));
257
+ }
198
258
  return null;
199
259
  }
200
260
  refresh() {
@@ -210,6 +270,6 @@ let PermissionPickerActionItem = class PermissionPickerActionItem extends ChatIn
210
270
  super.dispose();
211
271
  }
212
272
  };
213
- PermissionPickerActionItem = ( __decorate([( __param(3, IActionWidgetService)), ( __param(4, IKeybindingService)), ( __param(5, IContextKeyService)), ( __param(6, ITelemetryService)), ( __param(7, IConfigurationService)), ( __param(8, IDialogService)), ( __param(9, IOpenerService)), ( __param(10, IStorageService))], PermissionPickerActionItem));
273
+ PermissionPickerActionItem = ( __decorate([( __param(3, IActionWidgetService)), ( __param(4, IKeybindingService)), ( __param(5, IContextKeyService)), ( __param(6, ITelemetryService)), ( __param(7, IConfigurationService)), ( __param(8, IDialogService)), ( __param(9, IOpenerService)), ( __param(10, IStorageService)), ( __param(11, IHoverService))], PermissionPickerActionItem));
214
274
 
215
275
  export { PermissionPickerActionItem };
@@ -11,6 +11,7 @@ import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/
11
11
  import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
12
12
  import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
13
13
  import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
14
+ import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
14
15
  import { AgentSessionTarget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions";
15
16
  import { ChatInputPickerActionViewItem, IChatInputPickerOptions } from "./chatInputPickerActionItem.js";
16
17
  import { ISessionTypePickerDelegate } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
@@ -32,9 +33,10 @@ export declare class SessionTypePickerActionItem extends ChatInputPickerActionVi
32
33
  protected readonly commandService: ICommandService;
33
34
  protected readonly openerService: IOpenerService;
34
35
  protected readonly chatEntitlementService: IChatEntitlementService;
36
+ protected readonly languageModelsService: ILanguageModelsService;
35
37
  protected readonly configurationService: IConfigurationService;
36
38
  private _sessionTypeItems;
37
- constructor(action: MenuItemAction, chatSessionPosition: "sidebar" | "editor", delegate: ISessionTypePickerDelegate, pickerOptions: IChatInputPickerOptions, actionWidgetService: IActionWidgetService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, chatSessionsService: IChatSessionsService, commandService: ICommandService, openerService: IOpenerService, telemetryService: ITelemetryService, chatEntitlementService: IChatEntitlementService, configurationService: IConfigurationService);
39
+ constructor(action: MenuItemAction, chatSessionPosition: "sidebar" | "editor", delegate: ISessionTypePickerDelegate, pickerOptions: IChatInputPickerOptions, actionWidgetService: IActionWidgetService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, chatSessionsService: IChatSessionsService, commandService: ICommandService, openerService: IOpenerService, telemetryService: ITelemetryService, chatEntitlementService: IChatEntitlementService, languageModelsService: ILanguageModelsService, configurationService: IConfigurationService);
38
40
  protected _run(sessionTypeItem: ISessionTypeItem): void;
39
41
  protected _getSelectedSessionType(): AgentSessionTarget | undefined;
40
42
  protected _getAdditionalActions(): IActionWidgetDropdownAction[];
@@ -42,23 +44,13 @@ export declare class SessionTypePickerActionItem extends ChatInputPickerActionVi
42
44
  private _updateAgentSessionItems;
43
45
  /**
44
46
  * The default session type for the picker when no session is yet active.
45
- * Defaults to {@link AgentSessionProviders.Local} but is overridden to
46
- * {@link AgentSessionProviders.AgentHostCopilot} when the experimental
47
- * {@link ChatConfiguration.AgentHostDefaultChatProvider} setting is enabled
48
- * and that provider is registered.
47
+ * Defaults to {@link AgentSessionProviders.Local} but is overridden based on
48
+ * the experimental {@link ChatConfiguration.EditorDefaultProvider} setting
49
+ * when the selected provider is registered.
49
50
  */
50
51
  protected _getDefaultSessionType(): AgentSessionTarget;
51
- protected _isVisible(_type: AgentSessionTarget): boolean;
52
+ protected _isVisible(type: AgentSessionTarget): boolean;
52
53
  protected _isSessionTypeEnabled(type: AgentSessionTarget): boolean;
53
- /**
54
- * Whether the given session type is locked behind a plan upgrade for the
55
- * current user's entitlement. The cloud agent is not available to Copilot
56
- * Free or Copilot Student (EDU) users, so it is shown greyed out with an
57
- * Upgrade prompt instead of being selectable.
58
- */
59
- protected _isLockedForEntitlement(type: AgentSessionTarget): boolean;
60
- private _getUpgradeDescription;
61
- private _getUpgradeHover;
62
54
  protected _getSessionCategory(sessionTypeItem: ISessionTypeItem): {
63
55
  label: string;
64
56
  order: number;