@codingame/monaco-vscode-chat-service-override 36.2.7 → 37.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 (725) hide show
  1. package/index.d.ts +1 -0
  2. package/index.js +92 -10
  3. package/package.json +5 -5
  4. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +10 -3
  5. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +54 -17
  6. package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.d.ts +14 -0
  7. package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.js +46 -0
  8. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +7 -2
  9. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +34 -2
  10. package/vscode/src/vs/platform/agentHost/browser/{remoteAgentHostProtocolClient.d.ts → agentHostProtocolClient.d.ts} +240 -60
  11. package/vscode/src/vs/platform/agentHost/browser/agentHostProtocolClient.js +1911 -0
  12. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +30 -33
  13. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +381 -315
  14. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +3 -1
  15. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +2 -0
  16. package/vscode/src/vs/platform/agentHost/common/agentHostClientInfo.d.ts +9 -0
  17. package/vscode/src/vs/platform/agentHost/common/agentHostClientInfo.js +20 -0
  18. package/vscode/src/vs/platform/agentHost/common/agentHostExtensionProtocol.d.ts +144 -0
  19. package/vscode/src/vs/platform/agentHost/common/agentHostExtensionProtocol.js +20 -0
  20. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +14 -6
  21. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +14 -10
  22. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +1 -1
  23. package/vscode/src/vs/platform/agentHost/common/agentHostManagedRules.d.ts +47 -0
  24. package/vscode/src/vs/platform/agentHost/common/agentHostManagedRules.js +75 -0
  25. package/vscode/src/vs/platform/agentHost/common/agentHostManagedSettings.d.ts +68 -0
  26. package/vscode/src/vs/platform/agentHost/common/agentHostManagedSettings.js +161 -0
  27. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +288 -45
  28. package/vscode/src/vs/platform/agentHost/common/agentMerge.d.ts +261 -0
  29. package/vscode/src/vs/platform/agentHost/common/agentMerge.js +67 -0
  30. package/vscode/src/vs/platform/agentHost/common/agentSdkSetup.d.ts +53 -0
  31. package/vscode/src/vs/platform/agentHost/common/agentSdkSetup.js +45 -0
  32. package/vscode/src/vs/platform/agentHost/common/changesetUri.d.ts +130 -0
  33. package/vscode/src/vs/platform/agentHost/common/changesetUri.js +27 -0
  34. package/vscode/src/vs/platform/agentHost/common/customAgents.d.ts +8 -2
  35. package/vscode/src/vs/platform/agentHost/common/customAgents.js +7 -0
  36. package/vscode/src/vs/platform/agentHost/common/meta/agentChatSurfaceMeta.d.ts +39 -0
  37. package/vscode/src/vs/platform/agentHost/common/meta/agentChatSurfaceMeta.js +25 -0
  38. package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.d.ts +110 -0
  39. package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.js +38 -0
  40. package/vscode/src/vs/platform/agentHost/common/meta/agentHostArtifactRemovalMeta.d.ts +4 -0
  41. package/vscode/src/vs/platform/agentHost/common/meta/clientPluginCustomizationMeta.d.ts +7 -0
  42. package/vscode/src/vs/platform/agentHost/common/meta/clientPluginCustomizationMeta.js +14 -0
  43. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +3 -3
  44. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +16 -24
  45. package/vscode/src/vs/platform/agentHost/common/semanticSearchConstants.d.ts +8 -0
  46. package/vscode/src/vs/platform/agentHost/common/semanticSearchConstants.js +8 -0
  47. package/vscode/src/vs/platform/agentHost/common/sessionArtifacts.d.ts +75 -0
  48. package/vscode/src/vs/platform/agentHost/common/sessionArtifacts.js +84 -0
  49. package/vscode/src/vs/platform/agentHost/common/shellInitScript.d.ts +24 -0
  50. package/vscode/src/vs/platform/agentHost/common/shellInitScript.js +63 -0
  51. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +71 -20
  52. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +187 -26
  53. package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.d.ts +30 -0
  54. package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.js +87 -0
  55. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.js +2 -2
  56. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation/reducer.d.ts +4 -0
  57. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation/reducer.js +37 -0
  58. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation-run/reducer.d.ts +4 -0
  59. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation-run/reducer.js +45 -0
  60. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.d.ts +5 -4
  61. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +100 -35
  62. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.js +193 -49
  63. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.js +161 -40
  64. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.d.ts +1 -1
  65. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.js +5 -1
  66. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +2 -2
  67. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/timestamps.d.ts +1 -0
  68. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/timestamps.js +7 -0
  69. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
  70. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +114 -3
  71. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +28 -5
  72. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +4 -2
  73. package/vscode/src/vs/platform/agentHost/common/state/sessionWorkingDirectories.d.ts +34 -0
  74. package/vscode/src/vs/platform/agentHost/common/state/sessionWorkingDirectories.js +28 -0
  75. package/vscode/src/vs/platform/agentHost/common/worktreePaths.d.ts +24 -0
  76. package/vscode/src/vs/platform/agentHost/common/worktreePaths.js +15 -0
  77. package/vscode/src/vs/platform/browserView/common/browserChatToolReferenceNames.d.ts +1 -1
  78. package/vscode/src/vs/platform/chat/common/aiAgentEnv.d.ts +18 -0
  79. package/vscode/src/vs/platform/chat/common/aiAgentEnv.js +6 -0
  80. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +5 -1
  81. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +77 -5
  82. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +1 -1
  83. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +9 -5
  84. package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +1 -5
  85. package/vscode/src/vs/platform/networkFilter/common/settings.js +0 -4
  86. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +19 -7
  87. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +49 -37
  88. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.d.ts +2 -1
  89. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +12 -0
  90. package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +1 -2
  91. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +1 -0
  92. package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveParseSafety.d.ts +5 -0
  93. package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveParseSafety.js +7 -0
  94. package/vscode/src/vs/platform/terminal/common/autoApprove/cmdDelayedExpansion.d.ts +5 -0
  95. package/vscode/src/vs/platform/terminal/common/autoApprove/cmdDelayedExpansion.js +8 -0
  96. package/vscode/src/vs/{workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers → platform/terminal/common/autoApprove}/sedFileWriteParser.d.ts +1 -2
  97. package/vscode/src/vs/workbench/browser/chatChangesPill.d.ts +29 -0
  98. package/vscode/src/vs/workbench/browser/chatChangesPill.js +84 -0
  99. package/vscode/src/vs/workbench/common/chatPullRequest.d.ts +19 -0
  100. package/vscode/src/vs/workbench/common/chatPullRequest.js +53 -0
  101. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +342 -155
  102. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +2 -2
  103. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +25 -2
  104. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +150 -67
  105. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +5 -3
  106. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.d.ts +5 -1
  107. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +39 -9
  108. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +1 -1
  109. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +3 -3
  110. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +6 -6
  111. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +4 -2
  112. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +54 -17
  113. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +11 -11
  114. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +1 -1
  115. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +9 -9
  116. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +1 -1
  117. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +5 -5
  118. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.d.ts +6 -0
  119. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.js +5 -1
  120. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +1 -1
  121. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +1 -1
  122. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +2 -2
  123. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/media/voiceModeOnboarding.css +252 -0
  124. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +13 -13
  125. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +7 -7
  126. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.d.ts +146 -0
  127. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +889 -0
  128. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +2 -2
  129. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +2 -7
  130. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +3 -54
  131. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +32 -3
  132. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +214 -161
  133. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +10 -9
  134. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +2 -1
  135. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +256 -72
  136. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.d.ts +2 -1
  138. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +11 -12
  139. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +19 -15
  140. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +30 -14
  141. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +19 -10
  142. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +9 -9
  143. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  144. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.d.ts +6 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +237 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +7 -6
  147. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  148. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +10 -10
  149. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.d.ts +6 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +68 -61
  151. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +17 -21
  152. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +17 -21
  153. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  154. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +5 -0
  155. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +68 -14
  156. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
  157. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -19
  158. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.d.ts +7 -2
  159. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +222 -72
  160. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +64 -17
  161. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +530 -305
  162. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.d.ts +25 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.js +63 -0
  164. package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.d.ts +30 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.js +37 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.d.ts +6 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.js +95 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +10 -6
  169. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  170. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +2 -1
  171. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +18 -1
  172. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +86 -47
  173. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +61 -47
  174. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +43 -24
  175. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +326 -76
  176. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +112 -5
  177. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +33 -7
  178. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostImportConversationStore.d.ts +20 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostImportConversationStore.js +26 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +28 -10
  181. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +110 -126
  182. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.d.ts +131 -0
  183. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.js +638 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.d.ts +41 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.js +202 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.d.ts +24 -1
  187. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +26 -5
  188. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +10 -7
  189. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostProtectedResourcesService.d.ts +20 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostProtectedResourcesService.js +55 -0
  191. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.d.ts +62 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +40 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.d.ts +59 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +624 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.d.ts +90 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +207 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostShellInitSynchronizer.d.ts +31 -0
  198. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostShellInitSynchronizer.js +140 -0
  199. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.d.ts +4 -0
  200. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.js +5 -1
  201. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +5 -4
  202. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +74 -5
  203. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +511 -171
  204. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.d.ts +32 -0
  205. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.js +48 -0
  206. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +55 -6
  207. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +210 -20
  208. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +43 -24
  209. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +46 -10
  210. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +216 -110
  211. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +9 -4
  212. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +26 -17
  213. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  214. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  215. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  216. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  217. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +30 -26
  218. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +5 -2
  219. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/unifiedQuickAccess.css +6 -6
  220. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  221. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  222. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/externalSessionsFilterMenu.d.ts +3 -0
  223. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/externalSessionsFilterMenu.js +62 -0
  224. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/sessionSummaryHover.css +104 -0
  225. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.d.ts +115 -0
  226. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.js +168 -0
  227. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.d.ts +24 -0
  228. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.js +32 -0
  229. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +56 -0
  230. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +0 -4
  231. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +16 -17
  232. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +7 -3
  233. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +1 -0
  234. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +2 -0
  235. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +10 -1
  236. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +48 -1
  237. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +913 -220
  238. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -1
  239. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +148 -84
  240. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +161 -17
  241. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +2367 -247
  242. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +5 -2
  243. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +21 -13
  244. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementSectionRegistry.d.ts +26 -0
  245. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementSectionRegistry.js +34 -0
  246. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.d.ts +2 -0
  247. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.js +23 -0
  248. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +15 -0
  249. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +3 -0
  250. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +10 -2
  251. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +143 -68
  252. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
  253. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +10 -5
  254. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.d.ts +40 -0
  255. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.js +302 -0
  256. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +1 -2
  257. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +49 -8
  258. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +3 -3
  259. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.d.ts +38 -0
  260. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.js +240 -0
  261. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.d.ts +1 -0
  262. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +53 -0
  263. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.d.ts +82 -0
  264. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.js +762 -0
  265. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.d.ts +80 -0
  266. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.js +279 -0
  267. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.d.ts +44 -0
  268. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +437 -0
  269. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +85 -6
  270. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +697 -15
  271. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +7 -7
  272. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +40 -10
  273. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +164 -42
  274. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +6 -9
  275. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +260 -31
  276. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +2097 -589
  277. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.d.ts +32 -0
  278. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.js +860 -0
  279. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +2229 -1338
  280. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +79 -26
  281. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/customizationMigrationDashboard.css +354 -0
  282. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +85 -9
  283. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +1550 -357
  284. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +2 -4
  285. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +13 -27
  286. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.d.ts +38 -26
  287. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +637 -319
  288. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +28 -10
  289. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatPasteTargetService.d.ts +10 -0
  290. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatPasteTargetService.js +22 -0
  291. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatReferenceAttachmentWidget.contribution.d.ts +15 -0
  292. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatReferenceAttachmentWidget.contribution.js +38 -0
  293. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/transcriptContextAttachmentWidget.contribution.d.ts +8 -0
  294. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/transcriptContextAttachmentWidget.contribution.js +38 -0
  295. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +4 -1
  296. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +1675 -633
  297. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +93 -6
  298. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +823 -52
  299. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.d.ts +132 -0
  300. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.js +446 -0
  301. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostUsageSidecar.d.ts +183 -0
  302. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostUsageSidecar.js +218 -0
  303. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +45 -42
  304. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +11 -0
  305. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +163 -136
  306. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +72 -72
  307. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +7 -7
  308. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +22 -2
  309. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +105 -14
  310. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  311. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.d.ts +32 -0
  312. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +49 -0
  313. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  314. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  315. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  316. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  317. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +27 -22
  318. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +6 -0
  319. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +22 -23
  320. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  321. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +25 -25
  322. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  323. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  324. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +7 -2
  325. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +76 -43
  326. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  327. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +3 -2
  328. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +1 -0
  329. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.d.ts +145 -0
  330. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +839 -0
  331. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +277 -3
  332. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  333. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +6 -6
  334. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  335. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
  336. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  337. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +16 -16
  338. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -4
  339. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  340. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +8 -4
  341. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  342. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +6 -3
  343. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +35 -19
  344. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +16 -9
  345. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +4 -3
  346. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +4 -4
  347. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +4 -0
  348. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +7 -2
  349. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  350. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.d.ts +5 -5
  351. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +3 -3
  352. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPills.d.ts +86 -0
  353. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPills.js +282 -0
  354. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +14 -10
  355. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  356. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +5 -0
  357. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +37 -25
  358. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +7 -5
  359. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +135 -82
  360. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -3
  361. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutlineCreator.d.ts +17 -0
  362. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutlineCreator.js +28 -0
  363. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +5 -5
  364. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
  365. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementPreview.d.ts +7 -0
  366. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementPreview.js +114 -0
  367. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.d.ts +45 -0
  368. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +326 -0
  369. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.d.ts +33 -0
  370. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +99 -0
  371. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.d.ts +17 -0
  372. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +46 -0
  373. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.d.ts +27 -0
  374. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +301 -0
  375. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.d.ts +22 -0
  376. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +103 -0
  377. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +9 -36
  378. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +103 -196
  379. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  380. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +36 -30
  381. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +2 -0
  382. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +51 -12
  383. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  384. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +31 -27
  385. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +65 -20
  386. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +291 -138
  387. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/chatSetup.css +9 -0
  388. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/microsoft-dark.svg +1 -0
  389. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/microsoft-light.svg +1 -0
  390. package/vscode/src/vs/workbench/contrib/chat/browser/chatSideChat.d.ts +9 -0
  391. package/vscode/src/vs/workbench/contrib/chat/browser/chatSideChat.js +24 -0
  392. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -1
  393. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +59 -35
  394. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +7 -2
  395. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +221 -145
  396. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +15 -29
  397. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +21 -3
  398. package/vscode/src/vs/workbench/contrib/chat/browser/chatSubmitRequestHandlerService.d.ts +22 -0
  399. package/vscode/src/vs/workbench/contrib/chat/browser/chatSubmitRequestHandlerService.js +27 -0
  400. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +9 -0
  401. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +23 -21
  402. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +6 -1
  403. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +62 -6
  404. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +15 -1
  405. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +97 -8
  406. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  407. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +6 -6
  408. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.d.ts +11 -2
  409. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +24 -16
  410. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
  411. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  412. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.d.ts +44 -0
  413. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.js +232 -0
  414. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.d.ts +36 -0
  415. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.js +127 -0
  416. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +1 -1
  417. package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatModelFeedbackSurveyPromptContribution.d.ts +18 -0
  418. package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatModelFeedbackSurveyPromptContribution.js +55 -0
  419. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +4 -3
  420. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
  421. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatPetAchievements.css +236 -0
  422. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +1 -1
  423. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.d.ts +9 -0
  424. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +260 -0
  425. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.d.ts +39 -5
  426. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +155 -56
  427. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +10 -14
  428. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +29 -14
  429. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +2 -0
  430. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +76 -24
  431. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +1 -1
  432. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +53 -32
  433. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +1 -1
  434. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +17 -17
  435. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +8 -7
  436. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.d.ts +1 -1
  437. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +29 -71
  438. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +3 -0
  439. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +36 -40
  440. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +3 -0
  441. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +5 -5
  442. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  443. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +2 -2
  444. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  445. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  446. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +9 -16
  447. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  448. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +5 -13
  449. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/media/promptTimeline.css +820 -0
  450. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptBucketing.d.ts +38 -0
  451. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptBucketing.js +100 -0
  452. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.d.ts +1 -0
  453. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.js +51 -0
  454. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.d.ts +30 -0
  455. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.js +113 -0
  456. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.d.ts +146 -0
  457. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +440 -0
  458. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineLayout.d.ts +16 -0
  459. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineLayout.js +5 -0
  460. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.d.ts +194 -0
  461. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +525 -0
  462. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRail.d.ts +33 -0
  463. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.d.ts +128 -0
  464. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +460 -0
  465. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.d.ts +38 -0
  466. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.js +120 -0
  467. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineWidgetContrib.d.ts +53 -0
  468. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineWidgetContrib.js +160 -0
  469. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +25 -22
  470. package/vscode/src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.d.ts +13 -0
  471. package/vscode/src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.js +52 -0
  472. package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.d.ts +22 -0
  473. package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.js +58 -0
  474. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.d.ts +63 -0
  475. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.js +361 -0
  476. package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatEditorTopologyTelemetry.d.ts +35 -0
  477. package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatEditorTopologyTelemetry.js +90 -0
  478. package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +25 -18
  479. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -1
  480. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +77 -41
  481. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +60 -43
  482. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -1
  483. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +60 -16
  484. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +10 -8
  485. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +13 -4
  486. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +3 -1
  487. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +44 -24
  488. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +4 -4
  489. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  490. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +52 -6
  491. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +446 -79
  492. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceInputUtils.d.ts +11 -0
  493. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceInputUtils.js +13 -0
  494. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.d.ts +66 -0
  495. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +297 -0
  496. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.d.ts +137 -0
  497. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.js +714 -0
  498. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentOpenChat.css +379 -0
  499. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.d.ts +10 -0
  500. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +78 -0
  501. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.d.ts +36 -0
  502. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.js +172 -0
  503. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +5 -1
  504. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +8 -1
  505. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNoticeHub.d.ts +15 -0
  506. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNoticeHub.js +30 -0
  507. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +11 -1
  508. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +41 -13
  509. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +5 -2
  510. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +133 -3
  511. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.d.ts +3 -2
  512. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.js +11 -2
  513. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatEditorInputContentProvider.js +4 -4
  514. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.d.ts +1 -0
  515. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +96 -0
  516. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +12 -0
  517. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +36 -1
  518. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +67 -17
  519. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +23 -37
  520. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.d.ts +18 -0
  521. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +72 -3
  522. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputPlaceholderDecoration.d.ts +11 -0
  523. package/vscode/src/vs/workbench/contrib/{agentsVoice/common/agentsVoiceColors.js → chat/browser/widget/input/editor/chatInputPlaceholderDecoration.js} +17 -15
  524. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.d.ts +3 -0
  525. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.js +16 -0
  526. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -2
  527. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +6 -4
  528. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +21 -13
  529. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +48 -8
  530. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +457 -142
  531. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.d.ts +1 -1
  532. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +22 -14
  533. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +6 -22
  534. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationBlueprint.d.ts +22 -0
  535. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationBlueprint.js +163 -0
  536. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +27 -5
  537. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +79 -32
  538. package/vscode/src/vs/workbench/contrib/chat/common/chatNotification.d.ts +6 -0
  539. package/vscode/src/vs/workbench/contrib/chat/common/chatNotification.js +12 -0
  540. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +44 -11
  541. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +404 -51
  542. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +64 -4
  543. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +33 -2
  544. package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.d.ts +68 -0
  545. package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.js +70 -0
  546. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -2
  547. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +18 -5
  548. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +43 -14
  549. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +4 -0
  550. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +4 -9
  551. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +164 -71
  552. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +1 -1
  553. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +1 -1
  554. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
  555. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +12 -12
  556. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  557. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  558. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.d.ts +3 -1
  559. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +19 -10
  560. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +3 -1
  561. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +172 -159
  562. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationService.d.ts +115 -0
  563. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationService.js +69 -0
  564. package/vscode/src/vs/workbench/contrib/chat/common/sessionChatPills.d.ts +60 -0
  565. package/vscode/src/vs/workbench/contrib/chat/common/sessionChatPills.js +139 -0
  566. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  567. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.d.ts +5 -0
  568. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.js +21 -1
  569. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +25 -2
  570. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +55 -18
  571. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
  572. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
  573. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
  574. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +1 -0
  575. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  576. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  577. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.d.ts +59 -0
  578. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.js +323 -0
  579. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionResolver.d.ts +30 -0
  580. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionResolver.js +79 -0
  581. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +6 -2
  582. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +118 -13
  583. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  584. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  585. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  586. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  587. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  588. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
  589. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js +1 -0
  590. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.d.ts +81 -0
  591. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +85 -0
  592. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +17 -17
  593. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
  594. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +23 -23
  595. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
  596. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +17 -3
  597. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +81 -7
  598. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatSessionResolver.d.ts +30 -0
  599. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatSessionResolver.js +86 -0
  600. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +10 -2
  601. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +97 -18
  602. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +2 -22
  603. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +10 -8
  604. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.js +2 -1
  605. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +2 -0
  606. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +42 -36
  607. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +8 -0
  608. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +10 -0
  609. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +4 -4
  610. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +2 -1
  611. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  612. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +25 -16
  613. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +4 -3
  614. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/consoleCompactor/consoleCompactor.d.ts +70 -0
  615. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/consoleCompactor/consoleCompactor.js +4316 -0
  616. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  617. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  618. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  619. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  620. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +4 -4
  621. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +3 -3
  622. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +4 -4
  623. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +6 -1
  624. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +188 -148
  625. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
  626. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  627. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  628. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  629. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  630. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +7 -0
  631. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +82 -3
  632. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +5 -6
  633. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +5 -42
  634. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalOutput.d.ts +2 -0
  635. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalOutput.js +8 -0
  636. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +1 -0
  637. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +27 -8
  638. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.d.ts +205 -0
  639. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +1580 -0
  640. package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.d.ts +30 -0
  641. package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.js +175 -0
  642. package/vscode/src/vs/workbench/services/agentEditorComments/browser/media/agentEditorCommentsOverlayWidget.css +65 -0
  643. package/vscode/src/vs/workbench/services/agentHost/browser/agentSdkSetupService.d.ts +47 -0
  644. package/vscode/src/vs/workbench/services/agentHost/browser/agentSdkSetupService.js +129 -0
  645. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +26 -8
  646. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +89 -27
  647. package/vscode/src/vs/workbench/services/agentHost/browser/webAgentHostEnablementService.d.ts +8 -0
  648. package/vscode/src/vs/workbench/services/agentHost/browser/webAgentHostEnablementService.js +28 -0
  649. package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +5 -1
  650. package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.d.ts +18 -18
  651. package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.js +159 -60
  652. package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.d.ts +47 -0
  653. package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.js +362 -0
  654. package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.d.ts +0 -1
  655. package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.js +0 -40
  656. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +0 -1110
  657. package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +0 -76
  658. package/vscode/src/vs/platform/agentHost/common/agentHostResourceService.d.ts +0 -63
  659. package/vscode/src/vs/platform/agentHost/common/agentHostResourceService.js +0 -25
  660. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +0 -254
  661. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +0 -451
  662. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +0 -1294
  663. package/vscode/src/vs/platform/agentHost/common/agentService.js +0 -92
  664. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/errors.d.ts +0 -186
  665. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/errors.js +0 -10
  666. package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +0 -42
  667. package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.js +0 -7
  668. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.d.ts +0 -15
  669. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.js +0 -15
  670. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.d.ts +0 -2
  671. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +0 -19
  672. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +0 -243
  673. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.d.ts +0 -24
  674. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +0 -77
  675. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +0 -92
  676. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +0 -224
  677. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.d.ts +0 -23
  678. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.js +0 -52
  679. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +0 -16
  680. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +0 -96
  681. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.d.ts +0 -27
  682. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.js +0 -152
  683. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.d.ts +0 -87
  684. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.js +0 -772
  685. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.d.ts +0 -30
  686. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.js +0 -29
  687. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +0 -20
  688. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +0 -40
  689. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/media/planReviewFeedback.css +0 -160
  690. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.d.ts +0 -9
  691. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +0 -123
  692. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.d.ts +0 -37
  693. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +0 -572
  694. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.d.ts +0 -125
  695. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.js +0 -399
  696. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.d.ts +0 -321
  697. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.js +0 -2117
  698. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.d.ts +0 -57
  699. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.js +0 -367
  700. package/vscode/src/vs/workbench/contrib/chat/common/automations/automation.d.ts +0 -78
  701. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.d.ts +0 -13
  702. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.d.ts +0 -11
  703. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.js +0 -6
  704. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.d.ts +0 -16
  705. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.js +0 -6
  706. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.d.ts +0 -46
  707. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.d.ts +0 -36
  708. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.js +0 -6
  709. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.d.ts +0 -12
  710. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.js +0 -6
  711. package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.d.ts +0 -9
  712. package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.js +0 -6
  713. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -15
  714. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -177
  715. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
  716. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
  717. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -65
  718. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -264
  719. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -190
  720. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -865
  721. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
  722. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
  723. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +0 -24
  724. /package/vscode/src/vs/{workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers → platform/terminal/common/autoApprove}/sedFileWriteParser.js +0 -0
  725. /package/vscode/src/vs/{platform/agentHost/common/agentHost.config.contribution.d.ts → workbench/contrib/chat/browser/agentSessionsConfiguration.d.ts} +0 -0
@@ -2,15 +2,22 @@
2
2
  import { registerCss } from '@codingame/monaco-vscode-api/css';
3
3
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
4
  import * as aiCustomizationManagement from './media/aiCustomizationManagement.css';
5
- import { $ as $$1, append, getWindow, addDisposableListener, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
+ import { $ as $$1, append, clearNode, addDisposableListener, getWindow, EventType, DisposableResizeObserver, isHTMLElement, EventHelper, addStandardDisposableListener, scheduleAtNextAnimationFrame, isAncestorOfActiveElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
6
+ import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
7
+ import { Checkbox, TriStateCheckbox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/toggle/toggle';
8
+ import { defaultCheckboxStyles, defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
9
+ import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
10
+ import { dirname as dirname$1 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
6
11
  import { status } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
7
- import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
12
+ import { RunOnceScheduler, timeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
8
13
  import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
9
14
  import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
10
- import { onUnexpectedError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
11
- import { DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
15
+ import { onUnexpectedError, getErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
16
+ import { DisposableStore, MutableDisposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
17
+ import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
12
18
  import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
13
- import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
19
+ import { isMarkdownString, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
20
+ import { ResourceMap, ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
14
21
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
15
22
  import { SplitView, Sizing } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/splitview/splitview';
16
23
  import { Color } from '@codingame/monaco-vscode-api/vscode/vs/base/common/color';
@@ -20,16 +27,19 @@ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode
20
27
  import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
21
28
  import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
22
29
  import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
30
+ import { IFileDialogService, IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
23
31
  import { EditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorPane';
24
32
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
25
33
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
26
34
  import { WorkbenchList } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
27
35
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
28
36
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
37
+ import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
29
38
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
30
- import { basename, isEqualOrParent, isEqual, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
39
+ import { getComparisonKey, isEqual, basename, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
31
40
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
32
41
  import { AICustomizationManagementEditorInput } from './aiCustomizationManagementEditorInput.js';
42
+ import { aiCustomizationManagementSectionRegistry } from './aiCustomizationManagementSectionRegistry.js';
33
43
  import { AICustomizationListWidget } from './aiCustomizationListWidget.js';
34
44
  import { ITEMS_MODEL_SECTIONS } from './aiCustomizationItemsModel.js';
35
45
  import { IAICustomizationItemsModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.service';
@@ -37,23 +47,26 @@ import { McpListWidget } from './mcpListWidget.js';
37
47
  import { PluginListWidget } from './pluginListWidget.js';
38
48
  import { ToolsListWidget } from './toolsListWidget.js';
39
49
  import { AGENT_HOST_COPILOT_CLI_SESSION_TYPE } from '../agentSessions/agentHost/agentHostToolSetEnablementService.js';
40
- import { AutomationsListWidget } from './automationsListWidget.js';
41
50
  import { AI_CUSTOMIZATION_MANAGEMENT_EDITOR_ID, CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_EDITOR, CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_SECTION, CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_HARNESS, 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 '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement';
42
- import { toolsIcon, pluginIcon, automationIcon, hookIcon, promptIcon, instructionsIcon, skillIcon, agentIcon } from './aiCustomizationIcons.js';
43
- import { CHAT_AUTOMATIONS_ENABLED_SETTING } from '../../common/automations/automationsEnabled.js';
51
+ import { toolsIcon, pluginIcon, hookIcon, promptIcon, instructionsIcon, skillIcon, agentIcon } from './aiCustomizationIcons.js';
44
52
  import { ChatModelsWidget } from '../chatManagement/chatModelsWidget.js';
45
53
  import { PromptsType, Target } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
54
+ import { CustomizationMigrationType, isMcpServerCustomizationMigrationCandidate, getCustomizationMigrationTargetType, getMcpServerCustomizationMigrationCandidateKey } from '../../common/promptSyntax/service/customizationMigrationService.js';
55
+ import { ICustomizationMigrationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationService.service';
46
56
  import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
47
57
  import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
48
58
  import { AGENT_MD_FILENAME } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
59
+ import { PromptsConfig } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/config';
49
60
  import { getTarget, getAttributeDefinition } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptFileAttributes';
50
61
  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';
51
62
  import { showConfigureHooksQuickPick } from '../promptSyntax/hookActions.js';
52
- import { resolveWorkspaceTargetDirectory, resolveUserTargetDirectory } from './customizationCreatorService.js';
63
+ import { CustomizationLocationPicker, resolveWorkspaceTargetDirectory, resolveUserTargetDirectory } from './customizationCreatorService.js';
53
64
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
54
65
  import { AICustomizationManagementSection, AICustomizationSources } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService';
55
66
  import { IAICustomizationWorkspaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service';
67
+ import { hasReadableCustomizationContent } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostCustomizationUri';
56
68
  import { CodeEditorWidget } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget';
69
+ import { DomScrollableElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
57
70
  import { createTextBufferFactoryFromSnapshot } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/textModel';
58
71
  import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
59
72
  import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
@@ -61,27 +74,49 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
61
74
  import { getSimpleEditorOptions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
62
75
  import { IWorkingCopyService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
63
76
  import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
77
+ import { FileSystemProviderCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
64
78
  import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
65
79
  import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
66
80
  import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
67
81
  import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
68
82
  import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
83
+ import { ScrollbarVisibility } from '@codingame/monaco-vscode-api/vscode/vs/base/common/scrollable';
69
84
  import { EmbeddedMcpServerDetail } from './embeddedMcpServerDetail.js';
70
85
  import { EmbeddedAgentPluginDetail } from './embeddedAgentPluginDetail.js';
86
+ import { layoutVirtualizedSections, getVirtualizedSectionMinimumHeight, layoutVirtualizedSectionList } from './customizationCardList.js';
87
+ import { IMcpService, IMcpWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
88
+ import { IAgentHostCustomizationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.service';
71
89
  import { EmbeddedExtensionToolsDetail } from './embeddedExtensionToolsDetail.js';
72
90
  import { ICustomizationHarnessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService.service';
73
91
  import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
74
92
  import { AICustomizationWelcomePage } from './aiCustomizationWelcomePage.js';
93
+ import { migrateCustomizations } from './customizationMigration.js';
94
+ import { CustomizationMigrationCategoryId, CUSTOMIZATION_MIGRATION_CATEGORIES, getCustomizationMigrationCategory } from './customizationMigrationCategories.js';
95
+ import { CustomizationMigrationDashboard } from './customizationMigrationDashboard.js';
75
96
  import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
76
- import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
77
- import { PromptsServiceCustomizationItemProvider } from './promptsServiceCustomizationItemProvider.js';
78
97
  import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
98
+ import { showNoFoldersDialog } from '@codingame/monaco-vscode-xterm-addons-common/vscode/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder';
99
+ import { isAgentHostTarget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
79
100
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
80
101
  import { Orientation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/sash/sash';
81
102
 
82
103
  var AICustomizationManagementEditor_1;
83
104
  registerCss(aiCustomizationManagement);
84
105
  const $ = $$1;
106
+ const homepageMigrationCategories = [
107
+ CustomizationMigrationCategoryId.PromptFiles,
108
+ CustomizationMigrationCategoryId.UserData,
109
+ CustomizationMigrationCategoryId.McpServers
110
+ ];
111
+ function isCurrentPluginContributionNavigation(
112
+ requestGeneration,
113
+ currentGeneration,
114
+ requestedSection,
115
+ selectedSection,
116
+ isListView
117
+ ) {
118
+ return requestGeneration === currentGeneration && requestedSection === selectedSection && isListView;
119
+ }
85
120
  class SectionItemDelegate {
86
121
  getHeight() {
87
122
  return 26;
@@ -131,6 +166,165 @@ class SectionItemRenderer {
131
166
  templateData.templateDisposables.dispose();
132
167
  }
133
168
  }
169
+ const MIGRATION_ITEM_HEIGHT = 56;
170
+ class MigrationItemDelegate {
171
+ getHeight() {
172
+ return MIGRATION_ITEM_HEIGHT;
173
+ }
174
+ getTemplateId() {
175
+ return "migrationItem";
176
+ }
177
+ }
178
+ class MigrationItemRenderer {
179
+ constructor(
180
+ isSelected,
181
+ getPresentation,
182
+ onSelectionChange,
183
+ onOpen,
184
+ onMore,
185
+ onFirstFocusable,
186
+ hoverService
187
+ ) {
188
+ this.isSelected = isSelected;
189
+ this.getPresentation = getPresentation;
190
+ this.onSelectionChange = onSelectionChange;
191
+ this.onOpen = onOpen;
192
+ this.onMore = onMore;
193
+ this.onFirstFocusable = onFirstFocusable;
194
+ this.hoverService = hoverService;
195
+ this.templateId = "migrationItem";
196
+ this.templates = ( new Set());
197
+ }
198
+ renderTemplate(container) {
199
+ container.classList.add("ai-customization-list-item", "prompt-migration-item");
200
+ const templateDisposables = ( new DisposableStore());
201
+ const elementDisposables = templateDisposables.add(( new DisposableStore()));
202
+ const checkboxContainer = append(container, $(".item-sync-checkbox.prompt-migration-checkbox"));
203
+ const checkbox = templateDisposables.add(( new Checkbox("", false, defaultCheckboxStyles)));
204
+ checkboxContainer.replaceChildren(checkbox.domNode);
205
+ const itemLeft = append(container, $("span.item-left"));
206
+ const openButton = templateDisposables.add(( new Button(itemLeft, {})));
207
+ clearNode(openButton.element);
208
+ openButton.element.classList.add("item-text", "prompt-migration-open-button");
209
+ const openNameRow = append(openButton.element, $("span.item-name-row"));
210
+ const openNameLabel = append(openNameRow, $("span.item-name.prompt-migration-item-name"));
211
+ const openPathLabel = append(
212
+ openButton.element,
213
+ $("span.item-description.is-filename.prompt-migration-item-path")
214
+ );
215
+ const staticText = append(itemLeft, $("span.item-text.prompt-migration-static-text"));
216
+ const staticNameRow = append(staticText, $("span.item-name-row"));
217
+ const staticNameLabel = append(staticNameRow, $("span.item-name.prompt-migration-item-name"));
218
+ const staticPathLabel = append(
219
+ staticText,
220
+ $("span.item-description.is-filename.prompt-migration-item-path")
221
+ );
222
+ const itemRight = append(container, $("span.item-right"));
223
+ const moreButton = append(itemRight, $("button.icon-button.prompt-migration-more-action", {
224
+ type: "button"
225
+ }));
226
+ moreButton.classList.add(...ThemeIcon.asClassNameArray(Codicon.ellipsis));
227
+ const template = {
228
+ container,
229
+ checkbox,
230
+ openButton,
231
+ openNameLabel,
232
+ openPathLabel,
233
+ staticText,
234
+ staticNameLabel,
235
+ staticPathLabel,
236
+ moreButton,
237
+ templateDisposables,
238
+ elementDisposables,
239
+ hasFileActions: false
240
+ };
241
+ this.templates.add(template);
242
+ return template;
243
+ }
244
+ renderElement(customization, index, templateData) {
245
+ templateData.elementDisposables.clear();
246
+ templateData.container.removeAttribute("aria-selected");
247
+ templateData.currentIndex = index;
248
+ templateData.currentElement = customization;
249
+ const presentation = this.getPresentation(customization);
250
+ const file = presentation.file;
251
+ templateData.hasFileActions = file !== undefined;
252
+ this.updateCheckboxState(templateData, customization);
253
+ templateData.checkbox.domNode.setAttribute("aria-label", presentation.selectionAriaLabel);
254
+ templateData.openNameLabel.textContent = presentation.name;
255
+ templateData.openPathLabel.textContent = presentation.pathLabel;
256
+ templateData.staticNameLabel.textContent = presentation.name;
257
+ templateData.staticPathLabel.textContent = presentation.pathLabel;
258
+ templateData.openButton.element.style.display = file ? "" : "none";
259
+ templateData.staticText.style.display = file ? "none" : "";
260
+ templateData.moreButton.style.display = file ? "" : "none";
261
+ if (index === 0) {
262
+ this.onFirstFocusable(templateData.checkbox.domNode);
263
+ }
264
+ templateData.elementDisposables.add(templateData.checkbox.onChange(() => {
265
+ this.onSelectionChange(customization, templateData.checkbox.checked);
266
+ }));
267
+ if (file) {
268
+ templateData.openButton.element.setAttribute("aria-label", ( localize(6395, "Open {0}, {1}", presentation.name, presentation.pathLabel)));
269
+ templateData.moreButton.setAttribute("aria-label", ( localize(6396, "More actions for {0}", presentation.name)));
270
+ templateData.elementDisposables.add(templateData.openButton.onDidClick(() => this.onOpen(file)));
271
+ templateData.elementDisposables.add(this.hoverService.setupManagedHover(
272
+ getDefaultHoverDelegate("element"),
273
+ templateData.moreButton,
274
+ ( localize(6397, "More Actions"))
275
+ ));
276
+ templateData.elementDisposables.add(addDisposableListener(templateData.moreButton, "click", event => {
277
+ event.stopPropagation();
278
+ this.onMore(file, templateData.moreButton);
279
+ }));
280
+ } else {
281
+ templateData.openButton.element.removeAttribute("aria-label");
282
+ templateData.moreButton.removeAttribute("aria-label");
283
+ }
284
+ }
285
+ refreshSelectionState() {
286
+ for (const template of this.templates) {
287
+ if (template.currentElement) {
288
+ this.updateCheckboxState(template, template.currentElement);
289
+ }
290
+ }
291
+ }
292
+ updateCheckboxState(templateData, customization) {
293
+ const selected = this.isSelected(customization);
294
+ templateData.checkbox.checked = selected;
295
+ templateData.checkbox.domNode.setAttribute("aria-checked", String(selected));
296
+ }
297
+ getIndex(target) {
298
+ for (const template of this.templates) {
299
+ if (template.container.contains(target)) {
300
+ return template.currentIndex;
301
+ }
302
+ }
303
+ return undefined;
304
+ }
305
+ getControls(index) {
306
+ for (const template of this.templates) {
307
+ if (template.currentIndex === index) {
308
+ return template.hasFileActions ? [
309
+ template.checkbox.domNode,
310
+ template.openButton.element,
311
+ template.moreButton
312
+ ] : [template.checkbox.domNode];
313
+ }
314
+ }
315
+ return [];
316
+ }
317
+ disposeElement(_customization, _index, templateData) {
318
+ templateData.elementDisposables.clear();
319
+ templateData.currentIndex = undefined;
320
+ templateData.currentElement = undefined;
321
+ templateData.hasFileActions = false;
322
+ }
323
+ disposeTemplate(templateData) {
324
+ this.templates.delete(templateData);
325
+ templateData.templateDisposables.dispose();
326
+ }
327
+ }
134
328
  let AICustomizationManagementEditor = class AICustomizationManagementEditor extends EditorPane {
135
329
  static {
136
330
  AICustomizationManagementEditor_1 = this;
@@ -149,6 +343,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
149
343
  commandService,
150
344
  workspaceService,
151
345
  promptsService,
346
+ customizationMigrationService,
152
347
  textModelService,
153
348
  configurationService,
154
349
  workingCopyService,
@@ -158,10 +353,16 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
158
353
  quickInputService,
159
354
  fileService,
160
355
  notificationService,
356
+ fileDialogService,
357
+ dialogService,
358
+ contextMenuService,
161
359
  harnessService,
162
360
  viewsService,
163
361
  labelService,
164
- itemsModel
362
+ itemsModel,
363
+ mcpService,
364
+ mcpWorkbenchService,
365
+ agentHostCustomizationService
165
366
  ) {
166
367
  super(
167
368
  AICustomizationManagementEditor_1.ID,
@@ -176,6 +377,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
176
377
  this.commandService = commandService;
177
378
  this.workspaceService = workspaceService;
178
379
  this.promptsService = promptsService;
380
+ this.customizationMigrationService = customizationMigrationService;
179
381
  this.textModelService = textModelService;
180
382
  this.configurationService = configurationService;
181
383
  this.workingCopyService = workingCopyService;
@@ -185,10 +387,18 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
185
387
  this.quickInputService = quickInputService;
186
388
  this.fileService = fileService;
187
389
  this.notificationService = notificationService;
390
+ this.fileDialogService = fileDialogService;
391
+ this.dialogService = dialogService;
392
+ this.contextMenuService = contextMenuService;
188
393
  this.harnessService = harnessService;
189
394
  this.viewsService = viewsService;
190
395
  this.labelService = labelService;
191
396
  this.itemsModel = itemsModel;
397
+ this.mcpService = mcpService;
398
+ this.mcpWorkbenchService = mcpWorkbenchService;
399
+ this.agentHostCustomizationService = agentHostCustomizationService;
400
+ this.contributedSectionContainers = ( new Map());
401
+ this.contributedSectionWidgets = ( new Map());
192
402
  this.editorActionButtonInProgress = false;
193
403
  this.editorDisplayMode = "preview";
194
404
  this.editorModelChangeDisposables = this._register(( new DisposableStore()));
@@ -200,20 +410,44 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
200
410
  }, 200)));
201
411
  this.builtinEditingSessions = ( new Map());
202
412
  this.currentEditingReadOnly = false;
413
+ this.editorReturnViewMode = "list";
203
414
  this.viewMode = "list";
415
+ this.migrationSectionLists = [];
416
+ this.migrationSectionScrollPositions = ( new Map());
417
+ this.migrationWorkspaceSkipped = false;
418
+ this.selectedCustomizationMigrationItems = ( new ResourceMap());
419
+ this.selectedMcpServerMigrationItems = ( new Set());
420
+ this.knownMcpServerMigrationItems = ( new Set());
421
+ this.migrationSelectionContextKey = "";
422
+ this.selectedCustomizationMigrationTargets = ( new Map());
423
+ this.explicitlySelectedCustomizationMigrationTargets = ( new Set());
424
+ this.migrationPageDisposables = this._register(( new DisposableStore()));
425
+ this.migrationBannerDisposables = this._register(( new DisposableStore()));
204
426
  this.mcpDetailDisposables = this._register(( new DisposableStore()));
205
427
  this.pluginDetailDisposables = this._register(( new DisposableStore()));
206
428
  this.toolsDetailDisposables = this._register(( new DisposableStore()));
207
429
  this.sections = [];
208
430
  this.allSections = [];
431
+ this.contentNavigationGeneration = 0;
432
+ this.customizationsByMigrationCategory = ( new Map());
433
+ this.customizationMigrationTargetFoldersByType = ( new Map());
434
+ this.customizationMigrationRefreshSequence = 0;
435
+ this.customizationMigrationLoading = false;
436
+ this.customizationMigrationInProgress = false;
437
+ this.customizationMigrationWritesInProgress = false;
209
438
  this.editorDisposables = this._register(( new DisposableStore()));
439
+ this.pendingMigrationLayout = this._register(( new MutableDisposable()));
210
440
  this._editorContentChanged = false;
441
+ this.sidebarWidth = 0;
442
+ this.sidebarHeight = 0;
211
443
  this.inEditorContextKey = CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_EDITOR.bindTo(contextKeyService);
212
444
  this.sectionContextKey = CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_SECTION.bindTo(contextKeyService);
213
445
  this.harnessContextKey = CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_HARNESS.bindTo(contextKeyService);
214
- this.updateHarnessLabelPresentation();
446
+ this.updateTargetLabelPresentation();
215
447
  this._register(autorun(reader => {
216
448
  this.workspaceService.activeProjectRoot.read(reader);
449
+ this.workspaceService.activeProjectLabel.read(reader);
450
+ this.updateTargetLabelPresentation();
217
451
  if (this.viewMode === "editor") {
218
452
  this.currentEditingProjectRoot = this.workspaceService.getActiveProjectRoot();
219
453
  }
@@ -225,83 +459,82 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
225
459
  this._register(toDisposable(() => this.disposeBuiltinEditingSessions()));
226
460
  const sectionInfo = {
227
461
  [AICustomizationManagementSection.Agents]: {
228
- label: ( localize(5858, "Agents")),
462
+ label: ( localize(6398, "Agents")),
229
463
  icon: agentIcon,
230
464
  description: ( localize(
231
- 5859,
465
+ 6399,
232
466
  "Define custom agents with specialized personas, tool access, and instructions for specific tasks."
233
467
  ))
234
468
  },
235
469
  [AICustomizationManagementSection.Skills]: {
236
- label: ( localize(5860, "Skills")),
470
+ label: ( localize(6400, "Skills")),
237
471
  icon: skillIcon,
238
472
  description: ( localize(
239
- 5861,
473
+ 6401,
240
474
  "Create reusable skill files that provide domain-specific knowledge and workflows."
241
475
  ))
242
476
  },
243
477
  [AICustomizationManagementSection.Instructions]: {
244
- label: ( localize(5862, "Instructions")),
478
+ label: ( localize(6402, "Instructions")),
245
479
  icon: instructionsIcon,
246
480
  description: ( localize(
247
- 5863,
481
+ 6403,
248
482
  "Set always-on instructions that guide AI behavior across your workspace or user profile."
249
483
  ))
250
484
  },
251
485
  [AICustomizationManagementSection.Prompts]: {
252
- label: ( localize(5864, "Prompts")),
486
+ label: ( localize(6404, "Prompts")),
253
487
  icon: promptIcon,
254
- description: ( localize(5865, "Reusable prompt templates that can be invoked as slash commands."))
488
+ description: ( localize(6405, "Reusable prompt templates that can be invoked as slash commands."))
255
489
  },
256
490
  [AICustomizationManagementSection.Hooks]: {
257
- label: ( localize(5866, "Hooks")),
491
+ label: ( localize(6406, "Hooks")),
258
492
  icon: hookIcon,
259
493
  description: ( localize(
260
- 5867,
494
+ 6407,
261
495
  "Configure automated actions triggered by events like saving files or running tasks."
262
496
  ))
263
497
  },
264
- [AICustomizationManagementSection.Automations]: {
265
- label: ( localize(5868, "Automations")),
266
- icon: automationIcon,
267
- description: ( localize(5869, "Schedule agent sessions to run on a cadence you choose."))
268
- },
269
498
  [AICustomizationManagementSection.McpServers]: {
270
- label: ( localize(5870, "MCP Servers")),
499
+ label: ( localize(6408, "MCP Servers")),
271
500
  icon: Codicon.server,
272
501
  description: ( localize(
273
- 5871,
502
+ 6409,
274
503
  "Connect external tool servers that extend AI capabilities with custom tools and data sources."
275
504
  ))
276
505
  },
277
506
  [AICustomizationManagementSection.Plugins]: {
278
- label: ( localize(5872, "Plugins")),
507
+ label: ( localize(6410, "Plugins")),
279
508
  icon: pluginIcon,
280
509
  description: ( localize(
281
- 5873,
510
+ 6411,
282
511
  "Install and manage agent plugins that add additional tools, skills, and integrations."
283
512
  ))
284
513
  },
285
514
  [AICustomizationManagementSection.Models]: {
286
- label: ( localize(5874, "Models")),
515
+ label: ( localize(6412, "Models")),
287
516
  icon: Codicon.vm,
288
- description: ( localize(5875, "Configure and manage language models available for use."))
517
+ description: ( localize(6413, "Configure and manage language models available for use."))
289
518
  },
290
519
  [AICustomizationManagementSection.Tools]: {
291
- label: ( localize(5876, "Tools")),
520
+ label: ( localize(6414, "Tools")),
292
521
  icon: toolsIcon,
293
522
  description: ( localize(
294
- 5877,
523
+ 6415,
295
524
  "Enable or disable groups of language model tools available to chat."
296
525
  ))
297
526
  }
298
527
  };
528
+ const activeHarnessId = this.harnessService.activeHarness.get();
299
529
  for (const id of this.workspaceService.managementSections) {
300
- const info = sectionInfo[id];
530
+ const contribution = aiCustomizationManagementSectionRegistry.get(id, activeHarnessId) ?? aiCustomizationManagementSectionRegistry.getDefault(id);
531
+ const info = contribution ?? sectionInfo[id];
301
532
  if (info) {
302
533
  this.allSections.push({
303
534
  id,
304
- ...info,
535
+ label: info.label,
536
+ icon: info.icon,
537
+ description: info.description,
305
538
  count: 0
306
539
  });
307
540
  }
@@ -315,7 +548,10 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
315
548
  }
316
549
  }
317
550
  createEditor(parent) {
551
+ this.pendingMigrationLayout.clear();
318
552
  this.editorDisposables.clear();
553
+ this.contributedSectionContainers.clear();
554
+ this.contributedSectionWidgets.clear();
319
555
  this.container = append(parent, $(".ai-customization-management-editor"));
320
556
  this.createSplitView();
321
557
  this.updateStyles();
@@ -343,8 +579,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
343
579
  layout: (width, _, height) => {
344
580
  this.sidebarContainer.style.width = `${width}px`;
345
581
  if (height !== undefined) {
346
- const headerHeight = this.sidebarHeaderContainer?.offsetHeight ?? 0;
347
- this.sectionsList.layout(Math.max(0, height - 8 - headerHeight), width);
582
+ this.layoutSidebar(width, height);
348
583
  }
349
584
  }
350
585
  }, savedWidth, undefined, true);
@@ -356,11 +591,18 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
356
591
  layout: (width, _, height) => {
357
592
  this.contentContainer.style.width = `${width}px`;
358
593
  if (height !== undefined) {
359
- this.listWidget.layout(height - 16, width - 24);
360
- this.mcpListWidget?.layout(height - 16, width - 24);
361
- this.pluginListWidget?.layout(height - 16, width - 24);
362
- this.toolsListWidget?.layout(height - 16, width - 24);
363
- this.automationsListWidget?.layout(height - 16, width - 24);
594
+ if (this.promptsContentContainer?.style.display !== "none") {
595
+ this.listWidget.layout(height - 16, width - 24);
596
+ }
597
+ if (this.mcpContentContainer?.style.display !== "none") {
598
+ this.mcpListWidget?.layout(height - 16, width - 24);
599
+ }
600
+ if (this.pluginContentContainer?.style.display !== "none") {
601
+ this.pluginListWidget?.layout(height - 16, width - 24);
602
+ }
603
+ if (this.toolsContentContainer?.style.display !== "none") {
604
+ this.toolsListWidget?.layout(height - 16, width - 24);
605
+ }
364
606
  const modelsFooterHeight = this.modelsFooterElement?.offsetHeight || 80;
365
607
  this.modelsWidget?.layout(height - 16 - modelsFooterHeight, width);
366
608
  if (this.viewMode === "editor" && this.embeddedEditor && this.embeddedEditorContainer) {
@@ -409,28 +651,37 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
409
651
  }));
410
652
  }
411
653
  getActiveHarnessLabel() {
412
- return this.harnessService.getActiveDescriptor().label || ( localize(5878, "Local"));
654
+ const label = this.harnessService.getActiveDescriptor().label;
655
+ return label || (this.workspaceService.isSessionsWindow ? "" : ( localize(6416, "Local")));
413
656
  }
414
- updateHarnessLabelPresentation() {
657
+ updateTargetLabelPresentation() {
415
658
  const harnessLabel = this.getActiveHarnessLabel();
416
- AICustomizationManagementEditorInput.getOrCreate().setHarnessLabel(harnessLabel);
659
+ const workspaceLabel = this.workspaceService.activeProjectLabel.get();
417
660
  this.welcomePage?.setHarnessLabel(harnessLabel);
661
+ if (this.input instanceof AICustomizationManagementEditorInput) {
662
+ this.input.setTargetLabels(harnessLabel, workspaceLabel);
663
+ }
418
664
  }
419
665
  rebuildVisibleSections() {
420
666
  const activeId = this.harnessService.activeHarness.get();
421
667
  const descriptor = this.harnessService.findHarnessById(activeId);
422
668
  const hidden = ( new Set(descriptor?.hiddenSections ?? []));
423
- if (this.configurationService.getValue(CHAT_AUTOMATIONS_ENABLED_SETTING) !== true) {
424
- hidden.add(AICustomizationManagementSection.Automations);
425
- }
426
669
  this.sections.length = 0;
427
670
  for (const s of this.allSections) {
428
- if (!( hidden.has(s.id))) {
429
- this.sections.push(s);
671
+ const contribution = aiCustomizationManagementSectionRegistry.get(s.id, activeId);
672
+ const contributed = ( aiCustomizationManagementSectionRegistry.has(s.id));
673
+ if (!( hidden.has(s.id)) && (!contributed || !!contribution)) {
674
+ this.sections.push(contribution ? {
675
+ ...s,
676
+ label: contribution.label,
677
+ icon: contribution.icon,
678
+ description: contribution.description
679
+ } : s);
430
680
  }
431
681
  }
432
682
  if (this.sectionsList) {
433
683
  this.sectionsList.splice(0, this.sectionsList.length, this.sections);
684
+ this.layoutSidebar(this.sidebarWidth, this.sidebarHeight);
434
685
  }
435
686
  this.welcomePage?.rebuildCards(( new Set(( this.sections.map(s => s.id)))));
436
687
  if (this.selectedSection !== undefined && !( this.sections.some(s => s.id === this.selectedSection)) && this.sections.length > 0) {
@@ -442,7 +693,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
442
693
  createSidebar() {
443
694
  const sidebarContent = append(this.sidebarContainer, $(".sidebar-content"));
444
695
  this.createSidebarHeader(sidebarContent);
445
- const sectionsListContainer = append(sidebarContent, $(".sidebar-sections-list"));
696
+ const sectionsListContainer = this.sectionsListContainer = append(sidebarContent, $(".sidebar-sections-list"));
446
697
  this.sectionsList = this.editorDisposables.add(this.instantiationService.createInstance(
447
698
  WorkbenchList,
448
699
  "AICustomizationManagementSections",
@@ -454,8 +705,8 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
454
705
  setRowLineHeight: false,
455
706
  horizontalScrolling: false,
456
707
  accessibilityProvider: {
457
- getAriaLabel: item => item.count > 0 ? ( localize(5879, "{0}, {1} items", item.label, item.count)) : item.label,
458
- getWidgetAriaLabel: () => ( localize(5880, "Agent Customization Sections"))
708
+ getAriaLabel: item => item.count > 0 ? ( localize(6417, "{0}, {1} items", item.label, item.count)) : item.label,
709
+ getWidgetAriaLabel: () => ( localize(6418, "Agent Customization Sections"))
459
710
  },
460
711
  openOnSingleClick: true,
461
712
  identityProvider: {
@@ -481,6 +732,11 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
481
732
  this.updateHomeButtonHarnessPresentation();
482
733
  this.rebuildVisibleSections();
483
734
  if (this._previousActiveHarnessId !== undefined && this._previousActiveHarnessId !== activeId) {
735
+ for (const [section, widget] of this.contributedSectionWidgets) {
736
+ this.editorDisposables.delete(widget);
737
+ this.contributedSectionContainers.get(section)?.replaceChildren();
738
+ }
739
+ this.contributedSectionWidgets.clear();
484
740
  for (const section of this.sections) {
485
741
  this.updateSectionCount(section.id, 0);
486
742
  }
@@ -491,24 +747,40 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
491
747
  if (e.affectsConfiguration(ChatConfiguration.ChatCustomizationsStructuredPreviewEnabled)) {
492
748
  this.onStructuredPreviewSettingChanged();
493
749
  }
494
- if (e.affectsConfiguration(CHAT_AUTOMATIONS_ENABLED_SETTING)) {
495
- this.rebuildVisibleSections();
750
+ if (( CUSTOMIZATION_MIGRATION_CATEGORIES.some(
751
+ category => e.affectsConfiguration(category.enablementSetting) || category.configurationSettingIds?.some(settingId => e.affectsConfiguration(settingId))
752
+ ))) {
753
+ void this.refreshCustomizationMigrationInfo();
496
754
  }
497
755
  }));
756
+ this.createSidebarMigrationShortcut(sidebarContent);
757
+ }
758
+ layoutSidebar(width, height) {
759
+ this.sidebarWidth = width;
760
+ this.sidebarHeight = height;
761
+ if (!this.sectionsListContainer) {
762
+ return;
763
+ }
764
+ const headerHeight = this.sidebarHeaderContainer?.offsetHeight ?? 0;
765
+ const migrationHeight = this.migrationShortcutContainer?.style.display !== "none" ? (this.migrationShortcutContainer?.offsetHeight ?? 0) : 0;
766
+ const availableListHeight = Math.max(0, height - 8 - headerHeight - migrationHeight);
767
+ const listHeight = Math.min(availableListHeight, this.sections.length * 26);
768
+ this.sectionsListContainer.style.height = `${listHeight}px`;
769
+ this.sectionsList.layout(listHeight, width);
498
770
  }
499
771
  createSidebarHeader(sidebarContent) {
500
772
  const headerRow = this.sidebarHeaderContainer = append(sidebarContent, $(".sidebar-header-row"));
501
773
  const homeButton = this.homeButton = append(headerRow, $("button.sidebar-home-button"));
502
774
  homeButton.classList.add("sidebar-harness-home-button");
503
- homeButton.setAttribute("aria-label", ( localize(5881, "Overview")));
775
+ homeButton.setAttribute("aria-label", ( localize(6419, "Overview")));
504
776
  this.editorDisposables.add(
505
- this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), homeButton, ( localize(5882, "Back to overview")))
777
+ this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), homeButton, ( localize(6420, "Back to overview")))
506
778
  );
507
779
  const homeIcon = this.homeButtonIcon = append(homeButton, $("span.sidebar-home-icon"));
508
780
  homeIcon.classList.add(...ThemeIcon.asClassNameArray(Codicon.home));
509
781
  homeIcon.setAttribute("aria-hidden", "true");
510
782
  const homeLabel = this.homeButtonLabel = append(homeButton, $("span.sidebar-home-label"));
511
- homeLabel.textContent = ( localize(5883, "Overview"));
783
+ homeLabel.textContent = ( localize(6421, "Overview"));
512
784
  this.editorDisposables.add(addDisposableListener(homeButton, "click", () => {
513
785
  this.showWelcomePage();
514
786
  }));
@@ -523,15 +795,34 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
523
795
  this.homeButton.style.flex = "1";
524
796
  }
525
797
  updateHomeButtonHarnessPresentation() {
526
- this.updateHarnessLabelPresentation();
798
+ this.updateTargetLabelPresentation();
527
799
  if (!this.homeButton || !this.homeButtonIcon || !this.homeButtonLabel) {
528
800
  return;
529
801
  }
530
802
  this.homeButtonIcon.className = "sidebar-home-icon";
531
803
  this.homeButtonIcon.classList.add(...ThemeIcon.asClassNameArray(Codicon.home));
532
- this.homeButtonLabel.textContent = ( localize(5883, "Overview"));
533
- this.homeButton.setAttribute("aria-label", ( localize(5881, "Overview")));
534
- this.homeButton.title = ( localize(5882, "Back to overview"));
804
+ this.homeButtonLabel.textContent = ( localize(6421, "Overview"));
805
+ this.homeButton.setAttribute("aria-label", ( localize(6419, "Overview")));
806
+ this.homeButton.title = ( localize(6420, "Back to overview"));
807
+ }
808
+ createSidebarMigrationShortcut(sidebarContent) {
809
+ const container = this.migrationShortcutContainer = append(sidebarContent, $(".sidebar-migration-shortcut"));
810
+ container.style.display = "none";
811
+ append(container, $("div.sidebar-migration-separator"));
812
+ const button = this.migrationShortcutButton = append(container, $("button.sidebar-migration-button"));
813
+ button.type = "button";
814
+ button.setAttribute("aria-label", ( localize(6422, "Migrations")));
815
+ this.editorDisposables.add(
816
+ this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), button, ( localize(6423, "Review customizations that need migration")))
817
+ );
818
+ const icon = append(button, $("span.sidebar-migration-icon"));
819
+ icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.warning));
820
+ icon.setAttribute("aria-hidden", "true");
821
+ append(button, $("span.sidebar-migration-label")).textContent = ( localize(6424, "Migrations"));
822
+ this.migrationShortcutCount = append(button, $("span.sidebar-migration-count"));
823
+ this.editorDisposables.add(
824
+ addDisposableListener(button, "click", () => this.showCustomizationMigrationDashboard())
825
+ );
535
826
  }
536
827
  createWelcomePage(parent) {
537
828
  this.welcomePage = this.editorDisposables.add(( new AICustomizationWelcomePage(parent, this.workspaceService.welcomePageFeatures, {
@@ -544,6 +835,9 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
544
835
  this.group.closeEditor(this.input);
545
836
  }
546
837
  },
838
+ reviewMigrations: () => {
839
+ this.showCustomizationMigrationDashboard();
840
+ },
547
841
  prefillChat: async (query, options) => {
548
842
  try {
549
843
  if (this.workspaceService.isSessionsWindow) {
@@ -573,13 +867,18 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
573
867
  }
574
868
  }, this.commandService, this.workspaceService, this.hoverService, this.getActiveHarnessLabel())));
575
869
  this.welcomePage.rebuildCards(( new Set(( this.sections.map(s => s.id)))));
870
+ this.welcomePage.setMigrationCategories(this.getMigrationCategorySummaries());
576
871
  }
577
- createBackArrowButton(onClick) {
872
+ createBackArrowButton(
873
+ onClick,
874
+ ariaLabel = ( localize(6425, "Back to overview")),
875
+ tooltip = ( localize(6426, "Back to overview"))
876
+ ) {
578
877
  const button = $("button.section-back-arrow-button");
579
878
  button.type = "button";
580
- button.setAttribute("aria-label", ( localize(5884, "Back to overview")));
879
+ button.setAttribute("aria-label", ariaLabel);
581
880
  this.editorDisposables.add(
582
- this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), button, ( localize(5885, "Back to overview")))
881
+ this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), button, tooltip)
583
882
  );
584
883
  const icon = append(button, $("span.section-back-arrow-icon"));
585
884
  icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.arrowLeft));
@@ -593,12 +892,154 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
593
892
  }));
594
893
  return button;
595
894
  }
895
+ createCustomizationMigrationContent(contentInner) {
896
+ this.migrationContentContainer = append(
897
+ contentInner,
898
+ $(".prompt-migration-content-container.ai-customization-list-widget")
899
+ );
900
+ const header = this.migrationHeader = append(this.migrationContentContainer, $(".section-title-header"));
901
+ const titleRow = append(header, $(".section-title-row"));
902
+ this.migrationBackButton = this.createBackArrowButton(() => this.showCustomizationMigrationDashboard(), ( localize(6427, "Back to customization migrations")), ( localize(6428, "Back to customization migrations")));
903
+ titleRow.appendChild(this.migrationBackButton);
904
+ this.migrationTitleElement = append(titleRow, $("h2.section-title"));
905
+ this.migrationDescriptionElement = append(header, $("p.section-title-description"));
906
+ this.migrationDescriptionTextElement = append(this.migrationDescriptionElement, $("span.section-title-description-text"));
907
+ const sectionLink = this.migrationLinkElement = append(
908
+ this.migrationDescriptionElement,
909
+ $("a.section-title-link.migration-learn-more-link")
910
+ );
911
+ this.editorDisposables.add(addDisposableListener(sectionLink, "click", e => {
912
+ e.preventDefault();
913
+ this.openerService.open(( URI.parse(sectionLink.href)));
914
+ }));
915
+ this.migrationBannerContainer = append(this.migrationContentContainer, $(".customization-migration-banner"));
916
+ this.migrationBannerContainer.style.display = "none";
917
+ const migrationScrollContainer = $(".prompt-migration-scroll-container");
918
+ this.migrationListContainer = append(
919
+ migrationScrollContainer,
920
+ $(".prompt-migration-list.list-container.distributed-section-layout")
921
+ );
922
+ const migrationListScrollable = this.editorDisposables.add(( new DomScrollableElement(migrationScrollContainer, {
923
+ horizontal: ScrollbarVisibility.Hidden,
924
+ vertical: ScrollbarVisibility.Auto,
925
+ useShadows: false
926
+ })));
927
+ this.migrationListScrollable = migrationListScrollable;
928
+ this.editorDisposables.add(
929
+ addDisposableListener(migrationScrollContainer, EventType.SCROLL, () => {
930
+ migrationListScrollable.setScrollPosition({
931
+ scrollTop: migrationScrollContainer.scrollTop
932
+ });
933
+ })
934
+ );
935
+ const migrationListScrollableNode = migrationListScrollable.getDomNode();
936
+ migrationListScrollableNode.classList.add("prompt-migration-list-scrollable");
937
+ this.migrationContentContainer.appendChild(migrationListScrollableNode);
938
+ const footer = this.migrationFooter = append(this.migrationContentContainer, $(".prompt-migration-footer"));
939
+ this.migrationSelectedCountElement = append(footer, $("span.prompt-migration-selected-count"));
940
+ this.migrationSelectedCountElement.setAttribute("aria-live", "polite");
941
+ const clearSettingsLabel = ( localize(6429, "Clear unused location settings after migration"));
942
+ this.migrationClearSettingsCheckbox = this.editorDisposables.add(( new Checkbox(clearSettingsLabel, true, defaultCheckboxStyles)));
943
+ const actionButtonContainer = append(footer, $(".list-add-button-container"));
944
+ this.migrationMigrateButton = this.editorDisposables.add(( new Button(actionButtonContainer, defaultButtonStyles)));
945
+ this.migrationMigrateButton.element.classList.add("list-add-button", "prompt-migration-button");
946
+ this.editorDisposables.add(this.hoverService.setupManagedHover(
947
+ getDefaultHoverDelegate("element"),
948
+ this.migrationMigrateButton.element,
949
+ () => this.getActiveMigrationCategory()?.migrateButtonTooltip ?? ( localize(6430, "Migrate all customizations"))
950
+ ));
951
+ this.editorDisposables.add(this.migrationMigrateButton.onDidClick(() => {
952
+ const category = this.getActiveMigrationCategory();
953
+ if (!category) {
954
+ return;
955
+ }
956
+ const selectedCustomizations = this.getMigrationCandidates(category, this.activeMigrationStorage).filter(customization => this.isCustomizationSelectedForMigration(customization));
957
+ void this.migrateSelectedCustomizations(category, selectedCustomizations);
958
+ }));
959
+ const targetWindow = getWindow(this.migrationContentContainer);
960
+ const migrationResizeObserver = this.editorDisposables.add(new DisposableResizeObserver(
961
+ "AICustomizationManagementEditor.promptMigrationListScrollable",
962
+ () => this.scheduleMigrationSectionLayout(),
963
+ targetWindow
964
+ ));
965
+ this.editorDisposables.add(migrationResizeObserver.observe(migrationListScrollableNode));
966
+ this.migrationDashboardContainer = $(".customization-migration-dashboard-container");
967
+ this.migrationDashboardScrollable = this.editorDisposables.add(( new DomScrollableElement(this.migrationDashboardContainer, {
968
+ horizontal: ScrollbarVisibility.Hidden,
969
+ vertical: ScrollbarVisibility.Auto,
970
+ useShadows: false
971
+ })));
972
+ const dashboardScrollableNode = this.migrationDashboardScrollable.getDomNode();
973
+ dashboardScrollableNode.classList.add("customization-migration-dashboard-scrollable");
974
+ this.migrationContentContainer.appendChild(dashboardScrollableNode);
975
+ const migrationDashboardResizeObserver = this.editorDisposables.add(new DisposableResizeObserver(
976
+ "AICustomizationManagementEditor.customizationMigrationDashboard",
977
+ () => this.migrationDashboardScrollable?.scanDomNode(),
978
+ targetWindow
979
+ ));
980
+ this.editorDisposables.add(migrationDashboardResizeObserver.observe(dashboardScrollableNode));
981
+ this.editorDisposables.add(migrationDashboardResizeObserver.observe(this.migrationDashboardContainer));
982
+ this.migrationDashboard = this.editorDisposables.add(
983
+ this.instantiationService.createInstance(CustomizationMigrationDashboard, this.migrationDashboardContainer, {
984
+ onDidChangeContent: () => this.migrationDashboardScrollable?.scanDomNode(),
985
+ configureLocations: storage => void this.configureCustomizationMigrationLocations(storage).finally(() => this.migrationDashboard?.focusDestination(storage)),
986
+ dismissResult: () => {
987
+ this.migrationResult = undefined;
988
+ this.renderCustomizationMigrationPage();
989
+ },
990
+ reviewCategory: (id, storage) => void this.showCustomizationMigrationPage(id, storage),
991
+ setWorkspaceSkipped: skipped => {
992
+ this.migrationWorkspaceSkipped = skipped;
993
+ this.storeMigrationActivityState(PromptsStorage.local, {
994
+ ...this.getMigrationActivityState(PromptsStorage.local),
995
+ skipped
996
+ });
997
+ this.refreshCustomizationMigrationUi();
998
+ },
999
+ dismissActivity: id => {
1000
+ for (const storage of [PromptsStorage.user, PromptsStorage.local]) {
1001
+ const state = this.getMigrationActivityState(storage);
1002
+ this.storeMigrationActivityState(storage, {
1003
+ ...state,
1004
+ activity: state.activity.filter(entry => entry.id !== id)
1005
+ });
1006
+ }
1007
+ this.renderCustomizationMigrationPage();
1008
+ }
1009
+ })
1010
+ );
1011
+ this.renderCustomizationMigrationPage();
1012
+ if (this.viewMode === "migration") {
1013
+ this.scheduleMigrationSectionLayout();
1014
+ }
1015
+ }
596
1016
  createContent() {
597
1017
  const contentInner = append(this.contentContainer, $(".content-inner"));
598
1018
  this.createWelcomePage(contentInner);
1019
+ this.editorDisposables.add(Event.any(
1020
+ this.promptsService.onDidChangeSlashCommands,
1021
+ this.promptsService.onDidChangeCustomAgents,
1022
+ this.promptsService.onDidChangeInstructions,
1023
+ this.promptsService.onDidChangeAgentInstructions
1024
+ )(() => this.refreshCustomizationMigrationInfoFromPromptChange()));
1025
+ this.editorDisposables.add(
1026
+ this.agentHostCustomizationService.onDidChangeCustomizations(() => this.refreshCustomizationMigrationInfoFromMcpChange())
1027
+ );
1028
+ this.editorDisposables.add(
1029
+ Event.any(this.mcpWorkbenchService.onChange, this.mcpWorkbenchService.onReset)(() => this.refreshCustomizationMigrationInfoFromMcpChange())
1030
+ );
1031
+ this.editorDisposables.add(autorun(reader => {
1032
+ for (const server of this.mcpService.servers.read(reader)) {
1033
+ server.enablement.read(reader);
1034
+ server.readDefinitions().read(reader);
1035
+ }
1036
+ this.refreshCustomizationMigrationInfoFromMcpChange();
1037
+ }));
1038
+ this.registerCustomizationMigrationSessionRefresh();
599
1039
  this.promptsContentContainer = append(contentInner, $(".prompts-content-container"));
600
1040
  this.listWidget = this.editorDisposables.add(this.instantiationService.createInstance(AICustomizationListWidget));
601
1041
  this.promptsContentContainer.appendChild(this.listWidget.element);
1042
+ this.createCustomizationMigrationContent(contentInner);
602
1043
  this.editorDisposables.add(this.listWidget.onDidSelectItem(item => {
603
1044
  this.telemetryService.publicLog2("chatCustomizationEditor.itemSelected", {
604
1045
  section: this.selectedSection ?? "welcome",
@@ -639,11 +1080,11 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
639
1080
  this.modelsFooterElement = append(this.modelsContentContainer, $(".section-footer"));
640
1081
  const modelsDescription = append(this.modelsFooterElement, $("p.section-footer-description"));
641
1082
  modelsDescription.textContent = ( localize(
642
- 5886,
1083
+ 6431,
643
1084
  "Browse and manage language models from different providers. Select models for use in chat, code completion, and other AI features."
644
1085
  ));
645
1086
  const modelsLink = append(this.modelsFooterElement, $("a.section-footer-link"));
646
- modelsLink.textContent = ( localize(5887, "Learn more about language models"));
1087
+ modelsLink.textContent = ( localize(6432, "Learn more about language models"));
647
1088
  modelsLink.href = "https://code.visualstudio.com/docs/agent-customization/language-models?referrer=in-product";
648
1089
  this.editorDisposables.add(addDisposableListener(modelsLink, "click", e => {
649
1090
  e.preventDefault();
@@ -655,7 +1096,6 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
655
1096
  this.mcpListWidget = this.editorDisposables.add(this.instantiationService.createInstance(McpListWidget));
656
1097
  this.mcpContentContainer.appendChild(this.mcpListWidget.element);
657
1098
  this.mcpDetailContainer = append(contentInner, $(".mcp-detail-container"));
658
- this.createEmbeddedMcpDetail();
659
1099
  this.editorDisposables.add(this.mcpListWidget.onDidSelectServer(server => {
660
1100
  this.showEmbeddedMcpDetail(server);
661
1101
  }));
@@ -663,81 +1103,1548 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
663
1103
  this.showPluginDetail(item);
664
1104
  }));
665
1105
  }
666
- if (( hasSections.has(AICustomizationManagementSection.Plugins))) {
667
- this.pluginContentContainer = append(contentInner, $(".plugin-content-container"));
668
- this.pluginListWidget = this.editorDisposables.add(this.instantiationService.createInstance(PluginListWidget));
669
- this.pluginContentContainer.appendChild(this.pluginListWidget.element);
670
- this.pluginDetailContainer = append(contentInner, $(".plugin-detail-container"));
671
- this.createEmbeddedPluginDetail();
672
- this.editorDisposables.add(this.pluginListWidget.onDidSelectPlugin(item => {
673
- this.pluginDetailReturnSection = undefined;
674
- this.showEmbeddedPluginDetail(item);
675
- }));
1106
+ if (( hasSections.has(AICustomizationManagementSection.Plugins))) {
1107
+ this.pluginContentContainer = append(contentInner, $(".plugin-content-container"));
1108
+ this.pluginListWidget = this.editorDisposables.add(this.instantiationService.createInstance(PluginListWidget, undefined));
1109
+ this.pluginContentContainer.appendChild(this.pluginListWidget.element);
1110
+ this.pluginDetailContainer = append(contentInner, $(".plugin-detail-container"));
1111
+ this.createEmbeddedPluginDetail();
1112
+ this.editorDisposables.add(this.pluginListWidget.onDidSelectPlugin(item => {
1113
+ this.pluginDetailReturnSection = undefined;
1114
+ this.showEmbeddedPluginDetail(item);
1115
+ }));
1116
+ }
1117
+ if (( hasSections.has(AICustomizationManagementSection.Tools))) {
1118
+ this.toolsContentContainer = append(contentInner, $(".tools-content-container"));
1119
+ this.toolsListWidget = this.editorDisposables.add(
1120
+ this.instantiationService.createInstance(ToolsListWidget, AGENT_HOST_COPILOT_CLI_SESSION_TYPE)
1121
+ );
1122
+ this.toolsContentContainer.appendChild(this.toolsListWidget.element);
1123
+ this.toolsDetailContainer = append(contentInner, $(".tools-detail-container"));
1124
+ this.createEmbeddedToolDetail();
1125
+ this.editorDisposables.add(this.toolsListWidget.onDidSelectExtension(extension => {
1126
+ this.showEmbeddedToolDetail(extension);
1127
+ }));
1128
+ }
1129
+ for (const section of this.workspaceService.managementSections) {
1130
+ if (!( aiCustomizationManagementSectionRegistry.has(section))) {
1131
+ continue;
1132
+ }
1133
+ const container = append(contentInner, $(".contributed-section-container"));
1134
+ this.contributedSectionContainers.set(section, container);
1135
+ }
1136
+ this.editorContentContainer = append(contentInner, $(".editor-content-container"));
1137
+ this.createEmbeddedEditor();
1138
+ this.updateContentVisibility();
1139
+ this.editorDisposables.add(this.listWidget.onDidChangeItemCount(count => {
1140
+ if (this.isPromptsSection(this.selectedSection)) {
1141
+ this.updateSectionCount(this.selectedSection, count);
1142
+ }
1143
+ }));
1144
+ if (this.mcpListWidget) {
1145
+ this.editorDisposables.add(this.mcpListWidget.onDidChangeItemCount(count => {
1146
+ this.updateSectionCount(AICustomizationManagementSection.McpServers, count);
1147
+ }));
1148
+ this.mcpListWidget.fireItemCount();
1149
+ }
1150
+ if (this.pluginListWidget) {
1151
+ this.editorDisposables.add(this.pluginListWidget.onDidChangeItemCount(count => {
1152
+ this.updateSectionCount(AICustomizationManagementSection.Plugins, count);
1153
+ }));
1154
+ this.pluginListWidget.fireItemCount();
1155
+ }
1156
+ if (this.modelsWidget) {
1157
+ this.editorDisposables.add(this.modelsWidget.onDidChangeItemCount(count => {
1158
+ this.updateSectionCount(AICustomizationManagementSection.Models, count);
1159
+ }));
1160
+ this.modelsWidget.fireItemCount();
1161
+ }
1162
+ if (this.toolsListWidget) {
1163
+ this.editorDisposables.add(this.toolsListWidget.onDidChangeItemCount(count => {
1164
+ this.updateSectionCount(AICustomizationManagementSection.Tools, count);
1165
+ }));
1166
+ this.toolsListWidget.fireItemCount();
1167
+ }
1168
+ for (const section of ITEMS_MODEL_SECTIONS) {
1169
+ const observable = this.itemsModel.getCount(section);
1170
+ this.editorDisposables.add(autorun(reader => {
1171
+ this.updateSectionCount(section, observable.read(reader));
1172
+ }));
1173
+ }
1174
+ if (this.isPromptsSection(this.selectedSection)) {
1175
+ void this.listWidget.setSection(this.selectedSection);
1176
+ }
1177
+ void this.refreshCustomizationMigrationInfo();
1178
+ }
1179
+ registerCustomizationMigrationSessionRefresh() {
1180
+ this.editorDisposables.add(autorun(reader => {
1181
+ this.harnessService.activeSessionResource.read(reader);
1182
+ this.workspaceService.activeProjectRoot.read(reader);
1183
+ this.activeMigrationStorage = undefined;
1184
+ this.migrationWorkspaceSkipped = this.getMigrationActivityState(PromptsStorage.local).skipped;
1185
+ this.migrationResult = undefined;
1186
+ void this.refreshCustomizationMigrationInfo();
1187
+ }));
1188
+ }
1189
+ refreshCustomizationMigrationInfoFromPromptChange() {
1190
+ if (!this.customizationMigrationWritesInProgress) {
1191
+ void this.refreshCustomizationMigrationInfo();
1192
+ }
1193
+ }
1194
+ refreshCustomizationMigrationInfoFromMcpChange() {
1195
+ if (!this.customizationMigrationWritesInProgress) {
1196
+ void this.refreshCustomizationMigrationInfo();
1197
+ }
1198
+ }
1199
+ async refreshCustomizationMigrationInfo() {
1200
+ const activeHarnessId = this.harnessService.activeHarness.get();
1201
+ const activeSessionResource = this.harnessService.activeSessionResource.get();
1202
+ const projectRoot = this.workspaceService.activeProjectRoot.get();
1203
+ const selectionContextKey = `${activeHarnessId}\n${( activeSessionResource.toString())}\n${projectRoot ? getComparisonKey(projectRoot) : ""}`;
1204
+ if (selectionContextKey !== this.migrationSelectionContextKey) {
1205
+ this.migrationSelectionContextKey = selectionContextKey;
1206
+ this.knownMcpServerMigrationItems.clear();
1207
+ this.selectedMcpServerMigrationItems.clear();
1208
+ this.selectedCustomizationMigrationTargets.clear();
1209
+ this.explicitlySelectedCustomizationMigrationTargets.clear();
1210
+ }
1211
+ const refreshSequence = ++this.customizationMigrationRefreshSequence;
1212
+ this.customizationMigrationLoading = true;
1213
+ this.customizationMigrationLoadError = undefined;
1214
+ this.renderCustomizationMigrationPage();
1215
+ if (!isAgentHostTarget(activeHarnessId)) {
1216
+ this.customizationMigrationLoading = false;
1217
+ this.setCustomizationsToMigrate(( new Map()), ( new Map()));
1218
+ return;
1219
+ }
1220
+ try {
1221
+ const enabledCategories = this.getEnabledMigrationCategories();
1222
+ if (enabledCategories.length === 0) {
1223
+ this.customizationMigrationLoading = false;
1224
+ this.setCustomizationsToMigrate(( new Map()), ( new Map()));
1225
+ return;
1226
+ }
1227
+ const migrationsByCategory = await Promise.all(( enabledCategories.map(async category => {
1228
+ let migration;
1229
+ switch (category.migrationType) {
1230
+ case CustomizationMigrationType.McpServers:
1231
+ migration = await this.customizationMigrationService.computeMigration(activeSessionResource, CustomizationMigrationType.McpServers);
1232
+ break;
1233
+ default:
1234
+ migration = await this.customizationMigrationService.computeMigration(activeSessionResource, category.migrationType);
1235
+ break;
1236
+ }
1237
+ return [category.id, migration];
1238
+ })));
1239
+ if (refreshSequence !== this.customizationMigrationRefreshSequence || activeHarnessId !== this.harnessService.activeHarness.get() || !isEqual(activeSessionResource, this.harnessService.activeSessionResource.get())) {
1240
+ return;
1241
+ }
1242
+ const candidatesByCategory = ( new Map(( migrationsByCategory.map(([categoryId, migration]) => [categoryId, migration.candidates]))));
1243
+ const provider = this.harnessService.findHarnessById(activeHarnessId)?.itemProvider;
1244
+ const targetTypes = ( new Set(( [...( candidatesByCategory.values())].flat().filter(candidate => !isMcpServerCustomizationMigrationCandidate(candidate)).map(getCustomizationMigrationTargetType))));
1245
+ const targetFolderEntries = await Promise.all(( [...targetTypes].map(async targetType => {
1246
+ const folders = await provider?.provideSourceFolders?.(activeSessionResource, targetType, CancellationToken.None);
1247
+ return [targetType, folders ?? []];
1248
+ })));
1249
+ if (refreshSequence !== this.customizationMigrationRefreshSequence || activeHarnessId !== this.harnessService.activeHarness.get() || !isEqual(activeSessionResource, this.harnessService.activeSessionResource.get())) {
1250
+ return;
1251
+ }
1252
+ const targetFoldersByType = ( new Map(targetFolderEntries));
1253
+ this.customizationMigrationLoading = false;
1254
+ this.setCustomizationsToMigrate(candidatesByCategory, targetFoldersByType);
1255
+ } catch (error) {
1256
+ if (refreshSequence === this.customizationMigrationRefreshSequence) {
1257
+ this.customizationMigrationLoading = false;
1258
+ this.customizationMigrationLoadError = getErrorMessage(error);
1259
+ this.renderCustomizationMigrationPage();
1260
+ }
1261
+ onUnexpectedError(error);
1262
+ }
1263
+ }
1264
+ setCustomizationsToMigrate(candidatesByCategory, targetFoldersByType) {
1265
+ const previousFileItems = this.createCustomizationMigrationItemMap(
1266
+ this.getAllMigrationCandidates().filter(candidate => !isMcpServerCustomizationMigrationCandidate(candidate))
1267
+ );
1268
+ const selectedItems = ( new ResourceMap());
1269
+ for (const customization of [...( candidatesByCategory.values())].flat()) {
1270
+ if (isMcpServerCustomizationMigrationCandidate(customization)) {
1271
+ const key = getMcpServerCustomizationMigrationCandidateKey(customization);
1272
+ if (!( this.knownMcpServerMigrationItems.has(key))) {
1273
+ this.knownMcpServerMigrationItems.add(key);
1274
+ this.selectedMcpServerMigrationItems.add(key);
1275
+ }
1276
+ } else if (!this.hasCustomizationMigrationItem(previousFileItems, customization) || this.isCustomizationSelectedForMigration(customization)) {
1277
+ this.addCustomizationMigrationItem(selectedItems, customization);
1278
+ }
1279
+ }
1280
+ this.selectedCustomizationMigrationItems = selectedItems;
1281
+ this.customizationsByMigrationCategory = candidatesByCategory;
1282
+ this.customizationMigrationTargetFoldersByType = targetFoldersByType;
1283
+ this.reconcileCustomizationMigrationTargets();
1284
+ this.refreshCustomizationMigrationUi();
1285
+ if (this.viewMode === "migration" && this.activeMigrationCategoryId !== undefined && !( candidatesByCategory.has(this.activeMigrationCategoryId))) {
1286
+ this.showWelcomePage();
1287
+ }
1288
+ }
1289
+ reconcileCustomizationMigrationTargets() {
1290
+ const requiredTargets = ( new Map());
1291
+ for (const customization of this.getAllMigrationCandidates()) {
1292
+ if (isMcpServerCustomizationMigrationCandidate(customization)) {
1293
+ continue;
1294
+ }
1295
+ const type = getCustomizationMigrationTargetType(customization);
1296
+ const key = this.getCustomizationMigrationTargetKey(type, customization.storage);
1297
+ requiredTargets.set(key, {
1298
+ type,
1299
+ storage: customization.storage
1300
+ });
1301
+ }
1302
+ for (const key of ( this.selectedCustomizationMigrationTargets.keys())) {
1303
+ if (!( requiredTargets.has(key))) {
1304
+ this.selectedCustomizationMigrationTargets.delete(key);
1305
+ this.explicitlySelectedCustomizationMigrationTargets.delete(key);
1306
+ }
1307
+ }
1308
+ for (const [key, target] of requiredTargets) {
1309
+ if (( this.selectedCustomizationMigrationTargets.has(key)) && ( this.explicitlySelectedCustomizationMigrationTargets.has(key))) {
1310
+ continue;
1311
+ }
1312
+ const folder = this.getCustomizationMigrationFolders(target.type, target.storage)[0];
1313
+ if (folder) {
1314
+ this.selectedCustomizationMigrationTargets.set(key, folder);
1315
+ } else {
1316
+ this.selectedCustomizationMigrationTargets.delete(key);
1317
+ }
1318
+ }
1319
+ }
1320
+ getCustomizationMigrationTargetKey(type, storage) {
1321
+ return `${type}:${storage}`;
1322
+ }
1323
+ createCustomizationMigrationItemMap(customizations) {
1324
+ const result = ( new ResourceMap());
1325
+ for (const customization of customizations) {
1326
+ this.addCustomizationMigrationItem(result, customization);
1327
+ }
1328
+ return result;
1329
+ }
1330
+ hasCustomizationMigrationItem(items, customization) {
1331
+ return items.get(customization.uri)?.has(customization.storage) === true;
1332
+ }
1333
+ addCustomizationMigrationItem(items, customization) {
1334
+ const storages = items.get(customization.uri) ?? ( new Set());
1335
+ storages.add(customization.storage);
1336
+ items.set(customization.uri, storages);
1337
+ }
1338
+ getCustomizationMigrationCandidateKey(customization) {
1339
+ return isMcpServerCustomizationMigrationCandidate(customization) ? `mcp:${getMcpServerCustomizationMigrationCandidateKey(customization)}` : `file:${customization.storage}:${( customization.uri.toString())}`;
1340
+ }
1341
+ isCustomizationSelectedForMigration(customization) {
1342
+ if (isMcpServerCustomizationMigrationCandidate(customization)) {
1343
+ return ( this.selectedMcpServerMigrationItems.has(getMcpServerCustomizationMigrationCandidateKey(customization)));
1344
+ }
1345
+ return this.hasCustomizationMigrationItem(this.selectedCustomizationMigrationItems, customization);
1346
+ }
1347
+ setCustomizationSelectedForMigration(customization, selected) {
1348
+ if (isMcpServerCustomizationMigrationCandidate(customization)) {
1349
+ const key = getMcpServerCustomizationMigrationCandidateKey(customization);
1350
+ if (selected) {
1351
+ this.selectedMcpServerMigrationItems.add(key);
1352
+ } else {
1353
+ this.selectedMcpServerMigrationItems.delete(key);
1354
+ }
1355
+ return;
1356
+ }
1357
+ if (selected) {
1358
+ this.addCustomizationMigrationItem(this.selectedCustomizationMigrationItems, customization);
1359
+ return;
1360
+ }
1361
+ const storages = this.selectedCustomizationMigrationItems.get(customization.uri);
1362
+ storages?.delete(customization.storage);
1363
+ if (storages?.size === 0) {
1364
+ this.selectedCustomizationMigrationItems.delete(customization.uri);
1365
+ }
1366
+ }
1367
+ getMigrationCandidates(category, storage) {
1368
+ if (!this.isMigrationCategoryEnabled(category)) {
1369
+ return [];
1370
+ }
1371
+ const candidates = this.customizationsByMigrationCategory.get(category.id) ?? [];
1372
+ return storage === undefined ? candidates : candidates.filter(candidate => this.getMigrationCandidateStorage(candidate) === storage);
1373
+ }
1374
+ getMigrationCandidateStorage(candidate) {
1375
+ return isMcpServerCustomizationMigrationCandidate(candidate) ? PromptsStorage.local : candidate.storage;
1376
+ }
1377
+ getAllMigrationCandidates() {
1378
+ return [...( this.customizationsByMigrationCategory.values())].flat();
1379
+ }
1380
+ getActiveMigrationCategory() {
1381
+ return this.activeMigrationCategoryId ? getCustomizationMigrationCategory(this.activeMigrationCategoryId) : undefined;
1382
+ }
1383
+ getDashboardFileMigrationCandidates() {
1384
+ return [
1385
+ CustomizationMigrationCategoryId.PromptFiles,
1386
+ CustomizationMigrationCategoryId.UserData
1387
+ ].flatMap(id => this.getMigrationCandidates(getCustomizationMigrationCategory(id))).filter(candidate => !isMcpServerCustomizationMigrationCandidate(candidate));
1388
+ }
1389
+ getMigrationCategorySummaries() {
1390
+ const harnessLabel = this.getActiveHarnessLabel();
1391
+ const summaries = [];
1392
+ for (const id of homepageMigrationCategories) {
1393
+ const category = getCustomizationMigrationCategory(id);
1394
+ const candidates = this.getMigrationCandidates(category).filter(
1395
+ candidate => !this.migrationWorkspaceSkipped || this.getMigrationCandidateStorage(candidate) !== PromptsStorage.local
1396
+ );
1397
+ if (candidates.length === 0) {
1398
+ continue;
1399
+ }
1400
+ summaries.push({
1401
+ id: category.id,
1402
+ label: category.cardLabel,
1403
+ description: category.getCardDescription(candidates, harnessLabel),
1404
+ actionLabel: category.cardActionLabel,
1405
+ actionAriaLabel: category.cardActionAriaLabel,
1406
+ count: candidates.length
1407
+ });
1408
+ }
1409
+ return summaries;
1410
+ }
1411
+ refreshCustomizationMigrationUi() {
1412
+ this.welcomePage?.setMigrationCategories(this.getMigrationCategorySummaries());
1413
+ this.updateSidebarMigrationShortcut();
1414
+ this.renderCustomizationMigrationPage();
1415
+ }
1416
+ updateSidebarMigrationShortcut() {
1417
+ if (!this.migrationShortcutContainer || !this.migrationShortcutButton || !this.migrationShortcutCount) {
1418
+ return;
1419
+ }
1420
+ const candidates = homepageMigrationCategories.flatMap(id => this.getMigrationCandidates(getCustomizationMigrationCategory(id)));
1421
+ const count = candidates.filter(
1422
+ candidate => !this.migrationWorkspaceSkipped || this.getMigrationCandidateStorage(candidate) !== PromptsStorage.local
1423
+ ).length;
1424
+ const enabled = isAgentHostTarget(this.harnessService.activeHarness.get()) && ( homepageMigrationCategories.some(
1425
+ id => this.isMigrationCategoryEnabled(getCustomizationMigrationCategory(id))
1426
+ ));
1427
+ this.migrationShortcutContainer.style.display = enabled ? "" : "none";
1428
+ this.migrationShortcutCount.textContent = count > 0 ? String(count) : "";
1429
+ this.migrationShortcutButton.setAttribute("aria-label", count === 1 ? ( localize(6433, "Migrations, 1 customization needs attention")) : ( localize(6434, "Migrations, {0} customizations need attention", count)));
1430
+ this.layoutSidebar(this.sidebarWidth, this.sidebarHeight);
1431
+ }
1432
+ async migrateSelectedCustomizations(category, customizations) {
1433
+ if (this.customizationMigrationInProgress || customizations.length === 0 || !this.isMigrationCategoryEnabled(category)) {
1434
+ return;
1435
+ }
1436
+ this.customizationMigrationInProgress = true;
1437
+ this.updateCustomizationMigrationActionState();
1438
+ try {
1439
+ const sessionResource = this.harnessService.activeSessionResource.get();
1440
+ const activityContexts = this.getMigrationActivityContexts();
1441
+ if (category.migrationType === CustomizationMigrationType.McpServers) {
1442
+ await this.migrateSelectedMcpServers(
1443
+ category,
1444
+ customizations.filter(isMcpServerCustomizationMigrationCandidate),
1445
+ sessionResource
1446
+ );
1447
+ return;
1448
+ }
1449
+ const files = customizations.filter(candidate => !isMcpServerCustomizationMigrationCandidate(candidate));
1450
+ const settingsToClear = this.getConfiguredLocationSettingsToClear(category, files);
1451
+ const targetFolders = await this.resolveCustomizationMigrationTargetFolders(files, this.customizationMigrationTargetFoldersByType, sessionResource);
1452
+ if (!targetFolders || !this.isCustomizationMigrationSessionActive(sessionResource)) {
1453
+ return;
1454
+ }
1455
+ const confirmation = category.getConfirmation(
1456
+ files,
1457
+ this.getActiveHarnessLabel(),
1458
+ this.getCustomizationMigrationDestinationLabel([...( targetFolders.values())].flatMap(folders => [...( folders.values())]))
1459
+ );
1460
+ const confirmed = await this.dialogService.confirm({
1461
+ type: "question",
1462
+ message: confirmation.message,
1463
+ detail: confirmation.detail,
1464
+ primaryButton: confirmation.primaryButton,
1465
+ ...(confirmation.deleteOriginalsLabel ? {
1466
+ checkbox: {
1467
+ label: confirmation.deleteOriginalsLabel,
1468
+ checked: true
1469
+ }
1470
+ } : {})
1471
+ });
1472
+ if (!confirmed.confirmed || !this.isCustomizationMigrationSessionActive(sessionResource)) {
1473
+ return;
1474
+ }
1475
+ const deleteOriginalFiles = confirmed.checkboxChecked !== false;
1476
+ this.migrationResult = undefined;
1477
+ const result = await this.runCustomizationMigration(files, targetFolders, deleteOriginalFiles);
1478
+ for (const context of activityContexts) {
1479
+ const items = result.migratedSources.flatMap((source, index) => {
1480
+ const target = result.migratedCustomizations[index];
1481
+ const file = files.find(file => file.storage === source.storage && isEqual(file.uri, source.uri));
1482
+ return source.storage === context.storage && target && file ? [{
1483
+ label: file.name ?? basename(source.uri),
1484
+ sourceLabel: this.labelService.getUriLabel(source.uri),
1485
+ targetLabel: this.labelService.getUriLabel(target.uri),
1486
+ operation: file.type === PromptsType.prompt ? "converted" : deleteOriginalFiles ? "moved" : "copied"
1487
+ }] : [];
1488
+ });
1489
+ this.recordMigrationActivity(category, context, items);
1490
+ }
1491
+ if (result.failedCustomizationFileNames.length > 0) {
1492
+ const displayedFileNames = result.failedCustomizationFileNames.slice(0, 3);
1493
+ this.notificationService.error(category.getFailedMessage(
1494
+ displayedFileNames,
1495
+ result.failedCustomizationFileNames.length - displayedFileNames.length
1496
+ ));
1497
+ }
1498
+ if (result.migratedCount === 0) {
1499
+ if (result.failedCustomizationFileNames.length === 0) {
1500
+ this.notificationService.warn(category.noFilesMigratedMessage);
1501
+ }
1502
+ return;
1503
+ }
1504
+ if (result.failedCustomizationFileNames.length === 0 && result.migratedCount === files.length && settingsToClear.length > 0) {
1505
+ try {
1506
+ await this.clearConfiguredLocationSettings(settingsToClear);
1507
+ } catch (error) {
1508
+ this.notificationService.error(( localize(
1509
+ 6435,
1510
+ "Customizations were migrated, but the custom location settings could not be cleared: {0}",
1511
+ getErrorMessage(error)
1512
+ )));
1513
+ }
1514
+ }
1515
+ if (deleteOriginalFiles) {
1516
+ await this.refreshCustomizationMigrationInfo();
1517
+ }
1518
+ const unsupportedKeys = result.unsupportedHeaderKeys.join(", ");
1519
+ this.notificationService.info(
1520
+ unsupportedKeys && category.getMigratedWithReviewMessage ? category.getMigratedWithReviewMessage(result.migratedCount, unsupportedKeys) : category.getMigratedMessage(result.migratedCount)
1521
+ );
1522
+ this.showCustomizationMigrationDashboard();
1523
+ } finally {
1524
+ this.customizationMigrationInProgress = false;
1525
+ this.updateCustomizationMigrationActionState();
1526
+ }
1527
+ }
1528
+ async migrateSelectedMcpServers(category, servers, sessionResource) {
1529
+ if (servers.length === 0) {
1530
+ return;
1531
+ }
1532
+ const context = this.getMigrationActivityContext(PromptsStorage.local);
1533
+ const confirmation = category.getConfirmation(servers, this.getActiveHarnessLabel());
1534
+ const confirmResult = await this.dialogService.confirm({
1535
+ type: "question",
1536
+ message: confirmation.message,
1537
+ detail: confirmation.detail,
1538
+ primaryButton: confirmation.primaryButton
1539
+ });
1540
+ if (!confirmResult.confirmed || !this.isCustomizationMigrationSessionActive(sessionResource)) {
1541
+ return;
1542
+ }
1543
+ this.customizationMigrationWritesInProgress = true;
1544
+ this.migrationResult = undefined;
1545
+ let result;
1546
+ try {
1547
+ result = await this.customizationMigrationService.migrateMcpServers(sessionResource, servers);
1548
+ } finally {
1549
+ await timeout(0);
1550
+ this.customizationMigrationWritesInProgress = false;
1551
+ }
1552
+ const migratedServers = servers.filter(server => !( result.failures.some(
1553
+ failure => failure.id === server.id && isEqual(failure.sourceUri, server.sourceUri)
1554
+ )));
1555
+ if (result.migratedCount > 0) {
1556
+ this.recordMigrationActivity(category, context, ( migratedServers.map(server => ({
1557
+ label: server.name,
1558
+ sourceLabel: this.labelService.getUriLabel(server.sourceUri),
1559
+ targetLabel: this.labelService.getUriLabel(server.targetUri),
1560
+ operation: "server"
1561
+ }))));
1562
+ }
1563
+ await this.refreshCustomizationMigrationInfo();
1564
+ for (const failure of result.failures) {
1565
+ if (failure.error) {
1566
+ onUnexpectedError(failure.error);
1567
+ }
1568
+ }
1569
+ if (result.failures.length > 0) {
1570
+ const message = category.getMcpServerFailureMessage?.(result.failures) ?? category.getFailedMessage(( result.failures.slice(0, 3).map(failure => failure.name)), Math.max(0, result.failures.length - 3));
1571
+ this.notificationService.error(message);
1572
+ }
1573
+ if (result.migratedCount > 0) {
1574
+ this.notificationService.info(category.getMigratedMessage(result.migratedCount));
1575
+ this.showCustomizationMigrationDashboard();
1576
+ } else if (result.failures.length === 0) {
1577
+ this.notificationService.warn(category.noFilesMigratedMessage);
1578
+ }
1579
+ }
1580
+ getConfiguredLocationSettingsToClear(category, customizations) {
1581
+ if (category.id !== CustomizationMigrationCategoryId.ConfiguredLocations || !this.migrationClearSettingsCheckbox?.checked) {
1582
+ return [];
1583
+ }
1584
+ const selectedCustomizations = this.createCustomizationMigrationItemMap(customizations);
1585
+ const remainingCustomizations = this.getMigrationCandidates(category).filter(
1586
+ customization => !isMcpServerCustomizationMigrationCandidate(customization)
1587
+ ).filter(
1588
+ customization => !this.hasCustomizationMigrationItem(selectedCustomizations, customization)
1589
+ );
1590
+ return this.getModifiedConfiguredLocationSettingIds(category).filter(settingId => ( customizations.some(
1591
+ customization => this.configuredLocationSettingAppliesTo(settingId, customization)
1592
+ )) && !( remainingCustomizations.some(
1593
+ customization => this.configuredLocationSettingAppliesTo(settingId, customization)
1594
+ )));
1595
+ }
1596
+ getModifiedConfiguredLocationSettingIds(category) {
1597
+ return category.getModifiedSettingIds?.(this.configurationService) ?? [];
1598
+ }
1599
+ configuredLocationSettingAppliesTo(settingId, customization) {
1600
+ switch (settingId) {
1601
+ case PromptsConfig.AGENTS_LOCATION_KEY:
1602
+ case PromptsConfig.MODE_LOCATION_KEY:
1603
+ return customization.type === PromptsType.agent;
1604
+ case PromptsConfig.INSTRUCTIONS_LOCATION_KEY:
1605
+ return customization.type === PromptsType.instructions;
1606
+ case PromptsConfig.SKILLS_LOCATION_KEY:
1607
+ return customization.type === PromptsType.skill;
1608
+ default:
1609
+ return false;
1610
+ }
1611
+ }
1612
+ async clearConfiguredLocationSettings(settingIds) {
1613
+ for (const settingId of settingIds) {
1614
+ await this.configurationService.updateValue(settingId, undefined);
1615
+ }
1616
+ }
1617
+ async runCustomizationMigration(customizations, targetFolders, deleteOriginalFiles) {
1618
+ this.customizationMigrationWritesInProgress = true;
1619
+ try {
1620
+ return await migrateCustomizations(customizations, targetFolders, this.fileService, onUnexpectedError, {
1621
+ deleteOriginalFiles
1622
+ });
1623
+ } finally {
1624
+ await timeout(0);
1625
+ this.customizationMigrationWritesInProgress = false;
1626
+ }
1627
+ }
1628
+ renderCustomizationMigrationPage() {
1629
+ if (!this.migrationListContainer) {
1630
+ return;
1631
+ }
1632
+ const category = this.getActiveMigrationCategory();
1633
+ this.migrationContentContainer?.classList.toggle("showing-dashboard", !category);
1634
+ if (this.migrationDashboardScrollable) {
1635
+ this.migrationDashboardScrollable.getDomNode().style.display = category ? "none" : "";
1636
+ }
1637
+ if (this.migrationDashboardContainer) {
1638
+ this.migrationDashboardContainer.style.display = category ? "none" : "";
1639
+ }
1640
+ if (this.migrationListScrollable) {
1641
+ this.migrationListScrollable.getDomNode().style.display = category ? "" : "none";
1642
+ }
1643
+ if (this.migrationHeader) {
1644
+ this.migrationHeader.style.display = category ? "" : "none";
1645
+ }
1646
+ if (this.migrationFooter) {
1647
+ this.migrationFooter.style.display = category ? "" : "none";
1648
+ }
1649
+ if (!category) {
1650
+ this.renderCustomizationMigrationBanner(undefined);
1651
+ this.renderCustomizationMigrationDashboardState();
1652
+ return;
1653
+ }
1654
+ const targetDocument = getWindow(this.migrationListContainer).document;
1655
+ const activeElement = targetDocument.activeElement;
1656
+ const capturedFocusState = this.captureCustomizationMigrationFocus();
1657
+ if (capturedFocusState) {
1658
+ this.migrationFocusState = capturedFocusState;
1659
+ } else if (isHTMLElement(activeElement) && activeElement.isConnected && activeElement !== targetDocument.body) {
1660
+ this.migrationFocusState = undefined;
1661
+ }
1662
+ for (const section of this.migrationSectionLists) {
1663
+ this.migrationSectionScrollPositions?.set(section.key, section.list.scrollTop);
1664
+ }
1665
+ this.migrationPageDisposables.clear();
1666
+ clearNode(this.migrationListContainer);
1667
+ this.migrationClearSettingsContainer = undefined;
1668
+ this.migrationFirstFocusableElement = undefined;
1669
+ this.migrationSectionLists = [];
1670
+ const candidates = this.getMigrationCandidates(category, this.activeMigrationStorage);
1671
+ this.updateCustomizationMigrationPageHeader(category, candidates);
1672
+ this.updateCustomizationMigrationActionState();
1673
+ if (this.customizationMigrationLoading) {
1674
+ this.renderCustomizationMigrationState(( localize(6436, "Loading customizations...")), ( localize(6437, "Checking the active harness and available destinations.")));
1675
+ if (this.migrationMigrateButton) {
1676
+ this.migrationMigrateButton.enabled = false;
1677
+ }
1678
+ this.migrationListScrollable?.scanDomNode();
1679
+ return;
1680
+ }
1681
+ if (this.customizationMigrationLoadError) {
1682
+ this.renderCustomizationMigrationState(( localize(6438, "Customizations could not be loaded")), ( localize(6439, "Check the active agent connection, then try again.")), () => void this.refreshCustomizationMigrationInfo());
1683
+ if (this.migrationMigrateButton) {
1684
+ this.migrationMigrateButton.enabled = false;
1685
+ }
1686
+ return;
1687
+ }
1688
+ if (candidates.length === 0) {
1689
+ this.renderCustomizationMigrationState(
1690
+ category.pageEmptyMessage,
1691
+ category.getPageDescription(candidates, this.getActiveHarnessLabel())
1692
+ );
1693
+ return;
1694
+ }
1695
+ const renderGroup = (groupKey, groupLabel, customizations) => {
1696
+ const group = append(this.migrationListContainer, $(".prompt-migration-group"));
1697
+ const groupHeader = append(group, $(".prompt-migration-group-header"));
1698
+ const groupHeading = append(groupHeader, $(".prompt-migration-group-heading"));
1699
+ const label = append(groupHeading, $("h3.prompt-migration-group-title"));
1700
+ label.textContent = groupLabel;
1701
+ if (customizations.length === 0) {
1702
+ const count = append(groupHeading, $("span.prompt-migration-group-count"));
1703
+ count.textContent = "0";
1704
+ const emptyItems = append(group, $(".prompt-migration-group-items"));
1705
+ append(emptyItems, $(".plugin-inventory-empty.prompt-migration-group-empty")).textContent = ( localize(6440, "No customizations are available to migrate from {0}.", groupLabel));
1706
+ return;
1707
+ }
1708
+ const selectedInGroup = customizations.filter(customization => this.isCustomizationSelectedForMigration(customization)).length;
1709
+ const initialGroupState = selectedInGroup === customizations.length ? true : selectedInGroup === 0 ? false : "mixed";
1710
+ const groupCheckboxAriaLabel = ( localize(6441, "Select all customizations in {0}", groupLabel));
1711
+ const groupCheckbox = this.migrationPageDisposables.add(( new TriStateCheckbox(groupCheckboxAriaLabel, initialGroupState, defaultCheckboxStyles)));
1712
+ const count = append(groupHeading, $("span.prompt-migration-group-count"));
1713
+ count.textContent = String(customizations.length);
1714
+ const groupControls = append(groupHeader, $(".prompt-migration-group-controls"));
1715
+ const groupCheckboxContainer = append(groupControls, $(".item-sync-checkbox.prompt-migration-group-checkbox"));
1716
+ groupCheckboxContainer.replaceChildren(groupCheckbox.domNode);
1717
+ this.migrationFirstFocusableElement ??= groupCheckbox.domNode;
1718
+ const selectAllLabel = append(groupControls, $("span.prompt-migration-select-all-label"));
1719
+ selectAllLabel.textContent = ( localize(6442, "Select all"));
1720
+ const setGroupCheckboxState = state => {
1721
+ groupCheckbox.checked = state;
1722
+ groupCheckbox.domNode.setAttribute("aria-checked", String(state));
1723
+ };
1724
+ setGroupCheckboxState(initialGroupState);
1725
+ const updateGroupCheckboxState = () => {
1726
+ const selectedCount = customizations.filter(customization => this.isCustomizationSelectedForMigration(customization)).length;
1727
+ setGroupCheckboxState(
1728
+ selectedCount === customizations.length ? true : selectedCount === 0 ? false : "mixed"
1729
+ );
1730
+ };
1731
+ const groupId = `prompt-migration-group-${category.id}-${groupKey}`;
1732
+ const groupItems = append(group, $(".prompt-migration-group-items.virtualized-section-list"));
1733
+ groupItems.id = `${groupId}-items`;
1734
+ const sectionKey = `${category.id}:${groupKey}`;
1735
+ const section = this.createMigrationSectionList(
1736
+ groupItems,
1737
+ sectionKey,
1738
+ groupLabel,
1739
+ customizations,
1740
+ updateGroupCheckboxState
1741
+ );
1742
+ const setGroupSelection = selected => {
1743
+ for (const customization of customizations) {
1744
+ this.setCustomizationSelectedForMigration(customization, selected);
1745
+ }
1746
+ this.updateCustomizationMigrationActionState();
1747
+ section.renderer.refreshSelectionState();
1748
+ };
1749
+ this.migrationPageDisposables.add(
1750
+ groupCheckbox.onChange(() => setGroupSelection(groupCheckbox.checked === true))
1751
+ );
1752
+ this.migrationPageDisposables.add(addDisposableListener(selectAllLabel, "click", e => {
1753
+ EventHelper.stop(e, true);
1754
+ const selected = groupCheckbox.checked !== true;
1755
+ setGroupCheckboxState(selected);
1756
+ setGroupSelection(selected);
1757
+ groupCheckbox.focus();
1758
+ }));
1759
+ };
1760
+ const groups = category.group(candidates).filter(
1761
+ group => this.activeMigrationStorage === undefined || group.customizations.length > 0
1762
+ );
1763
+ const groupedCandidates = ( new Set());
1764
+ for (const group of groups) {
1765
+ for (const customization of group.customizations) {
1766
+ groupedCandidates.add(this.getCustomizationMigrationCandidateKey(customization));
1767
+ }
1768
+ renderGroup(group.key, group.label, group.customizations);
1769
+ }
1770
+ const ungroupedCandidates = candidates.filter(candidate => !( groupedCandidates.has(this.getCustomizationMigrationCandidateKey(candidate))));
1771
+ if (ungroupedCandidates.length > 0) {
1772
+ const ungroupedItems = append(
1773
+ this.migrationListContainer,
1774
+ $(".prompt-migration-group-items.virtualized-section-list")
1775
+ );
1776
+ this.createMigrationSectionList(
1777
+ ungroupedItems,
1778
+ `${category.id}:ungrouped`,
1779
+ category.pageTitle,
1780
+ ungroupedCandidates
1781
+ );
1782
+ }
1783
+ if (category.id === CustomizationMigrationCategoryId.ConfiguredLocations) {
1784
+ this.renderConfiguredLocationSettingsGroup();
1785
+ }
1786
+ this.updateCustomizationMigrationActionState();
1787
+ this.restoreCustomizationMigrationFocus();
1788
+ this.scheduleMigrationSectionLayout();
1789
+ }
1790
+ captureCustomizationMigrationFocus() {
1791
+ const activeElement = this.migrationListContainer ? getWindow(this.migrationListContainer).document.activeElement : undefined;
1792
+ if (!isHTMLElement(activeElement)) {
1793
+ return undefined;
1794
+ }
1795
+ for (const section of this.migrationSectionLists) {
1796
+ const index = section.renderer.getIndex(activeElement);
1797
+ if (index === undefined) {
1798
+ continue;
1799
+ }
1800
+ const candidate = section.items[index];
1801
+ if (candidate) {
1802
+ const controls = section.renderer.getControls(index);
1803
+ const controlIndex = controls.findIndex(control => control === activeElement || control.contains(activeElement));
1804
+ return {
1805
+ candidateKey: this.getCustomizationMigrationCandidateKey(candidate),
1806
+ controlIndex: Math.max(0, controlIndex)
1807
+ };
1808
+ }
1809
+ }
1810
+ return undefined;
1811
+ }
1812
+ restoreCustomizationMigrationFocus() {
1813
+ const focusState = this.migrationFocusState;
1814
+ if (!focusState) {
1815
+ return;
1816
+ }
1817
+ this.migrationFocusState = undefined;
1818
+ for (const section of this.migrationSectionLists) {
1819
+ const index = section.items.findIndex(
1820
+ candidate => this.getCustomizationMigrationCandidateKey(candidate) === focusState.candidateKey
1821
+ );
1822
+ if (index < 0) {
1823
+ continue;
1824
+ }
1825
+ section.list.setFocus([index]);
1826
+ section.list.reveal(index);
1827
+ section.renderer.getControls(index)[focusState.controlIndex]?.focus();
1828
+ return;
1829
+ }
1830
+ }
1831
+ renderConfiguredLocationSettingsGroup() {
1832
+ if (!this.migrationListContainer || !this.migrationClearSettingsCheckbox) {
1833
+ return;
1834
+ }
1835
+ const group = append(
1836
+ this.migrationListContainer,
1837
+ $(".prompt-migration-group.prompt-migration-settings-group")
1838
+ );
1839
+ const groupHeader = append(group, $(".prompt-migration-group-header"));
1840
+ const groupHeading = append(groupHeader, $(".prompt-migration-group-heading"));
1841
+ const settingsGroupLabel = ( localize(6443, "Settings"));
1842
+ append(groupHeading, $("h3.prompt-migration-group-title")).textContent = settingsGroupLabel;
1843
+ const groupItems = append(group, $(".prompt-migration-group-items"));
1844
+ const item = this.migrationClearSettingsContainer = append(groupItems, $(".prompt-migration-settings-item"));
1845
+ const checkboxContainer = append(item, $(".item-sync-checkbox.prompt-migration-checkbox"));
1846
+ checkboxContainer.replaceChildren(this.migrationClearSettingsCheckbox.domNode);
1847
+ const itemText = append(item, $("span.prompt-migration-settings-item-text"));
1848
+ const label = append(itemText, $("span.prompt-migration-settings-item-label"));
1849
+ label.textContent = ( localize(6444, "Clear unused location settings"));
1850
+ const description = append(itemText, $("span.prompt-migration-settings-item-description"));
1851
+ description.textContent = ( localize(
1852
+ 6445,
1853
+ "Remove deprecated settings that are no longer needed after the selected customizations migrate successfully."
1854
+ ));
1855
+ this.migrationPageDisposables.add(addDisposableListener(itemText, "click", () => {
1856
+ if (!this.migrationClearSettingsCheckbox?.enabled) {
1857
+ return;
1858
+ }
1859
+ this.migrationClearSettingsCheckbox.checked = !this.migrationClearSettingsCheckbox.checked;
1860
+ this.migrationClearSettingsCheckbox.focus();
1861
+ }));
1862
+ }
1863
+ createMigrationSectionList(container, key, label, items, onSelectionChange) {
1864
+ container.style.height = `${MIGRATION_ITEM_HEIGHT}px`;
1865
+ const category = this.getActiveMigrationCategory() ?? CUSTOMIZATION_MIGRATION_CATEGORIES[0];
1866
+ const renderer = ( new MigrationItemRenderer(
1867
+ customization => this.isCustomizationSelectedForMigration(customization),
1868
+ customization => category.getCandidatePresentation(customization, uri => this.labelService.getUriLabel(uri, {
1869
+ relative: true
1870
+ })),
1871
+ (customization, selected) => {
1872
+ this.setCustomizationSelectedForMigration(customization, selected);
1873
+ this.updateCustomizationMigrationActionState();
1874
+ onSelectionChange?.();
1875
+ },
1876
+ customization => {
1877
+ const isWorkspaceFile = customization.storage === PromptsStorage.local;
1878
+ void this.showEmbeddedEditor(
1879
+ customization.uri,
1880
+ customization.name ?? basename(customization.uri),
1881
+ customization.type,
1882
+ customization.storage,
1883
+ isWorkspaceFile
1884
+ );
1885
+ },
1886
+ (customization, anchor) => this.showCustomizationMigrationItemActions(customization, anchor),
1887
+ element => this.migrationFirstFocusableElement ??= element,
1888
+ this.hoverService
1889
+ ));
1890
+ const list = this.migrationPageDisposables.add(this.instantiationService.createInstance(
1891
+ WorkbenchList,
1892
+ `CustomizationMigration.${label}`,
1893
+ container,
1894
+ ( new MigrationItemDelegate()),
1895
+ [renderer],
1896
+ {
1897
+ multipleSelectionSupport: false,
1898
+ horizontalScrolling: false,
1899
+ accessibilityProvider: {
1900
+ getWidgetAriaLabel: () => label,
1901
+ getAriaLabel: customization => {
1902
+ const presentation = category.getCandidatePresentation(customization, uri => this.labelService.getUriLabel(uri, {
1903
+ relative: true
1904
+ }));
1905
+ return localize(6446, "{0}, {1}", presentation.name, presentation.pathLabel);
1906
+ },
1907
+ getSetSize: (_element, _index, listLength) => listLength,
1908
+ getPosInSet: (_element, index) => index + 1
1909
+ },
1910
+ identityProvider: {
1911
+ getId: customization => this.getCustomizationMigrationCandidateKey(customization)
1912
+ }
1913
+ }
1914
+ ));
1915
+ list.splice(0, 0, items);
1916
+ list.scrollTop = this.migrationSectionScrollPositions?.get(key) ?? 0;
1917
+ this.migrationPageDisposables.add(list.onDidChangeSelection(event => {
1918
+ if (event.indexes.length > 0) {
1919
+ list.setSelection([]);
1920
+ }
1921
+ }));
1922
+ this.migrationPageDisposables.add(
1923
+ addStandardDisposableListener(container, EventType.KEY_DOWN, event => {
1924
+ if (event.keyCode !== KeyCode.Tab) {
1925
+ return;
1926
+ }
1927
+ const target = event.target;
1928
+ if (!isHTMLElement(target)) {
1929
+ return;
1930
+ }
1931
+ const index = renderer.getIndex(target);
1932
+ if (index === undefined) {
1933
+ return;
1934
+ }
1935
+ const controls = renderer.getControls(index);
1936
+ const controlIndex = controls.findIndex(control => control === target || control.contains(target));
1937
+ const targetIndex = event.shiftKey ? index - 1 : index + 1;
1938
+ const crossesRowBoundary = event.shiftKey ? controlIndex === 0 : controlIndex === controls.length - 1;
1939
+ if (!crossesRowBoundary || targetIndex < 0 || targetIndex >= items.length) {
1940
+ return;
1941
+ }
1942
+ event.preventDefault();
1943
+ event.stopPropagation();
1944
+ list.setFocus([targetIndex]);
1945
+ list.reveal(targetIndex);
1946
+ const targetControls = renderer.getControls(targetIndex);
1947
+ targetControls[event.shiftKey ? targetControls.length - 1 : 0]?.focus();
1948
+ })
1949
+ );
1950
+ const section = {
1951
+ list,
1952
+ renderer,
1953
+ container,
1954
+ items,
1955
+ key
1956
+ };
1957
+ this.migrationSectionLists.push(section);
1958
+ return section;
1959
+ }
1960
+ showCustomizationMigrationItemActions(customization, anchor) {
1961
+ const actions = ( new DisposableStore());
1962
+ const deleteAction = actions.add(( new Action("customizationMigration.delete", ( localize(6447, "Delete")), ThemeIcon.asClassName(Codicon.trash), true, () => this.deleteCustomizationFile(customization))));
1963
+ this.contextMenuService.showContextMenu({
1964
+ getAnchor: () => anchor,
1965
+ getActions: () => [deleteAction],
1966
+ onHide: () => actions.dispose()
1967
+ });
1968
+ }
1969
+ layoutMigrationSectionLists() {
1970
+ if (!this.migrationListContainer) {
1971
+ return;
1972
+ }
1973
+ const heights = layoutVirtualizedSections(this.migrationListContainer, ( this.migrationSectionLists.map(section => ({
1974
+ container: section.container,
1975
+ contentHeight: section.items.length * MIGRATION_ITEM_HEIGHT,
1976
+ minimumHeight: getVirtualizedSectionMinimumHeight(section.items, () => MIGRATION_ITEM_HEIGHT)
1977
+ }))));
1978
+ for (let index = 0; index < this.migrationSectionLists.length; index++) {
1979
+ const section = this.migrationSectionLists[index];
1980
+ const height = heights[index];
1981
+ layoutVirtualizedSectionList(
1982
+ section.list,
1983
+ section.container,
1984
+ height,
1985
+ section.container.clientWidth || undefined
1986
+ );
1987
+ }
1988
+ }
1989
+ scheduleMigrationSectionLayout() {
1990
+ this.migrationDashboardScrollable?.scanDomNode();
1991
+ if (this.migrationContentContainer?.style.display === "none") {
1992
+ this.pendingMigrationLayout?.clear();
1993
+ return;
1994
+ }
1995
+ if (!this.pendingMigrationLayout) {
1996
+ this.layoutMigrationSectionLists();
1997
+ this.migrationListScrollable?.scanDomNode();
1998
+ return;
1999
+ }
2000
+ if (!this.migrationListContainer) {
2001
+ this.pendingMigrationLayout.clear();
2002
+ return;
2003
+ }
2004
+ this.pendingMigrationLayout.value = scheduleAtNextAnimationFrame(getWindow(this.migrationListContainer), () => {
2005
+ this.layoutMigrationSectionLists();
2006
+ this.migrationListScrollable?.scanDomNode();
2007
+ });
2008
+ }
2009
+ renderCustomizationMigrationDashboardState() {
2010
+ if (!this.migrationDashboard) {
2011
+ return;
2012
+ }
2013
+ if (this.customizationMigrationLoading) {
2014
+ this.migrationDashboard.showLoading(( localize(6436, "Loading customizations...")), ( localize(6437, "Checking the active harness and available destinations.")));
2015
+ return;
2016
+ }
2017
+ if (this.customizationMigrationLoadError) {
2018
+ this.migrationDashboard.showLoading(( localize(6438, "Customizations could not be loaded")), ( localize(6439, "Check the active agent connection, then try again.")), () => void this.refreshCustomizationMigrationInfo());
2019
+ this.migrationListScrollable?.scanDomNode();
2020
+ return;
2021
+ }
2022
+ this.renderCustomizationMigrationDashboard();
2023
+ }
2024
+ renderCustomizationMigrationDashboard() {
2025
+ if (!this.migrationDashboard) {
2026
+ return;
2027
+ }
2028
+ this.migrationDashboard.showOverview(this.getCustomizationMigrationDashboardOverview());
2029
+ this.migrationDashboardScrollable?.scanDomNode();
2030
+ this.migrationListScrollable?.scanDomNode();
2031
+ }
2032
+ getMigrationAccessibilityContent() {
2033
+ if (this.viewMode !== "migration" || this.activeMigrationCategoryId || !this.migrationDashboard || !isAncestorOfActiveElement(this.migrationDashboard.element)) {
2034
+ return undefined;
2035
+ }
2036
+ const overview = this.getCustomizationMigrationDashboardOverview();
2037
+ return [( localize(6448, "Your migration checklist")), ...( overview.scopes.map(scope => [scope.label, scope.skipped ? ( localize(6449, "Skipped")) : scope.count === 0 ? ( localize(6450, "No remaining migrations.")) : "", ...(scope.skipped ? [] : ( scope.categories.map(category => ( localize(
2038
+ 6451,
2039
+ "{0}: {1}. {2}{3}",
2040
+ category.label,
2041
+ category.countLabel,
2042
+ category.highRisk ? ( localize(6452, "High risk. ")) : "",
2043
+ category.description
2044
+ )))))].filter(Boolean).join("\n"))), ...( overview.activity.map(entry => [( localize(
2045
+ 6453,
2046
+ "Migration activity: {0}, {1}",
2047
+ entry.categoryLabel,
2048
+ entry.scopeLabel
2049
+ )), ...( entry.items.map(item => ( localize(
2050
+ 6454,
2051
+ "{0}: from {1} to {2}",
2052
+ item.label,
2053
+ item.sourceLabel,
2054
+ item.targetLabel
2055
+ ))))].join("\n")))].join("\n\n");
2056
+ }
2057
+ getCustomizationMigrationDashboardOverview() {
2058
+ const storages = [PromptsStorage.user];
2059
+ if (this.workspaceService.activeProjectRoot.get()) {
2060
+ storages.push(PromptsStorage.local);
2061
+ }
2062
+ const scopes = ( storages.map(storage => {
2063
+ const categories = homepageMigrationCategories.flatMap(id => {
2064
+ const candidates = this.getMigrationCandidates(getCustomizationMigrationCategory(id), storage);
2065
+ return candidates.length ? [this.getHomepageMigrationCategory(id, candidates)] : [];
2066
+ });
2067
+ return {
2068
+ storage,
2069
+ label: this.getMigrationScopeLabel(storage),
2070
+ count: categories.reduce((count, category) => count + category.count, 0),
2071
+ skipped: storage === PromptsStorage.local && this.migrationWorkspaceSkipped,
2072
+ started: this.getMigrationActivityState(storage).started === true,
2073
+ hasConfigurableDestinations: ( categories.some(category => category.id !== CustomizationMigrationCategoryId.McpServers)),
2074
+ categories
2075
+ };
2076
+ }));
2077
+ return {
2078
+ scopes,
2079
+ activity: storages.flatMap(storage => this.getMigrationActivityState(storage).activity).sort((a, b) => b.id.localeCompare(a.id)),
2080
+ result: this.migrationResult
2081
+ };
2082
+ }
2083
+ getHomepageMigrationCategory(id, candidates) {
2084
+ const count = candidates.length;
2085
+ switch (id) {
2086
+ case CustomizationMigrationCategoryId.PromptFiles:
2087
+ return {
2088
+ id,
2089
+ count,
2090
+ label: ( localize(6455, "Prompts to skills")),
2091
+ description: ( localize(
2092
+ 6456,
2093
+ "Convert reusable prompt files into skills so agents can discover and run them as supported customizations."
2094
+ )),
2095
+ countLabel: count === 1 ? ( localize(6457, "1 prompt")) : ( localize(6458, "{0} prompts", count)),
2096
+ highRisk: true
2097
+ };
2098
+ case CustomizationMigrationCategoryId.McpServers:
2099
+ return {
2100
+ id,
2101
+ count,
2102
+ label: ( localize(6459, "MCP Servers")),
2103
+ description: ( localize(
2104
+ 6460,
2105
+ "Move supported workspace servers to the root .mcp.json so agents can discover them directly."
2106
+ )),
2107
+ countLabel: count === 1 ? ( localize(6461, "1 server")) : ( localize(6462, "{0} servers", count))
2108
+ };
2109
+ case CustomizationMigrationCategoryId.UserData:
2110
+ {
2111
+ const agents = candidates.filter(candidate => candidate.type === PromptsType.agent).length;
2112
+ const instructions = candidates.filter(candidate => candidate.type === PromptsType.instructions).length;
2113
+ const counts = [];
2114
+ if (agents) {
2115
+ counts.push(agents === 1 ? ( localize(6463, "1 agent")) : ( localize(6464, "{0} agents", agents)));
2116
+ }
2117
+ if (instructions) {
2118
+ counts.push(instructions === 1 ? ( localize(6465, "1 instruction")) : ( localize(6466, "{0} instructions", instructions)));
2119
+ }
2120
+ return {
2121
+ id,
2122
+ count,
2123
+ label: ( localize(6467, "User Data")),
2124
+ description: ( localize(
2125
+ 6468,
2126
+ "Move agents and instructions to shared locations so they remain available to supported agent experiences."
2127
+ )),
2128
+ countLabel: counts.join(" · ")
2129
+ };
2130
+ }
2131
+ default:
2132
+ throw ( new Error(`Unsupported migration checklist category: ${id}`));
2133
+ }
2134
+ }
2135
+ getMigrationScopeLabel(storage) {
2136
+ return storage === PromptsStorage.user ? ( localize(6469, "Your profile")) : this.workspaceService.activeProjectLabel.get() || ( localize(6470, "Workspace"));
2137
+ }
2138
+ getMigrationActivityKey(storage) {
2139
+ const project = this.workspaceService.activeProjectRoot.get();
2140
+ return storage === PromptsStorage.user ? `chat.customizationMigration.activity.profile.${this.harnessService.activeHarness.get()}` : `chat.customizationMigration.activity.workspace.${project ? getComparisonKey(project) : ""}.${this.harnessService.activeHarness.get()}`;
2141
+ }
2142
+ getMigrationActivityState(storage) {
2143
+ return this.storageService.getObject(this.getMigrationActivityKey(storage), StorageScope.PROFILE, {
2144
+ activity: [],
2145
+ skipped: false
2146
+ });
2147
+ }
2148
+ getMigrationActivityContexts() {
2149
+ return ( [PromptsStorage.user, PromptsStorage.local].map(storage => this.getMigrationActivityContext(storage)));
2150
+ }
2151
+ getMigrationActivityContext(storage) {
2152
+ return {
2153
+ storage,
2154
+ key: this.getMigrationActivityKey(storage),
2155
+ label: this.getMigrationScopeLabel(storage)
2156
+ };
2157
+ }
2158
+ recordMigrationActivity(category, context, items) {
2159
+ if (!items.length || !( homepageMigrationCategories.some(id => id === category.id))) {
2160
+ return;
2161
+ }
2162
+ const state = this.storageService.getObject(context.key, StorageScope.PROFILE, {
2163
+ activity: [],
2164
+ skipped: false
2165
+ });
2166
+ const entry = {
2167
+ id: `${Date.now()}-${generateUuid()}`,
2168
+ categoryLabel: this.getHomepageMigrationCategory(category.id, []).label,
2169
+ scopeLabel: context.label,
2170
+ storage: context.storage,
2171
+ items
2172
+ };
2173
+ this.storageService.store(context.key, {
2174
+ ...state,
2175
+ started: true,
2176
+ activity: [entry, ...state.activity]
2177
+ }, StorageScope.PROFILE, StorageTarget.MACHINE);
2178
+ if (context.key === this.getMigrationActivityKey(context.storage)) {
2179
+ this.migrationResult = {
2180
+ migratedCount: (this.migrationResult?.migratedCount ?? 0) + items.length
2181
+ };
2182
+ }
2183
+ }
2184
+ storeMigrationActivityState(storage, state) {
2185
+ this.storageService.store(
2186
+ this.getMigrationActivityKey(storage),
2187
+ state,
2188
+ StorageScope.PROFILE,
2189
+ StorageTarget.MACHINE
2190
+ );
2191
+ }
2192
+ getCustomizationMigrationDashboardDestinations(customizations) {
2193
+ const destinations = ( new Map());
2194
+ for (const customization of customizations) {
2195
+ const targetType = getCustomizationMigrationTargetType(customization);
2196
+ const key = this.getCustomizationMigrationTargetKey(targetType, customization.storage);
2197
+ if (( destinations.has(key))) {
2198
+ continue;
2199
+ }
2200
+ const folder = this.selectedCustomizationMigrationTargets.get(key);
2201
+ const contextLabel = this.getCustomizationMigrationDestinationContextLabel(targetType, customization.storage);
2202
+ if (!folder) {
2203
+ const label = ( localize(6471, "Not configured"));
2204
+ destinations.set(key, {
2205
+ targetType,
2206
+ storage: customization.storage,
2207
+ contextLabel,
2208
+ label,
2209
+ ariaLabel: ( localize(6472, "Configure destination for {0}", contextLabel))
2210
+ });
2211
+ continue;
2212
+ }
2213
+ const folderLabel = this.getCustomizationMigrationFolderLabel(folder);
2214
+ destinations.set(key, {
2215
+ targetType,
2216
+ storage: customization.storage,
2217
+ contextLabel,
2218
+ label: folderLabel,
2219
+ ariaLabel: ( localize(
2220
+ 6473,
2221
+ "Change destination for {0}, currently {1}",
2222
+ contextLabel,
2223
+ folderLabel
2224
+ ))
2225
+ });
2226
+ }
2227
+ return [...( destinations.values())];
2228
+ }
2229
+ async configureCustomizationMigrationLocations(storage) {
2230
+ const sessionResource = this.harnessService.activeSessionResource.get();
2231
+ const destinations = this.getCustomizationMigrationDashboardDestinations(
2232
+ this.getDashboardFileMigrationCandidates().filter(candidate => candidate.storage === storage)
2233
+ );
2234
+ if (destinations.length === 0) {
2235
+ this.notificationService.info(( localize(
2236
+ 6474,
2237
+ "There are no file migration destinations to configure. MCP servers migrate to the workspace root .mcp.json."
2238
+ )));
2239
+ return;
2240
+ }
2241
+ const selected = await this.quickInputService.pick(( destinations.map(destination => ({
2242
+ label: destination.contextLabel,
2243
+ description: destination.label,
2244
+ destination
2245
+ }))), {
2246
+ canPickMany: false,
2247
+ placeHolder: ( localize(6475, "Choose a migration location to customize")),
2248
+ matchOnDescription: true
2249
+ });
2250
+ if (selected && this.isCustomizationMigrationSessionActive(sessionResource)) {
2251
+ await this.chooseCustomizationMigrationDestination(selected.destination);
2252
+ }
2253
+ }
2254
+ getCustomizationMigrationDestinationContextLabel(targetType, storage) {
2255
+ const scope = storage === PromptsStorage.local ? ( localize(6476, "Workspace")) : ( localize(6477, "User"));
2256
+ switch (targetType) {
2257
+ case PromptsType.skill:
2258
+ return localize(6478, "{0} skills", scope);
2259
+ case PromptsType.agent:
2260
+ return localize(6479, "{0} agents", scope);
2261
+ default:
2262
+ return localize(6480, "{0} instructions", scope);
2263
+ }
2264
+ }
2265
+ async chooseCustomizationMigrationDestination(destination) {
2266
+ const sessionResource = this.harnessService.activeSessionResource.get();
2267
+ const key = this.getCustomizationMigrationTargetKey(destination.targetType, destination.storage);
2268
+ const currentFolder = this.selectedCustomizationMigrationTargets.get(key);
2269
+ const availableFolders = this.getCustomizationMigrationFolders(destination.targetType, destination.storage);
2270
+ const picks = ( availableFolders.map(folder => ({
2271
+ label: folder.label,
2272
+ description: this.getCustomizationMigrationFolderPickDescription(folder, this.getCustomizationMigrationFolderLabel(folder)),
2273
+ picked: currentFolder ? isEqual(folder.uri, currentFolder.uri) : false,
2274
+ folder
2275
+ })));
2276
+ picks.push({
2277
+ label: ( localize(6481, "Choose another folder...")),
2278
+ description: ( localize(6482, "Use a custom migration destination")),
2279
+ chooseAnother: true
2280
+ });
2281
+ const selected = await this.quickInputService.pick(picks, {
2282
+ canPickMany: false,
2283
+ placeHolder: ( localize(6483, "Choose a destination for {0}", destination.contextLabel)),
2284
+ matchOnDescription: true
2285
+ });
2286
+ if (!selected || !this.isCustomizationMigrationSessionActive(sessionResource)) {
2287
+ return;
2288
+ }
2289
+ let folder = selected.folder;
2290
+ if (selected.chooseAnother) {
2291
+ const folders = await this.fileDialogService.showOpenDialog({
2292
+ title: ( localize(6484, "Choose a Custom Migration Destination")),
2293
+ openLabel: ( localize(6485, "Select Folder")),
2294
+ canSelectFiles: false,
2295
+ canSelectFolders: true,
2296
+ canSelectMany: false,
2297
+ defaultUri: currentFolder?.uri
2298
+ });
2299
+ const uri = folders?.[0];
2300
+ if (!uri || !this.isCustomizationMigrationSessionActive(sessionResource)) {
2301
+ return;
2302
+ }
2303
+ folder = {
2304
+ uri,
2305
+ label: this.labelService.getUriLabel(uri, {
2306
+ relative: true
2307
+ }),
2308
+ source: destination.storage
2309
+ };
2310
+ }
2311
+ if (!folder) {
2312
+ return;
2313
+ }
2314
+ this.selectedCustomizationMigrationTargets.set(key, folder);
2315
+ this.explicitlySelectedCustomizationMigrationTargets.add(key);
2316
+ this.renderCustomizationMigrationPage();
2317
+ }
2318
+ renderCustomizationMigrationState(title, description, retry) {
2319
+ const state = append(
2320
+ this.migrationListContainer,
2321
+ $(".plugin-inventory-empty.prompt-migration-state")
2322
+ );
2323
+ append(state, $("strong.prompt-migration-state-title")).textContent = title;
2324
+ append(state, $("span.prompt-migration-state-description")).textContent = description;
2325
+ if (retry) {
2326
+ const retryButton = this.migrationPageDisposables.add(( new Button(state, {
2327
+ ...defaultButtonStyles,
2328
+ secondary: true,
2329
+ ariaLabel: ( localize(6486, "Retry loading customizations"))
2330
+ })));
2331
+ retryButton.label = ( localize(6487, "Retry"));
2332
+ this.migrationFirstFocusableElement ??= retryButton.element;
2333
+ this.migrationPageDisposables.add(retryButton.onDidClick(retry));
2334
+ }
2335
+ this.migrationListScrollable?.scanDomNode();
2336
+ }
2337
+ updateCustomizationMigrationPageHeader(category, candidates) {
2338
+ if (this.migrationHeader) {
2339
+ this.migrationHeader.style.display = "";
2340
+ }
2341
+ if (this.migrationBackButton) {
2342
+ this.migrationBackButton.style.display = "";
2343
+ }
2344
+ if (this.migrationFooter) {
2345
+ this.migrationFooter.style.display = "";
2346
+ }
2347
+ if (this.migrationTitleElement) {
2348
+ this.migrationTitleElement.textContent = category.pageTitle;
2349
+ }
2350
+ const banner = candidates.length > 0 ? category.getBanner?.(
2351
+ candidates,
2352
+ this.getActiveHarnessLabel(),
2353
+ this.getCustomizationMigrationDestinationLabel(candidates.filter(
2354
+ customization => !isMcpServerCustomizationMigrationCandidate(customization)
2355
+ ).flatMap(customization => {
2356
+ const targetType = getCustomizationMigrationTargetType(customization);
2357
+ return this.customizationMigrationTargetFoldersByType.get(targetType)?.filter(folder => folder.source === customization.storage) ?? [];
2358
+ })),
2359
+ category.getModifiedSettingIds?.(this.configurationService) ?? []
2360
+ ) : undefined;
2361
+ this.renderCustomizationMigrationBanner(banner);
2362
+ if (this.migrationDescriptionElement) {
2363
+ const description = banner ? "" : category.getPageDescription(candidates, this.getActiveHarnessLabel());
2364
+ if (this.migrationDescriptionTextElement) {
2365
+ this.migrationDescriptionTextElement.textContent = description;
2366
+ } else {
2367
+ this.migrationDescriptionElement.textContent = description;
2368
+ }
2369
+ this.migrationDescriptionElement.style.display = banner ? "none" : "";
2370
+ }
2371
+ if (this.migrationLinkElement) {
2372
+ this.migrationLinkElement.style.display = "";
2373
+ this.migrationLinkElement.textContent = category.pageLinkLabel;
2374
+ this.migrationLinkElement.href = category.pageLinkUrl;
2375
+ }
2376
+ }
2377
+ renderCustomizationMigrationBanner(banner) {
2378
+ const container = this.migrationBannerContainer;
2379
+ if (!container) {
2380
+ return;
2381
+ }
2382
+ this.migrationBannerDisposables.clear();
2383
+ clearNode(container);
2384
+ if (!banner) {
2385
+ if (this.migrationLinkElement && this.migrationDescriptionElement) {
2386
+ this.migrationDescriptionElement.appendChild(this.migrationLinkElement);
2387
+ }
2388
+ container.style.display = "none";
2389
+ return;
2390
+ }
2391
+ container.style.display = "";
2392
+ const content = append(container, $(".customization-migration-banner-content"));
2393
+ if (isMarkdownString(banner.message)) {
2394
+ const renderedMessage = this.migrationBannerDisposables.add(this.markdownRendererService.render(banner.message));
2395
+ renderedMessage.element.classList.add("customization-migration-banner-message");
2396
+ content.appendChild(renderedMessage.element);
2397
+ } else {
2398
+ append(content, $("p.customization-migration-banner-message")).textContent = banner.message;
2399
+ }
2400
+ if (banner.consequence) {
2401
+ append(content, $("p.customization-migration-banner-consequence")).textContent = banner.consequence;
2402
+ }
2403
+ if (this.migrationLinkElement) {
2404
+ content.appendChild(this.migrationLinkElement);
2405
+ }
2406
+ }
2407
+ updateCustomizationMigrationActionState() {
2408
+ if (!this.migrationMigrateButton) {
2409
+ return;
2410
+ }
2411
+ const category = this.getActiveMigrationCategory();
2412
+ if (!category) {
2413
+ this.migrationMigrateButton.enabled = false;
2414
+ return;
2415
+ }
2416
+ const selectedCount = this.getMigrationCandidates(category, this.activeMigrationStorage).filter(customization => this.isCustomizationSelectedForMigration(customization)).length;
2417
+ this.migrationMigrateButton.enabled = selectedCount > 0 && !this.customizationMigrationInProgress;
2418
+ if (this.migrationClearSettingsCheckbox) {
2419
+ const hasModifiedSettings = this.getModifiedConfiguredLocationSettingIds(category).length > 0;
2420
+ const canClearSettings = category.id === CustomizationMigrationCategoryId.ConfiguredLocations && hasModifiedSettings && !this.customizationMigrationInProgress && !this.customizationMigrationLoading && !this.customizationMigrationLoadError;
2421
+ this.migrationClearSettingsContainer?.classList.toggle("disabled", !canClearSettings);
2422
+ if (canClearSettings) {
2423
+ this.migrationClearSettingsCheckbox.enable();
2424
+ this.migrationClearSettingsCheckbox.setTitle(( localize(6429, "Clear unused location settings after migration")));
2425
+ } else {
2426
+ this.migrationClearSettingsCheckbox.disable();
2427
+ this.migrationClearSettingsCheckbox.setTitle(( localize(6488, "The custom location settings are managed and cannot be cleared")));
2428
+ }
2429
+ }
2430
+ if (this.migrationSelectedCountElement) {
2431
+ this.migrationSelectedCountElement.textContent = selectedCount === 1 ? ( localize(6489, "1 selected")) : ( localize(6490, "{0} selected", selectedCount));
2432
+ }
2433
+ if (category.id === CustomizationMigrationCategoryId.PromptFiles) {
2434
+ this.migrationMigrateButton.label = selectedCount > 0 ? ( localize(6491, "Convert {0} to Skills", selectedCount)) : ( localize(6492, "Convert to Skills"));
2435
+ } else {
2436
+ this.migrationMigrateButton.label = selectedCount > 0 ? ( localize(6493, "Migrate {0}", selectedCount)) : ( localize(6494, "Migrate"));
2437
+ }
2438
+ }
2439
+ async deleteCustomizationFile(customization) {
2440
+ if (this.customizationMigrationInProgress) {
2441
+ return;
2442
+ }
2443
+ const fileName = customization.name ?? basename(customization.uri);
2444
+ const confirmation = await this.dialogService.confirm({
2445
+ message: ( localize(6495, "Are you sure you want to delete '{0}'?", fileName)),
2446
+ detail: ( localize(6496, "This action cannot be undone.")),
2447
+ primaryButton: ( localize(6447, "Delete")),
2448
+ type: "warning"
2449
+ });
2450
+ if (!confirmation.confirmed) {
2451
+ return;
676
2452
  }
677
- if (( hasSections.has(AICustomizationManagementSection.Tools))) {
678
- this.toolsContentContainer = append(contentInner, $(".tools-content-container"));
679
- this.toolsListWidget = this.editorDisposables.add(
680
- this.instantiationService.createInstance(ToolsListWidget, AGENT_HOST_COPILOT_CLI_SESSION_TYPE)
681
- );
682
- this.toolsContentContainer.appendChild(this.toolsListWidget.element);
683
- this.toolsDetailContainer = append(contentInner, $(".tools-detail-container"));
684
- this.createEmbeddedToolDetail();
685
- this.editorDisposables.add(this.toolsListWidget.onDidSelectExtension(extension => {
686
- this.showEmbeddedToolDetail(extension);
687
- }));
2453
+ const useTrash = this.fileService.hasCapability(customization.uri, FileSystemProviderCapabilities.Trash);
2454
+ await this.fileService.del(customization.uri, {
2455
+ useTrash
2456
+ });
2457
+ if (customization.storage === PromptsStorage.local) {
2458
+ const projectRoot = this.workspaceService.getActiveProjectRoot();
2459
+ if (projectRoot) {
2460
+ await this.workspaceService.deleteFiles(projectRoot, [customization.uri]);
2461
+ }
688
2462
  }
689
- if (( hasSections.has(AICustomizationManagementSection.Automations))) {
690
- this.automationsContentContainer = append(contentInner, $(".automations-content-container"));
691
- this.automationsListWidget = this.editorDisposables.add(this.instantiationService.createInstance(AutomationsListWidget));
692
- this.automationsContentContainer.appendChild(this.automationsListWidget.element);
2463
+ const updatedCandidates = ( new Map());
2464
+ for (const [categoryId, candidates] of this.customizationsByMigrationCategory) {
2465
+ updatedCandidates.set(categoryId, candidates.filter(
2466
+ candidate => isMcpServerCustomizationMigrationCandidate(candidate) || !isEqual(candidate.uri, customization.uri)
2467
+ ));
693
2468
  }
694
- this.editorContentContainer = append(contentInner, $(".editor-content-container"));
695
- this.createEmbeddedEditor();
696
- this.updateContentVisibility();
697
- this.editorDisposables.add(this.listWidget.onDidChangeItemCount(count => {
698
- if (this.isPromptsSection(this.selectedSection)) {
699
- this.updateSectionCount(this.selectedSection, count);
2469
+ this.setCustomizationsToMigrate(updatedCandidates, this.customizationMigrationTargetFoldersByType);
2470
+ }
2471
+ isMigrationCategoryEnabled(category) {
2472
+ if (this.configurationService.getValue(category.enablementSetting) !== true) {
2473
+ return false;
2474
+ }
2475
+ const modifiedSettingIds = category.getModifiedSettingIds?.(this.configurationService);
2476
+ return modifiedSettingIds === undefined || modifiedSettingIds.length > 0;
2477
+ }
2478
+ getEnabledMigrationCategories() {
2479
+ return CUSTOMIZATION_MIGRATION_CATEGORIES.filter(category => this.isMigrationCategoryEnabled(category));
2480
+ }
2481
+ async resolveCustomizationMigrationTargetFolders(customizations, availableSourceFolders, sessionResource) {
2482
+ const requiredStorageByTargetType = ( new Map());
2483
+ for (const customization of customizations) {
2484
+ const targetType = getCustomizationMigrationTargetType(customization);
2485
+ const storages = requiredStorageByTargetType.get(targetType) ?? ( new Set());
2486
+ storages.add(customization.storage);
2487
+ requiredStorageByTargetType.set(targetType, storages);
2488
+ }
2489
+ const targetFolders = ( new Map());
2490
+ const selectedDestinationGroupIds = ( new Map());
2491
+ for (const [targetType, requiredStorages] of requiredStorageByTargetType) {
2492
+ const availableFolders = availableSourceFolders.get(targetType) ?? [];
2493
+ if (!this.isCustomizationMigrationSessionActive(sessionResource)) {
2494
+ return undefined;
700
2495
  }
701
- }));
702
- if (this.mcpListWidget) {
703
- this.editorDisposables.add(this.mcpListWidget.onDidChangeItemCount(count => {
704
- this.updateSectionCount(AICustomizationManagementSection.McpServers, count);
705
- }));
706
- this.mcpListWidget.fireItemCount();
2496
+ const foldersByStorage = ( new Map());
2497
+ for (const storage of requiredStorages) {
2498
+ const matchingFolders = this.getCustomizationMigrationFolders(targetType, storage, availableFolders);
2499
+ const selectedFolder = this.selectedCustomizationMigrationTargets.get(this.getCustomizationMigrationTargetKey(targetType, storage));
2500
+ if (matchingFolders.length === 0 && !selectedFolder) {
2501
+ this.notificationService.error(this.getMissingMigrationTargetFolderMessage(targetType, storage));
2502
+ return undefined;
2503
+ }
2504
+ const selectedDestinationGroupId = selectedDestinationGroupIds.get(storage);
2505
+ const foldersAtSelectedDestination = selectedDestinationGroupId ? matchingFolders.filter(folder => folder.destinationGroupId === selectedDestinationGroupId) : [];
2506
+ let targetFolder = selectedFolder;
2507
+ if (targetFolder?.destinationGroupId) {
2508
+ selectedDestinationGroupIds.set(storage, targetFolder.destinationGroupId);
2509
+ } else if (foldersAtSelectedDestination.length === 1) {
2510
+ targetFolder = foldersAtSelectedDestination[0];
2511
+ } else if (!targetFolder && matchingFolders.length === 1) {
2512
+ targetFolder = matchingFolders[0];
2513
+ } else if (!targetFolder) {
2514
+ targetFolder = await this.pickCustomizationMigrationTargetFolder(matchingFolders, targetType, requiredStorageByTargetType.size > 1);
2515
+ if (targetFolder?.destinationGroupId) {
2516
+ selectedDestinationGroupIds.set(storage, targetFolder.destinationGroupId);
2517
+ }
2518
+ }
2519
+ if (!targetFolder || !this.isCustomizationMigrationSessionActive(sessionResource)) {
2520
+ return undefined;
2521
+ }
2522
+ foldersByStorage.set(storage, targetFolder);
2523
+ }
2524
+ targetFolders.set(targetType, foldersByStorage);
707
2525
  }
708
- if (this.pluginListWidget) {
709
- this.editorDisposables.add(this.pluginListWidget.onDidChangeItemCount(count => {
710
- this.updateSectionCount(AICustomizationManagementSection.Plugins, count);
711
- }));
712
- this.pluginListWidget.fireItemCount();
2526
+ return targetFolders;
2527
+ }
2528
+ isCustomizationMigrationSessionActive(sessionResource) {
2529
+ return isEqual(sessionResource, this.harnessService.activeSessionResource.get());
2530
+ }
2531
+ getMissingMigrationTargetFolderMessage(targetType, storage) {
2532
+ if (storage === PromptsStorage.local) {
2533
+ switch (targetType) {
2534
+ case PromptsType.skill:
2535
+ return localize(6497, "No workspace skills folder is configured for the active harness.");
2536
+ case PromptsType.agent:
2537
+ return localize(6498, "No workspace agents folder is configured for the active harness.");
2538
+ default:
2539
+ return localize(
2540
+ 6499,
2541
+ "No workspace instructions folder is configured for the active harness."
2542
+ );
2543
+ }
713
2544
  }
714
- if (this.automationsListWidget) {
715
- this.editorDisposables.add(this.automationsListWidget.onDidChangeItemCount(count => {
716
- this.updateSectionCount(AICustomizationManagementSection.Automations, count);
717
- }));
718
- this.automationsListWidget.fireItemCount();
2545
+ switch (targetType) {
2546
+ case PromptsType.skill:
2547
+ return localize(6500, "No global skills folder is configured for the active harness.");
2548
+ case PromptsType.agent:
2549
+ return localize(6501, "No global agents folder is configured for the active harness.");
2550
+ default:
2551
+ return localize(
2552
+ 6502,
2553
+ "No global instructions folder is configured for the active harness."
2554
+ );
719
2555
  }
720
- if (this.modelsWidget) {
721
- this.editorDisposables.add(this.modelsWidget.onDidChangeItemCount(count => {
722
- this.updateSectionCount(AICustomizationManagementSection.Models, count);
723
- }));
724
- this.modelsWidget.fireItemCount();
2556
+ }
2557
+ async pickCustomizationMigrationTargetFolder(sourceFolders, targetType, selectsMultipleTypes) {
2558
+ const picks = ( this.sortCustomizationMigrationFolders(sourceFolders).map(folder => ({
2559
+ label: folder.label,
2560
+ description: this.getCustomizationMigrationFolderPickDescription(folder, this.labelService.getUriLabel(folder.uri, {
2561
+ relative: true
2562
+ })),
2563
+ folder
2564
+ })));
2565
+ const selected = await this.quickInputService.pick(picks, {
2566
+ canPickMany: false,
2567
+ placeHolder: this.getMigrationTargetFolderPlaceholder(targetType, selectsMultipleTypes),
2568
+ matchOnDescription: true
2569
+ });
2570
+ return selected?.folder;
2571
+ }
2572
+ sortCustomizationMigrationFolders(folders) {
2573
+ return [...folders].sort(
2574
+ (first, second) => Number(this.isRecommendedCustomizationMigrationFolder(second)) - Number(this.isRecommendedCustomizationMigrationFolder(first))
2575
+ );
2576
+ }
2577
+ getCustomizationMigrationFolders(
2578
+ type,
2579
+ storage,
2580
+ availableFolders = this.customizationMigrationTargetFoldersByType.get(type) ?? []
2581
+ ) {
2582
+ return this.sortCustomizationMigrationFolders(availableFolders.filter(
2583
+ folder => folder.source === storage && !(type === PromptsType.skill && storage === PromptsStorage.local && basename(dirname(folder.uri)).toLowerCase() === ".claude")
2584
+ ));
2585
+ }
2586
+ isRecommendedCustomizationMigrationFolder(folder) {
2587
+ const root = basename(dirname(folder.uri)).toLowerCase();
2588
+ return root === (folder.source === PromptsStorage.local ? ".github" : ".copilot");
2589
+ }
2590
+ getCustomizationMigrationFolderPickDescription(folder, description) {
2591
+ return this.isRecommendedCustomizationMigrationFolder(folder) ? ( localize(6503, "{0} (Recommended)", description)) : description;
2592
+ }
2593
+ getMigrationTargetFolderPlaceholder(targetType, selectsMultipleTypes) {
2594
+ if (selectsMultipleTypes) {
2595
+ return localize(6504, "Select a destination for the migrated customizations");
725
2596
  }
726
- if (this.toolsListWidget) {
727
- this.editorDisposables.add(this.toolsListWidget.onDidChangeItemCount(count => {
728
- this.updateSectionCount(AICustomizationManagementSection.Tools, count);
729
- }));
730
- this.toolsListWidget.fireItemCount();
2597
+ switch (targetType) {
2598
+ case PromptsType.skill:
2599
+ return localize(6505, "Select a destination folder for migrated skills");
2600
+ case PromptsType.agent:
2601
+ return localize(6506, "Select a destination folder for migrated agents");
2602
+ default:
2603
+ return localize(6507, "Select a destination folder for migrated instructions");
731
2604
  }
732
- for (const section of ITEMS_MODEL_SECTIONS) {
733
- const observable = this.itemsModel.getCount(section);
734
- this.editorDisposables.add(autorun(reader => {
735
- this.updateSectionCount(section, observable.read(reader));
736
- }));
2605
+ }
2606
+ getCustomizationMigrationFolderLabel(folder) {
2607
+ const useSourceLabel = folder.label.startsWith("~") || (folder.source === PromptsStorage.local && folder.label.startsWith("."));
2608
+ let label = useSourceLabel ? folder.label : this.labelService.getUriLabel(folder.uri, {
2609
+ relative: folder.source === PromptsStorage.local
2610
+ });
2611
+ const folderName = basename(folder.uri);
2612
+ const normalizedLabel = label.replaceAll("\\", "/");
2613
+ if (useSourceLabel && normalizedLabel.split("/").at(-1) !== folderName) {
2614
+ const separator = label.includes("\\") ? "\\" : "/";
2615
+ label = `${label}${separator}${folderName}`;
737
2616
  }
738
- if (this.isPromptsSection(this.selectedSection)) {
739
- void this.listWidget.setSection(this.selectedSection);
2617
+ return label;
2618
+ }
2619
+ getCustomizationMigrationDestinationLabel(folders) {
2620
+ const seen = ( new ResourceSet());
2621
+ const uniqueFolders = folders.filter(folder => {
2622
+ if (( seen.has(folder.uri))) {
2623
+ return false;
2624
+ }
2625
+ seen.add(folder.uri);
2626
+ return true;
2627
+ });
2628
+ if (uniqueFolders.length === 0) {
2629
+ return undefined;
2630
+ }
2631
+ const commonLabel = uniqueFolders[0].label;
2632
+ if (commonLabel && uniqueFolders.every(folder => folder.label === commonLabel)) {
2633
+ return commonLabel;
2634
+ }
2635
+ const labelParent = dirname$1(uniqueFolders[0].label);
2636
+ if (labelParent !== "." && uniqueFolders.every(folder => dirname$1(folder.label) === labelParent)) {
2637
+ return labelParent;
2638
+ }
2639
+ let destination = uniqueFolders[0].uri;
2640
+ if (uniqueFolders.length > 1) {
2641
+ const commonParent = dirname(destination);
2642
+ if (!uniqueFolders.every(folder => isEqual(dirname(folder.uri), commonParent))) {
2643
+ return undefined;
2644
+ }
2645
+ destination = commonParent;
740
2646
  }
2647
+ return this.labelService.getUriLabel(destination);
741
2648
  }
742
2649
  isPromptsSection(section) {
743
2650
  return section === AICustomizationManagementSection.Agents || section === AICustomizationManagementSection.Skills || section === AICustomizationManagementSection.Instructions || section === AICustomizationManagementSection.Prompts || section === AICustomizationManagementSection.Hooks;
@@ -755,6 +2662,9 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
755
2662
  if (this.viewMode === "editor") {
756
2663
  this.goBackToList();
757
2664
  }
2665
+ if (this.viewMode === "migration") {
2666
+ this.viewMode = "list";
2667
+ }
758
2668
  if (this.viewMode === "mcpDetail") {
759
2669
  this.goBackFromMcpDetail();
760
2670
  }
@@ -765,6 +2675,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
765
2675
  this.goBackFromToolDetail();
766
2676
  }
767
2677
  this.selectedSection = undefined;
2678
+ this.activeMigrationStorage = undefined;
768
2679
  this.sectionContextKey.set("");
769
2680
  this.storageService.remove(AI_CUSTOMIZATION_MANAGEMENT_SELECTED_SECTION_KEY, StorageScope.PROFILE);
770
2681
  this.welcomePage?.reset();
@@ -783,6 +2694,9 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
783
2694
  if (this.viewMode === "editor") {
784
2695
  this.goBackToList();
785
2696
  }
2697
+ if (this.viewMode === "migration") {
2698
+ this.viewMode = "list";
2699
+ }
786
2700
  if (this.viewMode === "mcpDetail") {
787
2701
  this.goBackFromMcpDetail();
788
2702
  }
@@ -823,8 +2737,6 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
823
2737
  this.modelsWidget?.focusSearch();
824
2738
  } else if (section === AICustomizationManagementSection.Tools) {
825
2739
  this.toolsListWidget?.focusSearch();
826
- } else if (section === AICustomizationManagementSection.Automations) {
827
- this.automationsListWidget?.focus();
828
2740
  } else {
829
2741
  this.listWidget?.focusSearch();
830
2742
  }
@@ -852,7 +2764,9 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
852
2764
  }
853
2765
  }
854
2766
  updateContentVisibility() {
2767
+ this.contentNavigationGeneration++;
855
2768
  const isEditorMode = this.viewMode === "editor";
2769
+ const isMigrationMode = this.viewMode === "migration";
856
2770
  const isMcpDetailMode = this.viewMode === "mcpDetail";
857
2771
  const isPluginDetailMode = this.viewMode === "pluginDetail";
858
2772
  const isToolsDetailMode = this.viewMode === "toolsDetail";
@@ -863,37 +2777,53 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
863
2777
  const isMcpSection = this.selectedSection === AICustomizationManagementSection.McpServers;
864
2778
  const isPluginsSection = this.selectedSection === AICustomizationManagementSection.Plugins;
865
2779
  const isToolsSection = this.selectedSection === AICustomizationManagementSection.Tools;
866
- const isAutomationsSection = this.selectedSection === AICustomizationManagementSection.Automations;
867
2780
  if (this.welcomePage) {
868
- this.welcomePage.container.style.display = isWelcome && !isEditorMode && !isDetailMode ? "" : "none";
2781
+ this.welcomePage.container.style.display = isWelcome && !isEditorMode && !isMigrationMode && !isDetailMode ? "" : "none";
869
2782
  }
870
2783
  if (this.promptsContentContainer) {
871
- this.promptsContentContainer.style.display = !isEditorMode && !isDetailMode && isPromptsSection ? "" : "none";
2784
+ this.promptsContentContainer.style.display = !isEditorMode && !isMigrationMode && !isDetailMode && isPromptsSection ? "" : "none";
2785
+ }
2786
+ if (this.migrationContentContainer) {
2787
+ this.migrationContentContainer.style.display = isMigrationMode ? "" : "none";
2788
+ }
2789
+ if (this.migrationShortcutButton) {
2790
+ this.migrationShortcutButton.classList.toggle("selected", isMigrationMode);
2791
+ if (isMigrationMode) {
2792
+ this.migrationShortcutButton.setAttribute("aria-current", "page");
2793
+ } else {
2794
+ this.migrationShortcutButton.removeAttribute("aria-current");
2795
+ }
872
2796
  }
873
2797
  if (this.modelsContentContainer) {
874
- this.modelsContentContainer.style.display = !isEditorMode && !isDetailMode && isModelsSection ? "" : "none";
2798
+ this.modelsContentContainer.style.display = !isEditorMode && !isMigrationMode && !isDetailMode && isModelsSection ? "" : "none";
875
2799
  }
876
2800
  if (this.mcpContentContainer) {
877
- this.mcpContentContainer.style.display = !isEditorMode && !isDetailMode && isMcpSection ? "" : "none";
2801
+ this.mcpContentContainer.style.display = !isEditorMode && !isMigrationMode && !isDetailMode && isMcpSection ? "" : "none";
878
2802
  }
2803
+ this.mcpListWidget?.setVisible(!isEditorMode && !isMigrationMode && !isDetailMode && isMcpSection);
879
2804
  if (this.mcpDetailContainer) {
880
2805
  this.mcpDetailContainer.style.display = isMcpDetailMode ? "" : "none";
881
2806
  }
882
2807
  if (this.pluginContentContainer) {
883
- this.pluginContentContainer.style.display = !isEditorMode && !isDetailMode && isPluginsSection ? "" : "none";
884
- }
885
- if (this.automationsContentContainer) {
886
- this.automationsContentContainer.style.display = !isEditorMode && !isDetailMode && isAutomationsSection ? "" : "none";
2808
+ this.pluginContentContainer.style.display = !isEditorMode && !isMigrationMode && !isDetailMode && isPluginsSection ? "" : "none";
887
2809
  }
2810
+ this.pluginListWidget?.setVisible(!isEditorMode && !isMigrationMode && !isDetailMode && isPluginsSection);
888
2811
  if (this.pluginDetailContainer) {
889
2812
  this.pluginDetailContainer.style.display = isPluginDetailMode ? "" : "none";
890
2813
  }
891
2814
  if (this.toolsContentContainer) {
892
- this.toolsContentContainer.style.display = !isEditorMode && !isDetailMode && isToolsSection ? "" : "none";
2815
+ this.toolsContentContainer.style.display = !isEditorMode && !isMigrationMode && !isDetailMode && isToolsSection ? "" : "none";
893
2816
  }
894
2817
  if (this.toolsDetailContainer) {
895
2818
  this.toolsDetailContainer.style.display = isToolsDetailMode ? "" : "none";
896
2819
  }
2820
+ for (const [section, container] of this.contributedSectionContainers) {
2821
+ const visible = !isEditorMode && !isMigrationMode && !isDetailMode && this.selectedSection === section;
2822
+ container.style.display = visible ? "" : "none";
2823
+ if (visible) {
2824
+ this.ensureContributedSectionWidget(section);
2825
+ }
2826
+ }
897
2827
  if (this.editorContentContainer) {
898
2828
  this.editorContentContainer.style.display = isEditorMode ? "" : "none";
899
2829
  }
@@ -904,6 +2834,24 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
904
2834
  }
905
2835
  }
906
2836
  }
2837
+ ensureContributedSectionWidget(section) {
2838
+ const existing = this.contributedSectionWidgets.get(section);
2839
+ if (existing) {
2840
+ return existing;
2841
+ }
2842
+ const contribution = aiCustomizationManagementSectionRegistry.get(section, this.harnessService.activeHarness.get());
2843
+ const container = this.contributedSectionContainers.get(section);
2844
+ if (!contribution || !container) {
2845
+ return undefined;
2846
+ }
2847
+ const widget = contribution.create(this.instantiationService, container);
2848
+ this.contributedSectionWidgets.set(section, widget);
2849
+ this.editorDisposables.add(widget);
2850
+ if (this.dimension) {
2851
+ widget.layout?.(this.dimension);
2852
+ }
2853
+ return widget;
2854
+ }
907
2855
  async createNewItemWithAI(type) {
908
2856
  this.telemetryService.publicLog2("chatCustomizationEditor.createItem", {
909
2857
  section: this.selectedSection ?? "welcome",
@@ -941,42 +2889,57 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
941
2889
  return;
942
2890
  }
943
2891
  if (type === PromptsType.hook) {
2892
+ const preferredStorage = target === "user" ? PromptsStorage.user : PromptsStorage.local;
944
2893
  if (this.workspaceService.isSessionsWindow) {
945
2894
  await this.instantiationService.invokeFunction(showConfigureHooksQuickPick, {
946
2895
  openEditor: async resource => {
947
- await this.showEmbeddedEditor(resource, basename(resource), PromptsType.hook, PromptsStorage.local, true);
2896
+ await this.showEmbeddedEditor(
2897
+ resource,
2898
+ basename(resource),
2899
+ PromptsType.hook,
2900
+ preferredStorage,
2901
+ preferredStorage === PromptsStorage.local
2902
+ );
948
2903
  return;
949
2904
  },
950
- target: Target.GitHubCopilot
2905
+ target: Target.GitHubCopilot,
2906
+ preferredStorage
951
2907
  });
952
2908
  } else {
953
2909
  await this.instantiationService.invokeFunction(showConfigureHooksQuickPick, {
954
2910
  openEditor: async resource => {
955
- await this.showEmbeddedEditor(resource, basename(resource), PromptsType.hook, PromptsStorage.local, true);
2911
+ await this.showEmbeddedEditor(
2912
+ resource,
2913
+ basename(resource),
2914
+ PromptsType.hook,
2915
+ preferredStorage,
2916
+ preferredStorage === PromptsStorage.local
2917
+ );
956
2918
  return;
957
- }
2919
+ },
2920
+ preferredStorage
958
2921
  });
959
2922
  }
960
2923
  return;
961
2924
  }
962
- const targetDir = await this.resolveTargetDirectoryWithPicker(type, target);
2925
+ const sessionResource = this.harnessService.activeSessionResource.get();
2926
+ const picker = this.instantiationService.createInstance(CustomizationLocationPicker);
2927
+ const targetDir = await picker.resolveTargetDirectoryWithPicker(sessionResource, type, target);
963
2928
  if (targetDir === null) {
964
2929
  return;
965
2930
  }
2931
+ if (targetDir === undefined) {
2932
+ await this.instantiationService.invokeFunction(showNoFoldersDialog, type);
2933
+ return;
2934
+ }
966
2935
  const override = this.selectedSection ? this.harnessService.getActiveDescriptor().sectionOverrides?.get(this.selectedSection) : undefined;
967
2936
  const options = {
968
2937
  targetFolder: targetDir,
969
- targetStorage: target === "user" ? PromptsStorage.user : PromptsStorage.local,
2938
+ targetStorage: target === AICustomizationSources.user ? PromptsStorage.user : PromptsStorage.local,
970
2939
  fileExtension: override?.fileExtension,
971
2940
  openFile: async uri => {
972
- const isWorkspace = target === "workspace";
973
- await this.showEmbeddedEditor(
974
- uri,
975
- basename(uri),
976
- type,
977
- target === "user" ? PromptsStorage.user : PromptsStorage.local,
978
- isWorkspace
979
- );
2941
+ const isWorkspace = target === AICustomizationSources.local;
2942
+ await this.showEmbeddedEditor(uri, basename(uri), type, target, isWorkspace);
980
2943
  return this.embeddedEditor;
981
2944
  }
982
2945
  };
@@ -1000,51 +2963,6 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1000
2963
  await this.commandService.executeCommand(commandId, options);
1001
2964
  this.listWidget.refresh();
1002
2965
  }
1003
- async resolveTargetDirectoryWithPicker(type, target) {
1004
- const sessionResource = this.harnessService.activeSessionResource.get();
1005
- const activeDescriptor = this.harnessService.getActiveDescriptor();
1006
- const provider = activeDescriptor.itemProvider ?? this.instantiationService.createInstance(PromptsServiceCustomizationItemProvider, () => activeDescriptor);
1007
- if (!provider.provideSourceFolders) {
1008
- return undefined;
1009
- }
1010
- const allFolders = await provider.provideSourceFolders(sessionResource, type, CancellationToken.None);
1011
- if (!allFolders) {
1012
- return undefined;
1013
- }
1014
- const projectRoot = this.workspaceService.getActiveProjectRoot();
1015
- const matchingFolders = [];
1016
- const hasSeen = ( new ResourceSet());
1017
- for (const f of allFolders) {
1018
- if (target === "workspace") {
1019
- if (projectRoot && isEqualOrParent(f.uri, projectRoot) && !( hasSeen.has(f.uri))) {
1020
- hasSeen.add(f.uri);
1021
- matchingFolders.push(f);
1022
- }
1023
- } else {
1024
- if ((!projectRoot || !isEqualOrParent(f.uri, projectRoot)) && !( hasSeen.has(f.uri))) {
1025
- hasSeen.add(f.uri);
1026
- matchingFolders.push(f);
1027
- }
1028
- }
1029
- }
1030
- if (matchingFolders.length === 0) {
1031
- return undefined;
1032
- }
1033
- if (matchingFolders.length === 1) {
1034
- return matchingFolders[0].uri;
1035
- }
1036
- const items = ( matchingFolders.map(folder => ({
1037
- label: folder.label,
1038
- description: this.labelService.getUriLabel(folder.uri, {
1039
- relative: true
1040
- }),
1041
- uri: folder.uri
1042
- })));
1043
- const picked = await this.quickInputService.pick(items, {
1044
- placeHolder: ( localize(5888, "Select a directory for the new customization file"))
1045
- });
1046
- return picked?.uri ?? null;
1047
- }
1048
2966
  updateStyles() {
1049
2967
  this.splitView?.style({
1050
2968
  separatorBorder: Color.transparent
@@ -1059,6 +2977,10 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1059
2977
  section: this.selectedSection ?? "welcome"
1060
2978
  });
1061
2979
  await super.setInput(input, options, context, token);
2980
+ input.setTargetLabels(
2981
+ this.getActiveHarnessLabel(),
2982
+ this.workspaceService.activeProjectLabel.get()
2983
+ );
1062
2984
  if (this.dimension) {
1063
2985
  this.layout(this.dimension);
1064
2986
  }
@@ -1073,6 +2995,9 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1073
2995
  if (this.viewMode === "editor") {
1074
2996
  this.goBackToList();
1075
2997
  }
2998
+ if (this.viewMode === "migration") {
2999
+ this.viewMode = "list";
3000
+ }
1076
3001
  if (this.viewMode === "mcpDetail") {
1077
3002
  this.goBackFromMcpDetail();
1078
3003
  }
@@ -1086,12 +3011,30 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1086
3011
  this.disposeBuiltinEditingSessions();
1087
3012
  super.clearInput();
1088
3013
  }
3014
+ setEditorVisible(visible) {
3015
+ super.setEditorVisible(visible);
3016
+ if (visible && this.dimension) {
3017
+ this.layout(this.dimension);
3018
+ }
3019
+ }
1089
3020
  layout(dimension) {
1090
3021
  this.dimension = dimension;
1091
3022
  if (this.container && this.splitView) {
1092
3023
  this.splitViewContainer.style.height = `${dimension.height}px`;
1093
3024
  this.splitView.layout(dimension.width, dimension.height);
1094
3025
  }
3026
+ for (const widget of ( this.contributedSectionWidgets.values())) {
3027
+ widget.layout?.(dimension);
3028
+ }
3029
+ if (this.viewMode === "migration") {
3030
+ this.scheduleMigrationSectionLayout();
3031
+ }
3032
+ if (this.migrationContentContainer) {
3033
+ const migrationWidth = this.migrationContentContainer.offsetWidth || dimension.width;
3034
+ this.migrationContentContainer.classList.toggle("narrow-layout", migrationWidth < 500);
3035
+ }
3036
+ this.migrationListScrollable?.scanDomNode();
3037
+ this.migrationDashboardScrollable?.scanDomNode();
1095
3038
  }
1096
3039
  focus() {
1097
3040
  super.focus();
@@ -1103,6 +3046,10 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1103
3046
  }
1104
3047
  return;
1105
3048
  }
3049
+ if (this.viewMode === "migration") {
3050
+ this.focusCustomizationMigrationPage();
3051
+ return;
3052
+ }
1106
3053
  if (this.selectedSection === undefined) {
1107
3054
  this.welcomePage?.focus();
1108
3055
  return;
@@ -1115,8 +3062,8 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1115
3062
  this.modelsWidget?.focusSearch();
1116
3063
  } else if (this.selectedSection === AICustomizationManagementSection.Tools) {
1117
3064
  this.toolsListWidget?.focusSearch();
1118
- } else if (this.selectedSection === AICustomizationManagementSection.Automations) {
1119
- this.automationsListWidget?.focus();
3065
+ } else if (this.selectedSection && ( this.contributedSectionContainers.has(this.selectedSection))) {
3066
+ this.ensureContributedSectionWidget(this.selectedSection)?.focus?.();
1120
3067
  } else {
1121
3068
  this.listWidget?.focusSearch();
1122
3069
  }
@@ -1127,6 +3074,9 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1127
3074
  if (this.viewMode === "editor") {
1128
3075
  this.goBackToList();
1129
3076
  }
3077
+ if (this.viewMode === "migration") {
3078
+ this.viewMode = "list";
3079
+ }
1130
3080
  if (this.viewMode === "mcpDetail") {
1131
3081
  this.goBackFromMcpDetail();
1132
3082
  }
@@ -1161,9 +3111,78 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1161
3111
  }
1162
3112
  }
1163
3113
  }
3114
+ prepareCustomizationMigrationView() {
3115
+ if (this.viewMode === "editor") {
3116
+ this.goBackToList();
3117
+ }
3118
+ if (this.viewMode === "mcpDetail") {
3119
+ this.goBackFromMcpDetail();
3120
+ }
3121
+ if (this.viewMode === "pluginDetail") {
3122
+ this.goBackFromPluginDetail();
3123
+ }
3124
+ if (this.viewMode === "toolsDetail") {
3125
+ this.goBackFromToolDetail();
3126
+ }
3127
+ this.selectedSection = undefined;
3128
+ this.sectionContextKey.set("");
3129
+ this.viewMode = "migration";
3130
+ this.ensureSectionsListReflectsActiveSection(undefined);
3131
+ }
3132
+ showCustomizationMigrationDashboard() {
3133
+ this.prepareCustomizationMigrationView();
3134
+ this.activeMigrationCategoryId = undefined;
3135
+ this.activeMigrationStorage = undefined;
3136
+ this.renderCustomizationMigrationPage();
3137
+ this.updateContentVisibility();
3138
+ if (this.dimension) {
3139
+ this.layout(this.dimension);
3140
+ }
3141
+ if (this.migrationContentContainer) {
3142
+ getWindow(this.migrationContentContainer).requestAnimationFrame(() => this.focusCustomizationMigrationPage());
3143
+ }
3144
+ }
3145
+ async showCustomizationMigrationPage(categoryId, storage) {
3146
+ if (!categoryId) {
3147
+ await this.refreshCustomizationMigrationInfo();
3148
+ this.showCustomizationMigrationDashboard();
3149
+ return;
3150
+ }
3151
+ if (!this.isMigrationCategoryEnabled(getCustomizationMigrationCategory(categoryId))) {
3152
+ return;
3153
+ }
3154
+ this.prepareCustomizationMigrationView();
3155
+ this.activeMigrationCategoryId = categoryId;
3156
+ this.activeMigrationStorage = storage;
3157
+ if (this.migrationClearSettingsCheckbox) {
3158
+ this.migrationClearSettingsCheckbox.checked = true;
3159
+ }
3160
+ this.renderCustomizationMigrationPage();
3161
+ this.updateContentVisibility();
3162
+ if (this.dimension) {
3163
+ this.layout(this.dimension);
3164
+ }
3165
+ if (this.migrationContentContainer) {
3166
+ getWindow(this.migrationContentContainer).requestAnimationFrame(() => this.focusCustomizationMigrationPage());
3167
+ }
3168
+ }
1164
3169
  refreshList() {
1165
3170
  this.listWidget.refresh();
1166
3171
  }
3172
+ async revealCustomizationByUri(uri) {
3173
+ if (!this.isPromptsSection(this.selectedSection)) {
3174
+ return;
3175
+ }
3176
+ for (let attempt = 0; attempt < 10; attempt++) {
3177
+ if (this.listWidget.revealAndSelectFirstItemByUri([uri])) {
3178
+ return;
3179
+ }
3180
+ if (attempt === 0) {
3181
+ this.listWidget.clearSearch();
3182
+ }
3183
+ await timeout(100);
3184
+ }
3185
+ }
1167
3186
  revealLastItem() {
1168
3187
  if (this.selectedSection === AICustomizationManagementSection.McpServers) {
1169
3188
  this.mcpListWidget?.revealLastItem();
@@ -1182,11 +3201,11 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1182
3201
  }
1183
3202
  const editorHeader = append(this.editorContentContainer, $(".editor-header"));
1184
3203
  this.editorActionButton = append(editorHeader, $("button.editor-back-button"));
1185
- this.editorActionButton.setAttribute("aria-label", ( localize(5889, "Back to list")));
3204
+ this.editorActionButton.setAttribute("aria-label", ( localize(6508, "Back to list")));
1186
3205
  this.editorDisposables.add(this.hoverService.setupManagedHover(
1187
3206
  getDefaultHoverDelegate("element"),
1188
3207
  this.editorActionButton,
1189
- ( localize(5890, "Back to list"))
3208
+ ( localize(6509, "Back to list"))
1190
3209
  ));
1191
3210
  this.editorActionButtonIcon = append(
1192
3211
  this.editorActionButton,
@@ -1196,7 +3215,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1196
3215
  this.editorDisposables.add(addDisposableListener(this.editorActionButton, "click", () => {
1197
3216
  void this.handleEditorActionButton().catch(error => {
1198
3217
  console.error("Failed to handle editor back action:", error);
1199
- this.notificationService.error(( localize(5891, "Failed to finish the prompt action.")));
3218
+ this.notificationService.error(( localize(6510, "Failed to finish the prompt action.")));
1200
3219
  });
1201
3220
  }));
1202
3221
  const itemInfo = append(editorHeader, $(".editor-item-info"));
@@ -1217,7 +3236,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1217
3236
  this.editorPreviewContainer = append(this.editorContentContainer, $(".editor-preview-container"));
1218
3237
  this.editorPreviewScrollContainer = append(this.editorPreviewContainer, $(".editor-preview-scroll-container"));
1219
3238
  this.editorPreviewScrollContainer.setAttribute("role", "region");
1220
- this.editorPreviewScrollContainer.setAttribute("aria-label", ( localize(5892, "Customization preview")));
3239
+ this.editorPreviewScrollContainer.setAttribute("aria-label", ( localize(6511, "Customization preview")));
1221
3240
  this.editorPreviewIssuesContainer = append(this.editorPreviewScrollContainer, $(".editor-preview-issues"));
1222
3241
  const frontMatterSection = append(
1223
3242
  this.editorPreviewScrollContainer,
@@ -1267,6 +3286,10 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1267
3286
  isWorkspaceFile = false,
1268
3287
  isReadOnly = false
1269
3288
  ) {
3289
+ if (!hasReadableCustomizationContent(uri)) {
3290
+ return;
3291
+ }
3292
+ this.editorReturnViewMode = this.viewMode === "migration" ? "migration" : "list";
1270
3293
  this.currentModelRef?.dispose();
1271
3294
  this.currentModelRef = undefined;
1272
3295
  this.editorModelChangeDisposables.clear();
@@ -1344,9 +3367,9 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1344
3367
  this._editorContentChanged = this.workingCopyService.isDirty(uri);
1345
3368
  this.editorSaveIndicator.className = "editor-save-indicator visible saved";
1346
3369
  this.editorSaveIndicator.classList.add(...ThemeIcon.asClassNameArray(Codicon.check));
1347
- this.editorSaveIndicator.title = ( localize(5893, "Saved"));
1348
- this.editorSaveIndicator.setAttribute("aria-label", ( localize(5893, "Saved")));
1349
- status(( localize(5893, "Saved")));
3370
+ this.editorSaveIndicator.title = ( localize(6512, "Saved"));
3371
+ this.editorSaveIndicator.setAttribute("aria-label", ( localize(6512, "Saved")));
3372
+ status(( localize(6512, "Saved")));
1350
3373
  }
1351
3374
  }));
1352
3375
  } catch (error) {
@@ -1357,6 +3380,8 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1357
3380
  }
1358
3381
  }
1359
3382
  goBackToList() {
3383
+ const returnViewMode = this.editorReturnViewMode;
3384
+ this.editorReturnViewMode = "list";
1360
3385
  const fileUri = this.currentEditingUri;
1361
3386
  const backgroundSaveRequest = this.createExistingCustomizationSaveRequest();
1362
3387
  if (backgroundSaveRequest) {
@@ -1385,21 +3410,37 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1385
3410
  this.updateEditorActionButton();
1386
3411
  this.updateEditorDisplayMode();
1387
3412
  this.embeddedEditor?.setModel(null);
1388
- this.viewMode = "list";
3413
+ this.viewMode = returnViewMode;
1389
3414
  this.updateContentVisibility();
1390
- void this.listWidget?.refresh();
3415
+ if (returnViewMode === "migration") {
3416
+ this.renderCustomizationMigrationPage();
3417
+ void this.refreshCustomizationMigrationInfo();
3418
+ } else {
3419
+ void this.listWidget?.refresh();
3420
+ }
1391
3421
  if (this.dimension) {
1392
3422
  this.layout(this.dimension);
1393
3423
  }
1394
- this.listWidget?.focusSearch();
3424
+ if (returnViewMode === "migration") {
3425
+ this.focusCustomizationMigrationPage();
3426
+ } else {
3427
+ this.listWidget?.focusSearch();
3428
+ }
1395
3429
  if (backgroundSaveRequest) {
1396
3430
  const saveRequest = backgroundSaveRequest;
1397
3431
  void this.saveExistingCustomization(saveRequest).catch(error => {
1398
3432
  console.error("Failed to save customization changes on exit:", error);
1399
- this.notificationService.warn(( localize(5894, "Could not save changes to {0}.", basename(saveRequest.fileUri))));
3433
+ this.notificationService.warn(( localize(6513, "Could not save changes to {0}.", basename(saveRequest.fileUri))));
1400
3434
  });
1401
3435
  }
1402
3436
  }
3437
+ focusCustomizationMigrationPage() {
3438
+ if (this.activeMigrationCategoryId !== undefined) {
3439
+ (this.migrationFirstFocusableElement ?? this.migrationLinkElement ?? this.migrationMigrateButton?.element)?.focus();
3440
+ } else {
3441
+ this.migrationDashboard?.focus();
3442
+ }
3443
+ }
1403
3444
  async getOrCreateBuiltinEditingSession(uri) {
1404
3445
  const key = ( uri.toString());
1405
3446
  const existing = this.builtinEditingSessions.get(key);
@@ -1489,7 +3530,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1489
3530
  const workspaceFolder = resolveWorkspaceTargetDirectory(this.workspaceService, promptType);
1490
3531
  if (workspaceFolder) {
1491
3532
  items.push({
1492
- label: ( localize(5895, "Workspace")),
3533
+ label: ( localize(6514, "Workspace")),
1493
3534
  description: this.labelService.getUriLabel(workspaceFolder, {
1494
3535
  relative: true
1495
3536
  }),
@@ -1500,7 +3541,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1500
3541
  const userFolder = await resolveUserTargetDirectory(this.promptsService, promptType);
1501
3542
  if (userFolder) {
1502
3543
  items.push({
1503
- label: ( localize(5896, "User")),
3544
+ label: ( localize(6515, "User")),
1504
3545
  description: this.labelService.getUriLabel(userFolder, {
1505
3546
  relative: true
1506
3547
  }),
@@ -1509,12 +3550,12 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1509
3550
  });
1510
3551
  }
1511
3552
  items.push({
1512
- label: ( localize(5897, "Cancel")),
3553
+ label: ( localize(6516, "Cancel")),
1513
3554
  target: "cancel"
1514
3555
  });
1515
3556
  return this.quickInputService.pick(items, {
1516
3557
  canPickMany: false,
1517
- placeHolder: ( localize(5898, "Select Workspace, User, or Cancel")),
3558
+ placeHolder: ( localize(6517, "Select Workspace, User, or Cancel")),
1518
3559
  matchOnDescription: true
1519
3560
  });
1520
3561
  }
@@ -1547,7 +3588,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1547
3588
  void this.listWidget?.refresh();
1548
3589
  }, error => {
1549
3590
  console.error("Failed to save built-in override:", error);
1550
- this.notificationService.warn(saveRequest.target === "workspace" ? ( localize(5899, "Could not save the override to the workspace.")) : ( localize(5900, "Could not save the override to your user folder.")));
3591
+ this.notificationService.warn(saveRequest.target === "workspace" ? ( localize(6518, "Could not save the override to the workspace.")) : ( localize(6519, "Could not save the override to your user folder.")));
1551
3592
  });
1552
3593
  }
1553
3594
  } finally {
@@ -1563,8 +3604,8 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1563
3604
  const shouldShowBuiltinSaveAction = this.shouldShowBuiltinSaveAction();
1564
3605
  this.editorActionButtonIcon.className = `codicon codicon-${shouldShowBuiltinSaveAction ? Codicon.save.id : Codicon.arrowLeft.id} editor-action-button-icon`;
1565
3606
  this.editorActionButton.disabled = this.editorActionButtonInProgress;
1566
- this.editorActionButton.setAttribute("aria-label", shouldShowBuiltinSaveAction ? ( localize(5901, "Save override")) : ( localize(5889, "Back to list")));
1567
- this.editorActionButton.title = shouldShowBuiltinSaveAction ? ( localize(5902, "Save override (choose Workspace, User, or Cancel)")) : ( localize(5889, "Back to list"));
3607
+ this.editorActionButton.setAttribute("aria-label", shouldShowBuiltinSaveAction ? ( localize(6520, "Save override")) : this.editorReturnViewMode === "migration" ? (this.getActiveMigrationCategory()?.backLabel ?? ( localize(6521, "Back to migration"))) : ( localize(6508, "Back to list")));
3608
+ this.editorActionButton.title = shouldShowBuiltinSaveAction ? ( localize(6522, "Save override (choose Workspace, User, or Cancel)")) : this.editorReturnViewMode === "migration" ? (this.getActiveMigrationCategory()?.backLabel ?? ( localize(6521, "Back to migration"))) : ( localize(6508, "Back to list"));
1568
3609
  }
1569
3610
  shouldShowBuiltinSaveAction() {
1570
3611
  return this._editorContentChanged && this.currentEditingSource === AICustomizationSources.builtin && (this.currentEditingPromptType === PromptsType.prompt || this.currentEditingPromptType === PromptsType.skill);
@@ -1599,7 +3640,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1599
3640
  return true;
1600
3641
  } catch (error) {
1601
3642
  console.error("Failed to save built-in override:", error);
1602
- this.notificationService.warn(target.target === "workspace" ? ( localize(5899, "Could not save the override to the workspace.")) : ( localize(5900, "Could not save the override to your user folder.")));
3643
+ this.notificationService.warn(target.target === "workspace" ? ( localize(6518, "Could not save the override to the workspace.")) : ( localize(6519, "Could not save the override to your user folder.")));
1603
3644
  return false;
1604
3645
  }
1605
3646
  }
@@ -1681,18 +3722,18 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1681
3722
  return "";
1682
3723
  }
1683
3724
  if (this.editorDisplayMode === "raw") {
1684
- return localize(5903, "Preview");
3725
+ return localize(6523, "Preview");
1685
3726
  }
1686
- return this.canEditCurrentRaw() ? ( localize(5904, "Edit")) : ( localize(5905, "View Raw"));
3727
+ return this.canEditCurrentRaw() ? ( localize(6524, "Edit")) : ( localize(6525, "View Raw"));
1687
3728
  }
1688
3729
  getEditorModeButtonTooltip() {
1689
3730
  if (!this.isStructuredPreviewSupported(this.currentEditingPromptType)) {
1690
3731
  return "";
1691
3732
  }
1692
3733
  if (this.editorDisplayMode === "raw") {
1693
- return localize(5906, "Show structured preview");
3734
+ return localize(6526, "Show structured preview");
1694
3735
  }
1695
- return this.canEditCurrentRaw() ? ( localize(5907, "Edit the raw markdown file")) : ( localize(5908, "Show the raw markdown file"));
3736
+ return this.canEditCurrentRaw() ? ( localize(6527, "Edit the raw markdown file")) : ( localize(6528, "Show the raw markdown file"));
1696
3737
  }
1697
3738
  canEditCurrentRaw() {
1698
3739
  const promptType = this.currentEditingPromptType;
@@ -1735,8 +3776,8 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1735
3776
  return;
1736
3777
  }
1737
3778
  const issuesContainer = append(this.editorPreviewIssuesContainer, $(".editor-preview-issues-box"));
1738
- append(issuesContainer, $("div.editor-preview-issues-title")).textContent = ( localize(5909, "Header issues detected"));
1739
- append(issuesContainer, $("div.editor-preview-issues-description")).textContent = ( localize(5910, "Switch to raw view to fix invalid or unsupported metadata entries."));
3779
+ append(issuesContainer, $("div.editor-preview-issues-title")).textContent = ( localize(6529, "Header issues detected"));
3780
+ append(issuesContainer, $("div.editor-preview-issues-description")).textContent = ( localize(6530, "Switch to raw view to fix invalid or unsupported metadata entries."));
1740
3781
  const list = append(issuesContainer, $("ul.editor-preview-issues-list"));
1741
3782
  for (const error of parsedPromptFile.header.errors) {
1742
3783
  append(list, $("li.editor-preview-issues-item")).textContent = error.message;
@@ -1751,7 +3792,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1751
3792
  append(
1752
3793
  this.editorPreviewFrontMatterContainer,
1753
3794
  $("div.editor-preview-empty-state")
1754
- ).textContent = ( localize(5911, "No metadata found in this file."));
3795
+ ).textContent = ( localize(6531, "No metadata found in this file."));
1755
3796
  return;
1756
3797
  }
1757
3798
  for (const attribute of attributes) {
@@ -1767,11 +3808,11 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1767
3808
  append(header, $("div.editor-preview-row-key")).textContent = attribute.key;
1768
3809
  const helpButton = append(header, $("button.editor-preview-row-help"));
1769
3810
  helpButton.type = "button";
1770
- helpButton.setAttribute("aria-label", ( localize(5912, "Show help for '{0}'", attribute.key)));
3811
+ helpButton.setAttribute("aria-label", ( localize(6532, "Show help for '{0}'", attribute.key)));
1771
3812
  const helpIcon = append(helpButton, $("span.editor-preview-row-help-icon"));
1772
3813
  helpIcon.classList.add(...ThemeIcon.asClassNameArray(Codicon.info));
1773
3814
  helpIcon.setAttribute("aria-hidden", "true");
1774
- const description = getAttributeDefinition(attribute.key, promptType, target)?.description ?? ( localize(5913, "Custom metadata field `{0}`.", attribute.key));
3815
+ const description = getAttributeDefinition(attribute.key, promptType, target)?.description ?? ( localize(6533, "Custom metadata field `{0}`.", attribute.key));
1775
3816
  const helpHover = this.editorPreviewDisposables.add(
1776
3817
  this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), helpButton, {
1777
3818
  markdown: ( new MarkdownString(description)),
@@ -1794,7 +3835,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1794
3835
  }
1795
3836
  const bodyContent = parsedPromptFile.body?.getContent() ?? "";
1796
3837
  if (!bodyContent.trim()) {
1797
- append(this.editorPreviewBodyContainer, $("div.editor-preview-empty-state")).textContent = ( localize(5914, "No markdown body found in this file."));
3838
+ append(this.editorPreviewBodyContainer, $("div.editor-preview-empty-state")).textContent = ( localize(6534, "No markdown body found in this file."));
1798
3839
  return;
1799
3840
  }
1800
3841
  const markdown = ( new MarkdownString(bodyContent, {
@@ -1870,18 +3911,25 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1870
3911
  this.instantiationService.createInstance(EmbeddedMcpServerDetail, detailBody)
1871
3912
  );
1872
3913
  const backButton = append(this.embeddedMcpDetail.leadingSlot, $("button.editor-back-button"));
3914
+ this.mcpDetailBackButton = backButton;
1873
3915
  backButton.setAttribute("type", "button");
1874
- backButton.setAttribute("aria-label", ( localize(5915, "Back to MCP servers")));
3916
+ backButton.setAttribute("aria-label", ( localize(6535, "Back to MCP servers")));
1875
3917
  this.editorDisposables.add(
1876
- this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), backButton, ( localize(5916, "Back to MCP servers")))
3918
+ this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), backButton, ( localize(6536, "Back to MCP servers")))
3919
+ );
3920
+ const backIconEl = append(
3921
+ backButton,
3922
+ $(`.codicon.codicon-${Codicon.arrowLeft.id}.editor-action-button-icon`)
1877
3923
  );
1878
- const backIconEl = append(backButton, $(`.codicon.codicon-${Codicon.arrowLeft.id}`));
1879
3924
  backIconEl.setAttribute("aria-hidden", "true");
1880
3925
  this.editorDisposables.add(addDisposableListener(backButton, "click", () => {
1881
3926
  this.goBackFromMcpDetail();
1882
3927
  }));
1883
3928
  }
1884
3929
  async showEmbeddedMcpDetail(server) {
3930
+ if (!this.embeddedMcpDetail) {
3931
+ this.createEmbeddedMcpDetail();
3932
+ }
1885
3933
  if (!this.embeddedMcpDetail) {
1886
3934
  return;
1887
3935
  }
@@ -1892,6 +3940,7 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1892
3940
  if (this.dimension) {
1893
3941
  this.layout(this.dimension);
1894
3942
  }
3943
+ this.mcpDetailBackButton?.focus();
1895
3944
  }
1896
3945
  goBackFromMcpDetail() {
1897
3946
  this.mcpDetailDisposables.clear();
@@ -1911,11 +3960,23 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1911
3960
  this.embeddedPluginDetail = this.editorDisposables.add(
1912
3961
  this.instantiationService.createInstance(EmbeddedAgentPluginDetail, detailBody)
1913
3962
  );
3963
+ this.editorDisposables.add(this.embeddedPluginDetail.onDidRequestOpenSkill(uri => {
3964
+ this.openSkillFromPluginDetail(uri);
3965
+ }));
3966
+ this.editorDisposables.add(this.embeddedPluginDetail.onDidRequestOpenAgent(uri => {
3967
+ this.openPromptsItemFromPluginDetail(AICustomizationManagementSection.Agents, uri);
3968
+ }));
3969
+ this.editorDisposables.add(this.embeddedPluginDetail.onDidRequestOpenSection(section => {
3970
+ this.openSectionFromPluginDetail(section);
3971
+ }));
3972
+ this.editorDisposables.add(this.embeddedPluginDetail.onDidUninstall(() => {
3973
+ this.goBackFromPluginDetail();
3974
+ }));
1914
3975
  const backButton = append(this.embeddedPluginDetail.leadingSlot, $("button.editor-back-button"));
1915
3976
  backButton.setAttribute("type", "button");
1916
- backButton.setAttribute("aria-label", ( localize(5917, "Back to plugins")));
3977
+ backButton.setAttribute("aria-label", ( localize(6537, "Back to plugins")));
1917
3978
  this.editorDisposables.add(
1918
- this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), backButton, ( localize(5918, "Back to plugins")))
3979
+ this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), backButton, ( localize(6538, "Back to plugins")))
1919
3980
  );
1920
3981
  const backIconEl = append(backButton, $(`.codicon.codicon-${Codicon.arrowLeft.id}`));
1921
3982
  backIconEl.setAttribute("aria-hidden", "true");
@@ -1935,6 +3996,65 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1935
3996
  this.layout(this.dimension);
1936
3997
  }
1937
3998
  }
3999
+ async openSkillFromPluginDetail(uri) {
4000
+ await this.openPromptsItemFromPluginDetail(AICustomizationManagementSection.Skills, uri);
4001
+ }
4002
+ async openPromptsItemFromPluginDetail(section, uri) {
4003
+ this.pluginDetailDisposables.clear();
4004
+ this.embeddedPluginDetail?.clearInput();
4005
+ this.pluginDetailReturnSection = undefined;
4006
+ this.viewMode = "list";
4007
+ this.selectedSection = section;
4008
+ this.sectionContextKey.set(section);
4009
+ this.storageService.store(
4010
+ AI_CUSTOMIZATION_MANAGEMENT_SELECTED_SECTION_KEY,
4011
+ section,
4012
+ StorageScope.PROFILE,
4013
+ StorageTarget.USER
4014
+ );
4015
+ this.updateContentVisibility();
4016
+ const navigationGeneration = this.contentNavigationGeneration;
4017
+ await this.listWidget.setSection(section);
4018
+ const modelSection = ITEMS_MODEL_SECTIONS.find(s => s === section);
4019
+ if (modelSection) {
4020
+ await this.itemsModel.whenSectionLoaded(modelSection);
4021
+ if (!isCurrentPluginContributionNavigation(
4022
+ navigationGeneration,
4023
+ this.contentNavigationGeneration,
4024
+ section,
4025
+ this.selectedSection,
4026
+ this.viewMode === "list"
4027
+ )) {
4028
+ return;
4029
+ }
4030
+ const item = this.itemsModel.getItems(modelSection).get().find(item => isEqual(item.uri, uri));
4031
+ if (item) {
4032
+ const source = item.source;
4033
+ const isWorkspaceFile = source === AICustomizationSources.local;
4034
+ const isReadOnly = !source || source === AICustomizationSources.extension || source === AICustomizationSources.plugin || source === AICustomizationSources.builtin;
4035
+ this.showEmbeddedEditor(
4036
+ item.uri,
4037
+ item.name,
4038
+ item.promptType,
4039
+ source ?? AICustomizationSources.builtin,
4040
+ isWorkspaceFile,
4041
+ isReadOnly
4042
+ );
4043
+ }
4044
+ }
4045
+ this.ensureSectionsListReflectsActiveSection(section);
4046
+ if (this.dimension) {
4047
+ this.layout(this.dimension);
4048
+ }
4049
+ }
4050
+ openSectionFromPluginDetail(section) {
4051
+ this.pluginDetailDisposables.clear();
4052
+ this.embeddedPluginDetail?.clearInput();
4053
+ this.pluginDetailReturnSection = undefined;
4054
+ this.viewMode = "list";
4055
+ this.updateContentVisibility();
4056
+ this.selectSectionById(section);
4057
+ }
1938
4058
  async showPluginDetail(item) {
1939
4059
  if (this.selectedSection !== AICustomizationManagementSection.Plugins) {
1940
4060
  this.pluginDetailReturnSection = this.selectedSection ?? AICustomizationManagementSection.Agents;
@@ -1969,9 +4089,9 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
1969
4089
  );
1970
4090
  const backButton = append(this.embeddedToolDetail.leadingSlot, $("button.editor-back-button"));
1971
4091
  backButton.setAttribute("type", "button");
1972
- backButton.setAttribute("aria-label", ( localize(5919, "Back to tools")));
4092
+ backButton.setAttribute("aria-label", ( localize(6539, "Back to tools")));
1973
4093
  this.editorDisposables.add(
1974
- this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), backButton, ( localize(5920, "Back to tools")))
4094
+ this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), backButton, ( localize(6540, "Back to tools")))
1975
4095
  );
1976
4096
  const backIconEl = append(backButton, $(`.codicon.codicon-${Codicon.arrowLeft.id}`));
1977
4097
  backIconEl.setAttribute("aria-hidden", "true");
@@ -2002,6 +4122,6 @@ let AICustomizationManagementEditor = class AICustomizationManagementEditor exte
2002
4122
  this.toolsListWidget?.focusSearch();
2003
4123
  }
2004
4124
  };
2005
- 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, IHoverService)), ( __param(14, IMarkdownRendererService)), ( __param(15, IModelService)), ( __param(16, IQuickInputService)), ( __param(17, IFileService)), ( __param(18, INotificationService)), ( __param(19, ICustomizationHarnessService)), ( __param(20, IViewsService)), ( __param(21, ILabelService)), ( __param(22, IAICustomizationItemsModel))], AICustomizationManagementEditor));
4125
+ 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, ICustomizationMigrationService)), ( __param(11, ITextModelService)), ( __param(12, IConfigurationService)), ( __param(13, IWorkingCopyService)), ( __param(14, IHoverService)), ( __param(15, IMarkdownRendererService)), ( __param(16, IModelService)), ( __param(17, IQuickInputService)), ( __param(18, IFileService)), ( __param(19, INotificationService)), ( __param(20, IFileDialogService)), ( __param(21, IDialogService)), ( __param(22, IContextMenuService)), ( __param(23, ICustomizationHarnessService)), ( __param(24, IViewsService)), ( __param(25, ILabelService)), ( __param(26, IAICustomizationItemsModel)), ( __param(27, IMcpService)), ( __param(28, IMcpWorkbenchService)), ( __param(29, IAgentHostCustomizationService))], AICustomizationManagementEditor));
2006
4126
 
2007
- export { AICustomizationManagementEditor };
4127
+ export { AICustomizationManagementEditor, isCurrentPluginContributionNavigation };