@codingame/monaco-vscode-chat-service-override 37.6.1 → 38.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 (690) hide show
  1. package/common.js +64 -2
  2. package/index.js +3 -3
  3. package/package.json +5 -5
  4. package/session.js +5 -1
  5. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +13 -2
  6. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +164 -12
  7. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +4 -2
  8. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +8 -2
  9. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +34 -4
  10. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +345 -48
  11. package/vscode/src/vs/platform/agentHost/browser/webPubSubRelayTransport.d.ts +135 -0
  12. package/vscode/src/vs/platform/agentHost/browser/webPubSubRelayTransport.js +510 -0
  13. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +4 -1
  14. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +12 -2
  15. package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.d.ts +2 -11
  16. package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.js +14 -27
  17. package/vscode/src/vs/platform/agentHost/common/agentHostOperatingSystem.d.ts +6 -0
  18. package/vscode/src/vs/platform/agentHost/common/agentHostOperatingSystem.js +43 -0
  19. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +158 -73
  20. package/vscode/src/vs/platform/agentHost/common/artifactToolsConfiguration.d.ts +16 -0
  21. package/vscode/src/vs/platform/agentHost/common/artifactToolsConfiguration.js +26 -0
  22. package/vscode/src/vs/platform/agentHost/common/cloudSandboxAgentHost.d.ts +273 -0
  23. package/vscode/src/vs/platform/agentHost/common/cloudSandboxAgentHost.js +61 -0
  24. package/vscode/src/vs/platform/agentHost/common/codexAccountPlan.d.ts +3 -0
  25. package/vscode/src/vs/platform/agentHost/common/codexAccountPlan.js +30 -0
  26. package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.js +8 -8
  27. package/vscode/src/vs/platform/agentHost/common/meta/agentHostChatInputState.d.ts +2 -0
  28. package/vscode/src/vs/platform/agentHost/common/meta/agentModelMeta.d.ts +7 -0
  29. package/vscode/src/vs/platform/agentHost/common/meta/agentModelMeta.js +17 -0
  30. package/vscode/src/vs/platform/agentHost/common/meta/copilotd/cloudSandboxProjectMeta.d.ts +12 -0
  31. package/vscode/src/vs/platform/agentHost/common/meta/copilotd/cloudSandboxProjectMeta.js +48 -0
  32. package/vscode/src/vs/platform/agentHost/common/meta/{agentCustomizationMeta.js → vscode/agentCustomizationMeta.js} +2 -2
  33. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentHostChatInputState.d.ts +16 -0
  34. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentHostChatInputState.js +16 -0
  35. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelConfigurationMeta.d.ts +8 -0
  36. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelConfigurationMeta.js +20 -0
  37. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelEnsembleMeta.d.ts +8 -0
  38. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelEnsembleMeta.js +11 -0
  39. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelPricing.js +141 -0
  40. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentPermissionResponseMeta.d.ts +12 -0
  41. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentPermissionResponseMeta.js +25 -0
  42. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentSandboxDiagnostics.d.ts +5 -0
  43. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentSandboxDiagnostics.js +11 -0
  44. package/vscode/src/vs/platform/agentHost/common/meta/{clientPluginCustomizationMeta.d.ts → vscode/clientPluginCustomizationMeta.d.ts} +10 -0
  45. package/vscode/src/vs/platform/agentHost/common/meta/{clientPluginCustomizationMeta.js → vscode/clientPluginCustomizationMeta.js} +7 -1
  46. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +35 -24
  47. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +85 -20
  48. package/vscode/src/vs/platform/agentHost/common/sessionDataService.d.ts +440 -0
  49. package/vscode/src/vs/platform/agentHost/common/sessionDataService.js +11 -0
  50. package/vscode/src/vs/platform/agentHost/common/sessionDataService.service.d.ts +104 -0
  51. package/vscode/src/vs/platform/agentHost/common/taskEventReplay.d.ts +48 -0
  52. package/vscode/src/vs/platform/agentHost/common/taskEventReplay.js +238 -0
  53. package/vscode/src/vs/platform/agentHost/common/titleGenerationConfiguration.d.ts +35 -0
  54. package/vscode/src/vs/platform/agentHost/common/titleGenerationConfiguration.js +49 -0
  55. package/vscode/src/vs/platform/agentHost/common/vscodeSandboxPaths.d.ts +9 -0
  56. package/vscode/src/vs/platform/agentHost/common/vscodeSandboxPaths.js +13 -0
  57. package/vscode/src/vs/platform/agentHost/common/webPubSub/chunking.d.ts +102 -0
  58. package/vscode/src/vs/platform/agentHost/common/webPubSub/chunking.js +260 -0
  59. package/vscode/src/vs/platform/agentHost/common/webPubSub/framing.d.ts +102 -0
  60. package/vscode/src/vs/platform/agentHost/common/webPubSub/framing.js +115 -0
  61. package/vscode/src/vs/platform/agentHost/common/webPubSub/groups.d.ts +46 -0
  62. package/vscode/src/vs/platform/agentHost/common/webPubSub/groups.js +92 -0
  63. package/vscode/src/vs/platform/customizationMarketplace/common/mcpGalleryMarketplaceProvider.d.ts +22 -0
  64. package/vscode/src/vs/platform/customizationMarketplace/common/mcpGalleryMarketplaceProvider.js +158 -0
  65. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +4 -2
  66. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +12 -5
  67. package/vscode/src/vs/platform/otel/common/chatUserInteraction.d.ts +20 -0
  68. package/vscode/src/vs/platform/otel/common/chatUserInteraction.js +45 -0
  69. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +1 -4
  70. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +0 -9
  71. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +1 -4
  72. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +0 -15
  73. package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +1 -1
  74. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +6 -24
  75. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +51 -109
  76. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.d.ts +1 -1
  77. package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +1 -1
  78. package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileDiffView.js +7 -7
  79. package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileMultiDiffView.js +8 -8
  80. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +1 -1
  81. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +11 -10
  82. package/vscode/src/vs/sessions/contrib/chat/browser/branchChatSessionAction.js +2 -2
  83. package/vscode/src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.js +6 -6
  84. package/vscode/src/vs/sessions/contrib/chat/browser/chat.contribution.js +460 -94
  85. package/vscode/src/vs/sessions/contrib/chat/browser/chatBackgroundTint.d.ts +35 -0
  86. package/vscode/src/vs/sessions/contrib/chat/browser/chatBackgroundTint.js +652 -0
  87. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +9 -0
  88. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionAction.d.ts +11 -0
  89. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionAction.js +118 -0
  90. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionFolderQuickPickAction.js +4 -4
  91. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionOnboardingTargets.d.ts +7 -0
  92. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionOnboardingTargets.js +36 -0
  93. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionPickerTryout.d.ts +26 -0
  94. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionPickerTryout.js +145 -0
  95. package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.d.ts +1 -1
  96. package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.js +24 -6
  97. package/vscode/src/vs/sessions/contrib/chat/browser/runScriptAction.js +94 -89
  98. package/vscode/src/vs/sessions/contrib/chat/browser/runScriptCustomTaskWidget.js +21 -21
  99. package/vscode/src/vs/sessions/contrib/chat/browser/sessionTurnChanges.d.ts +0 -1
  100. package/vscode/src/vs/sessions/contrib/chat/browser/sessionTurnChanges.js +28 -29
  101. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.d.ts +7 -0
  102. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.js +501 -107
  103. package/vscode/src/vs/sessions/contrib/chat/browser/voiceBridge.contribution.js +5 -1
  104. package/vscode/src/vs/sessions/contrib/chat/browser/workbenchSessionTaskRunner.d.ts +3 -3
  105. package/vscode/src/vs/sessions/contrib/chat/browser/workbenchSessionTaskRunner.js +4 -4
  106. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.d.ts +8 -1
  107. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.js +214 -17
  108. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettings.contribution.js +16 -9
  109. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsFileSystemProvider.js +4 -4
  110. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettings.contribution.js +7 -6
  111. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettingsFileSystemProvider.js +4 -4
  112. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/mobile/mobileChatPhoneInputPresenter.js +226 -0
  113. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openAgentHostStateFileAction.js +1 -1
  114. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openSubagentChat.d.ts +11 -0
  115. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openSubagentChat.js +122 -0
  116. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudAutomationStore.d.ts +67 -0
  117. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudAutomationStore.js +695 -0
  118. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudSandboxSessionConfig.d.ts +4 -0
  119. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudSandboxSessionConfig.js +39 -0
  120. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.js +39 -22
  121. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.d.ts +1 -19
  122. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.js +42 -158
  123. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.d.ts +87 -0
  124. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.js +176 -0
  125. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.d.ts +422 -0
  126. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.js +2444 -0
  127. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.d.ts +91 -0
  128. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.js +620 -0
  129. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/modePicker.d.ts +5 -4
  130. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/modePicker.js +21 -12
  131. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.js +2 -11
  132. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.d.ts +46 -0
  133. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.js +321 -0
  134. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.d.ts +104 -0
  135. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.js +345 -0
  136. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.d.ts +14 -1
  137. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.js +20 -3
  138. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilter.contribution.d.ts +7 -1
  139. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilter.contribution.js +8 -12
  140. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilterActionViewItem.d.ts +8 -4
  141. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilterActionViewItem.js +88 -84
  142. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/manageRemoteAgentHosts.js +74 -20
  143. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/managedReconnectAgentHostContribution.js +2 -2
  144. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/media/hostFilter.css +34 -19
  145. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/media/hostPickerSheet.css +35 -3
  146. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.d.ts +37 -0
  147. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.js +305 -0
  148. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/mobileHostFilterActionViewItem.d.ts +4 -1
  149. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/mobileHostFilterActionViewItem.js +75 -20
  150. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHost.contribution.d.ts +1 -80
  151. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHost.contribution.js +19 -548
  152. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.d.ts +4 -0
  153. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.js +218 -122
  154. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.d.ts +5 -4
  155. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.js +43 -8
  156. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/wslAgentHost.contribution.js +1 -1
  157. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/media/sessionWorktreeCleanupEditor.css +223 -0
  158. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionStorageCleanupConfiguration.d.ts +2 -0
  159. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionStorageCleanupConfiguration.js +16 -0
  160. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupAccessibilityHelp.d.ts +15 -0
  161. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupAccessibilityHelp.js +49 -0
  162. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditor.d.ts +66 -0
  163. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditor.js +458 -0
  164. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditorInput.d.ts +13 -0
  165. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditorInput.js +35 -0
  166. package/vscode/src/vs/sessions/contrib/sessions/browser/customizationMcpServerCount.d.ts +15 -0
  167. package/vscode/src/vs/sessions/contrib/sessions/browser/customizationMcpServerCount.js +37 -0
  168. package/vscode/src/vs/sessions/contrib/sessions/browser/mobile/mobileOverlayContribution.js +4 -4
  169. package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.d.ts +1 -1
  170. package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.js +5 -1
  171. package/vscode/src/vs/sessions/skills/create-draft-pr/SKILL.md +1 -1
  172. package/vscode/src/vs/sessions/skills/create-pr/SKILL.md +1 -1
  173. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +1 -0
  174. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +2 -2
  175. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -2
  176. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +56 -31
  177. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +2 -2
  178. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +21 -21
  179. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +3 -3
  180. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +3 -3
  181. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +6 -6
  182. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +14 -14
  183. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +11 -11
  184. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +9 -9
  185. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +5 -5
  186. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +2 -2
  187. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +13 -13
  188. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +7 -7
  189. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +30 -29
  190. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +1 -1
  191. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +3 -1
  192. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +44 -8
  193. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatBackgroundShellOutputAccessibleView.d.ts +11 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatBackgroundShellOutputAccessibleView.js +34 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +1 -1
  196. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +85 -29
  197. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatTerminalOutputAccessibleView.js +33 -1
  198. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  199. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +1 -1
  200. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +318 -103
  201. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  202. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +60 -28
  203. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +41 -16
  204. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +49 -10
  205. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +7 -7
  206. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  207. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +7 -7
  208. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +5 -10
  209. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  210. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +15 -21
  211. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +16 -15
  212. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
  213. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  214. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +24 -23
  215. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  216. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +5 -1
  217. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +44 -31
  218. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +32 -32
  219. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.js +6 -6
  220. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.js +7 -7
  221. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +3 -1
  222. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +22 -26
  223. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  224. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +9 -0
  225. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +180 -26
  226. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +6 -2
  227. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +82 -69
  228. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.d.ts +4 -1
  229. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.js +32 -10
  230. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.js +12 -0
  231. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +5 -1
  232. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +37 -12
  233. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.d.ts +6 -1
  234. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +53 -7
  235. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputState.d.ts +25 -0
  236. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputState.js +144 -0
  237. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.d.ts +6 -1
  238. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.js +88 -12
  239. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationMarketplaceInstallProvider.d.ts +51 -0
  240. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationMarketplaceInstallProvider.js +642 -0
  241. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostFirstResponseTelemetry.d.ts +118 -0
  242. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostFirstResponseTelemetry.js +35 -0
  243. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.d.ts +9 -1
  244. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +49 -7
  245. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +21 -17
  246. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +38 -10
  247. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerMigrationProvider.d.ts +50 -0
  248. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerMigrationProvider.js +415 -0
  249. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.d.ts +12 -2
  250. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.js +124 -31
  251. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.d.ts +7 -2
  252. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.js +116 -5
  253. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.d.ts +3 -1
  254. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +6 -6
  255. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
  256. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.js +4 -4
  257. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRemoteByokNotification.d.ts +23 -0
  258. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRemoteByokNotification.js +134 -0
  259. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.d.ts +14 -36
  260. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +286 -126
  261. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.d.ts +1 -1
  262. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.js +3 -2
  263. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotification.d.ts +17 -0
  264. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotification.js +94 -0
  265. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotifications.d.ts +14 -0
  266. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotifications.js +63 -0
  267. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.d.ts +52 -88
  268. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +1030 -349
  269. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.d.ts +20 -4
  270. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +722 -114
  271. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.js +1 -1
  272. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.d.ts +3 -2
  273. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.js +88 -9
  274. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.d.ts +16 -1
  275. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.js +87 -10
  276. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +1 -1
  277. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.js +2 -2
  278. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.js +4 -4
  279. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +4 -4
  280. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.js +4 -3
  281. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +2 -1
  282. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +12 -4
  283. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +191 -60
  284. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.js +4 -3
  285. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.js +6 -6
  286. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.d.ts +4 -0
  287. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.js +27 -17
  288. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.d.ts +2 -0
  289. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.js +2 -2
  290. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuation.contribution.d.ts +1 -0
  291. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuation.contribution.js +127 -0
  292. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuationGuide.d.ts +44 -0
  293. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuationGuide.js +415 -0
  294. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuationPresenter.d.ts +25 -0
  295. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuationPresenter.js +160 -0
  296. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/copilotConfigSlashSubmitHandler.d.ts +3 -1
  297. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/copilotConfigSlashSubmitHandler.js +5 -1
  298. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.d.ts +7 -2
  299. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.js +122 -34
  300. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +22 -4
  301. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +74 -39
  302. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +1 -1
  303. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +4 -0
  304. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +89 -68
  305. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +3 -3
  306. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  307. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  308. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  309. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  310. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -25
  311. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  312. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  313. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +4 -2
  314. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +50 -22
  315. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/repositoryPicker.d.ts +21 -0
  316. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/repositoryPicker.js +122 -0
  317. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.d.ts +81 -1
  318. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +213 -13
  319. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +136 -100
  320. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationUrlHandler.d.ts +16 -0
  321. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationUrlHandler.js +76 -0
  322. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -1
  323. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +2 -2
  324. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotConnectorsService.d.ts +139 -0
  325. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotConnectorsService.js +944 -0
  326. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplace.contribution.d.ts +1 -0
  327. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplace.contribution.js +119 -0
  328. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallService.d.ts +110 -0
  329. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallService.js +1485 -0
  330. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallationAssociation.d.ts +38 -0
  331. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallationAssociation.js +48 -0
  332. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceWorkbenchService.d.ts +50 -0
  333. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceWorkbenchService.js +213 -0
  334. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +19 -12
  335. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.d.ts +6 -22
  336. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +87 -263
  337. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationsTelemetryService.d.ts +25 -0
  338. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationsTelemetryService.js +217 -0
  339. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/githubMcpRegistryIcons.d.ts +4 -0
  340. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/githubMcpRegistryIcons.js +605 -0
  341. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.d.ts +11 -4
  342. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.js +377 -184
  343. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  344. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -0
  345. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +753 -617
  346. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +1 -1
  347. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +118 -40
  348. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
  349. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +124 -124
  350. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +72 -72
  351. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  352. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  353. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +3 -3
  354. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  355. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  356. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  357. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  358. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
  359. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
  360. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  361. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
  362. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  363. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  364. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +35 -35
  365. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  366. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.d.ts +4 -2
  367. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +47 -42
  368. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +29 -6
  369. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  370. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +2 -1
  371. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +6 -3
  372. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  373. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
  374. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  375. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  376. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -3
  377. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +10 -7
  378. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +5 -3
  379. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +11 -5
  380. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +4 -3
  381. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +10 -7
  382. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +10 -10
  383. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +24 -11
  384. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +2 -2
  385. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +16 -20
  386. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +2 -2
  387. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +2 -2
  388. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  389. package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.js +1 -1
  390. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +12 -4
  391. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +52 -61
  392. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +17 -11
  393. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +2 -0
  394. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +3 -0
  395. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  396. package/vscode/src/vs/workbench/contrib/chat/browser/chatNetworkConfiguration.d.ts +4 -0
  397. package/vscode/src/vs/workbench/contrib/chat/browser/chatNetworkConfiguration.js +136 -0
  398. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
  399. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +52 -30
  400. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +71 -17
  401. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.d.ts +12 -5
  402. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +104 -16
  403. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.d.ts +5 -1
  404. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +1 -1
  405. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.d.ts +3 -1
  406. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +84 -64
  407. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetColorsWidget.d.ts +29 -0
  408. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetColorsWidget.js +221 -0
  409. package/vscode/src/vs/workbench/contrib/chat/browser/chatProgressConfiguration.d.ts +27 -0
  410. package/vscode/src/vs/workbench/contrib/chat/browser/chatProgressConfiguration.js +72 -0
  411. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.d.ts +4 -0
  412. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +4 -2
  413. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +25 -25
  414. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  415. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +2 -2
  416. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +1 -0
  417. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +52 -32
  418. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +3 -1
  419. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +65 -57
  420. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  421. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupMicrosoftProbe.d.ts +82 -0
  422. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupMicrosoftProbe.js +213 -0
  423. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -27
  424. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +5 -12
  425. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +93 -45
  426. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -1
  427. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +54 -55
  428. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +5 -1
  429. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +51 -15
  430. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusPromo.d.ts +43 -0
  431. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusPromo.js +230 -0
  432. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/codexStatusEntry.d.ts +20 -0
  433. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/codexStatusEntry.js +101 -0
  434. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +30 -19
  435. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +4 -2
  436. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +2 -0
  437. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +1 -0
  438. package/vscode/src/vs/workbench/contrib/chat/browser/chatUserInteractionOTel.d.ts +27 -0
  439. package/vscode/src/vs/workbench/contrib/chat/browser/chatUserInteractionOTel.js +88 -0
  440. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +7 -7
  441. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  442. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
  443. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
  444. package/vscode/src/vs/workbench/contrib/chat/browser/editorChatUsage.contribution.d.ts +34 -0
  445. package/vscode/src/vs/workbench/contrib/chat/browser/editorChatUsage.contribution.js +121 -0
  446. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  447. package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatHarnessSwitchFeedbackSurveyService.d.ts +34 -0
  448. package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatHarnessSwitchFeedbackSurveyService.js +192 -0
  449. package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatModelFeedbackSurveyPromptContribution.js +11 -24
  450. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +3 -3
  451. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatPetAchievements.css +232 -1
  452. package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/modelPickerTryout.contribution.d.ts +3 -0
  453. package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/modelPickerTryout.contribution.js +85 -0
  454. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +6 -6
  455. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +0 -7
  456. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +11 -28
  457. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitHubAuthentication.d.ts +6 -0
  458. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitHubAuthentication.js +18 -0
  459. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +13 -6
  460. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +250 -92
  461. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +2 -1
  462. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +39 -47
  463. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
  464. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +2 -2
  465. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  466. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +2 -2
  467. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  468. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  469. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  470. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  471. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  472. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.js +5 -5
  473. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.js +4 -4
  474. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +4 -4
  475. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +3 -3
  476. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +1 -1
  477. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.js +3 -3
  478. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
  479. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.d.ts +40 -0
  480. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.js +561 -0
  481. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.d.ts +133 -0
  482. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.js +1176 -0
  483. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxConnectionCustomization.d.ts +17 -0
  484. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxConnectionCustomization.js +76 -0
  485. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxCredentialRefresh.d.ts +54 -0
  486. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxCredentialRefresh.js +220 -0
  487. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxHistoryCache.d.ts +21 -0
  488. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxHistoryCache.js +184 -0
  489. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxLegacySessionPreparation.d.ts +8 -0
  490. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxLegacySessionPreparation.js +165 -0
  491. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxModels.d.ts +43 -0
  492. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxModels.js +162 -0
  493. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxReadOnlySessionHandler.d.ts +40 -0
  494. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxReadOnlySessionHandler.js +129 -0
  495. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.d.ts +166 -0
  496. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.js +838 -0
  497. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.d.ts +40 -0
  498. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.js +604 -0
  499. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.d.ts +45 -0
  500. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.js +251 -0
  501. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.d.ts +289 -0
  502. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.js +497 -0
  503. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.d.ts +46 -0
  504. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.js +277 -0
  505. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlCredentialSealing.d.ts +6 -0
  506. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlCredentialSealing.js +41 -0
  507. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentActions.d.ts +1 -0
  508. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentActions.js +178 -0
  509. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.d.ts +73 -0
  510. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.js +398 -0
  511. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlSharingService.d.ts +45 -0
  512. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlSharingService.js +296 -0
  513. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.d.ts +1 -0
  514. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.js +96 -0
  515. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostAuthentication.d.ts +8 -0
  516. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostAuthentication.js +15 -0
  517. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.d.ts +75 -0
  518. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.js +559 -0
  519. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostConnectionCustomization.d.ts +43 -0
  520. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostConnectionCustomization.js +26 -0
  521. package/vscode/src/vs/{sessions/contrib/providers/remoteAgentHost/browser → workbench/contrib/chat/browser/remoteAgentHost}/remoteAgentHostCustomizationHarness.d.ts +1 -1
  522. package/vscode/src/vs/{sessions/contrib/providers/remoteAgentHost/browser → workbench/contrib/chat/browser/remoteAgentHost}/remoteAgentHostCustomizationHarness.js +8 -8
  523. package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +26 -10
  524. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
  525. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +45 -31
  526. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +8 -8
  527. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +1 -1
  528. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +7 -7
  529. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
  530. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatUpdateRequiredView.d.ts +22 -0
  531. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatUpdateRequiredView.js +110 -0
  532. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  533. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +1 -1
  534. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +15 -15
  535. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +39 -35
  536. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +11 -11
  537. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +5 -1
  538. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +68 -16
  539. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +1 -1
  540. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +16 -1
  541. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +23 -18
  542. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
  543. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +7 -5
  544. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatPet/all_/_.png.js +4 -0
  545. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatPet/buddy-painting-insiders-96.png +0 -0
  546. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatPet/buddy-painting-insiders-96.spritesheet.png +0 -0
  547. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatPet/buddy-painting-stable-96.png +0 -0
  548. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatPet/buddy-painting-stable-96.spritesheet.png +0 -0
  549. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  550. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +15 -18
  551. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +17 -1
  552. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +122 -21
  553. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.d.ts +7 -1
  554. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +46 -11
  555. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -0
  556. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +18 -3
  557. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +24 -7
  558. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +406 -193
  559. package/vscode/src/vs/workbench/contrib/chat/common/customizationMarketplaceInstallService.d.ts +58 -0
  560. package/vscode/src/vs/workbench/contrib/chat/common/customizationMarketplaceInstallService.js +60 -0
  561. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +6 -0
  562. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +5 -1
  563. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
  564. package/vscode/src/vs/workbench/contrib/chat/common/onboarding/modelPickerTryout.d.ts +4 -0
  565. package/vscode/src/vs/workbench/contrib/chat/common/onboarding/modelPickerTryout.js +8 -0
  566. package/vscode/src/vs/workbench/contrib/chat/common/onboarding/newSessionPickerTryout.d.ts +3 -0
  567. package/vscode/src/vs/workbench/contrib/chat/common/onboarding/newSessionPickerTryout.js +8 -0
  568. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +17 -22
  569. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +455 -237
  570. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
  571. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +4 -2
  572. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +25 -17
  573. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +12 -12
  574. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  575. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +11 -14
  576. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.d.ts +1 -1
  577. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +2 -1
  578. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
  579. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +156 -155
  580. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationTelemetryService.d.ts +43 -0
  581. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationTelemetryService.js +225 -0
  582. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +10 -10
  583. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +7 -7
  584. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +6 -0
  585. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +65 -9
  586. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +3 -3
  587. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +4 -4
  588. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +4 -0
  589. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +11 -3
  590. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +22 -22
  591. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  592. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +4 -3
  593. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +46 -24
  594. package/vscode/src/vs/workbench/contrib/github/browser/githubCommitResolver.d.ts +15 -0
  595. package/vscode/src/vs/workbench/contrib/github/browser/githubCommitResolver.js +92 -0
  596. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
  597. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.d.ts +1 -0
  598. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +22 -15
  599. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
  600. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  601. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  602. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.js +1 -1
  603. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionResolver.js +1 -1
  604. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
  605. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  606. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  607. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  608. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  609. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  610. package/vscode/src/vs/workbench/contrib/onboarding/browser/onboarding.d.ts +4 -0
  611. package/vscode/src/vs/workbench/contrib/onboarding/browser/spotlight/spotlightStep.d.ts +10 -0
  612. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  613. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +10 -10
  614. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  615. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  616. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatSessionResolver.js +1 -1
  617. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  618. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +0 -1
  619. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +3 -25
  620. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  621. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +4 -5
  622. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  623. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  624. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  625. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +1 -1
  626. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  627. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  628. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  629. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  630. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +4 -4
  631. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +4 -4
  632. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +0 -1
  633. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +79 -82
  634. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +3 -3
  635. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
  636. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.d.ts +9 -1
  637. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +103 -26
  638. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  639. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  640. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  641. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +1 -1
  642. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +2 -2
  643. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +8 -4
  644. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +1 -5
  645. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +16 -60
  646. package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.js +3 -3
  647. package/vscode/src/vs/workbench/services/agentHost/browser/agentSdkSetupService.d.ts +1 -1
  648. package/vscode/src/vs/workbench/services/agentHost/browser/agentSdkSetupService.js +1 -1
  649. package/vscode/src/vs/workbench/services/agentHost/browser/codexContinuation.d.ts +31 -0
  650. package/vscode/src/vs/workbench/services/agentHost/browser/codexContinuation.js +86 -0
  651. package/vscode/src/vs/workbench/services/agentHost/browser/codexContinuationService.d.ts +76 -0
  652. package/vscode/src/vs/workbench/services/agentHost/browser/codexContinuationService.js +409 -0
  653. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +14 -2
  654. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +56 -7
  655. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.d.ts +0 -8
  656. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +0 -19
  657. package/vscode/src/vs/platform/agentHost/common/agentModelByokMeta.d.ts +0 -24
  658. package/vscode/src/vs/platform/agentHost/common/agentModelByokMeta.js +0 -13
  659. package/vscode/src/vs/platform/agentHost/common/agentModelPricing.js +0 -53
  660. package/vscode/src/vs/platform/agentHost/common/agentSdkSetup.d.ts +0 -53
  661. package/vscode/src/vs/platform/agentHost/common/agentSdkSetup.js +0 -45
  662. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +0 -108
  663. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +0 -15
  664. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/branchPicker.d.ts +0 -31
  665. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/branchPicker.js +0 -150
  666. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/mobilePermissionPicker.contribution.js +0 -37
  667. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/sandboxPicker.d.ts +0 -26
  668. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/sandboxPicker.js +0 -86
  669. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +0 -8
  670. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +0 -241
  671. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.d.ts +0 -142
  672. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.js +0 -746
  673. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +0 -164
  674. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +0 -485
  675. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.d.ts +0 -137
  676. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.js +0 -714
  677. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentOpenChat.css +0 -379
  678. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +0 -219
  679. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +0 -222
  680. package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.d.ts +0 -16
  681. package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +0 -39
  682. /package/vscode/src/vs/platform/agentHost/common/meta/{agentChatSurfaceMeta.d.ts → vscode/agentChatSurfaceMeta.d.ts} +0 -0
  683. /package/vscode/src/vs/platform/agentHost/common/meta/{agentChatSurfaceMeta.js → vscode/agentChatSurfaceMeta.js} +0 -0
  684. /package/vscode/src/vs/platform/agentHost/common/meta/{agentCustomizationMeta.d.ts → vscode/agentCustomizationMeta.d.ts} +0 -0
  685. /package/vscode/src/vs/platform/agentHost/common/meta/{agentEphemeralSessionMeta.d.ts → vscode/agentEphemeralSessionMeta.d.ts} +0 -0
  686. /package/vscode/src/vs/platform/agentHost/common/meta/{agentEphemeralSessionMeta.js → vscode/agentEphemeralSessionMeta.js} +0 -0
  687. /package/vscode/src/vs/platform/agentHost/common/{agentModelPricing.d.ts → meta/vscode/agentModelPricing.d.ts} +0 -0
  688. /package/vscode/src/vs/sessions/contrib/providers/{copilotChatSessions/browser/mobilePermissionPicker.contribution.d.ts → agentHost/browser/mobile/mobileChatPhoneInputPresenter.d.ts} +0 -0
  689. /package/vscode/src/vs/{sessions/contrib/providers/remoteAgentHost/browser → workbench/contrib/chat/browser/remoteAgentHost}/remoteAgentHostLogForwarder.d.ts +0 -0
  690. /package/vscode/src/vs/{sessions/contrib/providers/remoteAgentHost/browser → workbench/contrib/chat/browser/remoteAgentHost}/remoteAgentHostLogForwarder.js +0 -0
@@ -1,9 +1,14 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { getWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
+ import { status } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
4
5
  import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
6
+ import { distinct } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
5
7
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
6
- import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
8
+ import { structuralEquals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/equals';
9
+ import { toErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
10
+ import { Disposable, MutableDisposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
11
+ import { getMediaMime } from '@codingame/monaco-vscode-api/vscode/vs/base/common/mime';
7
12
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
8
13
  import { isEqual, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
9
14
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
@@ -12,47 +17,62 @@ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
12
17
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
13
18
  import { IAgentHostConnectionsService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostConnectionsService.service';
14
19
  import { toAgentHostUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
15
- import { selectDefaultChangeset, resolveChangesetUriTemplate } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/changesetUri';
20
+ import { ChangesetKind, selectDefaultChangeset, resolveChangesetUriTemplate, resolveChatChangesetCatalogue } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/changesetUri';
16
21
  import { SessionArtifactType, isGitHubArtifactLink, readSessionArtifactsNewestFirst } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/sessionArtifacts';
22
+ import { supportsAgentHostArtifactRemoval } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/meta/vscode/agentHostArtifactRemovalMeta';
17
23
  import { observableFromSubscription } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/agentSubscription';
18
- import { readSessionGitHubState, getSessionRelatedPullRequestUrls, getSessionChatResource, DEFAULT_CHAT_ID, parseChatUri, StateComponents, isSubagentChatUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
24
+ import { readSessionGitHubState, getSessionRelatedPullRequestUrls, getSessionChatResource, DEFAULT_CHAT_ID, parseChatUri, StateComponents, isSubagentChatUri, readSessionFolderGitHubState } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
19
25
  import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
26
+ import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
20
27
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
28
+ import { IWorkbenchGitHubService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/github/common/githubService.service';
29
+ import { parseGitHubCommitTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/github/common/githubUrls';
21
30
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
31
+ import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
32
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
33
+ import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
22
34
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
23
- import { getChatPillEntries, CHAT_INPUT_PILLS_ROW_HEIGHT, getChatPillResourceLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/chatPills';
35
+ import { getChatReferencePillPresentation, getChatPillEntries, CHAT_INPUT_PILLS_ROW_HEIGHT, getChatPillResourceLocation, withChatPillHoverLabel, chatPillCopyUrlHoverLabel, chatPillCopyHashHoverLabel, chatPillRemoveArtifactHoverLabel, chatPillRemoveReferenceHoverLabel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/chatPills';
24
36
  import { chatChangesStatsEqual, EMPTY_CHAT_CHANGES_STATS } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/chatChangesPill';
25
37
  import { BrowserEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserEditorInput';
26
38
  import { getAgentBrowserViewsNewestFirst, BrowserViewSharingState, browserViewUrlMatches } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView';
27
39
  import { IBrowserViewWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service';
28
40
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
41
+ import { computeAggregateIssueIcon, computeIssueIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/chatIssue';
29
42
  import { getHighestPriorityPullRequestIcon, computePullRequestIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/chatPullRequest';
30
- import { SessionChatPillKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/sessionChatPills';
43
+ import { SessionChatPillKind, SESSION_CHAT_PILL_KINDS } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/sessionChatPills';
31
44
  import { ISessionChatPillVisibilityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/sessionChatPills.service';
32
- import { CHAT_SUBAGENT_RESOURCE_QUERY_PARAM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
45
+ import { CustomizationIndex, createIncrementalChatCustomizationRefsParser, customizationRefsEqual, sessionChatCustomizationsEqual, resolveChatCustomizations } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/agentHostSessionCustomizations';
46
+ import { CHAT_SUBAGENT_RESOURCE_QUERY_PARAM, CHAT_OPEN_AGENT_HOST_CHAT_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
47
+ import { isUntitledChatSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
33
48
  import { chatPersistentContentVisibleClass } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatWidget';
34
49
  import { previewKind, openChatTurnFile } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatTurnPills';
35
50
  import { openChatFileChanges } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/editorChatResponseFileChangesService';
36
51
  import { StandardChatInputPillSources, ChatInputPills } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatInputPills';
52
+ import { ChatArtifactPillSource, mergeChatArtifactSections } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatArtifactPillSource';
53
+ import { SessionBackgroundShellsControl } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/sessionBackgroundShellsControl';
37
54
  import { createSessionPullRequestPillData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/sessionPullRequestPill';
55
+ import { SessionCustomizations } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/sessionCustomizations';
56
+ import { createSessionSubagentsPillData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/sessionSubagentsPill';
57
+ import { AgentHostBackgroundShellOutputs } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostBackgroundShells';
38
58
  import { agentHostChangesetFileToEntryDiff } from './agentHostResponseFileChanges.js';
59
+ import { IAgentHostUntitledProvisionalSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service';
60
+ import { GitHubCommitResolver } from '../../../../github/browser/githubCommitResolver.js';
61
+ import { getPullRequestResourceStatus, createPullRequestResourceHover, createIssueResourceHover, getIssueResourceStatus, getPullRequestChecksStatusLabel, createCommitResourceHover } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/github/browser/githubResourceHover';
62
+ import { GitHubResourceDetailsResolver, getGitHubResourcePresentation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/github/browser/githubResourceDetails';
63
+ import { ChatPillHoverCache } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/chatPillHover';
39
64
  import { observableSignal } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignal';
40
65
  import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
41
66
  import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
42
67
  import { derivedOpts, derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
43
68
  import { constObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/constObservable';
69
+ import { ChatOriginKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-chat/state';
44
70
  import { derivedObservableWithCache } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/utils';
45
71
  import { ChangesetStatus } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/state';
46
- import { ChatOriginKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-chat/state';
72
+ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
73
+ import { SessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/state';
74
+ import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
47
75
 
48
- const offeredPillKinds = [
49
- SessionChatPillKind.Changes,
50
- SessionChatPillKind.PullRequests,
51
- SessionChatPillKind.Issues,
52
- SessionChatPillKind.Artifacts,
53
- SessionChatPillKind.References,
54
- SessionChatPillKind.Browsers
55
- ];
56
76
  const artifactIcons = ( new Map([
57
77
  [SessionArtifactType.PullRequest, Codicon.gitPullRequest],
58
78
  [SessionArtifactType.Issue, Codicon.issues],
@@ -62,22 +82,22 @@ const artifactIcons = ( new Map([
62
82
  ]));
63
83
  const artifactSectionOrder = [{
64
84
  type: SessionArtifactType.PullRequest,
65
- title: ( localize(8181, "Pull Requests"))
85
+ title: ( localize(9790, "Pull Requests"))
66
86
  }, {
67
87
  type: SessionArtifactType.Issue,
68
- title: ( localize(8182, "Issues"))
88
+ title: ( localize(9791, "Issues"))
69
89
  }, {
70
90
  type: SessionArtifactType.Commit,
71
- title: ( localize(8183, "Commits"))
91
+ title: ( localize(9792, "Commits"))
72
92
  }, {
73
93
  type: SessionArtifactType.Website,
74
- title: ( localize(8184, "Websites"))
94
+ title: ( localize(9793, "Websites"))
75
95
  }, {
76
96
  type: SessionArtifactType.File,
77
- title: ( localize(8185, "Files"))
97
+ title: ( localize(9794, "Files"))
78
98
  }, {
79
99
  type: SessionArtifactType.Resource,
80
- title: ( localize(8186, "Resources"))
100
+ title: ( localize(9795, "Resources"))
81
101
  }];
82
102
  function linkKey(link) {
83
103
  return link.replace(/\/+$/, "").toLowerCase();
@@ -99,38 +119,52 @@ function dedupeLinks(...groups) {
99
119
  function setsEqual(first, second) {
100
120
  return first === second || (first.size === second.size && [...first].every(value => ( second.has(value))));
101
121
  }
102
- function isPromotedArtifact(artifact, type) {
122
+ function isPromotedGitHubArtifact(artifact, type) {
103
123
  return artifact.isArtifact && artifact.type === type && artifact.isGitHub === true && typeof artifact.link === "string" && isGitHubArtifactLink(artifact.link);
104
124
  }
105
- function getAgentHostSessionPillMetadata(meta) {
125
+ function getAgentHostSessionPillMetadata(meta, sessionWorkingDirectory) {
106
126
  const entries = readSessionArtifactsNewestFirst(meta);
107
- const github = readSessionGitHubState(meta);
108
- const artifactPullRequests = entries.filter(entry => isPromotedArtifact(entry, SessionArtifactType.PullRequest));
109
- const artifactIssues = entries.filter(entry => isPromotedArtifact(entry, SessionArtifactType.Issue));
127
+ const github = readSessionGitHubState(meta, sessionWorkingDirectory);
128
+ const recordedPullRequests = distinct(
129
+ entries.filter(entry => isPromotedGitHubArtifact(entry, SessionArtifactType.PullRequest)),
130
+ entry => linkKey(entry.link)
131
+ );
132
+ const recordedIssues = distinct(
133
+ entries.filter(entry => isPromotedGitHubArtifact(entry, SessionArtifactType.Issue)),
134
+ entry => linkKey(entry.link)
135
+ );
110
136
  const pullRequestUrls = dedupeLinks(
111
- artifactPullRequests.map(entry => entry.link),
137
+ recordedPullRequests.map(entry => entry.link),
112
138
  getSessionRelatedPullRequestUrls(github)
113
139
  );
114
140
  const pullRequestTitles = ( new Map(
115
- artifactPullRequests.filter(entry => entry.label).map(entry => [linkKey(entry.link), entry.label])
141
+ recordedPullRequests.filter(entry => entry.label).map(entry => [linkKey(entry.link), entry.label])
116
142
  ));
117
- const issueUrls = dedupeLinks(artifactIssues.map(entry => entry.link));
118
- const issueTitles = ( new Map(artifactIssues.map(entry => [linkKey(entry.link), entry.label])));
143
+ const pullRequestArtifacts = ( new Map(recordedPullRequests.map(entry => [linkKey(entry.link), entry])));
144
+ const issueUrls = dedupeLinks(recordedIssues.map(entry => entry.link));
145
+ const issueTitles = ( new Map(recordedIssues.map(entry => [linkKey(entry.link), entry.label])));
146
+ const issueArtifacts = ( new Map(recordedIssues.map(entry => [linkKey(entry.link), entry])));
119
147
  const promotedLinks = ( new Set([...pullRequestUrls, ...issueUrls].map(linkKey)));
120
- const remaining = entries.filter(entry => !entry.link || !( promotedLinks.has(linkKey(entry.link))));
121
148
  return {
122
149
  pullRequestUrls,
123
150
  pullRequestTitles,
151
+ pullRequestArtifacts,
124
152
  issueUrls,
125
153
  issueTitles,
126
- artifacts: remaining.filter(entry => entry.isArtifact),
127
- references: remaining.filter(entry => !entry.isArtifact)
154
+ issueArtifacts,
155
+ artifacts: entries.filter(entry => entry.isArtifact && (!entry.link || !( promotedLinks.has(linkKey(entry.link))))),
156
+ references: entries.filter(entry => !entry.isArtifact)
128
157
  };
129
158
  }
130
- function resolveAgentHostSessionChangeset(backendSession, changesets, defaultKind) {
159
+ const CHANGES_PILL_DEFAULT_CHANGESET_KIND = ChangesetKind.Session;
160
+ function resolveAgentHostChangeset(
161
+ ownerResource,
162
+ changesets,
163
+ defaultKind = CHANGES_PILL_DEFAULT_CHANGESET_KIND
164
+ ) {
131
165
  const staticChangesets = changesets?.filter(changeset => !changeset.uriTemplate.includes("{")) ?? [];
132
166
  const changeset = selectDefaultChangeset(staticChangesets, defaultKind);
133
- const resource = changeset ? parseUri(resolveChangesetUriTemplate(( backendSession.toString()), changeset.uriTemplate)) : undefined;
167
+ const resource = changeset ? parseUri(resolveChangesetUriTemplate(( ownerResource.toString()), changeset.uriTemplate)) : undefined;
134
168
  return changeset && resource ? {
135
169
  changeset,
136
170
  resource
@@ -156,20 +190,26 @@ function getAgentHostSessionBrowserOwnerIds(sessionResource, state) {
156
190
  }
157
191
  for (const chat of state.chats) {
158
192
  const parentChatResource = chat.origin?.kind === ChatOriginKind.Tool ? parseUri(chat.origin.chat) : undefined;
159
- const parsedChat = parseChatUri(chat.resource);
160
- if (!parentChatResource || !isEqual(parentChatResource, currentChatResource) || !parsedChat) {
193
+ if (!parentChatResource || !isEqual(parentChatResource, currentChatResource)) {
161
194
  continue;
162
195
  }
163
- ownerIds.add(( sessionResource.with({
164
- fragment: parsedChat.chatId,
165
- query: null
166
- }).toString()));
167
196
  const query = ( new URLSearchParams(sessionResource.query));
168
197
  query.set(CHAT_SUBAGENT_RESOURCE_QUERY_PARAM, chat.resource);
169
198
  ownerIds.add(( sessionResource.with({
170
- fragment: parsedChat.chatId,
199
+ fragment: chat.resource,
171
200
  query: ( query.toString())
172
201
  }).toString()));
202
+ const parsedChat = parseChatUri(chat.resource);
203
+ if (parsedChat) {
204
+ ownerIds.add(( sessionResource.with({
205
+ fragment: parsedChat.chatId,
206
+ query: null
207
+ }).toString()));
208
+ ownerIds.add(( sessionResource.with({
209
+ fragment: parsedChat.chatId,
210
+ query: ( query.toString())
211
+ }).toString()));
212
+ }
173
213
  }
174
214
  return ownerIds;
175
215
  }
@@ -192,16 +232,10 @@ function parseUri(value) {
192
232
  function referenceLabel(link, kind, title) {
193
233
  const resource = parseUri(link);
194
234
  const number = resource ? githubReferenceNumber(resource, kind) : undefined;
195
- if (title) {
196
- if (kind === "pullRequest") {
197
- return number ? ( localize(8187, "Pull Request #{0}: {1}", number, title)) : title;
198
- }
199
- return number ? ( localize(8188, "Issue #{0}: {1}", number, title)) : title;
235
+ if (number) {
236
+ return getChatReferencePillPresentation(kind, `#${number}`, title).resourceLabel;
200
237
  }
201
- if (kind === "pullRequest") {
202
- return number ? ( localize(8189, "Pull Request #{0}", number)) : ( localize(8190, "Pull Request"));
203
- }
204
- return number ? ( localize(8191, "Issue #{0}", number)) : ( localize(8192, "Issue"));
238
+ return title || (kind === "pullRequest" ? ( localize(9796, "Pull Request")) : ( localize(9797, "Issue")));
205
239
  }
206
240
  function githubReferenceNumber(resource, kind) {
207
241
  const segment = kind === "pullRequest" ? "pull" : "issues";
@@ -215,6 +249,221 @@ function websiteKey(url) {
215
249
  const path = parsed.pathname.length > 1 && parsed.pathname.endsWith("/") ? parsed.pathname.slice(0, -1) : parsed.pathname;
216
250
  return `${parsed.protocol}//${parsed.host}${path}${parsed.search}${parsed.hash}`;
217
251
  }
252
+ let AgentHostGitHubReferenceResolver = class AgentHostGitHubReferenceResolver extends Disposable {
253
+ constructor(_gitHubService, _logService) {
254
+ super();
255
+ this._gitHubService = _gitHubService;
256
+ this._logService = _logService;
257
+ this._issues = ( new Map());
258
+ this._pullRequests = ( new Map());
259
+ this._register(this._gitHubService.onDidChangeDefaultClient(() => {
260
+ for (const entry of ( this._issues.values())) {
261
+ this._initializeIssue(entry);
262
+ }
263
+ for (const entry of ( this._pullRequests.values())) {
264
+ this._initializePullRequest(entry);
265
+ }
266
+ }));
267
+ }
268
+ getIssue(target) {
269
+ const key = githubTargetKey(target);
270
+ let entry = this._issues.get(key);
271
+ if (!entry) {
272
+ entry = this._createEntry(target);
273
+ this._issues.set(key, entry);
274
+ }
275
+ if (!entry.subscription.value) {
276
+ this._initializeIssue(entry);
277
+ }
278
+ return entry.value;
279
+ }
280
+ getPullRequest(target) {
281
+ const key = githubTargetKey(target);
282
+ let entry = this._pullRequests.get(key);
283
+ if (!entry) {
284
+ entry = this._createEntry(target);
285
+ this._pullRequests.set(key, entry);
286
+ }
287
+ if (!entry.subscription.value) {
288
+ this._initializePullRequest(entry);
289
+ }
290
+ return entry.value;
291
+ }
292
+ retain(issueTargets, pullRequestTargets) {
293
+ this._retainEntries(this._issues, ( new Set(issueTargets.map(githubTargetKey))));
294
+ this._retainEntries(this._pullRequests, ( new Set(pullRequestTargets.map(githubTargetKey))));
295
+ }
296
+ _createEntry(target) {
297
+ return {
298
+ target,
299
+ value: observableValue(this, undefined),
300
+ subscription: this._register(( new MutableDisposable())),
301
+ generation: 0
302
+ };
303
+ }
304
+ _retainEntries(entries, retainedKeys) {
305
+ for (const [key, entry] of entries) {
306
+ if (!( retainedKeys.has(key))) {
307
+ this._store.delete(entry.subscription);
308
+ entries.delete(key);
309
+ }
310
+ }
311
+ }
312
+ _initializeIssue(entry) {
313
+ const generation = ++entry.generation;
314
+ const store = ( new DisposableStore());
315
+ entry.subscription.value = store;
316
+ entry.value.set(undefined, undefined);
317
+ const controller = ( new AbortController());
318
+ store.add(toDisposable(() => controller.abort()));
319
+ void this._gitHubService.acquireDefaultAccountClient(controller.signal).then(async reference => {
320
+ if (store.isDisposed) {
321
+ reference.dispose();
322
+ return;
323
+ }
324
+ const client = store.add(reference).object;
325
+ const credential = await client.credentials.getCredential(controller.signal);
326
+ if (controller.signal.aborted || generation !== entry.generation) {
327
+ return;
328
+ }
329
+ const ref = {
330
+ ...credential.account,
331
+ ...entry.target
332
+ };
333
+ const subscription = store.add(client.query.subscribeIssue(ref, {
334
+ priority: "visible"
335
+ }));
336
+ store.add(autorun(reader => {
337
+ const issue = subscription.resource.state.read(reader).value;
338
+ entry.value.set(issue ? toIssueHoverModel(issue) : undefined, undefined);
339
+ }));
340
+ void subscription.refresh().catch(error => this._logService.warn(
341
+ "[AgentHostSessionInputPills] Failed to refresh GitHub issue reference",
342
+ error
343
+ ));
344
+ }).catch(error => {
345
+ if (!controller.signal.aborted && generation === entry.generation) {
346
+ this._logService.warn(
347
+ "[AgentHostSessionInputPills] Failed to resolve GitHub credentials for issue reference",
348
+ error
349
+ );
350
+ entry.subscription.clear();
351
+ }
352
+ });
353
+ }
354
+ _initializePullRequest(entry) {
355
+ const generation = ++entry.generation;
356
+ const store = ( new DisposableStore());
357
+ entry.subscription.value = store;
358
+ entry.value.set(undefined, undefined);
359
+ const controller = ( new AbortController());
360
+ store.add(toDisposable(() => controller.abort()));
361
+ void this._gitHubService.acquireDefaultAccountClient(controller.signal).then(async reference => {
362
+ if (store.isDisposed) {
363
+ reference.dispose();
364
+ return;
365
+ }
366
+ const client = store.add(reference).object;
367
+ const credential = await client.credentials.getCredential(controller.signal);
368
+ if (controller.signal.aborted || generation !== entry.generation) {
369
+ return;
370
+ }
371
+ const ref = {
372
+ ...credential.account,
373
+ ...entry.target
374
+ };
375
+ const subscription = store.add(client.pullRequests.subscribePullRequest(ref, {
376
+ priority: "visible",
377
+ core: true,
378
+ checks: {
379
+ includeOptional: true
380
+ }
381
+ }));
382
+ store.add(autorun(reader => {
383
+ const snapshot = subscription.resource.snapshot.read(reader);
384
+ const pullRequest = snapshot.core.value;
385
+ entry.value.set(pullRequest ? {
386
+ pullRequest: toPullRequestHoverModel(pullRequest),
387
+ checksStatus: getChecksStatus(snapshot)
388
+ } : undefined, undefined);
389
+ }));
390
+ void subscription.refresh("core").catch(error => this._logService.warn(
391
+ "[AgentHostSessionInputPills] Failed to refresh GitHub pull request reference",
392
+ error
393
+ ));
394
+ void subscription.refresh("checks").catch(error => this._logService.warn(
395
+ "[AgentHostSessionInputPills] Failed to refresh GitHub pull request checks",
396
+ error
397
+ ));
398
+ }).catch(error => {
399
+ if (!controller.signal.aborted && generation === entry.generation) {
400
+ this._logService.warn(
401
+ "[AgentHostSessionInputPills] Failed to resolve GitHub credentials for pull request reference",
402
+ error
403
+ );
404
+ entry.subscription.clear();
405
+ }
406
+ });
407
+ }
408
+ };
409
+ AgentHostGitHubReferenceResolver = ( __decorate([( __param(0, IWorkbenchGitHubService)), ( __param(1, ILogService))], AgentHostGitHubReferenceResolver));
410
+ function githubTargetKey(target) {
411
+ return `${target.owner.toLowerCase()}/${target.repo.toLowerCase()}#${target.number}`;
412
+ }
413
+ function parseGitHubReferenceTarget(resource, kind) {
414
+ const segments = resource.path.split("/").filter(Boolean);
415
+ const expectedKind = kind === "pullRequest" ? "pull" : "issues";
416
+ const number = Number(segments[3]);
417
+ return resource.authority.toLowerCase() === "github.com" && segments.length >= 4 && segments[2] === expectedKind && Number.isInteger(number) && number > 0 ? {
418
+ owner: segments[0],
419
+ repo: segments[1],
420
+ number
421
+ } : undefined;
422
+ }
423
+ function toIssueHoverModel(issue) {
424
+ return {
425
+ title: issue.title,
426
+ body: issue.body,
427
+ state: issue.state,
428
+ stateReason: issue.stateReason,
429
+ author: issue.author,
430
+ createdAt: issue.createdAt
431
+ };
432
+ }
433
+ function toPullRequestHoverModel(pullRequest) {
434
+ return {
435
+ title: pullRequest.title,
436
+ body: pullRequest.body ?? "",
437
+ state: pullRequest.state,
438
+ author: pullRequest.author ?? {
439
+ login: "unknown"
440
+ },
441
+ headRef: pullRequest.headRef,
442
+ baseRef: pullRequest.baseRef,
443
+ isDraft: pullRequest.draft,
444
+ createdAt: pullRequest.createdAt
445
+ };
446
+ }
447
+ function getChecksStatus(snapshot) {
448
+ const checksValue = snapshot.checks.value;
449
+ if (!checksValue || checksValue.headSha !== snapshot.core.value?.headSha) {
450
+ return undefined;
451
+ }
452
+ const checks = checksValue.checks;
453
+ if (!checks?.length) {
454
+ return undefined;
455
+ }
456
+ if (( checks.some(isPendingCheck))) {
457
+ return "pending";
458
+ }
459
+ return ( checks.some(isFailingCheck)) ? "failure" : "success";
460
+ }
461
+ function isPendingCheck(check) {
462
+ return check.type === "checkRun" ? check.status !== "COMPLETED" : check.status === "PENDING" || check.status === "EXPECTED";
463
+ }
464
+ function isFailingCheck(check) {
465
+ return check.type === "checkRun" ? check.conclusion === "FAILURE" || check.conclusion === "TIMED_OUT" || check.conclusion === "CANCELLED" || check.conclusion === "ACTION_REQUIRED" || check.conclusion === "STARTUP_FAILURE" : check.status === "FAILURE" || check.status === "ERROR";
466
+ }
218
467
  let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Disposable {
219
468
  constructor(
220
469
  _widget,
@@ -226,7 +475,11 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
226
475
  _editorService,
227
476
  instantiationService,
228
477
  _openerService,
229
- visibility
478
+ visibility,
479
+ provisionalSessions,
480
+ _labelService,
481
+ _notificationService,
482
+ commandService
230
483
  ) {
231
484
  super();
232
485
  this._widget = _widget;
@@ -235,21 +488,45 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
235
488
  this._configurationService = _configurationService;
236
489
  this._editorService = _editorService;
237
490
  this._openerService = _openerService;
491
+ this._labelService = _labelService;
492
+ this._notificationService = _notificationService;
238
493
  this._browserChanged = observableSignal(this);
239
494
  this._browserListeners = this._register(( new MutableDisposable()));
495
+ this._pullRequestHoverCache = this._register(( new ChatPillHoverCache()));
496
+ this._issueHoverCache = this._register(( new ChatPillHoverCache()));
497
+ this._commitHoverCache = this._register(( new ChatPillHoverCache()));
498
+ this._gitHubReferenceResolver = this._register(instantiationService.createInstance(AgentHostGitHubReferenceResolver));
499
+ this._gitHubResourceDetailsResolver = this._register(instantiationService.createInstance(GitHubResourceDetailsResolver));
500
+ const gitHubCommitResolver = this._register(instantiationService.createInstance(GitHubCommitResolver));
240
501
  const sessionResource = observableFromEvent(
241
502
  this,
242
503
  this._widget.onDidChangeViewModel,
243
504
  () => this._widget.viewModel?.sessionResource
244
505
  );
506
+ const transcriptArtifacts = this._register(
507
+ instantiationService.createInstance(ChatArtifactPillSource, sessionResource)
508
+ );
245
509
  const sessionResolutionChanged = observableSignalFromEvent(this, connectionsService.onDidChangeSessionResolution);
510
+ const provisionalSessionChanged = observableSignalFromEvent(this, provisionalSessions.onDidChange);
246
511
  const resolution = derivedOpts({
247
512
  owner: this,
248
513
  equalsFn: resolutionEquals
249
514
  }, reader => {
250
515
  sessionResolutionChanged.read(reader);
251
516
  const resource = sessionResource.read(reader);
252
- return resource ? connectionsService.resolveSessionResource(resource) : undefined;
517
+ if (!resource) {
518
+ return undefined;
519
+ }
520
+ provisionalSessionChanged.read(reader);
521
+ const provisionalBackend = provisionalSessions.get(resource);
522
+ if (isUntitledChatSession(resource) && !provisionalBackend) {
523
+ return undefined;
524
+ }
525
+ const resolved = connectionsService.resolveSessionResource(resource);
526
+ return resolved && provisionalBackend ? {
527
+ ...resolved,
528
+ backendSession: provisionalBackend
529
+ } : resolved;
253
530
  });
254
531
  const sessionStateSource = derived(this, reader => {
255
532
  const current = resolution.read(reader);
@@ -264,22 +541,61 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
264
541
  return observableFromSubscription(this, subscription.object);
265
542
  });
266
543
  const sessionState = derived(this, reader => sessionStateSource.read(reader).read(reader));
267
- const subagentChat = derived(this, reader => {
544
+ const chatResource = derivedOpts({
545
+ owner: this,
546
+ equalsFn: isEqual
547
+ }, reader => {
268
548
  const resource = sessionResource.read(reader);
269
- const chatResource = resource ? getAgentHostSessionChatResource(resource, sessionState.read(reader)) : undefined;
270
- return !!chatResource && isSubagentChatUri(chatResource);
549
+ return resource ? getAgentHostSessionChatResource(resource, sessionState.read(reader)) : undefined;
550
+ });
551
+ const chatStateSource = derived(this, reader => {
552
+ const current = resolution.read(reader);
553
+ const resource = chatResource.read(reader);
554
+ if (!current || !resource) {
555
+ return constObservable(undefined);
556
+ }
557
+ const subscription = reader.store.add(
558
+ current.connection.getSubscription(StateComponents.Chat, resource, "AgentHostSessionInputPills")
559
+ );
560
+ return observableFromSubscription(this, subscription.object);
561
+ });
562
+ const chatState = derived(this, reader => chatStateSource.read(reader).read(reader));
563
+ const subagentChat = derived(this, reader => {
564
+ const resource = chatResource.read(reader);
565
+ return !!resource && (isSubagentChatUri(resource) || sessionState.read(reader)?.chats.some(chat => isEqual(( URI.parse(chat.resource)), resource) && chat.origin?.kind === ChatOriginKind.Tool));
271
566
  });
272
- const pillsVisible = derived(this, reader => !subagentChat.read(reader));
273
567
  const changesetTarget = derivedOpts({
274
568
  owner: this,
275
569
  equalsFn: changesetTargetEquals
276
570
  }, reader => {
277
571
  const currentResolution = resolution.read(reader);
278
- return currentResolution ? resolveAgentHostSessionChangeset(
279
- currentResolution.backendSession,
280
- sessionState.read(reader)?.changesets,
281
- currentResolution.defaultChangesetKind
282
- ) : undefined;
572
+ const chat = chatResource.read(reader);
573
+ if (!currentResolution || !chat) {
574
+ return undefined;
575
+ }
576
+ const session = sessionState.read(reader);
577
+ const resolvedCatalogue = resolveChatChangesetCatalogue(( chat.toString()), chatState.read(reader)?.changesets, session?.changesets, session?.defaultChat);
578
+ const selectableEntries = resolvedCatalogue?.filter((
579
+ {
580
+ changeset
581
+ }
582
+ ) => !changeset.uriTemplate.includes("{"));
583
+ const defaultKind = currentResolution.defaultChangesetKind ?? CHANGES_PILL_DEFAULT_CHANGESET_KIND;
584
+ const selectedChangeset = selectDefaultChangeset(selectableEntries?.map((
585
+ {
586
+ changeset
587
+ }
588
+ ) => changeset), defaultKind);
589
+ const selectedEntry = selectableEntries?.find((
590
+ {
591
+ changeset
592
+ }
593
+ ) => changeset === selectedChangeset);
594
+ return resolveAgentHostChangeset(
595
+ selectedEntry?.owner === "session" ? currentResolution.backendSession : chat,
596
+ selectedChangeset ? [selectedChangeset] : undefined,
597
+ defaultKind
598
+ );
283
599
  });
284
600
  const changesetStateSource = derived(this, reader => {
285
601
  const currentResolution = resolution.read(reader);
@@ -302,7 +618,7 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
302
618
  if (!state) {
303
619
  return lastValue?.connectionAuthority === currentResolution.connectionAuthority && isEqual(lastValue.resource, target.resource) ? lastValue : undefined;
304
620
  }
305
- if (state.status !== ChangesetStatus.Ready && lastValue?.connectionAuthority === currentResolution.connectionAuthority && isEqual(lastValue.resource, target.resource)) {
621
+ if (state.status !== ChangesetStatus.Ready && state.status !== ChangesetStatus.Recomputing && lastValue?.connectionAuthority === currentResolution.connectionAuthority && isEqual(lastValue.resource, target.resource)) {
306
622
  return lastValue;
307
623
  }
308
624
  return {
@@ -332,11 +648,33 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
332
648
  deletions: diffs.reduce((total, diff) => total + diff.removed, 0)
333
649
  };
334
650
  });
335
- const metadata = derived(
336
- this,
337
- reader => getAgentHostSessionPillMetadata(sessionState.read(reader)?._meta)
338
- );
339
- const gitHubState = derived(this, reader => readSessionGitHubState(sessionState.read(reader)?._meta));
651
+ const metadata = derived(this, reader => {
652
+ const state = sessionState.read(reader);
653
+ return getAgentHostSessionPillMetadata(state?._meta, state?.workingDirectories?.[0]);
654
+ });
655
+ const gitHubState = derived(this, reader => readSessionFolderGitHubState(sessionState.read(reader)));
656
+ this._register(autorun(reader => {
657
+ const currentMetadata = metadata.read(reader);
658
+ this._pullRequestHoverCache.retain(( new Set(currentMetadata.pullRequestUrls.map(linkKey))), sessionResource.read(reader)?.toString());
659
+ this._issueHoverCache.retain(( new Set(currentMetadata.issueUrls.map(linkKey))), sessionResource.read(reader)?.toString());
660
+ this._commitHoverCache.retain(( new Set(
661
+ [...currentMetadata.artifacts, ...currentMetadata.references].filter(artifact => artifact.type === SessionArtifactType.Commit).map(artifact => artifact.id)
662
+ )), sessionResource.read(reader)?.toString());
663
+ this._gitHubReferenceResolver.retain(
664
+ currentMetadata.issueUrls.map(link => parseUri(link)).filter(isDefined).map(resource => parseGitHubReferenceTarget(resource, "issue")).filter(isDefined),
665
+ currentMetadata.pullRequestUrls.map(link => parseUri(link)).filter(isDefined).map(resource => parseGitHubReferenceTarget(resource, "pullRequest")).filter(isDefined)
666
+ );
667
+ this._gitHubResourceDetailsResolver.retain(currentMetadata.references.flatMap(artifact => {
668
+ const resource = artifact.isGitHub === true && artifact.link ? parseUri(artifact.link) : undefined;
669
+ return resource ? [{
670
+ identity: artifact,
671
+ resource
672
+ }] : [];
673
+ }), sessionState.read(reader) ? sessionResource.read(reader)?.toString() : undefined);
674
+ gitHubCommitResolver.retain([...currentMetadata.artifacts, ...currentMetadata.references].flatMap(
675
+ artifact => artifact.type === SessionArtifactType.Commit && artifact.link ? [parseUri(artifact.link)] : []
676
+ ).filter(isDefined).map(parseGitHubCommitTarget).filter(isDefined));
677
+ }));
340
678
  this._register(
341
679
  this._browserViewService.onDidChangeBrowserViews(() => this._refreshBrowserListeners())
342
680
  );
@@ -358,11 +696,16 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
358
696
  });
359
697
  const pullRequestSections = derived(this, reader => {
360
698
  const currentMetadata = metadata.read(reader);
699
+ const currentResolution = resolution.read(reader);
361
700
  return this._buildReferenceSections(
362
701
  currentMetadata.pullRequestUrls,
363
702
  "pullRequest",
703
+ reader,
704
+ this._gitHubReferenceResolver,
364
705
  gitHubState.read(reader),
365
- currentMetadata.pullRequestTitles
706
+ currentMetadata.pullRequestTitles,
707
+ currentMetadata.pullRequestArtifacts,
708
+ this._getRemoveArtifactAction(currentResolution, reader)
366
709
  );
367
710
  });
368
711
  const pullRequestIcon = derived(this, reader => {
@@ -371,43 +714,144 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
371
714
  });
372
715
  const issueSections = derived(this, reader => {
373
716
  const currentMetadata = metadata.read(reader);
374
- return this._buildReferenceSections(currentMetadata.issueUrls, "issue", undefined, currentMetadata.issueTitles);
717
+ const currentResolution = resolution.read(reader);
718
+ return this._buildReferenceSections(
719
+ currentMetadata.issueUrls,
720
+ "issue",
721
+ reader,
722
+ this._gitHubReferenceResolver,
723
+ undefined,
724
+ currentMetadata.issueTitles,
725
+ currentMetadata.issueArtifacts,
726
+ this._getRemoveArtifactAction(currentResolution, reader)
727
+ );
375
728
  });
729
+ const issueIcon = derived(
730
+ this,
731
+ reader => computeAggregateIssueIcon(metadata.read(reader).issueUrls.map(link => {
732
+ const resource = parseUri(link);
733
+ const target = resource ? parseGitHubReferenceTarget(resource, "issue") : undefined;
734
+ return target ? this._gitHubReferenceResolver.getIssue(target).read(reader) : undefined;
735
+ }))
736
+ );
376
737
  const artifactSections = derived(this, reader => {
377
738
  const currentResolution = resolution.read(reader);
378
- return currentResolution ? this._buildArtifactSections(
739
+ const recorded = !subagentChat.read(reader) && currentResolution ? this._buildArtifactSections(
379
740
  metadata.read(reader).artifacts,
380
741
  browserUrls.read(reader),
381
- currentResolution
742
+ currentResolution,
743
+ gitHubCommitResolver,
744
+ reader,
745
+ this._getRemoveArtifactAction(currentResolution, reader)
382
746
  ) : [];
747
+ return mergeChatArtifactSections(recorded, transcriptArtifacts.sections.read(reader));
383
748
  });
384
749
  const referenceSections = derived(this, reader => {
385
750
  const currentResolution = resolution.read(reader);
386
751
  return currentResolution ? this._buildArtifactSections(
387
752
  metadata.read(reader).references,
388
753
  browserUrls.read(reader),
389
- currentResolution
754
+ currentResolution,
755
+ gitHubCommitResolver,
756
+ reader,
757
+ this._getRemoveArtifactAction(currentResolution, reader)
390
758
  ) : [];
391
759
  });
392
760
  const browserSections = derived(this, reader => {
393
761
  const entries = browserInputs.read(reader).map(input => this._browserEntry(input, sessionResource.read(reader)));
394
762
  return entries.length > 0 ? [{
395
- title: ( localize(8193, "Browsers")),
763
+ title: ( localize(9798, "Browsers")),
396
764
  entries
397
765
  }] : [];
398
766
  });
767
+ const subagents = derived(this, reader => {
768
+ const parentSession = sessionResource.read(reader);
769
+ const parentChat = chatResource.read(reader);
770
+ if (!parentSession || !parentChat) {
771
+ return [];
772
+ }
773
+ return (sessionState.read(reader)?.chats ?? []).filter(
774
+ chat => chat.origin?.kind === ChatOriginKind.Tool && isEqual(( URI.parse(chat.origin.chat)), parentChat)
775
+ ).map(chat => ({
776
+ id: chat.resource,
777
+ title: chat.title,
778
+ isActive: (chat.status & SessionStatus.InProgress) !== 0,
779
+ open: async () => {
780
+ await commandService.executeCommand(CHAT_OPEN_AGENT_HOST_CHAT_COMMAND_ID, {
781
+ chatResource: chat.resource,
782
+ parentSessionResource: ( parentSession.toString()),
783
+ title: chat.title
784
+ });
785
+ }
786
+ }));
787
+ });
788
+ const workingDirectories = derived(this, reader => sessionState.read(reader)?.workingDirectories);
789
+ const customizationRoots = derived(
790
+ this,
791
+ reader => workingDirectories.read(reader)?.map(resource => ( URI.parse(resource))) ?? []
792
+ );
793
+ const customizationFolders = derived(this, reader => {
794
+ const current = resolution.read(reader);
795
+ return current ? customizationRoots.read(reader).map(workingDirectory => ({
796
+ name: basename(workingDirectory),
797
+ workingDirectory: current.connection.resourceUris.fromAgentHost(workingDirectory)
798
+ })) : [];
799
+ });
800
+ const customizations = derived(this, reader => sessionState.read(reader)?.customizations);
801
+ const customizationIndex = derived(this, reader => {
802
+ const current = resolution.read(reader);
803
+ return ( new CustomizationIndex(
804
+ customizations.read(reader),
805
+ customizationRoots.read(reader),
806
+ current ? uri => current.connection.resourceUris.fromAgentHost(uri) : undefined
807
+ ));
808
+ });
809
+ const customizationParser = derived(this, reader => {
810
+ resolution.read(reader);
811
+ chatResource.read(reader);
812
+ return createIncrementalChatCustomizationRefsParser();
813
+ });
814
+ const customizationRefs = derivedOpts({
815
+ owner: this,
816
+ equalsFn: customizationRefsEqual
817
+ }, reader => {
818
+ const parse = customizationParser.read(reader);
819
+ const state = chatState.read(reader);
820
+ return state ? parse(state) : [];
821
+ });
822
+ const chatCustomizations = derivedOpts({
823
+ owner: this,
824
+ equalsFn: sessionChatCustomizationsEqual
825
+ }, reader => resolveChatCustomizations(customizationRefs.read(reader), customizationIndex.read(reader)));
826
+ const sessionCustomizations = this._register(
827
+ instantiationService.createInstance(SessionCustomizations, chatCustomizations, customizationFolders)
828
+ );
829
+ const backgroundShellOutputs = ( new AgentHostBackgroundShellOutputs(reader => resolution.read(reader)?.connection));
830
+ const backgroundShells = this._register(instantiationService.createInstance(
831
+ SessionBackgroundShellsControl,
832
+ derived(this, reader => chatResource.read(reader) ? {
833
+ backgroundShells: derivedOpts({
834
+ owner: this,
835
+ equalsFn: structuralEquals
836
+ }, shellReader => backgroundShellOutputs.project(
837
+ chatState.read(shellReader)?.backgroundWork,
838
+ chatResource.read(shellReader)
839
+ ))
840
+ } : undefined)
841
+ ));
399
842
  const sources = this._register(instantiationService.createInstance(StandardChatInputPillSources, {
400
843
  changes: {
401
844
  stats: changeStats,
402
845
  label: derived(
403
846
  this,
404
- reader => changesetTarget.read(reader)?.changeset.label ?? ( localize(8194, "Changes"))
847
+ reader => changesetTarget.read(reader)?.changeset.label ?? ( localize(9799, "Changes"))
405
848
  ),
406
- open: () => this._openChanges(changesetTarget.get()?.changeset.label ?? ( localize(8195, "Session Changes")), changes.get())
849
+ open: () => this._openChanges(changesetTarget.get()?.changeset.label ?? ( localize(9800, "Session Changes")), changes.get())
407
850
  },
408
851
  pullRequests: createSessionPullRequestPillData(pullRequestSections, visibility.pullRequests, pullRequestIcon),
409
852
  issues: {
410
- sections: issueSections
853
+ sections: issueSections,
854
+ icon: issueIcon
411
855
  },
412
856
  artifacts: {
413
857
  sections: artifactSections
@@ -415,10 +859,13 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
415
859
  references: {
416
860
  sections: referenceSections
417
861
  },
862
+ customizations: sessionCustomizations,
418
863
  browsers: {
419
864
  sections: browserSections
420
- }
421
- }, offeredPillKinds));
865
+ },
866
+ subagents: createSessionSubagentsPillData(subagents, visibility.subagents),
867
+ backgroundShells
868
+ }, SESSION_CHAT_PILL_KINDS));
422
869
  const inputPills = this._register(instantiationService.createInstance(
423
870
  ChatInputPills,
424
871
  this._widget.inputPart.persistentContentContainerElement,
@@ -426,10 +873,12 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
426
873
  debugName: "AgentHostSessionInputPills.content",
427
874
  compact,
428
875
  targetWindow: getWindow(this._widget.inputPart.persistentContentContainerElement),
429
- enabled: pillsVisible,
430
- sources: constObservable(sources.sources),
431
- offeredKinds: offeredPillKinds,
432
- ariaLabel: ( localize(8196, "Session status")),
876
+ enabled: constObservable(true),
877
+ sources: derived(
878
+ this,
879
+ reader => subagentChat.read(reader) ? sources.sources.filter(source => source.kind === SessionChatPillKind.Artifacts) : sources.sources
880
+ ),
881
+ offeredKinds: SESSION_CHAT_PILL_KINDS,
433
882
  focusFallback: () => this._widget.focusInput()
434
883
  }
435
884
  ));
@@ -445,7 +894,16 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
445
894
  this._register(inputPills.onDidChangeVisibility(updateVisibility));
446
895
  updateVisibility(inputPills.visible);
447
896
  }
448
- _buildReferenceSections(links, kind, gitHubState, titles) {
897
+ _buildReferenceSections(
898
+ links,
899
+ kind,
900
+ reader,
901
+ gitHubReferenceResolver,
902
+ gitHubState,
903
+ titles,
904
+ artifacts,
905
+ removeArtifact
906
+ ) {
449
907
  const entries = links.map(link => {
450
908
  const resource = parseUri(link);
451
909
  if (!resource) {
@@ -453,36 +911,77 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
453
911
  }
454
912
  const number = githubReferenceNumber(resource, kind);
455
913
  const title = titles?.get(linkKey(link));
914
+ const artifact = artifacts?.get(linkKey(link));
456
915
  const label = referenceLabel(link, kind, title);
457
- const pullRequestState = kind === "pullRequest" && gitHubState?.pullRequestState && gitHubState.pullRequestStateUrl && linkKey(gitHubState.pullRequestStateUrl) === linkKey(link) ? gitHubState.pullRequestState : "open";
458
- return {
916
+ const target = parseGitHubReferenceTarget(resource, kind);
917
+ const pullRequestDetails = kind === "pullRequest" && target ? gitHubReferenceResolver.getPullRequest(target).read(reader) : undefined;
918
+ const issue = kind === "issue" && target ? gitHubReferenceResolver.getIssue(target).read(reader) : undefined;
919
+ const liveTitle = pullRequestDetails?.pullRequest.title ?? issue?.title;
920
+ const presentation = number ? getChatReferencePillPresentation(kind, `#${number}`, liveTitle, title) : undefined;
921
+ const resourceLabel = presentation?.resourceLabel ?? label;
922
+ const pullRequestState = pullRequestDetails ? getPullRequestResourceStatus(pullRequestDetails.pullRequest).kind : kind === "pullRequest" && gitHubState?.pullRequestState && gitHubState.pullRequestStateUrl && linkKey(gitHubState.pullRequestStateUrl) === linkKey(link) ? gitHubState.pullRequestState : "open";
923
+ const createHover = pullRequestDetails && target ? density => createPullRequestResourceHover({
924
+ ...target,
925
+ repositoryHref: `https://github.com/${target.owner}/${target.repo}`,
926
+ referenceHref: ( resource.toString(true)),
927
+ pullRequest: pullRequestDetails.pullRequest,
928
+ checksStatus: pullRequestDetails.checksStatus,
929
+ density,
930
+ onDidClickRepository: () => this._openExternal(( URI.parse(`https://github.com/${target.owner}/${target.repo}`))),
931
+ onDidClickReference: () => this._openExternal(resource),
932
+ onDidClickBaseBranch: () => this._clipboardService.writeText(pullRequestDetails.pullRequest.baseRef),
933
+ onDidClickHeadBranch: () => this._clipboardService.writeText(pullRequestDetails.pullRequest.headRef)
934
+ }) : issue && target ? density => createIssueResourceHover({
935
+ ...target,
936
+ repositoryHref: `https://github.com/${target.owner}/${target.repo}`,
937
+ referenceHref: ( resource.toString(true)),
938
+ issue,
939
+ density,
940
+ onDidClickRepository: () => this._openExternal(( URI.parse(`https://github.com/${target.owner}/${target.repo}`))),
941
+ onDidClickReference: () => this._openExternal(resource)
942
+ }) : undefined;
943
+ const stateDescription = pullRequestDetails ? getPullRequestResourceStatus(pullRequestDetails.pullRequest).label : issue ? getIssueResourceStatus(issue).label : undefined;
944
+ const checksDescription = pullRequestDetails ? getPullRequestChecksStatusLabel(pullRequestDetails.pullRequest, pullRequestDetails.checksStatus) : undefined;
945
+ const entry = {
459
946
  id: linkKey(link),
460
947
  label,
461
- ...(kind === "pullRequest" && number ? {
462
- pillLabel: `#${number}`
463
- } : {}),
464
- icon: kind === "pullRequest" ? computePullRequestIcon(pullRequestState) : Codicon.issues,
948
+ icon: kind === "pullRequest" ? computePullRequestIcon(pullRequestState) : computeIssueIcon(issue?.state ?? "open", issue?.stateReason),
465
949
  pullRequestState: kind === "pullRequest" ? pullRequestState : undefined,
466
- toolbarActions: [toAction({
950
+ promotedAction: artifact && removeArtifact ? this._createRemoveAction(artifact, removeArtifact) : undefined,
951
+ toolbarActions: [withChatPillHoverLabel(toAction({
467
952
  id: `chatInputPills.copy.${kind}.${linkKey(link)}`,
468
- label: kind === "pullRequest" ? ( localize(8197, "Copy Pull Request URL")) : ( localize(8198, "Copy Issue URL")),
953
+ label: kind === "pullRequest" ? ( localize(9801, "Copy Pull Request URL")) : ( localize(9802, "Copy Issue URL")),
469
954
  class: ThemeIcon.asClassName(Codicon.copy),
470
955
  run: () => this._clipboardService.writeText(( resource.toString(true)))
471
- })],
472
- ...getChatPillResourceLocation(resource, label),
473
- ...(title ? {
474
- tooltip: `${label}\n${( resource.toString(true))}`
956
+ }), chatPillCopyUrlHoverLabel)],
957
+ ...getChatPillResourceLocation(resource, resourceLabel),
958
+ ...presentation?.entry,
959
+ ...(stateDescription ? {
960
+ ariaDescription: checksDescription ? ( localize(
961
+ 9803,
962
+ "{0}. {1}. {2}",
963
+ stateDescription,
964
+ checksDescription,
965
+ (resource.toString(true))
966
+ )) : ( localize(9804, "{0}. {1}", stateDescription, (resource.toString(true))))
967
+ } : {}),
968
+ ...(liveTitle || title ? {
969
+ tooltip: `${resourceLabel}\n${( resource.toString(true))}`
475
970
  } : {}),
476
971
  open: () => this._openExternal(resource)
477
972
  };
973
+ return target ? {
974
+ ...entry,
975
+ ...(kind === "pullRequest" ? this._pullRequestHoverCache : this._issueHoverCache).get(linkKey(link), entry, createHover)
976
+ } : entry;
478
977
  }).filter(isDefined);
479
- const title = kind === "pullRequest" ? ( localize(8199, "Pull Requests")) : ( localize(8200, "Issues"));
978
+ const title = kind === "pullRequest" ? ( localize(9805, "Pull Requests")) : ( localize(9806, "Issues"));
480
979
  return entries.length > 0 ? [{
481
980
  title,
482
981
  entries
483
982
  }] : [];
484
983
  }
485
- _buildArtifactSections(entries, browserUrls, resolution) {
984
+ _buildArtifactSections(entries, browserUrls, resolution, commitResolver, reader, removeArtifact) {
486
985
  const browserKeys = ( new Set([...browserUrls].map(websiteKey).filter(isDefined)));
487
986
  const entriesByType = ( new Map());
488
987
  for (const artifact of entries) {
@@ -492,10 +991,13 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
492
991
  continue;
493
992
  }
494
993
  }
495
- const entry = this._artifactEntry(artifact, resolution);
994
+ const entry = this._artifactEntry(artifact, resolution, commitResolver, reader);
496
995
  if (entry) {
497
996
  const typeEntries = entriesByType.get(artifact.type) ?? [];
498
- typeEntries.push(entry);
997
+ typeEntries.push(removeArtifact ? {
998
+ ...entry,
999
+ promotedAction: this._createRemoveAction(artifact, removeArtifact)
1000
+ } : entry);
499
1001
  entriesByType.set(artifact.type, typeEntries);
500
1002
  }
501
1003
  }
@@ -512,7 +1014,7 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
512
1014
  }] : [];
513
1015
  });
514
1016
  }
515
- _artifactEntry(artifact, resolution) {
1017
+ _artifactEntry(artifact, resolution, commitResolver, reader) {
516
1018
  if (artifact.type === SessionArtifactType.File || artifact.type === SessionArtifactType.Resource) {
517
1019
  const artifactResource = parseUri(artifact.uri);
518
1020
  if (!artifactResource) {
@@ -520,6 +1022,14 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
520
1022
  }
521
1023
  const resource = artifact.type === SessionArtifactType.File ? toAgentHostUri(artifactResource, resolution.connectionAuthority) : artifactResource;
522
1024
  const label = artifact.type === SessionArtifactType.File ? basename(resource) : artifact.label;
1025
+ const imageMimeType = artifact.type === SessionArtifactType.File && !artifact.isArtifact ? getMediaMime(resource.path) : undefined;
1026
+ const fullPath = artifact.type === SessionArtifactType.File ? this._labelService.getUriLabel(resource, {
1027
+ noPrefix: true
1028
+ }) : undefined;
1029
+ const relativePath = artifact.type === SessionArtifactType.File ? this._labelService.getUriLabel(resource, {
1030
+ relative: true,
1031
+ noPrefix: true
1032
+ }) : undefined;
523
1033
  return {
524
1034
  id: artifact.id,
525
1035
  label,
@@ -528,6 +1038,26 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
528
1038
  } : {
529
1039
  icon: Codicon.link
530
1040
  }),
1041
+ toolbarActions: [toAction({
1042
+ id: artifact.type === SessionArtifactType.File ? `chat.agentHost.sessionPills.copyFilePath.${artifact.id}` : `chat.agentHost.sessionPills.copyResourceUri.${artifact.id}`,
1043
+ label: artifact.type === SessionArtifactType.File ? ( localize(9807, "Copy Path")) : ( localize(9808, "Copy URI")),
1044
+ class: ThemeIcon.asClassName(Codicon.copy),
1045
+ run: () => this._clipboardService.writeText(fullPath ?? ( resource.toString(true)))
1046
+ })],
1047
+ ...(relativePath ? {
1048
+ hoverActions: [toAction({
1049
+ id: `chat.agentHost.sessionPills.copyFileRelativePath.${artifact.id}`,
1050
+ label: ( localize(9809, "Copy Relative Path")),
1051
+ class: ThemeIcon.asClassName(Codicon.copy),
1052
+ run: () => this._clipboardService.writeText(relativePath)
1053
+ })]
1054
+ } : {}),
1055
+ ...(imageMimeType?.startsWith("image/") ? {
1056
+ imagePreview: {
1057
+ resource,
1058
+ mimeType: imageMimeType
1059
+ }
1060
+ } : {}),
531
1061
  ...getChatPillResourceLocation(resource, label),
532
1062
  open: () => this._openResource(resource)
533
1063
  };
@@ -535,29 +1065,80 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
535
1065
  const link = parseUri(artifact.link);
536
1066
  const icon = artifactIcons.get(artifact.type) ?? Codicon.archive;
537
1067
  if (link) {
538
- const copyAction = artifact.type === SessionArtifactType.Commit && artifact.commitHash ? [toAction({
539
- id: "chat.agentHost.sessionPills.copyCommitHash",
540
- label: ( localize(8201, "Copy Commit Hash")),
1068
+ const commitTarget = artifact.type === SessionArtifactType.Commit ? parseGitHubCommitTarget(link) : undefined;
1069
+ const commit = commitTarget ? commitResolver.get(commitTarget).read(reader) : undefined;
1070
+ const label = commit?.message.split(/\r?\n/, 1)[0] || artifact.label;
1071
+ const createCommitHover = commitTarget && commit ? density => createCommitResourceHover({
1072
+ owner: commitTarget.owner,
1073
+ repo: commitTarget.repo,
1074
+ repositoryHref: `https://github.com/${commitTarget.owner}/${commitTarget.repo}`,
1075
+ referenceHref: ( link.toString(true)),
1076
+ commit,
1077
+ density,
1078
+ onDidClickRepository: () => this._openExternal(( URI.parse(`https://github.com/${commitTarget.owner}/${commitTarget.repo}`))),
1079
+ onDidClickReference: () => this._openExternal(link)
1080
+ }) : undefined;
1081
+ const copyAction = artifact.type === SessionArtifactType.Commit ? withChatPillHoverLabel(toAction({
1082
+ id: `chat.agentHost.sessionPills.copyCommitUrl.${artifact.id}`,
1083
+ label: ( localize(9810, "Copy Commit URL")),
541
1084
  class: ThemeIcon.asClassName(Codicon.copy),
542
- run: () => this._clipboardService.writeText(artifact.commitHash)
543
- })] : undefined;
544
- return {
1085
+ run: () => this._clipboardService.writeText(( link.toString(true)))
1086
+ }), chatPillCopyUrlHoverLabel) : artifact.type === SessionArtifactType.Website ? withChatPillHoverLabel(toAction({
1087
+ id: `chat.agentHost.sessionPills.copyWebsiteUrl.${artifact.id}`,
1088
+ label: ( localize(9811, "Copy Website URL")),
1089
+ class: ThemeIcon.asClassName(Codicon.copy),
1090
+ run: () => this._clipboardService.writeText(( link.toString(true)))
1091
+ }), chatPillCopyUrlHoverLabel) : artifact.type === SessionArtifactType.PullRequest || artifact.type === SessionArtifactType.Issue ? withChatPillHoverLabel(toAction({
1092
+ id: `chat.agentHost.sessionPills.copyReferenceUrl.${artifact.id}`,
1093
+ label: artifact.type === SessionArtifactType.PullRequest ? ( localize(9812, "Copy Pull Request URL")) : ( localize(9813, "Copy Issue URL")),
1094
+ class: ThemeIcon.asClassName(Codicon.copy),
1095
+ run: () => this._clipboardService.writeText(( link.toString(true)))
1096
+ }), chatPillCopyUrlHoverLabel) : undefined;
1097
+ const gitHubKind = artifact.isGitHub === true ? artifact.type === SessionArtifactType.PullRequest ? "pullRequest" : artifact.type === SessionArtifactType.Issue ? "issue" : undefined : undefined;
1098
+ const gitHubDetails = gitHubKind ? this._gitHubResourceDetailsResolver.resolveReference(artifact, {
1099
+ kind: gitHubKind,
1100
+ resource: link,
1101
+ fallbackLabel: label,
1102
+ enrich: !artifact.isArtifact,
1103
+ onDidClickRepository: resource => this._openExternal(resource),
1104
+ onDidClickReference: () => this._openExternal(link),
1105
+ onDidClickBranch: branch => {
1106
+ void this._clipboardService.writeText(branch);
1107
+ }
1108
+ }) : undefined;
1109
+ const gitHubPresentation = gitHubDetails ? gitHubDetails.presentation.read(reader) : gitHubKind ? getGitHubResourcePresentation(link, gitHubKind, undefined, label) : undefined;
1110
+ const displayLabel = gitHubPresentation?.label ?? label;
1111
+ const entry = {
545
1112
  id: artifact.id,
546
- label: artifact.label,
1113
+ label: displayLabel,
547
1114
  icon,
548
1115
  ...(copyAction ? {
549
- toolbarActions: copyAction
1116
+ toolbarActions: [copyAction]
550
1117
  } : {}),
551
- ...getChatPillResourceLocation(link, artifact.label),
1118
+ ...((artifact.type === SessionArtifactType.Commit && (artifact.commitHash || commit?.sha)) ? {
1119
+ hoverActions: [withChatPillHoverLabel(toAction({
1120
+ id: `chat.agentHost.sessionPills.copyCommitHash.${artifact.id}`,
1121
+ label: ( localize(9814, "Copy Commit Hash")),
1122
+ class: ThemeIcon.asClassName(Codicon.copy),
1123
+ run: () => this._clipboardService.writeText(artifact.commitHash ?? commit.sha)
1124
+ }), chatPillCopyHashHoverLabel)]
1125
+ } : {}),
1126
+ ...getChatPillResourceLocation(link, displayLabel),
1127
+ ...gitHubPresentation,
1128
+ ...gitHubDetails?.hover,
552
1129
  open: () => this._openExternal(link)
553
1130
  };
1131
+ return artifact.type === SessionArtifactType.Commit ? {
1132
+ ...entry,
1133
+ ...this._commitHoverCache.get(artifact.id, entry, createCommitHover)
1134
+ } : entry;
554
1135
  }
555
1136
  if (artifact.type === SessionArtifactType.Commit && artifact.commitHash) {
556
1137
  return {
557
1138
  id: artifact.id,
558
1139
  label: artifact.label,
559
1140
  icon,
560
- ariaLabel: ( localize(8202, "Copy commit hash for {0}", artifact.label)),
1141
+ ariaLabel: ( localize(9815, "Copy Commit Hash for {0}", artifact.label)),
561
1142
  tooltip: artifact.commitHash,
562
1143
  open: () => {
563
1144
  void this._clipboardService.writeText(artifact.commitHash);
@@ -566,8 +1147,35 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
566
1147
  }
567
1148
  return undefined;
568
1149
  }
1150
+ _getRemoveArtifactAction(resolution, reader) {
1151
+ return resolution?.connection.removeSessionArtifact && supportsAgentHostArtifactRemoval(resolution.connection.initializeResult.read(reader)) ? artifact => this._removeArtifact(resolution, artifact) : undefined;
1152
+ }
1153
+ _createRemoveAction(artifact, removeArtifact) {
1154
+ return withChatPillHoverLabel(toAction({
1155
+ id: `chat.agentHost.sessionPills.removeArtifact.${artifact.id}`,
1156
+ label: artifact.isArtifact ? ( localize(9816, "Remove Artifact {0} from Session", artifact.label)) : ( localize(9817, "Remove Reference {0} from Session", artifact.label)),
1157
+ class: ThemeIcon.asClassName(Codicon.close),
1158
+ run: () => removeArtifact(artifact)
1159
+ }), artifact.isArtifact ? chatPillRemoveArtifactHoverLabel : chatPillRemoveReferenceHoverLabel);
1160
+ }
1161
+ async _removeArtifact(resolution, artifact) {
1162
+ try {
1163
+ if (!resolution.connection.removeSessionArtifact) {
1164
+ throw ( new Error(( localize(9818, "Removing references is unavailable for this session."))));
1165
+ }
1166
+ await resolution.connection.removeSessionArtifact(resolution.backendSession, artifact.id);
1167
+ status(( localize(9819, "{0} removed from session.", artifact.label)));
1168
+ } catch (error) {
1169
+ this._notificationService.error(( localize(
1170
+ 9820,
1171
+ "Could not remove {0} from this session: {1}",
1172
+ artifact.label,
1173
+ toErrorMessage(error)
1174
+ )));
1175
+ }
1176
+ }
569
1177
  _browserEntry(input, sessionResource) {
570
- const label = input.title?.trim() || ( localize(8203, "Browser"));
1178
+ const label = input.title?.trim() || ( localize(9821, "Browser"));
571
1179
  return {
572
1180
  id: input.id,
573
1181
  label,
@@ -624,6 +1232,6 @@ let AgentHostSessionInputPills = class AgentHostSessionInputPills extends Dispos
624
1232
  this._browserChanged.trigger(undefined);
625
1233
  }
626
1234
  };
627
- AgentHostSessionInputPills = ( __decorate([( __param(2, IAgentHostConnectionsService)), ( __param(3, IBrowserViewWorkbenchService)), ( __param(4, IClipboardService)), ( __param(5, IConfigurationService)), ( __param(6, IEditorService)), ( __param(7, IInstantiationService)), ( __param(8, IOpenerService)), ( __param(9, ISessionChatPillVisibilityService))], AgentHostSessionInputPills));
1235
+ AgentHostSessionInputPills = ( __decorate([( __param(2, IAgentHostConnectionsService)), ( __param(3, IBrowserViewWorkbenchService)), ( __param(4, IClipboardService)), ( __param(5, IConfigurationService)), ( __param(6, IEditorService)), ( __param(7, IInstantiationService)), ( __param(8, IOpenerService)), ( __param(9, ISessionChatPillVisibilityService)), ( __param(10, IAgentHostUntitledProvisionalSessionService)), ( __param(11, ILabelService)), ( __param(12, INotificationService)), ( __param(13, ICommandService))], AgentHostSessionInputPills));
628
1236
 
629
- export { AgentHostSessionInputPills, getAgentHostSessionBrowserOwnerIds, getAgentHostSessionChatResource, getAgentHostSessionPillMetadata, resolveAgentHostSessionChangeset };
1237
+ export { AgentHostSessionInputPills, getAgentHostSessionBrowserOwnerIds, getAgentHostSessionChatResource, getAgentHostSessionPillMetadata, resolveAgentHostChangeset };