@codingame/monaco-vscode-chat-service-override 27.0.0 → 28.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/index.js +5 -2
  2. package/package.json +5 -5
  3. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +54 -4
  4. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +179 -11
  5. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +5 -1
  6. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +6 -1
  7. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +25 -10
  8. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +67 -0
  9. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +263 -0
  10. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +6 -0
  11. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +25 -6
  12. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  13. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +15 -15
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +13 -5
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +5 -5
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +11 -11
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +5 -4
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +7 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +2 -2
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +13 -13
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +12 -12
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +49 -13
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +58 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +537 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +17 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +55 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +26 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +9 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/media/agentPluginEditor.css +32 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +17 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +89 -11
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +4 -26
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +146 -53
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +56 -54
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -25
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  58. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +13 -12
  60. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +7 -9
  61. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +189 -145
  62. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +42 -44
  63. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +3 -4
  65. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +20 -8
  66. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +210 -59
  67. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
  68. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +14 -3
  69. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +3 -3
  70. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +122 -53
  71. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +87 -9
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +62 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +702 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  75. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +279 -214
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +21 -21
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +12 -3
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +19 -19
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +12 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +63 -4
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +18 -18
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +6 -6
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +4 -1
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +62 -24
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +28 -28
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +9 -9
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +2 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +7 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -5
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +32 -36
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +4 -5
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +2 -2
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +49 -49
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +9 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +14 -14
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +26 -26
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +13 -13
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +3 -1
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +103 -60
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +61 -61
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +66 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +245 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +78 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.js +234 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +31 -126
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +229 -524
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +41 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +22 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +4 -3
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +54 -20
  137. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
  138. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +11 -12
  139. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +112 -39
  140. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +99 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +489 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  143. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +6 -3
  144. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +348 -285
  145. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +18 -1
  146. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +107 -5
  147. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  148. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +4 -4
  149. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  150. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  151. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  152. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  153. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +2 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +55 -38
  155. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +20 -1
  156. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +148 -60
  157. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -5
  158. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
  159. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -6
  160. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +29 -14
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +72 -14
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +5 -3
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +5 -2
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +11 -10
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +8 -0
  172. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +1 -0
  173. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +1 -0
  174. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +8 -0
  175. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +20 -0
  176. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +1 -1
  177. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +72 -23
  178. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +19 -1
  179. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +5 -1
  180. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +6 -1
  181. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +37 -8
  182. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +36 -3
  183. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +4 -4
  184. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +2 -2
  185. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +6 -1
  186. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +71 -25
  187. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +217 -91
  188. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +85 -3
  189. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +257 -63
  190. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
  191. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +3 -16
  192. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +7 -50
  193. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +2 -1
  194. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +32 -3
  195. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +1 -1
  196. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +3 -1
  197. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -1
  198. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +7 -6
  199. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
  200. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +26 -1
  201. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +287 -88
  202. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
  203. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +75 -20
  204. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +121 -0
  205. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1422 -0
  206. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
  207. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +5 -1
  208. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +81 -41
  209. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +3 -1
  210. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +8 -6
  211. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  212. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +14 -2
  213. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +54 -5
  214. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +6 -5
  215. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +4 -4
  216. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +38 -22
  217. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +8 -8
  219. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  220. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  221. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  222. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  223. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  224. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +8 -0
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +36 -18
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +6 -0
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +27 -13
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +1 -1
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +1 -0
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +8 -1
  250. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -12
  251. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -67
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Storage keys used by ChatTipService for persisting tip state.
3
+ */
4
+ export declare const ChatTipStorageKeys: {
5
+ /** IDs of tips that have been permanently dismissed by the user. */
6
+ DismissedTips: string;
7
+ /** The ID of the last tip that was shown, for round-robin selection. */
8
+ LastTipId: string;
9
+ /** Whether the user has ever modified the thinking phrases setting. */
10
+ ThinkingPhrasesEverModified: string;
11
+ };
12
+ /**
13
+ * Storage keys used by TipEligibilityTracker for tracking user signals.
14
+ */
15
+ export declare const TipEligibilityStorageKeys: {
16
+ /** Command IDs that have been executed (for excludeWhenCommandsExecuted). */
17
+ ExecutedCommands: string;
18
+ /** Chat modes that have been used (for excludeWhenModesUsed). */
19
+ UsedModes: string;
20
+ /** Tool IDs that have been invoked (for excludeWhenToolsInvoked). */
21
+ InvokedTools: string;
22
+ };
23
+ /**
24
+ * Synthetic command IDs used to track user actions that don't have real commands.
25
+ * These are recorded when the user performs the action, allowing tips to be excluded
26
+ * via excludeWhenCommandsExecuted.
27
+ */
28
+ export declare const TipTrackingCommands: {
29
+ /** Tracked when user attaches a file/folder reference with #. */
30
+ readonly AttachFilesReferenceUsed: "chat.tips.attachFiles.referenceUsed";
31
+ /** Tracked when user executes /init or /create-instructions. */
32
+ readonly CreateAgentInstructionsUsed: "chat.tips.createAgentInstructions.commandUsed";
33
+ /** Tracked when user executes /create-prompt. */
34
+ readonly CreatePromptUsed: "chat.tips.createPrompt.commandUsed";
35
+ /** Tracked when user executes /create-agent. */
36
+ readonly CreateAgentUsed: "chat.tips.createAgent.commandUsed";
37
+ /** Tracked when user executes /create-skill. */
38
+ readonly CreateSkillUsed: "chat.tips.createSkill.commandUsed";
39
+ /** Tracked when user executes /fork. */
40
+ readonly ForkConversationUsed: "chat.tips.forkConversation.commandUsed";
41
+ };
@@ -0,0 +1,22 @@
1
+
2
+
3
+ const ChatTipStorageKeys = {
4
+ DismissedTips: 'chat.tip.dismissed',
5
+ LastTipId: 'chat.tip.lastTipId',
6
+ ThinkingPhrasesEverModified: 'chat.tip.thinkingPhrasesEverModified',
7
+ };
8
+ const TipEligibilityStorageKeys = {
9
+ ExecutedCommands: 'chat.tips.executedCommands',
10
+ UsedModes: 'chat.tips.usedModes',
11
+ InvokedTools: 'chat.tips.invokedTools',
12
+ };
13
+ const TipTrackingCommands = {
14
+ AttachFilesReferenceUsed: 'chat.tips.attachFiles.referenceUsed',
15
+ CreateAgentInstructionsUsed: 'chat.tips.createAgentInstructions.commandUsed',
16
+ CreatePromptUsed: 'chat.tips.createPrompt.commandUsed',
17
+ CreateAgentUsed: 'chat.tips.createAgent.commandUsed',
18
+ CreateSkillUsed: 'chat.tips.createSkill.commandUsed',
19
+ ForkConversationUsed: 'chat.tips.forkConversation.commandUsed',
20
+ };
21
+
22
+ export { ChatTipStorageKeys, TipEligibilityStorageKeys, TipTrackingCommands };
@@ -1,6 +1,5 @@
1
1
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
2
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
- import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
4
3
  import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
5
4
  import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service";
6
5
  import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
@@ -14,12 +13,14 @@ export declare class ChatWindowNotifier extends Disposable implements IWorkbench
14
13
  private readonly _chatWidgetService;
15
14
  private readonly _hostService;
16
15
  private readonly _configurationService;
17
- private readonly _commandService;
18
16
  static readonly ID = "workbench.contrib.chatWindowNotifier";
19
17
  private readonly _activeNotifications;
20
- constructor(_chatService: IChatService, _chatWidgetService: IChatWidgetService, _hostService: IHostService, _configurationService: IConfigurationService, _commandService: ICommandService);
18
+ constructor(_chatService: IChatService, _chatWidgetService: IChatWidgetService, _hostService: IHostService, _configurationService: IConfigurationService);
21
19
  private _trackModel;
22
20
  private _notifyIfNeeded;
21
+ private _confirmAllow;
22
+ private _getNotificationBody;
23
+ private _getPendingTerminalCommand;
23
24
  private _isQuestionCarouselPending;
24
25
  private _sanitizeOSToastText;
25
26
  private _clearNotification;
@@ -7,32 +7,25 @@ import { Disposable, DisposableResourceMap, toDisposable } from '@codingame/mona
7
7
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
8
8
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
9
9
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
10
- import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
11
10
  import { FocusMode } from '@codingame/monaco-vscode-api/vscode/vs/platform/native/common/native';
12
11
  import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
12
+ import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
13
13
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
14
+ import { migrateLegacyTerminalToolSpecificData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
14
15
  import { ChatConfiguration, ChatNotificationMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
15
16
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
16
- import { AcceptToolConfirmationActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
17
17
  import { autorunIterableDelta, autorunDelta } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
18
18
 
19
19
  let ChatWindowNotifier = class ChatWindowNotifier extends Disposable {
20
20
  static {
21
21
  this.ID = "workbench.contrib.chatWindowNotifier";
22
22
  }
23
- constructor(
24
- _chatService,
25
- _chatWidgetService,
26
- _hostService,
27
- _configurationService,
28
- _commandService
29
- ) {
23
+ constructor(_chatService, _chatWidgetService, _hostService, _configurationService) {
30
24
  super();
31
25
  this._chatService = _chatService;
32
26
  this._chatWidgetService = _chatWidgetService;
33
27
  this._hostService = _hostService;
34
28
  this._configurationService = _configurationService;
35
- this._commandService = _commandService;
36
29
  this._activeNotifications = this._register(( new DisposableResourceMap()));
37
30
  const modelTrackers = this._register(( new DisposableResourceMap()));
38
31
  this._register(
@@ -84,34 +77,75 @@ let ChatWindowNotifier = class ChatWindowNotifier extends Disposable {
84
77
  mode: FocusMode.Notify
85
78
  });
86
79
  }
87
- const notificationTitle = info.title ? ( localize(6162, "Chat: {0}", info.title)) : ( localize(6163, "Untitled Chat"));
80
+ const notificationTitle = info.title ? ( localize(6233, "Session: {0}", info.title)) : ( localize(6234, "Untitled Session"));
88
81
  const cts = ( new CancellationTokenSource());
89
82
  this._activeNotifications.set(sessionResource, toDisposable(() => cts.dispose(true)));
90
83
  const isQuestionCarousel = this._isQuestionCarouselPending(sessionResource);
91
84
  try {
92
- const actionLabel = isQuestionCarousel ? ( localize(6164, "Open Chat")) : ( localize(6165, "Allow"));
93
- const body = info.detail ? this._sanitizeOSToastText(info.detail) : isQuestionCarousel ? ( localize(6166, "Questions need your input.")) : ( localize(6167, "Approval needed to continue."));
85
+ const actionLabel = isQuestionCarousel ? ( localize(6235, "Open Session")) : ( localize(6236, "Allow"));
94
86
  const result = await this._hostService.showToast({
95
87
  title: this._sanitizeOSToastText(notificationTitle),
96
- body,
88
+ body: this._getNotificationBody(sessionResource, info, isQuestionCarousel),
97
89
  actions: [actionLabel]
98
90
  }, cts.token);
91
+ if (result.actionIndex === 0 && !isQuestionCarousel && this._confirmAllow(sessionResource)) {
92
+ return;
93
+ }
99
94
  if (result.clicked || typeof result.actionIndex === "number") {
100
95
  await this._hostService.focus(targetWindow, {
101
96
  mode: FocusMode.Force
102
97
  });
103
98
  const widget = await this._chatWidgetService.openSession(sessionResource);
104
99
  widget?.focusInput();
105
- if (result.actionIndex === 0 && !isQuestionCarousel) {
106
- await this._commandService.executeCommand(AcceptToolConfirmationActionId, {
107
- sessionResource
108
- });
109
- }
110
100
  }
111
101
  } finally {
112
102
  this._clearNotification(sessionResource);
113
103
  }
114
104
  }
105
+ _confirmAllow(sessionResource) {
106
+ const model = this._chatService.getSession(sessionResource);
107
+ const lastResponse = model?.lastRequest?.response;
108
+ if (!lastResponse) {
109
+ return false;
110
+ }
111
+ for (const part of lastResponse.response.value) {
112
+ const state = part.kind === "toolInvocation" ? part.state.get() : undefined;
113
+ if (state?.type === IChatToolInvocation.StateKind.WaitingForConfirmation || state?.type === IChatToolInvocation.StateKind.WaitingForPostApproval) {
114
+ state.confirm({
115
+ type: ToolConfirmKind.UserAction
116
+ });
117
+ return true;
118
+ }
119
+ }
120
+ return false;
121
+ }
122
+ _getNotificationBody(sessionResource, info, isQuestionCarousel) {
123
+ if (isQuestionCarousel) {
124
+ return localize(6237, "Questions need your input.");
125
+ }
126
+ const terminalCommand = this._getPendingTerminalCommand(sessionResource);
127
+ if (terminalCommand) {
128
+ return this._sanitizeOSToastText(terminalCommand);
129
+ }
130
+ if (info.detail) {
131
+ return this._sanitizeOSToastText(info.detail);
132
+ }
133
+ return localize(6238, "Approval needed to continue.");
134
+ }
135
+ _getPendingTerminalCommand(sessionResource) {
136
+ const model = this._chatService.getSession(sessionResource);
137
+ const lastResponse = model?.lastRequest?.response;
138
+ if (!lastResponse?.response?.value) {
139
+ return undefined;
140
+ }
141
+ for (const part of lastResponse.response.value) {
142
+ if (part.kind === "toolInvocation" && part.toolSpecificData?.kind === "terminal") {
143
+ const terminalData = migrateLegacyTerminalToolSpecificData(part.toolSpecificData);
144
+ return terminalData.commandLine.forDisplay ?? terminalData.commandLine.userEdited ?? terminalData.commandLine.toolEdited ?? terminalData.commandLine.original;
145
+ }
146
+ }
147
+ return undefined;
148
+ }
115
149
  _isQuestionCarouselPending(sessionResource) {
116
150
  const model = this._chatService.getSession(sessionResource);
117
151
  const lastResponse = model?.lastRequest?.response;
@@ -127,6 +161,6 @@ let ChatWindowNotifier = class ChatWindowNotifier extends Disposable {
127
161
  this._activeNotifications.deleteAndDispose(sessionResource);
128
162
  }
129
163
  };
130
- ChatWindowNotifier = ( __decorate([( __param(0, IChatService)), ( __param(1, IChatWidgetService)), ( __param(2, IHostService)), ( __param(3, IConfigurationService)), ( __param(4, ICommandService))], ChatWindowNotifier));
164
+ ChatWindowNotifier = ( __decorate([( __param(0, IChatService)), ( __param(1, IChatWidgetService)), ( __param(2, IHostService)), ( __param(3, IConfigurationService))], ChatWindowNotifier));
131
165
 
132
166
  export { ChatWindowNotifier };
@@ -13,8 +13,8 @@ const configurationRegistry = ( Registry.as(Extensions.Configuration));
13
13
  function createDefaultModelArrays() {
14
14
  return {
15
15
  modelIds: [""],
16
- modelLabels: [( localize(6168, "Auto (Vendor Default)"))],
17
- modelDescriptions: [( localize(6169, "Use the vendor's default model"))]
16
+ modelLabels: [( localize(6239, "Auto (Vendor Default)"))],
17
+ modelDescriptions: [( localize(6240, "Use the vendor's default model"))]
18
18
  };
19
19
  }
20
20
  let DefaultModelContribution = class DefaultModelContribution extends Disposable {
@@ -46,8 +46,8 @@ let DefaultModelContribution = class DefaultModelContribution extends Disposable
46
46
  modelLabels.length = 0;
47
47
  modelDescriptions.length = 0;
48
48
  modelIds.push("");
49
- modelLabels.push(( localize(6168, "Auto (Vendor Default)")));
50
- modelDescriptions.push(( localize(6169, "Use the vendor's default model")));
49
+ modelLabels.push(( localize(6239, "Auto (Vendor Default)")));
50
+ modelDescriptions.push(( localize(6240, "Use the vendor's default model")));
51
51
  const models = [];
52
52
  const allModelIds = this._languageModelsService.getLanguageModelIds();
53
53
  for (const modelId of allModelIds) {
@@ -1,27 +1,26 @@
1
1
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
- import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
2
+ import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
3
3
  import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
4
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
4
5
  import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
5
6
  import { IAgentPluginRepositoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service";
6
7
  import { IPluginInstallService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service";
7
8
  import { IMarketplacePlugin } from "../common/plugins/pluginMarketplaceService.js";
9
+ import { IPluginMarketplaceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service";
8
10
  export declare class PluginInstallService implements IPluginInstallService {
9
11
  private readonly _pluginRepositoryService;
10
- private readonly _configurationService;
12
+ private readonly _pluginMarketplaceService;
11
13
  private readonly _fileService;
12
14
  private readonly _notificationService;
15
+ private readonly _dialogService;
16
+ private readonly _logService;
13
17
  readonly _serviceBrand: undefined;
14
- constructor(_pluginRepositoryService: IAgentPluginRepositoryService, _configurationService: IConfigurationService, _fileService: IFileService, _notificationService: INotificationService);
18
+ constructor(_pluginRepositoryService: IAgentPluginRepositoryService, _pluginMarketplaceService: IPluginMarketplaceService, _fileService: IFileService, _notificationService: INotificationService, _dialogService: IDialogService, _logService: ILogService);
15
19
  installPlugin(plugin: IMarketplacePlugin): Promise<void>;
16
20
  updatePlugin(plugin: IMarketplacePlugin): Promise<void>;
17
- uninstallPlugin(pluginUri: URI): Promise<void>;
18
21
  getPluginInstallUri(plugin: IMarketplacePlugin): URI;
19
- /**
20
- * Adds the given file-system path to `chat.plugins.paths` in user-local config.
21
- */
22
- private _addPluginPath;
23
- /**
24
- * Removes the given file-system path from `chat.plugins.paths` in user-local config.
25
- */
26
- private _removePluginPath;
22
+ private _ensureMarketplaceTrusted;
23
+ private _installRelativePathPlugin;
24
+ private _installGitPlugin;
25
+ private _installPackagePlugin;
27
26
  }
@@ -1,31 +1,96 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
3
4
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
- import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
5
- import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
5
+ import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
6
6
  import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
7
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
7
8
  import '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
8
9
  import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
9
- import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
10
10
  import { IAgentPluginRepositoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service';
11
+ import { PluginSourceKind } from '../common/plugins/pluginMarketplaceService.js';
12
+ import { IPluginMarketplaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service';
11
13
  import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
12
14
 
13
15
  let PluginInstallService = class PluginInstallService {
14
16
  constructor(
15
17
  _pluginRepositoryService,
16
- _configurationService,
18
+ _pluginMarketplaceService,
17
19
  _fileService,
18
- _notificationService
20
+ _notificationService,
21
+ _dialogService,
22
+ _logService
19
23
  ) {
20
24
  this._pluginRepositoryService = _pluginRepositoryService;
21
- this._configurationService = _configurationService;
25
+ this._pluginMarketplaceService = _pluginMarketplaceService;
22
26
  this._fileService = _fileService;
23
27
  this._notificationService = _notificationService;
28
+ this._dialogService = _dialogService;
29
+ this._logService = _logService;
24
30
  }
25
31
  async installPlugin(plugin) {
32
+ if (!(await this._ensureMarketplaceTrusted(plugin))) {
33
+ return;
34
+ }
35
+ const kind = plugin.sourceDescriptor.kind;
36
+ if (kind === PluginSourceKind.RelativePath) {
37
+ return this._installRelativePathPlugin(plugin);
38
+ }
39
+ if (kind === PluginSourceKind.Npm || kind === PluginSourceKind.Pip) {
40
+ return this._installPackagePlugin(plugin);
41
+ }
42
+ return this._installGitPlugin(plugin);
43
+ }
44
+ async updatePlugin(plugin) {
45
+ const kind = plugin.sourceDescriptor.kind;
46
+ if (kind === PluginSourceKind.Npm || kind === PluginSourceKind.Pip) {
47
+ return this._installPackagePlugin(plugin);
48
+ }
49
+ return this._pluginRepositoryService.updatePluginSource(plugin, {
50
+ pluginName: plugin.name,
51
+ failureLabel: plugin.name,
52
+ marketplaceType: plugin.marketplaceType
53
+ });
54
+ }
55
+ getPluginInstallUri(plugin) {
56
+ if (plugin.sourceDescriptor.kind === PluginSourceKind.RelativePath) {
57
+ return this._pluginRepositoryService.getPluginInstallUri(plugin);
58
+ }
59
+ return this._pluginRepositoryService.getPluginSourceInstallUri(plugin.sourceDescriptor);
60
+ }
61
+ async _ensureMarketplaceTrusted(plugin) {
62
+ if (this._pluginMarketplaceService.isMarketplaceTrusted(plugin.marketplaceReference)) {
63
+ return true;
64
+ }
65
+ const {
66
+ confirmed
67
+ } = await this._dialogService.confirm({
68
+ type: "question",
69
+ message: ( localize(
70
+ 6241,
71
+ "Trust Plugins from '{0}'?",
72
+ plugin.marketplaceReference.displayLabel
73
+ )),
74
+ detail: ( localize(
75
+ 6242,
76
+ "Plugins can run code on your machine. Only install plugins from sources you trust.\n\nSource: {0}",
77
+ plugin.marketplaceReference.rawValue
78
+ )),
79
+ primaryButton: ( localize(6243, "&&Trust")),
80
+ custom: {
81
+ icon: Codicon.shield
82
+ }
83
+ });
84
+ if (!confirmed) {
85
+ return false;
86
+ }
87
+ this._pluginMarketplaceService.trustMarketplace(plugin.marketplaceReference);
88
+ return true;
89
+ }
90
+ async _installRelativePathPlugin(plugin) {
26
91
  try {
27
92
  await this._pluginRepositoryService.ensureRepository(plugin.marketplaceReference, {
28
- progressTitle: ( localize(6170, "Installing plugin '{0}'...", plugin.name)),
93
+ progressTitle: ( localize(6244, "Installing plugin '{0}'...", plugin.name)),
29
94
  failureLabel: plugin.name,
30
95
  marketplaceType: plugin.marketplaceType
31
96
  });
@@ -39,7 +104,7 @@ let PluginInstallService = class PluginInstallService {
39
104
  this._notificationService.notify({
40
105
  severity: Severity.Error,
41
106
  message: ( localize(
42
- 6171,
107
+ 6245,
43
108
  "Plugin source directory '{0}' is invalid for repository '{1}'.",
44
109
  plugin.source,
45
110
  plugin.marketplace
@@ -52,7 +117,7 @@ let PluginInstallService = class PluginInstallService {
52
117
  this._notificationService.notify({
53
118
  severity: Severity.Error,
54
119
  message: ( localize(
55
- 6172,
120
+ 6246,
56
121
  "Plugin source directory '{0}' not found in repository '{1}'.",
57
122
  plugin.source,
58
123
  plugin.marketplace
@@ -60,43 +125,51 @@ let PluginInstallService = class PluginInstallService {
60
125
  });
61
126
  return;
62
127
  }
63
- this._addPluginPath(pluginDir.fsPath);
128
+ this._pluginMarketplaceService.addInstalledPlugin(pluginDir, plugin);
64
129
  }
65
- async updatePlugin(plugin) {
66
- return this._pluginRepositoryService.pullRepository(plugin.marketplaceReference, {
67
- pluginName: plugin.name,
68
- failureLabel: plugin.name,
69
- marketplaceType: plugin.marketplaceType
70
- });
71
- }
72
- async uninstallPlugin(pluginUri) {
73
- await this._removePluginPath(pluginUri.fsPath);
74
- }
75
- getPluginInstallUri(plugin) {
76
- return this._pluginRepositoryService.getPluginInstallUri(plugin);
77
- }
78
- _addPluginPath(fsPath) {
79
- const current = this._configurationService.getValue(ChatConfiguration.PluginPaths) ?? {};
80
- if (Object.prototype.hasOwnProperty.call(current, fsPath)) {
130
+ async _installGitPlugin(plugin) {
131
+ const repo = this._pluginRepositoryService.getPluginSource(plugin.sourceDescriptor.kind);
132
+ let pluginDir;
133
+ try {
134
+ pluginDir = await this._pluginRepositoryService.ensurePluginSource(plugin, {
135
+ progressTitle: ( localize(6244, "Installing plugin '{0}'...", plugin.name)),
136
+ failureLabel: plugin.name,
137
+ marketplaceType: plugin.marketplaceType
138
+ });
139
+ } catch {
81
140
  return;
82
141
  }
83
- this._configurationService.updateValue(ChatConfiguration.PluginPaths, {
84
- ...current,
85
- [fsPath]: true
86
- }, ConfigurationTarget.USER_LOCAL);
142
+ const pluginExists = await this._fileService.exists(pluginDir);
143
+ if (!pluginExists) {
144
+ this._notificationService.notify({
145
+ severity: Severity.Error,
146
+ message: ( localize(
147
+ 6247,
148
+ "Plugin source '{0}' not found after cloning.",
149
+ repo.getLabel(plugin.sourceDescriptor)
150
+ ))
151
+ });
152
+ return;
153
+ }
154
+ this._pluginMarketplaceService.addInstalledPlugin(pluginDir, plugin);
87
155
  }
88
- _removePluginPath(fsPath) {
89
- const current = this._configurationService.getValue(ChatConfiguration.PluginPaths) ?? {};
90
- if (!Object.prototype.hasOwnProperty.call(current, fsPath)) {
156
+ async _installPackagePlugin(plugin) {
157
+ const repo = this._pluginRepositoryService.getPluginSource(plugin.sourceDescriptor.kind);
158
+ if (!repo.runInstall) {
159
+ this._logService.error(
160
+ `[PluginInstallService] Expected package repository for kind '${plugin.sourceDescriptor.kind}'`
161
+ );
162
+ return;
163
+ }
164
+ const installDir = await this._pluginRepositoryService.ensurePluginSource(plugin);
165
+ const pluginDir = this._pluginRepositoryService.getPluginSourceInstallUri(plugin.sourceDescriptor);
166
+ const result = await repo.runInstall(installDir, pluginDir, plugin);
167
+ if (!result) {
91
168
  return;
92
169
  }
93
- const updated = {
94
- ...current
95
- };
96
- delete updated[fsPath];
97
- return this._configurationService.updateValue(ChatConfiguration.PluginPaths, updated, ConfigurationTarget.USER_LOCAL);
170
+ this._pluginMarketplaceService.addInstalledPlugin(result.pluginDir, plugin);
98
171
  }
99
172
  };
100
- PluginInstallService = ( __decorate([( __param(0, IAgentPluginRepositoryService)), ( __param(1, IConfigurationService)), ( __param(2, IFileService)), ( __param(3, INotificationService))], PluginInstallService));
173
+ PluginInstallService = ( __decorate([( __param(0, IAgentPluginRepositoryService)), ( __param(1, IPluginMarketplaceService)), ( __param(2, IFileService)), ( __param(3, INotificationService)), ( __param(4, IDialogService)), ( __param(5, ILogService))], PluginInstallService));
101
174
 
102
175
  export { PluginInstallService };
@@ -0,0 +1,99 @@
1
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
+ import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
3
+ import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
4
+ import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
5
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
6
+ import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
7
+ import { IProgressService } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service";
8
+ import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
9
+ import { IEnsureRepositoryOptions, IPullRepositoryOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService";
10
+ import { IMarketplacePlugin, IPluginSourceDescriptor, PluginSourceKind } from "../common/plugins/pluginMarketplaceService.js";
11
+ import { IPluginSource } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginSource";
12
+ declare abstract class AbstractGitPluginSource implements IPluginSource {
13
+ protected readonly _commandService: ICommandService;
14
+ protected readonly _fileService: IFileService;
15
+ protected readonly _logService: ILogService;
16
+ protected readonly _notificationService: INotificationService;
17
+ protected readonly _progressService: IProgressService;
18
+ abstract readonly kind: PluginSourceKind;
19
+ constructor(_commandService: ICommandService, _fileService: IFileService, _logService: ILogService, _notificationService: INotificationService, _progressService: IProgressService);
20
+ abstract getInstallUri(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI;
21
+ abstract getLabel(descriptor: IPluginSourceDescriptor): string;
22
+ protected abstract _cloneUrl(descriptor: IPluginSourceDescriptor): string;
23
+ protected abstract _displayLabel(descriptor: IPluginSourceDescriptor): string;
24
+ getCleanupTarget(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI | undefined;
25
+ ensure(cacheRoot: URI, plugin: IMarketplacePlugin, options?: IEnsureRepositoryOptions): Promise<URI>;
26
+ update(cacheRoot: URI, plugin: IMarketplacePlugin, options?: IPullRepositoryOptions): Promise<void>;
27
+ private _cloneRepository;
28
+ private _checkoutRevision;
29
+ }
30
+ export declare class RelativePathPluginSource implements IPluginSource {
31
+ readonly kind = PluginSourceKind.RelativePath;
32
+ getInstallUri(_cacheRoot: URI, _descriptor: IPluginSourceDescriptor): URI;
33
+ ensure(_cacheRoot: URI, _plugin: IMarketplacePlugin, _options?: IEnsureRepositoryOptions): Promise<URI>;
34
+ update(_cacheRoot: URI, _plugin: IMarketplacePlugin, _options?: IPullRepositoryOptions): Promise<void>;
35
+ getCleanupTarget(_cacheRoot: URI, _descriptor: IPluginSourceDescriptor): URI | undefined;
36
+ getLabel(descriptor: IPluginSourceDescriptor): string;
37
+ }
38
+ export declare class GitHubPluginSource extends AbstractGitPluginSource {
39
+ readonly kind = PluginSourceKind.GitHub;
40
+ getInstallUri(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI;
41
+ getLabel(descriptor: IPluginSourceDescriptor): string;
42
+ protected _cloneUrl(descriptor: IPluginSourceDescriptor): string;
43
+ protected _displayLabel(descriptor: IPluginSourceDescriptor): string;
44
+ }
45
+ export declare class GitUrlPluginSource extends AbstractGitPluginSource {
46
+ readonly kind = PluginSourceKind.GitUrl;
47
+ getInstallUri(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI;
48
+ getLabel(descriptor: IPluginSourceDescriptor): string;
49
+ protected _cloneUrl(descriptor: IPluginSourceDescriptor): string;
50
+ protected _displayLabel(descriptor: IPluginSourceDescriptor): string;
51
+ private _gitUrlCacheSegments;
52
+ }
53
+ export declare abstract class AbstractPackagePluginSource implements IPluginSource {
54
+ protected readonly _dialogService: IDialogService;
55
+ protected readonly _fileService: IFileService;
56
+ protected readonly _logService: ILogService;
57
+ protected readonly _notificationService: INotificationService;
58
+ protected readonly _progressService: IProgressService;
59
+ protected readonly _terminalService: ITerminalService;
60
+ abstract readonly kind: PluginSourceKind;
61
+ constructor(_dialogService: IDialogService, _fileService: IFileService, _logService: ILogService, _notificationService: INotificationService, _progressService: IProgressService, _terminalService: ITerminalService);
62
+ abstract getInstallUri(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI;
63
+ abstract getLabel(descriptor: IPluginSourceDescriptor): string;
64
+ getCleanupTarget(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI | undefined;
65
+ /**
66
+ * Return the parent directory (prefix / target) where the package
67
+ * manager installs into. This is above the actual plugin content dir.
68
+ */
69
+ protected abstract _getCacheDir(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI;
70
+ /** Build the terminal command args for install. */
71
+ protected abstract _buildInstallArgs(installDir: URI, plugin: IMarketplacePlugin): string[];
72
+ /** Human-readable package manager name for messages. */
73
+ protected abstract get _managerName(): string;
74
+ ensure(cacheRoot: URI, plugin: IMarketplacePlugin, _options?: IEnsureRepositoryOptions): Promise<URI>;
75
+ update(cacheRoot: URI, plugin: IMarketplacePlugin, _options?: IPullRepositoryOptions): Promise<void>;
76
+ runInstall(installDir: URI, pluginDir: URI, plugin: IMarketplacePlugin): Promise<{
77
+ pluginDir: URI;
78
+ } | undefined>;
79
+ private _confirmTerminalCommand;
80
+ private _runTerminalCommand;
81
+ private _waitForTerminalCommandCompletion;
82
+ }
83
+ export declare class NpmPluginSource extends AbstractPackagePluginSource {
84
+ readonly kind = PluginSourceKind.Npm;
85
+ protected readonly _managerName = "npm";
86
+ getInstallUri(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI;
87
+ getLabel(descriptor: IPluginSourceDescriptor): string;
88
+ protected _getCacheDir(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI;
89
+ protected _buildInstallArgs(installDir: URI, plugin: IMarketplacePlugin): string[];
90
+ }
91
+ export declare class PipPluginSource extends AbstractPackagePluginSource {
92
+ readonly kind = PluginSourceKind.Pip;
93
+ protected readonly _managerName = "pip";
94
+ getInstallUri(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI;
95
+ getLabel(descriptor: IPluginSourceDescriptor): string;
96
+ protected _getCacheDir(cacheRoot: URI, descriptor: IPluginSourceDescriptor): URI;
97
+ protected _buildInstallArgs(installDir: URI, plugin: IMarketplacePlugin): string[];
98
+ }
99
+ export {};