@codingame/monaco-vscode-chat-service-override 26.2.2 → 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 (356) hide show
  1. package/index.js +35 -2
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +15 -0
  4. package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +53 -0
  5. package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +219 -0
  6. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +89 -0
  7. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +251 -0
  8. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
  9. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +278 -0
  10. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +76 -0
  11. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +299 -0
  12. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +67 -0
  13. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +263 -0
  14. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +85 -0
  15. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +397 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -2
  17. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +27 -40
  18. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +9 -3
  19. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +74 -18
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +1 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +54 -8
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +87 -53
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +71 -15
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +43 -21
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +13 -5
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -3
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +1 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +154 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -8
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +53 -43
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +4 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +85 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +8 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +33 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +18 -32
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  42. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +13 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
  44. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +49 -13
  45. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +58 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +537 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +17 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +55 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +26 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +9 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/media/agentPluginEditor.css +32 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +48 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +282 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +55 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +634 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +10 -11
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -67
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +7 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +27 -18
  61. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +1 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +4 -2
  63. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
  65. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +2 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +90 -51
  67. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +20 -5
  68. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +3 -1
  69. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +43 -27
  70. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +7 -2
  71. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +3 -1
  72. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +84 -22
  73. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  74. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.d.ts → localAgentSessionsController.d.ts} +7 -4
  75. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.js → localAgentSessionsController.js} +24 -17
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +23 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +171 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +52 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +20 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +179 -0
  81. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +987 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +246 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +56 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +26 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +130 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +878 -0
  88. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +22 -0
  89. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +38 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +83 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +45 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +165 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +75 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +692 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +936 -0
  97. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +62 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +702 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +2 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +30 -1
  101. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +32 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +26 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +622 -391
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +18 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +419 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +12 -0
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +46 -0
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +34 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +198 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +55 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +314 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.d.ts +23 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +64 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +5 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +84 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +27 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +110 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +46 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +170 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +71 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +611 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +125 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +504 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.d.ts +10 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +914 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +19 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +128 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +61 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +467 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +31 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +113 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +14 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +126 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +38 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +279 -0
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +18 -0
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +122 -0
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +47 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +85 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +788 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -5
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +32 -36
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +6 -24
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  147. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  148. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  149. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
  151. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +2 -1
  152. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +2 -2
  153. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  154. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +12 -12
  155. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
  156. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +16 -15
  157. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  158. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  159. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -76
  160. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +26 -15
  161. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +2 -2
  162. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  163. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  164. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +24 -7
  165. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +40 -413
  166. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +10 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +38 -6
  168. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +5 -1
  169. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +56 -46
  170. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +15 -11
  171. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +52 -0
  172. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +138 -0
  173. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +11 -1
  174. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +166 -41
  175. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +6 -0
  176. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +37 -23
  177. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +17 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +394 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +118 -63
  181. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
  182. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +28 -0
  183. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +66 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +245 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +78 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.js +234 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +88 -14
  188. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +624 -68
  189. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +41 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +22 -0
  191. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +88 -24
  193. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +28 -19
  194. package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.d.ts +14 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.js +62 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +36 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +110 -0
  198. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.d.ts +10 -0
  199. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +39 -0
  200. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +3 -3
  201. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
  202. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.d.ts +10 -0
  203. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +39 -0
  204. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +26 -0
  205. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +175 -0
  206. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +99 -0
  207. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +489 -0
  208. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  209. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +19 -1
  210. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +364 -279
  211. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +18 -1
  212. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +69 -6
  213. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  214. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +9 -9
  215. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  216. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +4 -0
  217. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
  218. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  219. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
  220. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
  221. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +22 -0
  222. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +76 -0
  223. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +5 -0
  224. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +30 -0
  225. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +2 -0
  226. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +67 -38
  227. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +20 -1
  228. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +187 -74
  229. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +31 -0
  230. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +242 -0
  231. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +34 -0
  232. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +45 -0
  233. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
  234. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +33 -0
  235. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +311 -0
  236. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  237. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +4 -0
  238. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +10 -1
  239. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
  240. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +29 -14
  241. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
  242. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +126 -30
  243. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +9 -5
  244. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  245. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -2
  246. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +15 -4
  247. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +46 -9
  248. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +8 -1
  249. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +65 -37
  250. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +6 -5
  251. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -20
  252. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +15 -6
  253. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +40 -0
  254. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +28 -0
  255. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +190 -0
  256. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +11 -0
  257. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +44 -0
  258. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +208 -0
  259. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +19 -9
  260. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +261 -105
  261. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +21 -2
  262. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -2
  263. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -6
  264. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +16 -8
  265. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +13 -4
  266. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +144 -11
  267. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +36 -3
  268. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
  269. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +2 -2
  270. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +57 -0
  271. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +29 -0
  272. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +119 -0
  273. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +748 -0
  274. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +146 -0
  275. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +672 -0
  276. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
  277. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +3 -16
  278. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +7 -50
  279. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +2 -1
  280. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +2 -2
  281. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +1 -6
  282. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +4 -8
  283. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
  284. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +10 -9
  285. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
  286. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +26 -1
  287. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +293 -94
  288. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
  289. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +86 -30
  290. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +121 -0
  291. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1422 -0
  292. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
  293. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +48 -14
  294. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +404 -132
  295. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -2
  296. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +40 -28
  297. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +3 -0
  298. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +13 -0
  299. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  300. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +14 -2
  301. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +54 -5
  302. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +12 -5
  303. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +27 -4
  304. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +265 -25
  305. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +6 -11
  306. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +18 -81
  307. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +2 -3
  308. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +10 -10
  309. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  310. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  311. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  312. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
  313. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  314. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  315. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +6 -2
  316. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  317. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +35 -26
  318. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +0 -1
  319. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +1 -5
  320. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +3 -3
  321. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  322. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +4 -1
  323. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +13 -11
  324. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
  325. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +3 -1
  326. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  327. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  328. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  329. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  330. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  331. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  332. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  333. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  334. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +17 -0
  335. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +302 -69
  336. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +3 -1
  337. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +8 -0
  338. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -10
  339. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +7 -0
  340. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +63 -21
  341. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +8 -0
  342. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +31 -0
  343. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  344. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  345. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  346. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  347. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +7 -1
  348. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +46 -17
  349. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +0 -72
  350. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +0 -587
  351. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -12
  352. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -51
  353. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +0 -71
  354. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +0 -293
  355. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +0 -2
  356. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +0 -31
@@ -0,0 +1,878 @@
1
+
2
+ import { registerCss } from '@codingame/monaco-vscode-api/css';
3
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
+ import * as aiCustomizationManagement from './media/aiCustomizationManagement.css';
5
+ import { $ as $$1, append, Dimension, addDisposableListener } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
6
+ import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
7
+ import { DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
8
+ import { Delayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
9
+ import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
10
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
11
+ import { SplitView, Sizing } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/splitview/splitview';
12
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
13
+ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
14
+ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
15
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
16
+ import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
17
+ import { EditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorPane';
18
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
19
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
20
+ import { WorkbenchList } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
21
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
22
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
23
+ import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
24
+ import { basename, isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
25
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
26
+ import { registerColor } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
27
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
28
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
29
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
30
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
31
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
32
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
33
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
34
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
35
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
36
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
37
+ import { PANEL_BORDER } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
38
+ import { AICustomizationListWidget } from './aiCustomizationListWidget.js';
39
+ import { McpListWidget } from './mcpListWidget.js';
40
+ import { PluginListWidget } from './pluginListWidget.js';
41
+ import { AI_CUSTOMIZATION_MANAGEMENT_EDITOR_ID, CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_EDITOR, CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_SECTION, AI_CUSTOMIZATION_MANAGEMENT_SELECTED_SECTION_KEY, AI_CUSTOMIZATION_MANAGEMENT_SIDEBAR_WIDTH_KEY, SIDEBAR_DEFAULT_WIDTH, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_WIDTH, CONTENT_MIN_WIDTH } from './aiCustomizationManagement.js';
42
+ import { pluginIcon, hookIcon, promptIcon, instructionsIcon, skillIcon, agentIcon } from './aiCustomizationIcons.js';
43
+ import { ChatModelsWidget } from '../chatManagement/chatModelsWidget.js';
44
+ import { PromptsType, Target } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
45
+ import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
46
+ import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
47
+ import { NEW_SKILL_COMMAND_ID, NEW_AGENT_COMMAND_ID, NEW_INSTRUCTIONS_COMMAND_ID, NEW_PROMPT_COMMAND_ID } from '@codingame/monaco-vscode-xterm-addons-common/vscode/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions';
48
+ import { showConfigureHooksQuickPick } from '../promptSyntax/hookActions.js';
49
+ import { resolveWorkspaceTargetDirectory, resolveUserTargetDirectory } from './customizationCreatorService.js';
50
+ import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
51
+ import { IAICustomizationWorkspaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service';
52
+ import { CodeEditorWidget } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget';
53
+ import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
54
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
55
+ import { getSimpleEditorOptions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
56
+ import { IWorkingCopyService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
57
+ import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
58
+ import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
59
+ import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
60
+ import { McpServerEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/browser/mcpServerEditorInput';
61
+ import { McpServerEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/browser/mcpServerEditor';
62
+ import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
63
+ import { AgentPluginEditor } from '../agentPluginEditor/agentPluginEditor.js';
64
+ import { AgentPluginEditorInput } from '../agentPluginEditor/agentPluginEditorInput.js';
65
+ import { AICustomizationManagementSection } from '../../common/aiCustomizationWorkspaceService.js';
66
+ import { Orientation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/sash/sash';
67
+ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
68
+
69
+ var AICustomizationManagementEditor_1;
70
+ registerCss(aiCustomizationManagement);
71
+ const $ = $$1;
72
+ const aiCustomizationManagementSashBorder = registerColor("aiCustomizationManagement.sashBorder", PANEL_BORDER, ( localize(
73
+ 5294,
74
+ "The color of the Chat Customization Management editor splitview sash border."
75
+ )));
76
+ class SectionItemDelegate {
77
+ getHeight() {
78
+ return 26;
79
+ }
80
+ getTemplateId() {
81
+ return "sectionItem";
82
+ }
83
+ }
84
+ class SectionItemRenderer {
85
+ constructor() {
86
+ this.templateId = "sectionItem";
87
+ }
88
+ renderTemplate(container) {
89
+ container.classList.add("section-list-item");
90
+ const icon = append(container, $(".section-icon"));
91
+ const label = append(container, $(".section-label"));
92
+ return {
93
+ container,
94
+ icon,
95
+ label
96
+ };
97
+ }
98
+ renderElement(element, index, templateData) {
99
+ templateData.icon.className = "section-icon";
100
+ templateData.icon.classList.add(...ThemeIcon.asClassNameArray(element.icon));
101
+ templateData.label.textContent = element.label;
102
+ }
103
+ disposeTemplate() {}
104
+ }
105
+ let AICustomizationManagementEditor = class AICustomizationManagementEditor extends EditorPane {
106
+ static {
107
+ AICustomizationManagementEditor_1 = this;
108
+ }
109
+ static {
110
+ this.ID = AI_CUSTOMIZATION_MANAGEMENT_EDITOR_ID;
111
+ }
112
+ constructor(
113
+ group,
114
+ telemetryService,
115
+ themeService,
116
+ storageService,
117
+ instantiationService,
118
+ contextKeyService,
119
+ openerService,
120
+ commandService,
121
+ workspaceService,
122
+ promptsService,
123
+ textModelService,
124
+ configurationService,
125
+ workingCopyService,
126
+ textFileService,
127
+ fileDialogService,
128
+ hoverService
129
+ ) {
130
+ super(
131
+ AICustomizationManagementEditor_1.ID,
132
+ group,
133
+ telemetryService,
134
+ themeService,
135
+ storageService
136
+ );
137
+ this.storageService = storageService;
138
+ this.instantiationService = instantiationService;
139
+ this.openerService = openerService;
140
+ this.commandService = commandService;
141
+ this.workspaceService = workspaceService;
142
+ this.promptsService = promptsService;
143
+ this.textModelService = textModelService;
144
+ this.configurationService = configurationService;
145
+ this.workingCopyService = workingCopyService;
146
+ this.textFileService = textFileService;
147
+ this.fileDialogService = fileDialogService;
148
+ this.hoverService = hoverService;
149
+ this.editorModelChangeDisposables = this._register(( new DisposableStore()));
150
+ this.viewMode = "list";
151
+ this.mcpDetailDisposables = this._register(( new DisposableStore()));
152
+ this.pluginDetailDisposables = this._register(( new DisposableStore()));
153
+ this.sections = [];
154
+ this.selectedSection = AICustomizationManagementSection.Agents;
155
+ this.editorDisposables = this._register(( new DisposableStore()));
156
+ this._editorContentChanged = false;
157
+ this.inEditorContextKey = CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_EDITOR.bindTo(contextKeyService);
158
+ this.sectionContextKey = CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_SECTION.bindTo(contextKeyService);
159
+ this._register(autorun(reader => {
160
+ this.workspaceService.activeProjectRoot.read(reader);
161
+ if (this.viewMode === "editor") {
162
+ this.currentEditingProjectRoot = this.workspaceService.getActiveProjectRoot();
163
+ }
164
+ }));
165
+ this._register(toDisposable(() => {
166
+ this.currentModelRef?.dispose();
167
+ this.currentModelRef = undefined;
168
+ }));
169
+ const sectionInfo = {
170
+ [AICustomizationManagementSection.Agents]: {
171
+ label: ( localize(5295, "Agents")),
172
+ icon: agentIcon
173
+ },
174
+ [AICustomizationManagementSection.Skills]: {
175
+ label: ( localize(5296, "Skills")),
176
+ icon: skillIcon
177
+ },
178
+ [AICustomizationManagementSection.Instructions]: {
179
+ label: ( localize(5297, "Instructions")),
180
+ icon: instructionsIcon
181
+ },
182
+ [AICustomizationManagementSection.Prompts]: {
183
+ label: ( localize(5298, "Prompts")),
184
+ icon: promptIcon
185
+ },
186
+ [AICustomizationManagementSection.Hooks]: {
187
+ label: ( localize(5299, "Hooks")),
188
+ icon: hookIcon
189
+ },
190
+ [AICustomizationManagementSection.McpServers]: {
191
+ label: ( localize(5300, "MCP Servers")),
192
+ icon: Codicon.server
193
+ },
194
+ [AICustomizationManagementSection.Plugins]: {
195
+ label: ( localize(5301, "Plugins")),
196
+ icon: pluginIcon
197
+ },
198
+ [AICustomizationManagementSection.Models]: {
199
+ label: ( localize(5302, "Models")),
200
+ icon: Codicon.vm
201
+ }
202
+ };
203
+ for (const id of this.workspaceService.managementSections) {
204
+ const info = sectionInfo[id];
205
+ if (info) {
206
+ this.sections.push({
207
+ id,
208
+ ...info
209
+ });
210
+ }
211
+ }
212
+ const savedSection = this.storageService.get(AI_CUSTOMIZATION_MANAGEMENT_SELECTED_SECTION_KEY, StorageScope.PROFILE);
213
+ if (savedSection && ( this.sections.some(s => s.id === savedSection))) {
214
+ this.selectedSection = savedSection;
215
+ } else if (this.sections.length > 0) {
216
+ this.selectedSection = this.sections[0].id;
217
+ }
218
+ }
219
+ createEditor(parent) {
220
+ this.editorDisposables.clear();
221
+ this.container = append(parent, $(".ai-customization-management-editor"));
222
+ this.createSplitView();
223
+ this.updateStyles();
224
+ }
225
+ createSplitView() {
226
+ this.splitViewContainer = append(this.container, $(".management-split-view"));
227
+ this.sidebarContainer = $(".management-sidebar");
228
+ this.contentContainer = $(".management-content");
229
+ this.createSidebar();
230
+ this.createContent();
231
+ this.splitView = this.editorDisposables.add(( new SplitView(this.splitViewContainer, {
232
+ orientation: Orientation.HORIZONTAL,
233
+ proportionalLayout: true
234
+ })));
235
+ const savedWidth = this.storageService.getNumber(
236
+ AI_CUSTOMIZATION_MANAGEMENT_SIDEBAR_WIDTH_KEY,
237
+ StorageScope.PROFILE,
238
+ SIDEBAR_DEFAULT_WIDTH
239
+ );
240
+ this.splitView.addView({
241
+ onDidChange: Event.None,
242
+ element: this.sidebarContainer,
243
+ minimumSize: SIDEBAR_MIN_WIDTH,
244
+ maximumSize: SIDEBAR_MAX_WIDTH,
245
+ layout: (width, _, height) => {
246
+ this.sidebarContainer.style.width = `${width}px`;
247
+ if (height !== undefined) {
248
+ const footerHeight = this.folderPickerContainer?.offsetHeight ?? 0;
249
+ const listHeight = height - 8 - footerHeight;
250
+ this.sectionsList.layout(listHeight, width);
251
+ }
252
+ }
253
+ }, savedWidth, undefined, true);
254
+ this.splitView.addView({
255
+ onDidChange: Event.None,
256
+ element: this.contentContainer,
257
+ minimumSize: CONTENT_MIN_WIDTH,
258
+ maximumSize: Number.POSITIVE_INFINITY,
259
+ layout: (width, _, height) => {
260
+ this.contentContainer.style.width = `${width}px`;
261
+ if (height !== undefined) {
262
+ this.listWidget.layout(height - 16, width - 24);
263
+ this.mcpListWidget?.layout(height - 16, width - 24);
264
+ this.pluginListWidget?.layout(height - 16, width - 24);
265
+ const modelsFooterHeight = this.modelsFooterElement?.offsetHeight || 80;
266
+ this.modelsWidget?.layout(height - 16 - modelsFooterHeight, width);
267
+ if (this.viewMode === "editor" && this.embeddedEditor) {
268
+ const editorHeaderHeight = 50;
269
+ const padding = 24;
270
+ this.embeddedEditor.layout({
271
+ width: Math.max(0, width - padding),
272
+ height: Math.max(0, height - editorHeaderHeight - padding)
273
+ });
274
+ }
275
+ if (this.viewMode === "mcpDetail" && this.embeddedMcpEditor) {
276
+ const backHeaderHeight = 40;
277
+ this.embeddedMcpEditor.layout(new Dimension(width, Math.max(0, height - backHeaderHeight)));
278
+ }
279
+ if (this.viewMode === "pluginDetail" && this.embeddedPluginEditor) {
280
+ const backHeaderHeight = 40;
281
+ this.embeddedPluginEditor.layout(new Dimension(width, Math.max(0, height - backHeaderHeight)));
282
+ }
283
+ }
284
+ }
285
+ }, Sizing.Distribute, undefined, true);
286
+ this.editorDisposables.add(this.splitView.onDidSashChange(() => {
287
+ const width = this.splitView.getViewSize(0);
288
+ this.storageService.store(
289
+ AI_CUSTOMIZATION_MANAGEMENT_SIDEBAR_WIDTH_KEY,
290
+ width,
291
+ StorageScope.PROFILE,
292
+ StorageTarget.USER
293
+ );
294
+ }));
295
+ this.editorDisposables.add(this.splitView.onDidSashReset(() => {
296
+ const totalWidth = this.splitView.getViewSize(0) + this.splitView.getViewSize(1);
297
+ this.splitView.resizeView(0, SIDEBAR_DEFAULT_WIDTH);
298
+ this.splitView.resizeView(1, totalWidth - SIDEBAR_DEFAULT_WIDTH);
299
+ }));
300
+ }
301
+ createSidebar() {
302
+ const sidebarContent = append(this.sidebarContainer, $(".sidebar-content"));
303
+ const sectionsListContainer = append(sidebarContent, $(".sidebar-sections-list"));
304
+ this.sectionsList = this.editorDisposables.add(this.instantiationService.createInstance(
305
+ WorkbenchList,
306
+ "AICustomizationManagementSections",
307
+ sectionsListContainer,
308
+ ( new SectionItemDelegate()),
309
+ [( new SectionItemRenderer())],
310
+ {
311
+ multipleSelectionSupport: false,
312
+ setRowLineHeight: false,
313
+ horizontalScrolling: false,
314
+ accessibilityProvider: {
315
+ getAriaLabel: item => item.label,
316
+ getWidgetAriaLabel: () => ( localize(5303, "Chat Customization Sections"))
317
+ },
318
+ openOnSingleClick: true,
319
+ identityProvider: {
320
+ getId: item => item.id
321
+ }
322
+ }
323
+ ));
324
+ this.sectionsList.splice(0, this.sectionsList.length, this.sections);
325
+ const selectedIndex = this.sections.findIndex(s => s.id === this.selectedSection);
326
+ if (selectedIndex >= 0) {
327
+ this.sectionsList.setSelection([selectedIndex]);
328
+ }
329
+ this.editorDisposables.add(this.sectionsList.onDidChangeSelection(e => {
330
+ if (e.elements.length > 0) {
331
+ this.selectSection(e.elements[0].id);
332
+ }
333
+ }));
334
+ if (this.workspaceService.isSessionsWindow) {
335
+ this.createFolderPicker(sidebarContent);
336
+ }
337
+ }
338
+ createFolderPicker(sidebarContent) {
339
+ const footer = this.folderPickerContainer = append(sidebarContent, $(".sidebar-folder-picker"));
340
+ const button = append(footer, $("button.folder-picker-button"));
341
+ button.setAttribute("aria-label", ( localize(5304, "Browse folder")));
342
+ const folderIcon = append(button, $(`.codicon.codicon-${Codicon.folder.id}`));
343
+ folderIcon.classList.add("folder-picker-icon");
344
+ this.folderPickerLabel = append(button, $("span.folder-picker-label"));
345
+ this.folderPickerClearButton = append(footer, $("button.folder-picker-clear"));
346
+ this.folderPickerClearButton.setAttribute("aria-label", ( localize(5305, "Reset to session folder")));
347
+ append(this.folderPickerClearButton, $(`.codicon.codicon-${Codicon.close.id}`));
348
+ this.editorDisposables.add(addDisposableListener(button, "click", () => {
349
+ this.browseForFolder();
350
+ }));
351
+ this.editorDisposables.add(addDisposableListener(this.folderPickerClearButton, "click", () => {
352
+ this.workspaceService.clearOverrideProjectRoot();
353
+ }));
354
+ this.editorDisposables.add(
355
+ this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), button, () => {
356
+ const root = this.workspaceService.getActiveProjectRoot();
357
+ return root?.fsPath ?? "";
358
+ })
359
+ );
360
+ this.editorDisposables.add(autorun(reader => {
361
+ const root = this.workspaceService.activeProjectRoot.read(reader);
362
+ const hasOverride = this.workspaceService.hasOverrideProjectRoot.read(reader);
363
+ this.updateFolderPickerLabel(root, hasOverride);
364
+ }));
365
+ }
366
+ updateFolderPickerLabel(root, hasOverride) {
367
+ if (this.folderPickerLabel) {
368
+ this.folderPickerLabel.textContent = root ? basename(root) : ( localize(5306, "No folder"));
369
+ }
370
+ if (this.folderPickerClearButton) {
371
+ this.folderPickerClearButton.style.display = hasOverride ? "" : "none";
372
+ }
373
+ }
374
+ async browseForFolder() {
375
+ const result = await this.fileDialogService.showOpenDialog({
376
+ canSelectFolders: true,
377
+ canSelectFiles: false,
378
+ canSelectMany: false,
379
+ title: ( localize(5307, "Select Folder to Explore")),
380
+ defaultUri: this.workspaceService.getActiveProjectRoot()
381
+ });
382
+ if (result?.[0]) {
383
+ this.workspaceService.setOverrideProjectRoot(result[0]);
384
+ }
385
+ }
386
+ createContent() {
387
+ const contentInner = append(this.contentContainer, $(".content-inner"));
388
+ this.promptsContentContainer = append(contentInner, $(".prompts-content-container"));
389
+ this.listWidget = this.editorDisposables.add(this.instantiationService.createInstance(AICustomizationListWidget));
390
+ this.promptsContentContainer.appendChild(this.listWidget.element);
391
+ this.editorDisposables.add(this.listWidget.onDidSelectItem(item => {
392
+ const isWorkspaceFile = item.storage === PromptsStorage.local;
393
+ const isReadOnly = item.storage === PromptsStorage.extension || item.storage === PromptsStorage.plugin;
394
+ this.showEmbeddedEditor(item.uri, item.name, isWorkspaceFile, isReadOnly);
395
+ }));
396
+ this.editorDisposables.add(this.listWidget.onDidRequestCreate(promptType => {
397
+ this.createNewItemWithAI(promptType);
398
+ }));
399
+ this.editorDisposables.add(this.listWidget.onDidRequestCreateManual((
400
+ {
401
+ type,
402
+ target
403
+ }
404
+ ) => {
405
+ this.createNewItemManual(type, target);
406
+ }));
407
+ const hasSections = ( new Set(this.workspaceService.managementSections));
408
+ if (( hasSections.has(AICustomizationManagementSection.Models))) {
409
+ this.modelsContentContainer = append(contentInner, $(".models-content-container"));
410
+ this.modelsWidget = this.editorDisposables.add(this.instantiationService.createInstance(ChatModelsWidget));
411
+ this.modelsContentContainer.appendChild(this.modelsWidget.element);
412
+ this.modelsFooterElement = append(this.modelsContentContainer, $(".section-footer"));
413
+ const modelsDescription = append(this.modelsFooterElement, $("p.section-footer-description"));
414
+ modelsDescription.textContent = ( localize(
415
+ 5308,
416
+ "Browse and manage language models from different providers. Select models for use in chat, code completion, and other AI features."
417
+ ));
418
+ const modelsLink = append(this.modelsFooterElement, $("a.section-footer-link"));
419
+ modelsLink.textContent = ( localize(5309, "Learn more about language models"));
420
+ modelsLink.href = "https://code.visualstudio.com/docs/copilot/customization/language-models";
421
+ this.editorDisposables.add(addDisposableListener(modelsLink, "click", e => {
422
+ e.preventDefault();
423
+ this.openerService.open(( URI.parse(modelsLink.href)));
424
+ }));
425
+ }
426
+ if (( hasSections.has(AICustomizationManagementSection.McpServers))) {
427
+ this.mcpContentContainer = append(contentInner, $(".mcp-content-container"));
428
+ this.mcpListWidget = this.editorDisposables.add(this.instantiationService.createInstance(McpListWidget));
429
+ this.mcpContentContainer.appendChild(this.mcpListWidget.element);
430
+ this.mcpDetailContainer = append(contentInner, $(".mcp-detail-container"));
431
+ this.createEmbeddedMcpDetail();
432
+ this.editorDisposables.add(this.mcpListWidget.onDidSelectServer(server => {
433
+ this.showEmbeddedMcpDetail(server);
434
+ }));
435
+ }
436
+ if (( hasSections.has(AICustomizationManagementSection.Plugins))) {
437
+ this.pluginContentContainer = append(contentInner, $(".plugin-content-container"));
438
+ this.pluginListWidget = this.editorDisposables.add(this.instantiationService.createInstance(PluginListWidget));
439
+ this.pluginContentContainer.appendChild(this.pluginListWidget.element);
440
+ this.pluginDetailContainer = append(contentInner, $(".plugin-detail-container"));
441
+ this.createEmbeddedPluginDetail();
442
+ this.editorDisposables.add(this.pluginListWidget.onDidSelectPlugin(item => {
443
+ this.showEmbeddedPluginDetail(item);
444
+ }));
445
+ }
446
+ this.editorContentContainer = append(contentInner, $(".editor-content-container"));
447
+ this.createEmbeddedEditor();
448
+ this.updateContentVisibility();
449
+ if (this.isPromptsSection(this.selectedSection)) {
450
+ void this.listWidget.setSection(this.selectedSection);
451
+ }
452
+ }
453
+ isPromptsSection(section) {
454
+ return section === AICustomizationManagementSection.Agents || section === AICustomizationManagementSection.Skills || section === AICustomizationManagementSection.Instructions || section === AICustomizationManagementSection.Prompts || section === AICustomizationManagementSection.Hooks;
455
+ }
456
+ selectSection(section) {
457
+ if (this.selectedSection === section) {
458
+ return;
459
+ }
460
+ if (this.viewMode === "editor") {
461
+ this.goBackToList();
462
+ }
463
+ if (this.viewMode === "mcpDetail") {
464
+ this.goBackFromMcpDetail();
465
+ }
466
+ if (this.viewMode === "pluginDetail") {
467
+ this.goBackFromPluginDetail();
468
+ }
469
+ this.selectedSection = section;
470
+ this.sectionContextKey.set(section);
471
+ this.storageService.store(
472
+ AI_CUSTOMIZATION_MANAGEMENT_SELECTED_SECTION_KEY,
473
+ section,
474
+ StorageScope.PROFILE,
475
+ StorageTarget.USER
476
+ );
477
+ this.updateContentVisibility();
478
+ if (this.isPromptsSection(section)) {
479
+ void this.listWidget.setSection(section);
480
+ }
481
+ }
482
+ updateContentVisibility() {
483
+ const isEditorMode = this.viewMode === "editor";
484
+ const isMcpDetailMode = this.viewMode === "mcpDetail";
485
+ const isPluginDetailMode = this.viewMode === "pluginDetail";
486
+ const isDetailMode = isMcpDetailMode || isPluginDetailMode;
487
+ const isPromptsSection = this.isPromptsSection(this.selectedSection);
488
+ const isModelsSection = this.selectedSection === AICustomizationManagementSection.Models;
489
+ const isMcpSection = this.selectedSection === AICustomizationManagementSection.McpServers;
490
+ const isPluginsSection = this.selectedSection === AICustomizationManagementSection.Plugins;
491
+ this.promptsContentContainer.style.display = !isEditorMode && !isDetailMode && isPromptsSection ? "" : "none";
492
+ if (this.modelsContentContainer) {
493
+ this.modelsContentContainer.style.display = !isEditorMode && !isDetailMode && isModelsSection ? "" : "none";
494
+ }
495
+ if (this.mcpContentContainer) {
496
+ this.mcpContentContainer.style.display = !isEditorMode && !isDetailMode && isMcpSection ? "" : "none";
497
+ }
498
+ if (this.mcpDetailContainer) {
499
+ this.mcpDetailContainer.style.display = isMcpDetailMode ? "" : "none";
500
+ }
501
+ if (this.pluginContentContainer) {
502
+ this.pluginContentContainer.style.display = !isEditorMode && !isDetailMode && isPluginsSection ? "" : "none";
503
+ }
504
+ if (this.pluginDetailContainer) {
505
+ this.pluginDetailContainer.style.display = isPluginDetailMode ? "" : "none";
506
+ }
507
+ if (this.editorContentContainer) {
508
+ this.editorContentContainer.style.display = isEditorMode ? "" : "none";
509
+ }
510
+ if (isModelsSection && this.modelsWidget) {
511
+ this.modelsWidget.render();
512
+ if (this.dimension) {
513
+ this.layout(this.dimension);
514
+ }
515
+ }
516
+ }
517
+ async createNewItemWithAI(type) {
518
+ if (this.input) {
519
+ this.group.closeEditor(this.input);
520
+ }
521
+ await this.workspaceService.generateCustomization(type);
522
+ }
523
+ async createNewItemManual(type, target) {
524
+ if (type === PromptsType.hook) {
525
+ if (this.workspaceService.isSessionsWindow) {
526
+ await this.instantiationService.invokeFunction(showConfigureHooksQuickPick, {
527
+ openEditor: async resource => {
528
+ await this.showEmbeddedEditor(resource, basename(resource), true);
529
+ return;
530
+ },
531
+ target: Target.GitHubCopilot
532
+ });
533
+ } else {
534
+ await this.instantiationService.invokeFunction(showConfigureHooksQuickPick, {
535
+ openEditor: async resource => {
536
+ await this.showEmbeddedEditor(resource, basename(resource), true);
537
+ return;
538
+ }
539
+ });
540
+ }
541
+ return;
542
+ }
543
+ const targetDir = target === "workspace" ? resolveWorkspaceTargetDirectory(this.workspaceService, type) : await resolveUserTargetDirectory(this.promptsService, type);
544
+ const options = {
545
+ targetFolder: targetDir,
546
+ targetStorage: target === "user" ? PromptsStorage.user : PromptsStorage.local,
547
+ openFile: async uri => {
548
+ const isWorkspace = target === "workspace";
549
+ await this.showEmbeddedEditor(uri, basename(uri), isWorkspace);
550
+ return this.embeddedEditor;
551
+ }
552
+ };
553
+ let commandId;
554
+ switch (type) {
555
+ case PromptsType.prompt:
556
+ commandId = NEW_PROMPT_COMMAND_ID;
557
+ break;
558
+ case PromptsType.instructions:
559
+ commandId = NEW_INSTRUCTIONS_COMMAND_ID;
560
+ break;
561
+ case PromptsType.agent:
562
+ commandId = NEW_AGENT_COMMAND_ID;
563
+ break;
564
+ case PromptsType.skill:
565
+ commandId = NEW_SKILL_COMMAND_ID;
566
+ break;
567
+ default:
568
+ return;
569
+ }
570
+ await this.commandService.executeCommand(commandId, options);
571
+ void this.listWidget.refresh();
572
+ }
573
+ updateStyles() {
574
+ const borderColor = this.theme.getColor(aiCustomizationManagementSashBorder);
575
+ if (borderColor) {
576
+ this.splitView?.style({
577
+ separatorBorder: borderColor
578
+ });
579
+ }
580
+ }
581
+ async setInput(input, options, context, token) {
582
+ this.workspaceService.clearOverrideProjectRoot();
583
+ this.inEditorContextKey.set(true);
584
+ this.sectionContextKey.set(this.selectedSection);
585
+ await super.setInput(input, options, context, token);
586
+ if (this.dimension) {
587
+ this.layout(this.dimension);
588
+ }
589
+ }
590
+ clearInput() {
591
+ this.inEditorContextKey.set(false);
592
+ if (this.viewMode === "editor") {
593
+ this.goBackToList();
594
+ }
595
+ if (this.viewMode === "mcpDetail") {
596
+ this.goBackFromMcpDetail();
597
+ }
598
+ if (this.viewMode === "pluginDetail") {
599
+ this.goBackFromPluginDetail();
600
+ }
601
+ this.workspaceService.clearOverrideProjectRoot();
602
+ super.clearInput();
603
+ }
604
+ layout(dimension) {
605
+ this.dimension = dimension;
606
+ if (this.container && this.splitView) {
607
+ this.splitViewContainer.style.height = `${dimension.height}px`;
608
+ this.splitView.layout(dimension.width, dimension.height);
609
+ }
610
+ }
611
+ focus() {
612
+ super.focus();
613
+ if (this.viewMode === "editor") {
614
+ this.embeddedEditor?.focus();
615
+ return;
616
+ }
617
+ if (this.selectedSection === AICustomizationManagementSection.McpServers) {
618
+ this.mcpListWidget?.focusSearch();
619
+ } else if (this.selectedSection === AICustomizationManagementSection.Plugins) {
620
+ this.pluginListWidget?.focusSearch();
621
+ } else if (this.selectedSection === AICustomizationManagementSection.Models) {
622
+ this.modelsWidget?.focusSearch();
623
+ } else {
624
+ this.listWidget?.focusSearch();
625
+ }
626
+ }
627
+ selectSectionById(sectionId) {
628
+ const index = this.sections.findIndex(s => s.id === sectionId);
629
+ if (index >= 0) {
630
+ if (this.viewMode === "editor") {
631
+ this.goBackToList();
632
+ }
633
+ if (this.viewMode === "mcpDetail") {
634
+ this.goBackFromMcpDetail();
635
+ }
636
+ if (this.viewMode === "pluginDetail") {
637
+ this.goBackFromPluginDetail();
638
+ }
639
+ this.selectedSection = sectionId;
640
+ this.sectionContextKey.set(sectionId);
641
+ this.storageService.store(
642
+ AI_CUSTOMIZATION_MANAGEMENT_SELECTED_SECTION_KEY,
643
+ sectionId,
644
+ StorageScope.PROFILE,
645
+ StorageTarget.USER
646
+ );
647
+ this.updateContentVisibility();
648
+ if (this.isPromptsSection(sectionId)) {
649
+ void this.listWidget.setSection(sectionId);
650
+ }
651
+ this.sectionsList.setFocus([index]);
652
+ this.sectionsList.setSelection([index]);
653
+ }
654
+ }
655
+ refreshList() {
656
+ void this.listWidget.refresh();
657
+ }
658
+ async generateDebugReport() {
659
+ return this.listWidget.generateDebugReport();
660
+ }
661
+ createEmbeddedEditor() {
662
+ if (!this.editorContentContainer) {
663
+ return;
664
+ }
665
+ const editorHeader = append(this.editorContentContainer, $(".editor-header"));
666
+ const backButton = append(editorHeader, $("button.editor-back-button"));
667
+ backButton.setAttribute("aria-label", ( localize(5310, "Back to list")));
668
+ const backIcon = append(backButton, $(`.codicon.codicon-${Codicon.arrowLeft.id}`));
669
+ backIcon.setAttribute("aria-hidden", "true");
670
+ this.editorDisposables.add(addDisposableListener(backButton, "click", () => {
671
+ this.goBackToList();
672
+ }));
673
+ const itemInfo = append(editorHeader, $(".editor-item-info"));
674
+ this.editorItemNameElement = append(itemInfo, $(".editor-item-name"));
675
+ this.editorItemPathElement = append(itemInfo, $(".editor-item-path"));
676
+ this.editorSaveIndicator = append(editorHeader, $(".editor-save-indicator"));
677
+ const embeddedEditorContainer = append(this.editorContentContainer, $(".embedded-editor-container"));
678
+ const overflowWidgetsDomNode = append(
679
+ this.editorContentContainer,
680
+ $(".embedded-editor-overflow-widgets.monaco-editor")
681
+ );
682
+ this.editorDisposables.add(toDisposable(() => overflowWidgetsDomNode.remove()));
683
+ this.embeddedEditor = this.editorDisposables.add(
684
+ this.instantiationService.createInstance(CodeEditorWidget, embeddedEditorContainer, {
685
+ ...getSimpleEditorOptions(this.configurationService),
686
+ readOnly: false,
687
+ minimap: {
688
+ enabled: false
689
+ },
690
+ lineNumbers: "on",
691
+ wordWrap: "on",
692
+ scrollBeyondLastLine: false,
693
+ automaticLayout: false,
694
+ folding: true,
695
+ renderLineHighlight: "all",
696
+ scrollbar: {
697
+ vertical: "auto",
698
+ horizontal: "auto"
699
+ },
700
+ overflowWidgetsDomNode
701
+ }, {
702
+ isSimpleWidget: false
703
+ })
704
+ );
705
+ }
706
+ async showEmbeddedEditor(uri, displayName, isWorkspaceFile = false, isReadOnly = false) {
707
+ this.currentModelRef?.dispose();
708
+ this.currentModelRef = undefined;
709
+ this.currentEditingUri = uri;
710
+ this.currentEditingProjectRoot = isWorkspaceFile ? this.workspaceService.getActiveProjectRoot() : undefined;
711
+ this.viewMode = "editor";
712
+ this.editorItemNameElement.textContent = displayName;
713
+ this.editorItemPathElement.textContent = basename(uri);
714
+ this.updateContentVisibility();
715
+ try {
716
+ const ref = await this.textModelService.createModelReference(uri);
717
+ if (!isEqual(this.currentEditingUri, uri)) {
718
+ ref.dispose();
719
+ return;
720
+ }
721
+ this.currentModelRef = ref;
722
+ this.embeddedEditor.setModel(ref.object.textEditorModel);
723
+ this.embeddedEditor.updateOptions({
724
+ readOnly: isReadOnly
725
+ });
726
+ if (this.dimension) {
727
+ this.layout(this.dimension);
728
+ }
729
+ this.embeddedEditor.focus();
730
+ this.editorModelChangeDisposables.clear();
731
+ this._editorContentChanged = false;
732
+ const saveDelayer = this.editorModelChangeDisposables.add(( new Delayer(500)));
733
+ this.editorModelChangeDisposables.add(ref.object.textEditorModel.onDidChangeContent(() => {
734
+ this._editorContentChanged = true;
735
+ this.editorSaveIndicator.className = "editor-save-indicator visible";
736
+ this.editorSaveIndicator.classList.add(...ThemeIcon.asClassNameArray(Codicon.loading), "codicon-modifier-spin");
737
+ this.editorSaveIndicator.title = ( localize(5311, "Saving..."));
738
+ saveDelayer.trigger(async () => {
739
+ try {
740
+ await this.textFileService.save(uri);
741
+ } catch (error) {
742
+ console.error("Failed to save AI customization file:", error);
743
+ this.editorSaveIndicator.className = "editor-save-indicator visible error";
744
+ this.editorSaveIndicator.classList.add(...ThemeIcon.asClassNameArray(Codicon.error));
745
+ this.editorSaveIndicator.title = ( localize(5312, "Save Failed"));
746
+ }
747
+ });
748
+ }));
749
+ this.editorModelChangeDisposables.add(this.workingCopyService.onDidSave(e => {
750
+ if (isEqual(e.workingCopy.resource, uri)) {
751
+ this.editorSaveIndicator.className = "editor-save-indicator visible saved";
752
+ this.editorSaveIndicator.classList.add(...ThemeIcon.asClassNameArray(Codicon.check));
753
+ this.editorSaveIndicator.title = ( localize(5313, "Saved"));
754
+ }
755
+ }));
756
+ } catch (error) {
757
+ console.error("Failed to load model for embedded editor:", error);
758
+ if (isEqual(this.currentEditingUri, uri)) {
759
+ this.goBackToList();
760
+ }
761
+ }
762
+ }
763
+ goBackToList() {
764
+ const fileUri = this.currentEditingUri;
765
+ const projectRoot = this.currentEditingProjectRoot;
766
+ if (fileUri && projectRoot && this._editorContentChanged) {
767
+ this.workspaceService.commitFiles(projectRoot, [fileUri]);
768
+ }
769
+ this.currentModelRef?.dispose();
770
+ this.currentModelRef = undefined;
771
+ this.currentEditingUri = undefined;
772
+ this.currentEditingProjectRoot = undefined;
773
+ this.editorModelChangeDisposables.clear();
774
+ this.editorSaveIndicator.className = "editor-save-indicator";
775
+ this.editorSaveIndicator.title = "";
776
+ this.embeddedEditor?.setModel(null);
777
+ this.viewMode = "list";
778
+ this.updateContentVisibility();
779
+ void this.listWidget?.refresh();
780
+ if (this.dimension) {
781
+ this.layout(this.dimension);
782
+ }
783
+ this.listWidget?.focusSearch();
784
+ }
785
+ createEmbeddedMcpDetail() {
786
+ if (!this.mcpDetailContainer) {
787
+ return;
788
+ }
789
+ const detailHeader = append(this.mcpDetailContainer, $(".editor-header"));
790
+ const backButton = append(detailHeader, $("button.editor-back-button"));
791
+ backButton.setAttribute("aria-label", ( localize(5314, "Back to MCP servers")));
792
+ const backIconEl = append(backButton, $(`.codicon.codicon-${Codicon.arrowLeft.id}`));
793
+ backIconEl.setAttribute("aria-hidden", "true");
794
+ this.editorDisposables.add(addDisposableListener(backButton, "click", () => {
795
+ this.goBackFromMcpDetail();
796
+ }));
797
+ const editorContainer = append(this.mcpDetailContainer, $(".mcp-detail-editor-container"));
798
+ this.embeddedMcpEditor = this.editorDisposables.add(this.instantiationService.createInstance(McpServerEditor, this.group));
799
+ this.embeddedMcpEditor.create(editorContainer);
800
+ }
801
+ async showEmbeddedMcpDetail(server) {
802
+ if (!this.embeddedMcpEditor) {
803
+ return;
804
+ }
805
+ this.viewMode = "mcpDetail";
806
+ this.updateContentVisibility();
807
+ const input = this.instantiationService.createInstance(McpServerEditorInput, server);
808
+ this.mcpDetailDisposables.clear();
809
+ this.mcpDetailDisposables.add(input);
810
+ try {
811
+ await this.embeddedMcpEditor.setInput(input, undefined, {}, CancellationToken.None);
812
+ } catch {
813
+ this.goBackFromMcpDetail();
814
+ return;
815
+ }
816
+ if (this.dimension) {
817
+ this.layout(this.dimension);
818
+ }
819
+ }
820
+ goBackFromMcpDetail() {
821
+ this.mcpDetailDisposables.clear();
822
+ this.embeddedMcpEditor?.clearInput();
823
+ this.viewMode = "list";
824
+ this.updateContentVisibility();
825
+ if (this.dimension) {
826
+ this.layout(this.dimension);
827
+ }
828
+ this.mcpListWidget?.focusSearch();
829
+ }
830
+ createEmbeddedPluginDetail() {
831
+ if (!this.pluginDetailContainer) {
832
+ return;
833
+ }
834
+ const detailHeader = append(this.pluginDetailContainer, $(".editor-header"));
835
+ const backButton = append(detailHeader, $("button.editor-back-button"));
836
+ backButton.setAttribute("aria-label", ( localize(5315, "Back to plugins")));
837
+ const backIconEl = append(backButton, $(`.codicon.codicon-${Codicon.arrowLeft.id}`));
838
+ backIconEl.setAttribute("aria-hidden", "true");
839
+ this.editorDisposables.add(addDisposableListener(backButton, "click", () => {
840
+ this.goBackFromPluginDetail();
841
+ }));
842
+ const editorContainer = append(this.pluginDetailContainer, $(".plugin-detail-editor-container"));
843
+ this.embeddedPluginEditor = this.editorDisposables.add(this.instantiationService.createInstance(AgentPluginEditor, this.group));
844
+ this.embeddedPluginEditor.create(editorContainer);
845
+ }
846
+ async showEmbeddedPluginDetail(item) {
847
+ if (!this.embeddedPluginEditor) {
848
+ return;
849
+ }
850
+ this.viewMode = "pluginDetail";
851
+ this.updateContentVisibility();
852
+ const input = ( new AgentPluginEditorInput(item));
853
+ this.pluginDetailDisposables.clear();
854
+ this.pluginDetailDisposables.add(input);
855
+ try {
856
+ await this.embeddedPluginEditor.setInput(input, undefined, {}, CancellationToken.None);
857
+ } catch {
858
+ this.goBackFromPluginDetail();
859
+ return;
860
+ }
861
+ if (this.dimension) {
862
+ this.layout(this.dimension);
863
+ }
864
+ }
865
+ goBackFromPluginDetail() {
866
+ this.pluginDetailDisposables.clear();
867
+ this.embeddedPluginEditor?.clearInput();
868
+ this.viewMode = "list";
869
+ this.updateContentVisibility();
870
+ if (this.dimension) {
871
+ this.layout(this.dimension);
872
+ }
873
+ this.pluginListWidget?.focusSearch();
874
+ }
875
+ };
876
+ AICustomizationManagementEditor = AICustomizationManagementEditor_1 = ( __decorate([( __param(1, ITelemetryService)), ( __param(2, IThemeService)), ( __param(3, IStorageService)), ( __param(4, IInstantiationService)), ( __param(5, IContextKeyService)), ( __param(6, IOpenerService)), ( __param(7, ICommandService)), ( __param(8, IAICustomizationWorkspaceService)), ( __param(9, IPromptsService)), ( __param(10, ITextModelService)), ( __param(11, IConfigurationService)), ( __param(12, IWorkingCopyService)), ( __param(13, ITextFileService)), ( __param(14, IFileDialogService)), ( __param(15, IHoverService))], AICustomizationManagementEditor));
877
+
878
+ export { AICustomizationManagementEditor, aiCustomizationManagementSashBorder };