@codingame/monaco-vscode-chat-service-override 37.0.0 → 37.2.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 (459) hide show
  1. package/index.js +26 -5
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.js +1 -1
  4. package/vscode/src/vs/platform/agentHost/browser/agentHostProtocolClient.js +1 -1
  5. package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.d.ts +74 -0
  6. package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.js +90 -0
  7. package/vscode/src/vs/platform/agentHost/common/agentHostSlashCommand.d.ts +8 -0
  8. package/vscode/src/vs/platform/agentHost/common/agentHostSlashCommand.js +16 -0
  9. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +53 -53
  10. package/vscode/src/vs/platform/agentHost/common/agentHostWorkingDirectories.d.ts +16 -0
  11. package/vscode/src/vs/platform/agentHost/common/agentHostWorkingDirectories.js +14 -0
  12. package/vscode/src/vs/platform/agentHost/common/agentMerge.js +7 -7
  13. package/vscode/src/vs/platform/agentHost/common/agentModelByokMeta.d.ts +24 -0
  14. package/vscode/src/vs/platform/agentHost/common/agentModelByokMeta.js +13 -0
  15. package/vscode/src/vs/platform/agentHost/common/agentModelNotices.d.ts +22 -0
  16. package/vscode/src/vs/platform/agentHost/common/agentModelNotices.js +21 -0
  17. package/vscode/src/vs/platform/agentHost/common/agentModelPricing.d.ts +114 -0
  18. package/vscode/src/vs/platform/agentHost/common/agentModelPricing.js +56 -0
  19. package/vscode/src/vs/platform/agentHost/common/changesetUri.js +15 -1
  20. package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.d.ts +73 -0
  21. package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.js +141 -0
  22. package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.js +42 -1
  23. package/vscode/src/vs/platform/agentHost/common/meta/agentCustomizationMeta.d.ts +27 -0
  24. package/vscode/src/vs/platform/agentHost/common/meta/agentCustomizationMeta.js +14 -0
  25. package/vscode/src/vs/platform/agentHost/common/meta/agentEphemeralSessionMeta.d.ts +14 -0
  26. package/vscode/src/vs/platform/agentHost/common/meta/agentEphemeralSessionMeta.js +11 -0
  27. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +13 -13
  28. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +1 -1
  29. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +4 -1
  30. package/vscode/src/vs/platform/agentHost/common/toolSearchConstants.d.ts +4 -0
  31. package/vscode/src/vs/platform/agentHost/common/toolSearchConstants.js +6 -0
  32. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +1 -1
  33. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +104 -0
  34. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +827 -0
  35. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +15 -0
  36. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +71 -0
  37. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +16 -0
  38. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +95 -0
  39. package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.d.ts +22 -0
  40. package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +286 -0
  41. package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.d.ts +10 -0
  42. package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.js +38 -0
  43. package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.d.ts +9 -0
  44. package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.js +22 -0
  45. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +130 -0
  46. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +907 -0
  47. package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.d.ts +10 -0
  48. package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +28 -0
  49. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +27 -0
  50. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +167 -0
  51. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +46 -0
  52. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +356 -0
  53. package/vscode/src/vs/workbench/browser/chatChangesPill.js +2 -2
  54. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +28 -28
  55. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +2 -2
  56. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +18 -18
  57. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +4 -4
  58. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +3 -3
  59. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +6 -6
  60. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +11 -11
  61. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +11 -11
  62. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +9 -9
  63. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +5 -5
  64. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +2 -2
  65. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +13 -13
  66. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +7 -7
  67. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +28 -28
  68. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +1 -1
  69. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +18 -18
  70. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  71. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +93 -93
  72. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  74. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
  75. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
  76. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +7 -7
  77. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  78. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +7 -7
  79. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  80. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  81. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  82. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +12 -12
  83. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +13 -13
  84. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +16 -16
  85. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  86. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -15
  87. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  88. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  89. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +32 -32
  90. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +10 -10
  91. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.js +5 -5
  92. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.js +7 -7
  93. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +3 -3
  94. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  95. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +2 -2
  96. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +1 -1
  97. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +14 -14
  98. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +16 -16
  99. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.d.ts +34 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.js +229 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.d.ts +57 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.js +460 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +1 -1
  104. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.d.ts +1 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.js +92 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +1 -1
  107. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAllowSignedOutWhenUsableContribution.d.ts +23 -0
  108. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAllowSignedOutWhenUsableContribution.js +46 -0
  109. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.d.ts +142 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.js +746 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.d.ts +77 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +474 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostConfigEditor.d.ts +169 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostConfigEditor.js +261 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.d.ts +20 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.js +90 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostDownloadProgress.d.ts +35 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostDownloadProgress.js +73 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostExistingSessionHarnessPickerEnablement.d.ts +20 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostExistingSessionHarnessPickerEnablement.js +61 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.d.ts +112 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +192 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +1 -1
  124. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +6 -6
  125. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.d.ts +21 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.js +137 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +301 -12
  128. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.d.ts +84 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.js +96 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.d.ts +884 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +5870 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +19 -19
  133. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.d.ts +27 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.js +129 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.d.ts +42 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.js +221 -0
  137. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.d.ts +125 -0
  138. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.js +345 -0
  139. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +1 -1
  140. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.d.ts +1 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.js +68 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.d.ts +62 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.js +163 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.d.ts +54 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +219 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSubagentProgress.d.ts +10 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSubagentProgress.js +50 -0
  148. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.d.ts +42 -0
  149. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.js +132 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.d.ts +1 -0
  151. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.js +85 -0
  152. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.d.ts +79 -0
  153. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.js +161 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.d.ts +18 -0
  155. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.js +13 -0
  156. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/copilotConfigSlashSubmitHandler.d.ts +28 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/copilotConfigSlashSubmitHandler.js +71 -0
  158. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.d.ts +35 -0
  159. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.js +205 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +1 -1
  161. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +1 -1
  162. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +51 -51
  163. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +1 -1
  164. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +4 -4
  165. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +1 -1
  166. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -1
  167. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  168. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +1 -1
  169. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
  170. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +1 -1
  171. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +2 -2
  172. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +5 -5
  173. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +23 -23
  174. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  175. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  176. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/externalSessionsFilterMenu.js +6 -6
  177. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +2 -2
  178. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.js +7 -7
  179. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +3 -3
  180. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -15
  181. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +1 -1
  182. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +1 -1
  183. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +3 -3
  184. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +126 -126
  185. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +44 -44
  186. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +138 -138
  187. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +3 -3
  188. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.d.ts +1 -1
  189. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.js +6 -6
  190. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +37 -37
  191. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.js +1 -1
  192. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +1 -1
  193. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +1 -1
  194. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +1 -1
  195. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.d.ts +1 -1
  196. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +6 -6
  197. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.js +146 -146
  198. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.js +29 -29
  199. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +9 -9
  200. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +1 -1
  201. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +40 -40
  202. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +7 -7
  203. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +8 -8
  204. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +5 -5
  205. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +76 -76
  206. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -1
  207. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +116 -116
  208. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +1 -1
  209. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +4 -4
  210. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +50 -50
  211. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +2 -2
  212. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +356 -356
  213. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +1 -1
  214. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +38 -38
  215. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.js +5 -5
  216. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +1 -1
  217. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
  218. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +1 -1
  219. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +124 -124
  220. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +72 -72
  221. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +1 -1
  222. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  223. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  224. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +3 -3
  225. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
  226. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  227. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +1 -1
  228. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +8 -8
  229. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  230. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  231. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
  232. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
  233. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
  234. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +1 -1
  235. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +18 -18
  236. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +1 -1
  237. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
  238. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +1 -1
  239. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  240. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +1 -1
  241. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  242. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +36 -36
  243. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +1 -1
  244. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  245. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +40 -40
  246. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  247. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  248. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
  249. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  250. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  251. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  252. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  253. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -1
  254. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  255. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  256. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
  257. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
  258. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +1 -1
  259. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  260. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +3 -3
  261. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPills.js +3 -3
  262. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
  263. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  264. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -63
  265. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
  266. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  267. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +12 -12
  268. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +1 -1
  269. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +1 -1
  270. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +35 -35
  271. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +2 -2
  272. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +27 -27
  273. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  274. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +2 -0
  275. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +57 -0
  276. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +21 -21
  277. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +1 -1
  278. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +11 -11
  279. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +1 -1
  280. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  281. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +27 -27
  282. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +1 -1
  283. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +17 -17
  284. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +20 -20
  285. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +62 -62
  286. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +10 -10
  287. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
  288. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
  289. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +7 -7
  290. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  291. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
  292. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
  293. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  294. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.d.ts +1 -1
  295. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.js +1 -1
  296. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.js +1 -1
  297. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
  298. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +6 -6
  299. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +6 -6
  300. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +1 -1
  301. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +29 -29
  302. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +1 -1
  303. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +16 -16
  304. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +7 -7
  305. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +2 -2
  306. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +30 -30
  307. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +4 -4
  308. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  309. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +2 -2
  310. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  311. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  312. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  313. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  314. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  315. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.js +5 -5
  316. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.js +4 -4
  317. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +4 -4
  318. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +3 -3
  319. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +1 -1
  320. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.js +3 -3
  321. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +21 -21
  322. package/vscode/src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.js +18 -18
  323. package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.js +2 -2
  324. package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +10 -10
  325. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
  326. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +26 -26
  327. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +9 -9
  328. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +1 -1
  329. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +8 -8
  330. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
  331. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  332. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +1 -1
  333. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.js +17 -17
  334. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +15 -15
  335. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +11 -11
  336. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +2 -2
  337. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +1 -1
  338. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +12 -12
  339. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
  340. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +13 -5
  341. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.js +1 -1
  342. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  343. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
  344. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -1
  345. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +11 -11
  346. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  347. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugEvents.d.ts +1 -1
  348. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +253 -0
  349. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +20 -0
  350. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +1 -1
  351. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +1 -1
  352. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +10 -10
  353. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +300 -0
  354. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +272 -0
  355. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
  356. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +25 -0
  357. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +178 -0
  358. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +78 -0
  359. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +51 -0
  360. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -2
  361. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +14 -14
  362. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +67 -0
  363. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +195 -0
  364. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +67 -0
  365. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +294 -0
  366. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +212 -0
  367. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +955 -0
  368. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +31 -0
  369. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +122 -0
  370. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +1 -1
  371. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +1 -1
  372. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
  373. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +65 -0
  374. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +698 -0
  375. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +50 -0
  376. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +78 -0
  377. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +77 -0
  378. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +120 -0
  379. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +10 -0
  380. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +23 -0
  381. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +12 -12
  382. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  383. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  384. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +154 -154
  385. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +92 -0
  386. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +335 -0
  387. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +235 -0
  388. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +1673 -0
  389. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +202 -0
  390. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +872 -0
  391. package/vscode/src/vs/workbench/contrib/chat/common/sessionChatPills.js +9 -9
  392. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +36 -0
  393. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +239 -0
  394. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +21 -0
  395. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +143 -0
  396. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +24 -0
  397. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +298 -0
  398. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +25 -0
  399. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +177 -0
  400. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +73 -0
  401. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +577 -0
  402. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +11 -0
  403. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +90 -0
  404. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +16 -0
  405. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +130 -0
  406. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +12 -0
  407. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +53 -0
  408. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +5 -0
  409. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +12 -0
  410. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +10 -0
  411. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +91 -0
  412. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +38 -0
  413. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +518 -0
  414. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +6 -0
  415. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +231 -0
  416. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  417. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
  418. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
  419. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
  420. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  421. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  422. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.js +1 -1
  423. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
  424. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  425. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  426. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +11 -11
  427. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +9 -9
  428. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  429. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  430. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +10 -10
  431. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  432. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  433. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  434. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  435. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
  436. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  437. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  438. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  439. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
  440. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -4
  441. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -4
  442. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +4 -4
  443. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +3 -3
  444. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -5
  445. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +74 -74
  446. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +11 -11
  447. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +15 -15
  448. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +8 -8
  449. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +15 -15
  450. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  451. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.d.ts +1 -1
  452. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.js +1 -1
  453. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +1 -1
  454. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +4 -4
  455. package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.js +3 -3
  456. package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.d.ts +0 -30
  457. package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.js +0 -87
  458. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.d.ts +0 -205
  459. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +0 -1580
@@ -0,0 +1,907 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { raceCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
4
+ import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
5
+ import { isCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
6
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
7
+ import { markdownStringEqual, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
8
+ import { Disposable, DisposableResourceMap, DisposableMap, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
9
+ import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
10
+ import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
11
+ import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
12
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
13
+ import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
14
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
15
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
16
+ import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
17
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
18
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
19
+ import { hasValidDiff } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
20
+ import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
21
+ import { isIChatViewViewContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
22
+ import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
23
+ import { getInProgressSessionDescription } from '../../contrib/chat/browser/chatSessions/chatSessionDescription.js';
24
+ import { getSessionStatusForModel } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution';
25
+ import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput';
26
+ import { IChatDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service';
27
+ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
28
+ import { ChatSessionOptionsMap } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
29
+ import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
30
+ import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
31
+ import { getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
32
+ import { IChatArtifactsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/chatArtifactsService.service';
33
+ import { IChatTodoListService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/chatTodoListService.service';
34
+ import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
35
+ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
36
+ import { extHostNamedCustomer } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers';
37
+ import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
38
+ import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
39
+ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
40
+ import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
41
+
42
+ function stringOrMarkdownEqual(a, b) {
43
+ if (a === b) {
44
+ return true;
45
+ }
46
+ if (!a || !b) {
47
+ return false;
48
+ }
49
+ if (typeof a === "string" || typeof b === "string") {
50
+ return false;
51
+ }
52
+ return markdownStringEqual(a, b);
53
+ }
54
+ class ObservableChatSession extends Disposable {
55
+ get options() {
56
+ return this._options ? ( new Map(this._options)) : undefined;
57
+ }
58
+ get progressObs() {
59
+ return this._progressObservable;
60
+ }
61
+ get isCompleteObs() {
62
+ return this._isCompleteObservable;
63
+ }
64
+ constructor(resource, providerHandle, proxy, logService, dialogService) {
65
+ super();
66
+ this._progressObservable = observableValue(this, []);
67
+ this._isCompleteObservable = observableValue(this, false);
68
+ this._onWillDispose = ( new Emitter());
69
+ this.onWillDispose = this._onWillDispose.event;
70
+ this._pendingProgressChunks = ( new Map());
71
+ this._isInitialized = false;
72
+ this._interruptionWasCanceled = false;
73
+ this._disposalPending = false;
74
+ this._inFlightRequestCount = 0;
75
+ this.sessionResource = resource;
76
+ this.providerHandle = providerHandle;
77
+ this.history = [];
78
+ this._proxy = proxy;
79
+ this._providerHandle = providerHandle;
80
+ this._logService = logService;
81
+ this._dialogService = dialogService;
82
+ }
83
+ initialize(token, context) {
84
+ if (!this._initializationPromise) {
85
+ this._initializationPromise = this._doInitializeContent(token, context);
86
+ }
87
+ return this._initializationPromise;
88
+ }
89
+ async _doInitializeContent(token, context) {
90
+ try {
91
+ const sessionContent = await raceCancellationError(
92
+ this._proxy.$provideChatSessionContent(this._providerHandle, this.sessionResource, context, token),
93
+ token
94
+ );
95
+ this._options = sessionContent.options ? ChatSessionOptionsMap.fromRecord(sessionContent.options) : undefined;
96
+ this.title = sessionContent.title;
97
+ this.history.length = 0;
98
+ this.history.push(...( sessionContent.history.map(turn => {
99
+ if (turn.type === "request") {
100
+ const variables = turn.variableData?.variables.map(v => {
101
+ const entry = {
102
+ ...v,
103
+ value: revive(v.value)
104
+ };
105
+ return entry;
106
+ });
107
+ return {
108
+ type: "request",
109
+ prompt: turn.prompt,
110
+ participant: turn.participant,
111
+ command: turn.command,
112
+ variableData: variables ? {
113
+ variables
114
+ } : undefined,
115
+ id: turn.id,
116
+ modelId: turn.modelId,
117
+ modeInstructions: turn.modeInstructions ? revive(turn.modeInstructions) : undefined
118
+ };
119
+ }
120
+ return {
121
+ type: "response",
122
+ parts: ( turn.parts.map(part => revive(part))),
123
+ participant: turn.participant,
124
+ details: turn.details
125
+ };
126
+ })));
127
+ if (sessionContent.hasActiveResponseCallback && !this.interruptActiveResponseCallback) {
128
+ this.interruptActiveResponseCallback = async () => {
129
+ const confirmInterrupt = () => {
130
+ if (this._disposalPending) {
131
+ this._proxy.$disposeChatSessionContent(this._providerHandle, this.sessionResource);
132
+ this._disposalPending = false;
133
+ }
134
+ this._proxy.$interruptChatSessionActiveResponse(this._providerHandle, this.sessionResource, "ongoing");
135
+ return true;
136
+ };
137
+ if (sessionContent.supportsInterruption) {
138
+ return confirmInterrupt();
139
+ }
140
+ return this._dialogService.confirm({
141
+ message: ( localize(2973, "Are you sure you want to interrupt the active session?"))
142
+ }).then(confirmed => {
143
+ if (confirmed.confirmed) {
144
+ return confirmInterrupt();
145
+ } else {
146
+ this._addProgress([{
147
+ kind: "progressMessage",
148
+ content: {
149
+ value: "",
150
+ isTrusted: false
151
+ }
152
+ }]);
153
+ this._interruptionWasCanceled = true;
154
+ if (this._disposalPending) {
155
+ this._logService.info(
156
+ `Canceling deferred disposal for session ${this.sessionResource} (user canceled interruption)`
157
+ );
158
+ this._disposalPending = false;
159
+ }
160
+ return false;
161
+ }
162
+ });
163
+ };
164
+ }
165
+ if (sessionContent.hasRequestHandler && !this.requestHandler) {
166
+ this.requestHandler = async (request, progress, history, token) => {
167
+ this._inFlightRequestCount++;
168
+ this._progressObservable.set([], undefined);
169
+ this._isCompleteObservable.set(false, undefined);
170
+ let lastProgressLength = 0;
171
+ const progressDisposable = autorun(reader => {
172
+ const progressArray = this._progressObservable.read(reader);
173
+ const isComplete = this._isCompleteObservable.read(reader);
174
+ if (progressArray.length > lastProgressLength) {
175
+ const newProgress = progressArray.slice(lastProgressLength);
176
+ progress(newProgress);
177
+ lastProgressLength = progressArray.length;
178
+ }
179
+ if (isComplete) {
180
+ progressDisposable.dispose();
181
+ }
182
+ });
183
+ try {
184
+ await this._proxy.$invokeChatSessionRequestHandler(this._providerHandle, this.sessionResource, request, history, token);
185
+ if (!this._isCompleteObservable.get() && !this.interruptActiveResponseCallback) {
186
+ this._markComplete();
187
+ }
188
+ } catch (error) {
189
+ const errorProgress = {
190
+ kind: "progressMessage",
191
+ content: {
192
+ value: `Error: ${error instanceof Error ? error.message : String(error)}`,
193
+ isTrusted: false
194
+ }
195
+ };
196
+ this._addProgress([errorProgress]);
197
+ this._markComplete();
198
+ throw error;
199
+ } finally {
200
+ progressDisposable.dispose();
201
+ this._inFlightRequestCount--;
202
+ if (this._disposalPending && this._inFlightRequestCount === 0 && !this.interruptActiveResponseCallback) {
203
+ this._disposalPending = false;
204
+ this._proxy.$disposeChatSessionContent(this._providerHandle, this.sessionResource);
205
+ }
206
+ }
207
+ };
208
+ }
209
+ if (sessionContent.hasForkHandler && !this.forkSession) {
210
+ this.forkSession = async (request, token) => {
211
+ const result = await this._proxy.$forkChatSession(
212
+ this._providerHandle,
213
+ this.sessionResource,
214
+ request ? this.toRequestDto(request) : undefined,
215
+ token
216
+ );
217
+ return revive(result);
218
+ };
219
+ }
220
+ this._isInitialized = true;
221
+ const hasActiveResponse = sessionContent.hasActiveResponseCallback;
222
+ const hasRequestHandler = sessionContent.hasRequestHandler;
223
+ const hasAnyCapability = hasActiveResponse || hasRequestHandler;
224
+ for (const [requestId, chunks] of this._pendingProgressChunks) {
225
+ this._logService.debug(
226
+ `Processing ${chunks.length} pending progress chunks for session ${this.sessionResource}, requestId ${requestId}`
227
+ );
228
+ this._addProgress(chunks);
229
+ }
230
+ this._pendingProgressChunks.clear();
231
+ if (!hasAnyCapability) {
232
+ this._isCompleteObservable.set(true, undefined);
233
+ }
234
+ } catch (error) {
235
+ this._logService.error(`Failed to initialize chat session ${this.sessionResource}:`, error);
236
+ throw error;
237
+ }
238
+ }
239
+ handleProgressChunk(requestId, progress) {
240
+ if (!this._isInitialized) {
241
+ const existing = this._pendingProgressChunks.get(requestId) || [];
242
+ this._pendingProgressChunks.set(requestId, [...existing, ...progress]);
243
+ this._logService.debug(
244
+ `Queuing ${progress.length} progress chunks for session ${this.sessionResource}, requestId ${requestId} (session not initialized)`
245
+ );
246
+ return;
247
+ }
248
+ this._addProgress(progress);
249
+ }
250
+ handleProgressComplete(requestId) {
251
+ this._pendingProgressChunks.delete(requestId);
252
+ if (this._isInitialized) {
253
+ if (!this._interruptionWasCanceled) {
254
+ this._markComplete();
255
+ } else {
256
+ this._interruptionWasCanceled = false;
257
+ }
258
+ }
259
+ }
260
+ _addProgress(progress) {
261
+ const currentProgress = this._progressObservable.get();
262
+ this._progressObservable.set([...currentProgress, ...progress], undefined);
263
+ }
264
+ _markComplete() {
265
+ if (!this._isCompleteObservable.get()) {
266
+ this._isCompleteObservable.set(true, undefined);
267
+ }
268
+ }
269
+ toRequestDto(request) {
270
+ return {
271
+ type: "request",
272
+ id: request.id,
273
+ prompt: request.prompt,
274
+ participant: request.participant,
275
+ command: request.command,
276
+ variableData: undefined,
277
+ modelId: request.modelId,
278
+ modeInstructions: request.modeInstructions
279
+ };
280
+ }
281
+ dispose() {
282
+ this._onWillDispose.fire();
283
+ this._onWillDispose.dispose();
284
+ this._pendingProgressChunks.clear();
285
+ if (this.interruptActiveResponseCallback && !this._interruptionWasCanceled) {
286
+ this._disposalPending = true;
287
+ } else if (this._inFlightRequestCount > 0) {
288
+ this._disposalPending = true;
289
+ } else {
290
+ this._proxy.$disposeChatSessionContent(this._providerHandle, this.sessionResource);
291
+ }
292
+ super.dispose();
293
+ }
294
+ }
295
+ let MainThreadChatSessionItemController = class MainThreadChatSessionItemController extends Disposable {
296
+ constructor(proxy, chatSessionType, handle, supportsResolve, _chatService) {
297
+ super();
298
+ this._chatService = _chatService;
299
+ this._onDidChangeChatSessionItems = this._register(( new Emitter()));
300
+ this.onDidChangeChatSessionItems = this._onDidChangeChatSessionItems.event;
301
+ this._modelListeners = this._register(( new DisposableResourceMap()));
302
+ this._resolveCache = ( new ResourceMap());
303
+ this._resolving = ( new ResourceMap());
304
+ this._isDisposed = false;
305
+ this._items = ( new ResourceMap());
306
+ this._proxy = proxy;
307
+ this._handle = handle;
308
+ this._supportsResolve = supportsResolve;
309
+ const addModelListeners = async model => {
310
+ if (getChatSessionType(model.sessionResource) !== chatSessionType) {
311
+ return;
312
+ }
313
+ await this.refresh(CancellationToken.None);
314
+ if (this._isDisposed) {
315
+ return;
316
+ }
317
+ this.tryUpdateItemForModel(model);
318
+ const requestChangeListener = ( model.lastRequestObs.map(
319
+ last => last?.response && observableSignalFromEvent("chatSessions.modelRequestChangeListener", last.response.onDidChange)
320
+ ));
321
+ const modelChangeListener = observableSignalFromEvent("chatSessions.modelChangeListener", model.onDidChange);
322
+ this._modelListeners.set(model.sessionResource, autorun(reader => {
323
+ requestChangeListener.read(reader)?.read(reader);
324
+ modelChangeListener.read(reader);
325
+ this.tryUpdateItemForModel(model);
326
+ }));
327
+ };
328
+ this._register(_chatService.onDidCreateModel(model => addModelListeners(model)));
329
+ for (const model of _chatService.chatModels.get()) {
330
+ addModelListeners(model);
331
+ }
332
+ this._register(_chatService.onDidDisposeSession(e => {
333
+ for (const sessionResource of e.sessionResources) {
334
+ this._modelListeners.deleteAndDispose(sessionResource);
335
+ }
336
+ }));
337
+ }
338
+ dispose() {
339
+ this._isDisposed = true;
340
+ this._resolveCache.clear();
341
+ super.dispose();
342
+ }
343
+ get items() {
344
+ return Array.from(( this._items.values()));
345
+ }
346
+ refresh(token) {
347
+ return this._proxy.$refreshChatSessionItems(this._handle, token);
348
+ }
349
+ async newChatSessionItem(request, token) {
350
+ const dto = await raceCancellationError(this._proxy.$newChatSessionItem(this._handle, {
351
+ prompt: request.prompt,
352
+ command: request.command,
353
+ initialSessionOptions: request.initialSessionOptions ? ChatSessionOptionsMap.toStrValueArray(request.initialSessionOptions) : undefined
354
+ }, token), token);
355
+ if (!dto) {
356
+ return undefined;
357
+ }
358
+ const item = this.addOrUpdateItem(dto);
359
+ return item;
360
+ }
361
+ async acceptChange(change) {
362
+ const addedOrUpdatedItems = [];
363
+ for (const item of change.addedOrUpdated) {
364
+ const resource = URI.revive(item.resource);
365
+ if (!( this._resolving.has(resource))) {
366
+ this._resolveCache.delete(resource);
367
+ }
368
+ addedOrUpdatedItems.push(await this.addOrUpdateItem(item));
369
+ }
370
+ for (const uri of change.removed) {
371
+ this._resolveCache.delete(uri);
372
+ this._items.delete(uri);
373
+ }
374
+ this._onDidChangeChatSessionItems.fire({
375
+ addedOrUpdated: addedOrUpdatedItems,
376
+ removed: change.removed
377
+ });
378
+ }
379
+ async addOrUpdateItem(dto) {
380
+ const resource = URI.revive(dto.resource);
381
+ const existing = this._items.get(resource);
382
+ const updated = ( new MainThreadChatSessionItem(
383
+ dto,
384
+ this._chatService.getSession(resource),
385
+ await this._chatService.getMetadataForSession(resource)
386
+ ));
387
+ if (existing?.isEqual(updated)) {
388
+ return existing;
389
+ }
390
+ if (existing && existing.label !== updated.label && this._chatService.getSession(resource)) {
391
+ this._chatService.setSessionTitle(resource, updated.label);
392
+ }
393
+ this._items.set(resource, updated);
394
+ this._onDidChangeChatSessionItems.fire({
395
+ addedOrUpdated: [updated]
396
+ });
397
+ return updated;
398
+ }
399
+ async tryUpdateItemForModel(model) {
400
+ const resource = model.sessionResource;
401
+ const existing = this._items.get(resource);
402
+ if (existing) {
403
+ this.addOrUpdateItem(existing);
404
+ }
405
+ }
406
+ async getNewChatSessionInputState(sessionResource, token) {
407
+ const optionGroups = await this._proxy.$provideChatSessionInputState(this._handle, sessionResource, token);
408
+ if (!optionGroups?.length) {
409
+ return undefined;
410
+ }
411
+ return optionGroups;
412
+ }
413
+ async resolveChatSessionItem(resource, token) {
414
+ if (!this._supportsResolve) {
415
+ return undefined;
416
+ }
417
+ const cached = this._resolveCache.get(resource);
418
+ if (cached) {
419
+ return cached;
420
+ }
421
+ const promise = this._doResolveItem(resource, token).catch(err => {
422
+ this._resolveCache.delete(resource);
423
+ throw err;
424
+ });
425
+ this._resolveCache.set(resource, promise);
426
+ return promise;
427
+ }
428
+ async _doResolveItem(resource, token) {
429
+ const expectedItem = this._items.get(resource);
430
+ this._resolving.set(resource, true);
431
+ let dto;
432
+ try {
433
+ dto = await raceCancellationError(this._proxy.$resolveChatSessionItem(this._handle, resource, token), token);
434
+ } finally {
435
+ this._resolving.delete(resource);
436
+ }
437
+ if (!dto) {
438
+ return undefined;
439
+ }
440
+ if (this._items.get(resource) !== expectedItem) {
441
+ return this._items.get(resource);
442
+ }
443
+ const updated = ( new MainThreadChatSessionItem(
444
+ dto,
445
+ this._chatService.getSession(resource),
446
+ await this._chatService.getMetadataForSession(resource)
447
+ ));
448
+ if (this._items.get(resource) !== expectedItem) {
449
+ return this._items.get(resource);
450
+ }
451
+ if (expectedItem?.isEqual(updated)) {
452
+ return expectedItem;
453
+ }
454
+ this._items.set(resource, updated);
455
+ this._onDidChangeChatSessionItems.fire({
456
+ addedOrUpdated: [updated]
457
+ });
458
+ return updated;
459
+ }
460
+ setSupportsResolve(supportsResolve) {
461
+ if (this._supportsResolve === supportsResolve) {
462
+ return;
463
+ }
464
+ this._supportsResolve = supportsResolve;
465
+ if (supportsResolve) {
466
+ this._resolveCache.clear();
467
+ }
468
+ }
469
+ };
470
+ MainThreadChatSessionItemController = ( __decorate([( __param(4, IChatService))], MainThreadChatSessionItemController));
471
+ class MainThreadChatSessionItem {
472
+ constructor(dto, model, detailOverrides) {
473
+ this.resource = URI.revive(dto.resource);
474
+ this.label = dto.label;
475
+ this.timing = dto.timing;
476
+ this.iconPath = dto.iconPath;
477
+ this.badge = reviveMarkdownString(dto.badge);
478
+ this.tooltip = reviveMarkdownString(dto.tooltip);
479
+ this.archived = dto.archived;
480
+ this.metadata = dto.metadata;
481
+ this.legacyResource = dto.legacyResource ? URI.revive(dto.legacyResource) : undefined;
482
+ this.description = (model && getInProgressSessionDescription(model)) ?? reviveMarkdownString(dto.description);
483
+ this.status = (model && getSessionStatusForModel(model)) ?? dto.status;
484
+ this.changes = revive(dto.changes);
485
+ if (detailOverrides && !this.changes) {
486
+ const diffs = {
487
+ files: detailOverrides.stats?.fileCount || 0,
488
+ insertions: detailOverrides.stats?.added || 0,
489
+ deletions: detailOverrides.stats?.removed || 0
490
+ };
491
+ if (hasValidDiff(diffs)) {
492
+ this.changes = diffs;
493
+ }
494
+ }
495
+ }
496
+ isEqual(other) {
497
+ return isEqual(this.resource, other.resource) && this.label === other.label && this.description === other.description && this.status === other.status && this.timing.created === other.timing.created && this.timing.lastRequestStarted === other.timing.lastRequestStarted && this.timing.lastRequestEnded === other.timing.lastRequestEnded && equals(this.changes, other.changes) && equals(this.iconPath, other.iconPath) && stringOrMarkdownEqual(this.badge, other.badge) && stringOrMarkdownEqual(this.tooltip, other.tooltip) && this.archived === other.archived && equals(this.metadata, other.metadata) && isEqual(this.legacyResource, other.legacyResource);
498
+ }
499
+ }
500
+ let MainThreadChatSessions = class MainThreadChatSessions extends Disposable {
501
+ constructor(
502
+ _extHostContext,
503
+ _agentSessionsService,
504
+ _chatSessionsService,
505
+ _chatService,
506
+ _chatWidgetService,
507
+ _chatTodoListService,
508
+ _chatArtifactsService,
509
+ _chatDebugService,
510
+ _dialogService,
511
+ _editorService,
512
+ editorGroupService,
513
+ _logService,
514
+ _instantiationService
515
+ ) {
516
+ super();
517
+ this._extHostContext = _extHostContext;
518
+ this._agentSessionsService = _agentSessionsService;
519
+ this._chatSessionsService = _chatSessionsService;
520
+ this._chatService = _chatService;
521
+ this._chatWidgetService = _chatWidgetService;
522
+ this._chatTodoListService = _chatTodoListService;
523
+ this._chatArtifactsService = _chatArtifactsService;
524
+ this._chatDebugService = _chatDebugService;
525
+ this._dialogService = _dialogService;
526
+ this._editorService = _editorService;
527
+ this.editorGroupService = editorGroupService;
528
+ this._logService = _logService;
529
+ this._instantiationService = _instantiationService;
530
+ this._itemControllerRegistrations = this._register(( new DisposableMap()));
531
+ this._contentProvidersRegistrations = this._register(( new DisposableMap()));
532
+ this._sessionTypeToHandle = ( new Map());
533
+ this._activeSessions = ( new ResourceMap());
534
+ this._sessionDisposables = ( new ResourceMap());
535
+ this._proxy = ( this._extHostContext.getProxy(ExtHostContext.ExtHostChatSessions));
536
+ this._register(this._chatSessionsService.onDidChangeSessionOptions((
537
+ {
538
+ sessionResource,
539
+ updates
540
+ }
541
+ ) => {
542
+ const sessionType = getChatSessionType(sessionResource);
543
+ const handle = this._getHandleForSessionType(sessionType);
544
+ this._logService.trace(
545
+ `[MainThreadChatSessions] onRequestNotifyExtension received: sessionType '${sessionType}', handle ${handle}, ${updates.size} update(s)`
546
+ );
547
+ if (handle !== undefined) {
548
+ this.notifyOptionsChange(handle, sessionResource, updates);
549
+ } else {
550
+ this._logService.warn(
551
+ `[MainThreadChatSessions] Cannot notify option change for sessionType '${sessionType}': no provider registered. Registered types: [${Array.from(( this._sessionTypeToHandle.keys())).join(", ")}]`
552
+ );
553
+ }
554
+ }));
555
+ this._register(
556
+ this._agentSessionsService.model.onDidChangeSessionArchivedState(session => {
557
+ for (const [handle, {
558
+ chatSessionType
559
+ }] of this._itemControllerRegistrations) {
560
+ if (chatSessionType === session.providerType) {
561
+ this._proxy.$onDidChangeChatSessionItemState(handle, session.resource, session.isArchived());
562
+ }
563
+ }
564
+ })
565
+ );
566
+ }
567
+ _getHandleForSessionType(chatSessionType) {
568
+ return this._sessionTypeToHandle.get(chatSessionType);
569
+ }
570
+ $registerChatSessionItemController(handle, chatSessionType, supportsResolve) {
571
+ const disposables = ( new DisposableStore());
572
+ const controller = disposables.add(this._instantiationService.createInstance(
573
+ MainThreadChatSessionItemController,
574
+ this._proxy,
575
+ chatSessionType,
576
+ handle,
577
+ supportsResolve
578
+ ));
579
+ disposables.add(
580
+ this._chatSessionsService.registerChatSessionItemController(chatSessionType, controller)
581
+ );
582
+ this._itemControllerRegistrations.set(handle, {
583
+ chatSessionType,
584
+ controller,
585
+ dispose: () => disposables.dispose()
586
+ });
587
+ this._refreshControllerInputState(handle, chatSessionType);
588
+ }
589
+ $updateChatSessionItemControllerCapabilities(handle, supportsResolve) {
590
+ const registration = this._itemControllerRegistrations.get(handle);
591
+ if (!registration) {
592
+ this._logService.warn(`No chat session item controller found for handle ${handle}`);
593
+ return;
594
+ }
595
+ registration.controller.setSupportsResolve(supportsResolve);
596
+ }
597
+ _refreshControllerInputState(handle, chatSessionType) {
598
+ this._proxy.$provideChatSessionInputState(handle, undefined, CancellationToken.None).then(optionGroups => {
599
+ if (optionGroups?.length) {
600
+ this._applyOptionGroups(handle, chatSessionType, undefined, optionGroups);
601
+ }
602
+ }).catch(
603
+ err => this._logService.error("Error fetching chat session input state", err)
604
+ );
605
+ }
606
+ _applyOptionGroups(handle, chatSessionType, sessionResourceComponents, optionGroups) {
607
+ this._chatSessionsService.setOptionGroupsForSessionType(chatSessionType, handle, optionGroups);
608
+ if (sessionResourceComponents) {
609
+ const sessionResource = URI.revive(sessionResourceComponents);
610
+ optionGroups.forEach(group => {
611
+ if (group.selected) {
612
+ this._chatSessionsService.setSessionOption(sessionResource, group.id, group.selected);
613
+ }
614
+ });
615
+ }
616
+ }
617
+ getController(handle) {
618
+ const registration = this._itemControllerRegistrations.get(handle);
619
+ if (!registration) {
620
+ throw ( new Error(`No chat session controller registered for handle ${handle}`));
621
+ }
622
+ return registration.controller;
623
+ }
624
+ async $updateChatSessionItems(controllerHandle, change) {
625
+ const controller = this.getController(controllerHandle);
626
+ controller.acceptChange({
627
+ addedOrUpdated: change.addedOrUpdated,
628
+ removed: ( change.removed.map(uri => URI.revive(uri)))
629
+ });
630
+ }
631
+ async $addOrUpdateChatSessionItem(controllerHandle, item) {
632
+ const controller = this.getController(controllerHandle);
633
+ controller.acceptChange({
634
+ addedOrUpdated: [item],
635
+ removed: []
636
+ });
637
+ }
638
+ $onDidChangeChatSessionOptions(handle, sessionResourceComponents, updates) {
639
+ const sessionResource = URI.revive(sessionResourceComponents);
640
+ this._chatSessionsService.updateSessionOptions(sessionResource, ChatSessionOptionsMap.fromRecord(updates));
641
+ }
642
+ async $onDidCommitChatSessionItem(handle, originalComponents, modifiedCompoennts) {
643
+ const originalResource = URI.revive(originalComponents);
644
+ const modifiedResource = URI.revive(modifiedCompoennts);
645
+ this._logService.trace(
646
+ `$onDidCommitChatSessionItem: handle(${handle}), original(${originalResource}), modified(${modifiedResource})`
647
+ );
648
+ const chatSessionType = this._itemControllerRegistrations.get(handle)?.chatSessionType;
649
+ if (!chatSessionType) {
650
+ this._logService.error(`No chat session type found for provider handle ${handle}`);
651
+ return;
652
+ }
653
+ const originalEditor = this._editorService.editors.find(editor => editor.resource?.toString() === ( originalResource.toString()));
654
+ const originalModel = this._chatService.acquireExistingSession(originalResource);
655
+ const contribution = this._chatSessionsService.getAllChatSessionContributions().find(c => c.type === chatSessionType);
656
+ try {
657
+ this._chatTodoListService.migrateTodos(originalResource, modifiedResource);
658
+ this._chatArtifactsService.getArtifacts(originalResource).migrate(this._chatArtifactsService.getArtifacts(modifiedResource));
659
+ if (chatSessionType === "copilotcli") {
660
+ this._chatDebugService.invokeProviders(modifiedResource).catch(() => {});
661
+ }
662
+ const originalGroup = this.editorGroupService.groups.find(group => ( group.editors.some(editor => isEqual(editor.resource, originalResource)))) ?? this.editorGroupService.activeGroup;
663
+ const options = {
664
+ title: {
665
+ preferred: originalEditor?.getName() || undefined,
666
+ fallback: ( localize(2974, "{0}", contribution?.displayName))
667
+ }
668
+ };
669
+ const newSession = await this._chatSessionsService.getOrCreateChatSession(URI.revive(modifiedResource), CancellationToken.None);
670
+ if (originalEditor) {
671
+ newSession.transferredState = originalEditor instanceof ChatEditorInput ? {
672
+ editingSession: originalEditor.transferOutEditingSession(),
673
+ inputState: originalModel?.object?.inputModel.toJSON()
674
+ } : undefined;
675
+ await this._editorService.replaceEditors([{
676
+ editor: originalEditor,
677
+ replacement: {
678
+ resource: modifiedResource,
679
+ options
680
+ }
681
+ }], originalGroup);
682
+ this._resendPendingRequests(originalResource, modifiedResource);
683
+ return;
684
+ }
685
+ if (originalModel) {
686
+ newSession.transferredState = {
687
+ editingSession: originalModel.object.editingSession,
688
+ inputState: originalModel.object.inputModel.toJSON()
689
+ };
690
+ }
691
+ const chatViewWidget = this._chatWidgetService.getWidgetBySessionResource(originalResource);
692
+ if (chatViewWidget && isIChatViewViewContext(chatViewWidget.viewContext)) {
693
+ await this._chatWidgetService.openSession(modifiedResource, undefined, {
694
+ preserveFocus: true
695
+ });
696
+ } else if (!chatViewWidget) {
697
+ const ref = await this._chatService.acquireOrLoadSession(modifiedResource, ChatAgentLocation.Chat, CancellationToken.None);
698
+ ref?.dispose();
699
+ }
700
+ this._resendPendingRequests(originalResource, modifiedResource);
701
+ this._chatSessionsService.fireSessionCommitted(originalResource, modifiedResource);
702
+ } finally {
703
+ originalModel?.dispose();
704
+ }
705
+ }
706
+ _resendPendingRequests(originalResource, modifiedResource) {
707
+ this._chatService.migrateRequests(originalResource, modifiedResource);
708
+ }
709
+ async _provideChatSessionContent(providerHandle, sessionResource, token) {
710
+ const t0 = Date.now();
711
+ this._logService.trace(
712
+ `[MainThreadChatSessions] _provideChatSessionContent start handle=${providerHandle} uri=${( sessionResource.toString())}`
713
+ );
714
+ let session = this._activeSessions.get(sessionResource);
715
+ if (!session) {
716
+ session = ( new ObservableChatSession(
717
+ sessionResource,
718
+ providerHandle,
719
+ this._proxy,
720
+ this._logService,
721
+ this._dialogService
722
+ ));
723
+ this._activeSessions.set(sessionResource, session);
724
+ const disposable = session.onWillDispose(() => {
725
+ this._activeSessions.delete(sessionResource);
726
+ this._sessionDisposables.get(sessionResource)?.dispose();
727
+ this._sessionDisposables.delete(sessionResource);
728
+ });
729
+ this._sessionDisposables.set(sessionResource, disposable);
730
+ }
731
+ try {
732
+ const initialSessionOptions = this._chatSessionsService.getSessionOptions(sessionResource);
733
+ await session.initialize(token, {
734
+ initialSessionOptions: initialSessionOptions ? ( [...initialSessionOptions].map(([optionId, value]) => ({
735
+ optionId,
736
+ value: typeof value === "string" ? value : value?.id
737
+ }))) : undefined
738
+ });
739
+ if (session.options) {
740
+ for (const [_, handle] of this._sessionTypeToHandle) {
741
+ if (handle === providerHandle) {
742
+ for (const [optionId, value] of session.options) {
743
+ this._chatSessionsService.setSessionOption(sessionResource, optionId, value);
744
+ }
745
+ break;
746
+ }
747
+ }
748
+ }
749
+ this._logService.trace(
750
+ `[MainThreadChatSessions] _provideChatSessionContent done total=${Date.now() - t0}ms handle=${providerHandle} uri=${( sessionResource.toString())}`
751
+ );
752
+ return session;
753
+ } catch (error) {
754
+ session.dispose();
755
+ this._logService.error(
756
+ `Error providing chat session content for handle ${providerHandle} and resource ${( sessionResource.toString())}:`,
757
+ error
758
+ );
759
+ throw error;
760
+ }
761
+ }
762
+ $unregisterChatSessionItemController(handle) {
763
+ this._itemControllerRegistrations.deleteAndDispose(handle);
764
+ }
765
+ $registerChatSessionContentProvider(handle, chatSessionScheme) {
766
+ const provider = {
767
+ provideChatSessionContent: (resource, token) => this._provideChatSessionContent(handle, resource, token)
768
+ };
769
+ this._sessionTypeToHandle.set(chatSessionScheme, handle);
770
+ this._contentProvidersRegistrations.set(
771
+ handle,
772
+ this._chatSessionsService.registerChatSessionContentProvider(chatSessionScheme, provider)
773
+ );
774
+ this._refreshProviderOptions(handle, chatSessionScheme);
775
+ }
776
+ $unregisterChatSessionContentProvider(handle) {
777
+ this._contentProvidersRegistrations.deleteAndDispose(handle);
778
+ for (const [sessionType, h] of this._sessionTypeToHandle) {
779
+ if (h === handle) {
780
+ this._sessionTypeToHandle.delete(sessionType);
781
+ break;
782
+ }
783
+ }
784
+ for (const [key, session] of this._activeSessions) {
785
+ if (session.providerHandle === handle) {
786
+ session.dispose();
787
+ this._activeSessions.delete(key);
788
+ }
789
+ }
790
+ }
791
+ async $handleProgressChunk(handle, sessionResource, requestId, chunks) {
792
+ const resource = URI.revive(sessionResource);
793
+ const observableSession = this._activeSessions.get(resource);
794
+ if (!observableSession) {
795
+ this._logService.warn(
796
+ `No session found for progress chunks: handle ${handle}, sessionResource ${resource}, requestId ${requestId}`
797
+ );
798
+ return;
799
+ }
800
+ const chatProgressParts = ( chunks.map(chunk => {
801
+ const [progress] = Array.isArray(chunk) ? chunk : [chunk];
802
+ return revive(progress);
803
+ }));
804
+ observableSession.handleProgressChunk(requestId, chatProgressParts);
805
+ }
806
+ $handleProgressComplete(handle, sessionResource, requestId) {
807
+ const resource = URI.revive(sessionResource);
808
+ const observableSession = this._activeSessions.get(resource);
809
+ if (!observableSession) {
810
+ this._logService.warn(
811
+ `No session found for progress completion: handle ${handle}, sessionResource ${resource}, requestId ${requestId}`
812
+ );
813
+ return;
814
+ }
815
+ observableSession.handleProgressComplete(requestId);
816
+ }
817
+ $handleAnchorResolve(handle, sesssionResource, requestId, requestHandle, anchor) {}
818
+ $onDidChangeChatSessionProviderOptions(handle) {
819
+ let sessionType;
820
+ for (const [type, h] of this._sessionTypeToHandle) {
821
+ if (h === handle) {
822
+ sessionType = type;
823
+ break;
824
+ }
825
+ }
826
+ if (!sessionType) {
827
+ this._logService.warn(
828
+ `No session type found for chat session content provider handle ${handle} when refreshing provider options`
829
+ );
830
+ return;
831
+ }
832
+ this._refreshProviderOptions(handle, sessionType);
833
+ }
834
+ $updateChatSessionInputState(controllerHandle, sessionResource, optionGroups) {
835
+ const registration = this._itemControllerRegistrations.get(controllerHandle);
836
+ if (!registration) {
837
+ this._logService.warn(
838
+ `No controller found for handle ${controllerHandle} when updating input state`
839
+ );
840
+ return;
841
+ }
842
+ this._applyOptionGroups(
843
+ controllerHandle,
844
+ registration.chatSessionType,
845
+ sessionResource,
846
+ optionGroups
847
+ );
848
+ }
849
+ _refreshProviderOptions(handle, chatSessionScheme) {
850
+ this._proxy.$provideChatSessionProviderOptions(handle, CancellationToken.None).then(options => {
851
+ if (options?.optionGroups && options.optionGroups.length) {
852
+ this._chatSessionsService.setOptionGroupsForSessionType(chatSessionScheme, handle, [...options.optionGroups]);
853
+ }
854
+ }).catch(err => {
855
+ if (!isCancellationError(err)) {
856
+ this._logService.error("Error fetching chat session options", err);
857
+ }
858
+ });
859
+ }
860
+ dispose() {
861
+ for (const session of ( this._activeSessions.values())) {
862
+ session.dispose();
863
+ }
864
+ this._activeSessions.clear();
865
+ for (const disposable of ( this._sessionDisposables.values())) {
866
+ disposable.dispose();
867
+ }
868
+ this._sessionDisposables.clear();
869
+ super.dispose();
870
+ }
871
+ async notifyOptionsChange(handle, sessionResource, updates) {
872
+ this._logService.trace(
873
+ `[MainThreadChatSessions] notifyOptionsChange: starting proxy call for handle ${handle}, sessionResource ${sessionResource}`
874
+ );
875
+ try {
876
+ await this._proxy.$provideHandleOptionsChange(
877
+ handle,
878
+ sessionResource,
879
+ Object.fromEntries(updates),
880
+ CancellationToken.None
881
+ );
882
+ this._logService.trace(
883
+ `[MainThreadChatSessions] notifyOptionsChange: proxy call completed for handle ${handle}, sessionResource ${sessionResource}`
884
+ );
885
+ } catch (error) {
886
+ this._logService.error(
887
+ `[MainThreadChatSessions] notifyOptionsChange: error for handle ${handle}, sessionResource ${sessionResource}:`,
888
+ error
889
+ );
890
+ }
891
+ }
892
+ };
893
+ MainThreadChatSessions = __decorate([extHostNamedCustomer(MainContext.MainThreadChatSessions), ( __param(1, IAgentSessionsService)), ( __param(2, IChatSessionsService)), ( __param(3, IChatService)), ( __param(4, IChatWidgetService)), ( __param(5, IChatTodoListService)), ( __param(6, IChatArtifactsService)), ( __param(7, IChatDebugService)), ( __param(8, IDialogService)), ( __param(9, IEditorService)), ( __param(10, IEditorGroupsService)), ( __param(11, ILogService)), ( __param(12, IInstantiationService))], MainThreadChatSessions);
894
+ function reviveMarkdownString(value) {
895
+ if (!value) {
896
+ return undefined;
897
+ }
898
+ if (typeof value === "string") {
899
+ return value;
900
+ }
901
+ if (typeof value === "object" && "value" in value) {
902
+ return MarkdownString.lift(value);
903
+ }
904
+ return undefined;
905
+ }
906
+
907
+ export { MainThreadChatSessions, ObservableChatSession };