@codingame/monaco-vscode-chat-service-override 29.1.1 → 30.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 (258) hide show
  1. package/index.js +5 -2
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +37 -39
  4. package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
  5. package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +11 -1
  6. package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +4 -4
  7. package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +132 -42
  8. package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +54 -0
  9. package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +15 -0
  10. package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +5 -1
  11. package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +188 -51
  12. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +7 -6
  13. package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +1 -1
  14. package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +7 -2
  15. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +6 -0
  16. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +14 -0
  17. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +18 -0
  18. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +13 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  20. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +37 -16
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +10 -8
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +37 -3
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +6 -6
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +20 -11
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +14 -14
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +18 -13
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +10 -10
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.d.ts +36 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +482 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +10 -2
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +43 -10
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -76
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +27 -35
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -8
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +86 -80
  61. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +3 -2
  62. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +38 -4
  63. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +14 -14
  64. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +38 -18
  65. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +427 -167
  66. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +37 -37
  67. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +15 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +108 -37
  69. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +8 -1
  70. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +28 -2
  71. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +11 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +1 -3
  74. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +3 -20
  75. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +4 -0
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +65 -68
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +2 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +64 -51
  80. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +288 -195
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +21 -21
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +19 -19
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +21 -21
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +21 -21
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +28 -28
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +1 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +3 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +1 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +5 -2
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +2 -1
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +10 -3
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +4 -2
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +19 -7
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +3 -2
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +54 -12
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +3 -3
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -8
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +14 -14
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +50 -50
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +3 -1
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +86 -17
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +65 -65
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +24 -16
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +17 -17
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -6
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  137. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  138. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
  139. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
  140. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  141. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
  142. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +3 -6
  143. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +54 -39
  144. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +16 -16
  145. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +24 -3
  146. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +72 -14
  147. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  148. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
  149. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
  150. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  151. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +181 -0
  152. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +3 -3
  153. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  154. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  155. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  156. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  157. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +8 -6
  158. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +37 -37
  159. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +28 -23
  160. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +6 -6
  161. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +7 -7
  162. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +12 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +62 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +1 -10
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +148 -88
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +16 -9
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  176. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +8 -0
  177. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +158 -0
  178. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +8 -3
  179. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +155 -76
  180. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +1 -2
  181. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +5 -4
  182. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +5 -1
  183. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -6
  184. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +31 -1
  185. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +228 -1
  186. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +66 -0
  187. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +190 -0
  188. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +25 -3
  189. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +130 -107
  190. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +1 -0
  191. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +19 -18
  192. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
  193. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  194. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  195. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +2 -18
  196. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +169 -266
  197. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +12 -10
  198. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +149 -206
  199. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +3 -3
  200. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +27 -22
  201. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +20 -8
  202. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +183 -43
  203. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  204. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +1 -1
  205. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +2 -3
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +21 -21
  208. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  209. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -11
  210. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  211. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  212. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +11 -11
  213. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
  214. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  215. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
  216. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  217. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  218. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  219. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +2 -2
  220. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  221. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +3 -1
  222. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -2
  223. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +3 -2
  224. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +1 -0
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +1 -0
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +1 -3
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +26 -23
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +4 -9
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +16 -6
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +9 -9
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +150 -50
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +2 -2
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +66 -5
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +239 -48
  248. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +0 -14
  249. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +0 -208
  250. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +0 -22
  251. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +0 -637
  252. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +0 -24
  253. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +0 -384
  254. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +0 -33
  255. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +0 -47
  256. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +0 -30
  257. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +0 -55
  258. /package/vscode/src/vs/workbench/contrib/chat/{common → browser}/promptSyntax/promptFileContributions.d.ts +0 -0
@@ -53,8 +53,8 @@ function renderSection(
53
53
  append(header, $("span.chat-debug-message-section-title", undefined, label));
54
54
  if (clipboardService) {
55
55
  const copyBtn = disposables.add(( new Button(header, {
56
- title: ( localize(5909, "Copy")),
57
- ariaLabel: ( localize(5909, "Copy")),
56
+ title: ( localize(5955, "Copy")),
57
+ ariaLabel: ( localize(5955, "Copy")),
58
58
  hoverDelegate: getDefaultHoverDelegate("mouse")
59
59
  })));
60
60
  copyBtn.icon = Codicon.copy;
@@ -97,10 +97,10 @@ async function renderToolCallContent(content, languageService, clipboardService,
97
97
  );
98
98
  const statusParts = [];
99
99
  if (content.result) {
100
- statusParts.push(content.result === "success" ? ( localize(5910, "Success")) : ( localize(5911, "Error")));
100
+ statusParts.push(content.result === "success" ? ( localize(5956, "Success")) : ( localize(5957, "Error")));
101
101
  }
102
102
  if (content.durationInMillis !== undefined) {
103
- statusParts.push(( localize(5912, "{0}ms", content.durationInMillis)));
103
+ statusParts.push(( localize(5958, "{0}ms", content.durationInMillis)));
104
104
  }
105
105
  if (statusParts.length > 0) {
106
106
  append(container, $(
@@ -115,14 +115,14 @@ async function renderToolCallContent(content, languageService, clipboardService,
115
115
  plainText,
116
116
  tokenizedHtml
117
117
  } = await tokenizeContent(content.input, languageService);
118
- renderSection(sectionsContainer, ( localize(5913, "Arguments")), plainText, tokenizedHtml, disposables, false, clipboardService, scrollable);
118
+ renderSection(sectionsContainer, ( localize(5959, "Arguments")), plainText, tokenizedHtml, disposables, false, clipboardService, scrollable);
119
119
  }
120
120
  if (content.output) {
121
121
  const {
122
122
  plainText,
123
123
  tokenizedHtml
124
124
  } = await tokenizeContent(content.output, languageService);
125
- renderSection(sectionsContainer, ( localize(5914, "Output")), plainText, tokenizedHtml, disposables, false, clipboardService, scrollable);
125
+ renderSection(sectionsContainer, ( localize(5960, "Output")), plainText, tokenizedHtml, disposables, false, clipboardService, scrollable);
126
126
  }
127
127
  return {
128
128
  element: container,
@@ -131,16 +131,16 @@ async function renderToolCallContent(content, languageService, clipboardService,
131
131
  }
132
132
  function toolCallContentToPlainText(content) {
133
133
  const lines = [];
134
- lines.push(( localize(5915, "Tool: {0}", content.toolName)));
134
+ lines.push(( localize(5961, "Tool: {0}", content.toolName)));
135
135
  if (content.result) {
136
- lines.push(( localize(5916, "Status: {0}", content.result)));
136
+ lines.push(( localize(5962, "Status: {0}", content.result)));
137
137
  }
138
138
  if (content.durationInMillis !== undefined) {
139
- lines.push(( localize(5917, "Duration: {0}ms", content.durationInMillis)));
139
+ lines.push(( localize(5963, "Duration: {0}ms", content.durationInMillis)));
140
140
  }
141
141
  if (content.input) {
142
142
  lines.push("");
143
- lines.push(`[${( localize(5913, "Arguments"))}]`);
143
+ lines.push(`[${( localize(5959, "Arguments"))}]`);
144
144
  try {
145
145
  const parsed = JSON.parse(content.input);
146
146
  lines.push(JSON.stringify(parsed, null, 2));
@@ -150,7 +150,7 @@ function toolCallContentToPlainText(content) {
150
150
  }
151
151
  if (content.output) {
152
152
  lines.push("");
153
- lines.push(`[${( localize(5914, "Output"))}]`);
153
+ lines.push(`[${( localize(5960, "Output"))}]`);
154
154
  try {
155
155
  const parsed = JSON.parse(content.output);
156
156
  lines.push(JSON.stringify(parsed, null, 2));
@@ -620,7 +620,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
620
620
  options: {
621
621
  selection
622
622
  },
623
- label: ( localize(5953, "{0} (changes from chat)", basename(this._entry.modifiedURI)))
623
+ label: ( localize(6001, "{0} (changes from chat)", basename(this._entry.modifiedURI)))
624
624
  });
625
625
  if (diffEditor && diffEditor.input) {
626
626
  diffEditor.getControl()?.setSelection(selection);
@@ -66,6 +66,7 @@ export declare class ChatEditingDeletedFileEntry extends AbstractChatEditingModi
66
66
  createSnapshot(chatSessionResource: URI, requestId: string | undefined, undoStop: string | undefined): ISnapshotEntry;
67
67
  restoreFromSnapshot(snapshot: ISnapshotEntry, restoreToDisk?: boolean): Promise<void>;
68
68
  resetToInitialContent(): Promise<void>;
69
+ resetEditTrackerToInitialContent(): Promise<void>;
69
70
  protected _areOriginalAndModifiedIdentical(): Promise<boolean>;
70
71
  protected _createUndoRedoElement(response: IChatResponseModel): IUndoRedoElement;
71
72
  acceptAgentEdits(_uri: URI, _edits: (TextEdit | ICellEditOperation)[], isLastEdits: boolean, _responseModel: IChatResponseModel | undefined): Promise<void>;
@@ -134,6 +134,9 @@ let ChatEditingDeletedFileEntry = class ChatEditingDeletedFileEntry extends Abst
134
134
  async resetToInitialContent() {
135
135
  await this._fileService.writeFile(this.modifiedURI, VSBuffer.fromString(this._originalContent));
136
136
  }
137
+ resetEditTrackerToInitialContent() {
138
+ return Promise.resolve();
139
+ }
137
140
  async _areOriginalAndModifiedIdentical() {
138
141
  return this._originalContent === "";
139
142
  }
@@ -129,7 +129,7 @@ let ChatEditingExplanationModelManager = class ChatEditingExplanationModelManage
129
129
  this._updateUriStatePartial(fileData.uri, {
130
130
  progress: "error",
131
131
  explanations: [],
132
- errorMessage: ( localize(5989, "No language model available"))
132
+ errorMessage: ( localize(6037, "No language model available"))
133
133
  });
134
134
  }
135
135
  return;
@@ -200,7 +200,7 @@ Example response format:
200
200
  for (const fileData of fileChanges) {
201
201
  const explanations = [];
202
202
  for (const data of fileData.changes) {
203
- const parsedExplanation = parsed[parsedIndex]?.explanation?.trim() || ( localize(5990, "Code was modified."));
203
+ const parsedExplanation = parsed[parsedIndex]?.explanation?.trim() || ( localize(6038, "Code was modified."));
204
204
  explanations.push({
205
205
  uri: fileData.uri,
206
206
  startLineNumber: data.startLineNumber,
@@ -218,7 +218,7 @@ Example response format:
218
218
  }
219
219
  } catch (e) {
220
220
  if (!cancellationToken.isCancellationRequested) {
221
- const errorMessage = e instanceof Error ? e.message : ( localize(5991, "Failed to generate explanations"));
221
+ const errorMessage = e instanceof Error ? e.message : ( localize(6039, "Failed to generate explanations"));
222
222
  for (const fileData of fileChanges) {
223
223
  this._updateUriStatePartial(fileData.uri, {
224
224
  progress: "error",
@@ -57,6 +57,7 @@ export declare class ChatEditingModifiedDocumentEntry extends AbstractChatEditin
57
57
  getCurrentContents(): string;
58
58
  restoreFromSnapshot(snapshot: ISnapshotEntry, restoreToDisk?: boolean): Promise<void>;
59
59
  resetToInitialContent(): Promise<void>;
60
+ resetEditTrackerToInitialContent(): Promise<void>;
60
61
  protected _areOriginalAndModifiedIdentical(): Promise<boolean>;
61
62
  protected _resetEditsState(tx: ITransaction): void;
62
63
  protected _createUndoRedoElement(response: IChatResponseModel): IUndoRedoElement;
@@ -142,7 +142,7 @@ let ChatEditingModifiedDocumentEntry = class ChatEditingModifiedDocumentEntry ex
142
142
  if (inProgress) {
143
143
  const res = this._lastModifyingResponseObs.read(r);
144
144
  const req = res && res.session.getRequests().find(value => value.id === res.requestId);
145
- resourceFilter.value = markerService.installResourceFilter(this.modifiedURI, req?.message.text || ( localize(6004, "Chat Edits")));
145
+ resourceFilter.value = markerService.installResourceFilter(this.modifiedURI, req?.message.text || ( localize(6052, "Chat Edits")));
146
146
  } else {
147
147
  resourceFilter.clear();
148
148
  }
@@ -175,6 +175,9 @@ let ChatEditingModifiedDocumentEntry = class ChatEditingModifiedDocumentEntry ex
175
175
  async resetToInitialContent() {
176
176
  await this._textModelChangeService.resetDocumentValues(undefined, this.initialContent);
177
177
  }
178
+ async resetEditTrackerToInitialContent() {
179
+ await this._textModelChangeService.resetDocumentValues(this.initialContent, undefined);
180
+ }
178
181
  async _areOriginalAndModifiedIdentical() {
179
182
  return this._textModelChangeService.areOriginalAndModifiedIdentical();
180
183
  }
@@ -184,7 +187,7 @@ let ChatEditingModifiedDocumentEntry = class ChatEditingModifiedDocumentEntry ex
184
187
  }
185
188
  _createUndoRedoElement(response) {
186
189
  const request = response.session.getRequests().find(req => req.id === response.requestId);
187
- const label = request?.message.text ? ( localize(6005, "Chat Edit: '{0}'", request.message.text)) : ( localize(6006, "Chat Edit"));
190
+ const label = request?.message.text ? ( localize(6053, "Chat Edit: '{0}'", request.message.text)) : ( localize(6054, "Chat Edit"));
188
191
  return ( new SingleModelEditStackElement(label, "chat.edit", this.modifiedModel, null));
189
192
  }
190
193
  async acceptAgentEdits(resource, textEdits, isLastEdits, responseModel) {
@@ -106,6 +106,7 @@ export declare abstract class AbstractChatEditingModifiedFileEntry extends Dispo
106
106
  abstract equalsSnapshot(snapshot: ISnapshotEntry | undefined): boolean;
107
107
  abstract restoreFromSnapshot(snapshot: ISnapshotEntry, restoreToDisk?: boolean): Promise<void>;
108
108
  abstract resetToInitialContent(): Promise<void>;
109
+ abstract resetEditTrackerToInitialContent(): Promise<void>;
109
110
  abstract initialContent: string;
110
111
  /**
111
112
  * Computes the edits between two snapshots of the file content.
@@ -42,7 +42,7 @@ class AutoAcceptControl {
42
42
  this.cancel = cancel;
43
43
  }
44
44
  }
45
- const pendingRewriteMinimap = registerColor("minimap.chatEditHighlight", ( transparent(editorBackground, 0.6)), ( localize(6007, "Color of pending edit regions in the minimap")));
45
+ const pendingRewriteMinimap = registerColor("minimap.chatEditHighlight", ( transparent(editorBackground, 0.6)), ( localize(6055, "Color of pending edit regions in the minimap")));
46
46
  let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFileEntry extends Disposable {
47
47
  static {
48
48
  AbstractChatEditingModifiedFileEntry_1 = this;
@@ -13,7 +13,7 @@ import { IUndoRedoService } from "@codingame/monaco-vscode-api/vscode/vs/platfor
13
13
  import { IEditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
14
14
  import { IFilesConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service";
15
15
  import { IAiEditTelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service";
16
- import { CellDiffInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel";
16
+ import { CellDiffInfo } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel";
17
17
  import { NotebookCellTextModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel";
18
18
  import { ICellEditOperation, IResolvedNotebookEditorModel, NotebookTextModelChangedEvent, TransientOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
19
19
  import { INotebookEditorModelResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service";
@@ -109,6 +109,7 @@ export declare class ChatEditingModifiedNotebookEntry extends AbstractChatEditin
109
109
  createSnapshot(chatSessionResource: URI, requestId: string | undefined, undoStop: string | undefined): ISnapshotEntry;
110
110
  equalsSnapshot(snapshot: ISnapshotEntry | undefined): boolean;
111
111
  restoreFromSnapshot(snapshot: ISnapshotEntry, restoreToDisk?: boolean): Promise<void>;
112
+ resetEditTrackerToInitialContent(): Promise<void>;
112
113
  resetToInitialContent(): Promise<void>;
113
114
  restoreModifiedModelFromSnapshot(snapshot: string): Promise<void>;
114
115
  private restoreSnapshotInModifiedModel;
@@ -27,10 +27,10 @@ import { SaveReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/com
27
27
  import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
28
28
  import { SnapshotContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/fileWorkingCopy';
29
29
  import { IAiEditTelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service';
30
- import { NotebookTextDiffEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor';
30
+ import { NotebookTextDiffEditor } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor';
31
31
  import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
32
32
  import { CellEditType, NotebookCellsChangeType, NotebookSetting } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
33
- import { computeDiff } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookDiff';
33
+ import { computeDiff } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/common/notebookDiff';
34
34
  import { INotebookEditorModelResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service';
35
35
  import { INotebookLoggingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service';
36
36
  import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
@@ -485,7 +485,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
485
485
  }
486
486
  _createUndoRedoElement(response) {
487
487
  const request = response.session.getRequests().find(req => req.id === response.requestId);
488
- const label = request?.message.text ? ( localize(6008, "Chat Edit: '{0}'", request.message.text)) : ( localize(6009, "Chat Edit"));
488
+ const label = request?.message.text ? ( localize(6056, "Chat Edit: '{0}'", request.message.text)) : ( localize(6057, "Chat Edit"));
489
489
  const transientOptions = this.transientOptions;
490
490
  const outputSizeLimit = this.configurationService.getValue(NotebookSetting.outputBackupSizeLimit) * 1024;
491
491
  let initial = createSnapshot(this.modifiedModel, transientOptions, outputSizeLimit);
@@ -928,6 +928,13 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
928
928
  }
929
929
  this.initializeModelsFromDiff();
930
930
  }
931
+ async resetEditTrackerToInitialContent() {
932
+ if (this.initialContent) {
933
+ restoreSnapshot(this.originalModel, this.initialContent);
934
+ }
935
+ this.updateCellDiffInfo([], undefined);
936
+ this.initializeModelsFromDiff();
937
+ }
931
938
  async resetToInitialContent() {
932
939
  this.updateCellDiffInfo([], undefined);
933
940
  this.restoreSnapshotInModifiedModel(this.initialContent);
@@ -1,4 +1,4 @@
1
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
1
+ import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
2
  import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
3
3
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
4
  import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
@@ -16,7 +16,7 @@ import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbe
16
16
  import { IMultiDiffSourceResolver, IResolvedMultiDiffSource } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService";
17
17
  import { IMultiDiffSourceResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service";
18
18
  import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
19
- import { IChatEditingSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
19
+ import { IChatEditingSession, IChatEditingSessionProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
20
20
  import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service";
21
21
  import { ChatModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
22
22
  import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
@@ -29,6 +29,7 @@ export declare class ChatEditingService extends Disposable implements IChatEditi
29
29
  private readonly notebookService;
30
30
  private readonly _configurationService;
31
31
  _serviceBrand: undefined;
32
+ private readonly _providers;
32
33
  private readonly _sessionsObs;
33
34
  readonly editingSessionsObs: IObservable<readonly IChatEditingSession[]>;
34
35
  constructor(_instantiationService: IInstantiationService, multiDiffSourceResolverService: IMultiDiffSourceResolverService, textModelService: ITextModelService, contextKeyService: IContextKeyService, _chatService: IChatService, _editorService: IEditorService, decorationsService: IDecorationsService, _fileService: IFileService, lifecycleService: ILifecycleService, storageService: IStorageService, logService: ILogService, extensionService: IExtensionService, productService: IProductService, notebookService: INotebookService, _configurationService: IConfigurationService);
@@ -39,6 +40,7 @@ export declare class ChatEditingService extends Disposable implements IChatEditi
39
40
  createEditingSession(chatModel: ChatModel, global?: boolean): IChatEditingSession;
40
41
  transferEditingSession(chatModel: ChatModel, session: IChatEditingSession): IChatEditingSession;
41
42
  private _createEditingSession;
43
+ registerEditingSessionProvider(scheme: string, provider: IChatEditingSessionProvider): IDisposable;
42
44
  private installAutoApplyObserver;
43
45
  private observerEditsInResponse;
44
46
  }
@@ -6,7 +6,7 @@ import { groupBy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/coll
6
6
  import { ErrorNoTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
7
7
  import { Event, Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
8
8
  import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
9
- import { Disposable, dispose, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
9
+ import { Disposable, dispose, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
10
10
  import { LinkedList } from '@codingame/monaco-vscode-api/vscode/vs/base/common/linkedList';
11
11
  import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
12
12
  import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
@@ -71,6 +71,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
71
71
  this.lifecycleService = lifecycleService;
72
72
  this.notebookService = notebookService;
73
73
  this._configurationService = _configurationService;
74
+ this._providers = ( new Map());
74
75
  this._sessionsObs = observableValueOpts({
75
76
  equalsFn: (a, b) => false
76
77
  }, ( new LinkedList()));
@@ -94,7 +95,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
94
95
  ));
95
96
  this._register(this._chatService.onDidDisposeSession(e => {
96
97
  if (e.reason === "cleared") {
97
- for (const resource of e.sessionResource) {
98
+ for (const resource of e.sessionResources) {
98
99
  this.getEditingSession(resource)?.stop();
99
100
  }
100
101
  }
@@ -124,7 +125,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
124
125
  }
125
126
  e.join(storageTask, {
126
127
  id: "join.chatEditingSession",
127
- label: ( localize(6010, "Saving chat edits history"))
128
+ label: ( localize(6058, "Saving chat edits history"))
128
129
  });
129
130
  }));
130
131
  }
@@ -158,7 +159,8 @@ let ChatEditingService = class ChatEditingService extends Disposable {
158
159
  this.getEditingSession(chatModel.sessionResource) === undefined,
159
160
  "CANNOT have more than one editing session per chat session"
160
161
  );
161
- const session = this._instantiationService.createInstance(
162
+ const provider = this._providers.get(chatModel.sessionResource.scheme);
163
+ const session = provider ? provider.createEditingSession(chatModel.sessionResource) : this._instantiationService.createInstance(
162
164
  ChatEditingSession,
163
165
  chatModel.sessionResource,
164
166
  global,
@@ -169,7 +171,9 @@ let ChatEditingService = class ChatEditingService extends Disposable {
169
171
  const removeSession = list.unshift(session);
170
172
  const store = ( new DisposableStore());
171
173
  this._store.add(store);
172
- store.add(this.installAutoApplyObserver(session, chatModel));
174
+ if (!provider && session instanceof ChatEditingSession) {
175
+ store.add(this.installAutoApplyObserver(session, chatModel));
176
+ }
173
177
  store.add(session.onDidDispose(e => {
174
178
  removeSession();
175
179
  this._sessionsObs.set(list, undefined);
@@ -178,6 +182,14 @@ let ChatEditingService = class ChatEditingService extends Disposable {
178
182
  this._sessionsObs.set(list, undefined);
179
183
  return session;
180
184
  }
185
+ registerEditingSessionProvider(scheme, provider) {
186
+ this._providers.set(scheme, provider);
187
+ return toDisposable(() => {
188
+ if (this._providers.get(scheme) === provider) {
189
+ this._providers.delete(scheme);
190
+ }
191
+ });
192
+ }
181
193
  installAutoApplyObserver(session, chatModel) {
182
194
  if (!chatModel) {
183
195
  throw ( new ErrorNoTelemetry(
@@ -346,7 +358,7 @@ class ChatDecorationsProvider extends Disposable {
346
358
  constructor(_sessions) {
347
359
  super();
348
360
  this._sessions = _sessions;
349
- this.label = ( localize(6011, "Chat Editing"));
361
+ this.label = ( localize(6059, "Chat Editing"));
350
362
  this._currentEntries = derived(this, r => {
351
363
  const sessions = this._sessions.read(r);
352
364
  if (!sessions) {
@@ -390,7 +402,7 @@ class ChatDecorationsProvider extends Disposable {
390
402
  return {
391
403
  weight: 1000,
392
404
  letter: Codicon.diffModified,
393
- tooltip: ( localize(6012, "Pending changes from chat")),
405
+ tooltip: ( localize(6060, "Pending changes from chat")),
394
406
  bubble: true
395
407
  };
396
408
  }
@@ -39,6 +39,7 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
39
39
  private readonly _fileService;
40
40
  private readonly _explanationModelManager;
41
41
  private readonly _telemetryService;
42
+ readonly supportsKeepUndo = false;
42
43
  private readonly _state;
43
44
  private readonly _timeline;
44
45
  /**
@@ -94,8 +95,8 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
94
95
  startStreamingEdits(resource: URI, responseModel: IChatResponseModel, inUndoStop: string | undefined): IStreamingEdits;
95
96
  startDeletion(resource: URI, responseModel: IChatResponseModel, undoStopId: string): void;
96
97
  applyWorkspaceEdit(edit: IChatWorkspaceEdit, responseModel: IChatResponseModel, undoStopId: string): void;
97
- startExternalEdits(responseModel: IChatResponseModel, operationId: number, resources: URI[], undoStopId: string): Promise<IChatProgress[]>;
98
- stopExternalEdits(responseModel: IChatResponseModel, operationId: number): Promise<IChatProgress[]>;
98
+ startExternalEdits(responseModel: IChatResponseModel, operationId: number, resources: URI[], undoStopId: string, contentFor?: URI[]): Promise<IChatProgress[]>;
99
+ stopExternalEdits(responseModel: IChatResponseModel, operationId: number, contentFor?: URI[]): Promise<IChatProgress[]>;
99
100
  undoInteraction(): Promise<void>;
100
101
  redoInteraction(): Promise<void>;
101
102
  triggerExplanationGeneration(): Promise<void>;
@@ -87,9 +87,6 @@ function createOpeningEditCodeBlock(uri, isNotebook, undoStopId) {
87
87
  uri,
88
88
  isEdit: true,
89
89
  undoStopId
90
- }, {
91
- kind: "markdownContent",
92
- content: ( new MarkdownString("\n````\n"))
93
90
  }, isNotebook ? {
94
91
  kind: "notebookEdit",
95
92
  uri,
@@ -153,6 +150,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
153
150
  this._fileService = _fileService;
154
151
  this._explanationModelManager = _explanationModelManager;
155
152
  this._telemetryService = _telemetryService;
153
+ this.supportsKeepUndo = false;
156
154
  this._state = observableValue(this, ChatEditingSessionState.Initial);
157
155
  this._initialFileContents = ( new ResourceMap());
158
156
  this._baselineCreationLocks = ( new SequencerByKey());
@@ -407,7 +405,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
407
405
  }
408
406
  const input = MultiDiffEditorInput.fromResourceMultiDiffEditorInput({
409
407
  multiDiffSource: getMultiDiffSourceUri(this, previousChanges),
410
- label: ( localize(6013, "Suggested Edits"))
408
+ label: ( localize(6061, "Suggested Edits"))
411
409
  }, this._instantiationService);
412
410
  this._editorPane = await this._editorService.openEditor(input, {
413
411
  pinned: true,
@@ -553,14 +551,16 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
553
551
  }
554
552
  }
555
553
  }
556
- async startExternalEdits(responseModel, operationId, resources, undoStopId) {
554
+ async startExternalEdits(responseModel, operationId, resources, undoStopId, contentFor) {
557
555
  const snapshots = ( new ResourceMap());
558
556
  const acquiredLockPromises = [];
559
557
  const releaseLockPromises = [];
560
558
  const progress = [];
561
559
  const telemetryInfo = this._getTelemetryInfoForModel(responseModel);
562
560
  await chatEditingSessionIsReady(this);
563
- for (const resource of resources) {
561
+ for (let i = 0; i < resources.length; i++) {
562
+ const resource = resources[i];
563
+ const contentSource = contentFor?.[i];
564
564
  const releaseLock = ( new DeferredPromise());
565
565
  releaseLockPromises.push(releaseLock);
566
566
  const acquiredLock = ( new DeferredPromise());
@@ -570,7 +570,16 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
570
570
  acquiredLock.complete();
571
571
  return;
572
572
  }
573
- const entry = await this._getOrCreateModifiedFileEntry(resource, NotExistBehavior.Abort, telemetryInfo);
573
+ let initialContent;
574
+ if (contentSource) {
575
+ try {
576
+ const data = await this._fileService.readFile(contentSource);
577
+ initialContent = ( data.value.toString());
578
+ } catch {
579
+ initialContent = "";
580
+ }
581
+ }
582
+ const entry = await this._getOrCreateModifiedFileEntry(resource, NotExistBehavior.Abort, telemetryInfo, initialContent);
574
583
  if (entry) {
575
584
  await this._acceptStreamingEditsStart(responseModel, undoStopId, resource);
576
585
  }
@@ -580,8 +589,16 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
580
589
  this._notebookService.hasSupportedNotebooks(notebookUri),
581
590
  undoStopId
582
591
  ));
583
- await entry?.save();
584
- snapshots.set(resource, entry && this._getCurrentTextOrNotebookSnapshot(entry));
592
+ if (initialContent !== undefined) {
593
+ if (entry) {
594
+ entry.initialContent = initialContent;
595
+ await entry.resetEditTrackerToInitialContent();
596
+ }
597
+ snapshots.set(resource, initialContent);
598
+ } else {
599
+ await entry?.save();
600
+ snapshots.set(resource, entry && this._getCurrentTextOrNotebookSnapshot(entry));
601
+ }
585
602
  entry?.startExternalEdit();
586
603
  acquiredLock.complete();
587
604
  return releaseLock.p;
@@ -597,7 +614,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
597
614
  });
598
615
  return progress;
599
616
  }
600
- async stopExternalEdits(responseModel, operationId) {
617
+ async stopExternalEdits(responseModel, operationId, contentFor) {
601
618
  const operation = this._externalEditOperations.get(operationId);
602
619
  if (!operation) {
603
620
  this._logService.warn(`stopExternalEdits called for unknown operation ${operationId}`);
@@ -606,6 +623,16 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
606
623
  this._externalEditOperations.delete(operationId);
607
624
  const progress = [];
608
625
  try {
626
+ const contentForMap = ( new ResourceMap());
627
+ if (contentFor) {
628
+ let idx = 0;
629
+ for (const [resource] of operation.snapshots) {
630
+ if (idx < contentFor.length && contentFor[idx]) {
631
+ contentForMap.set(resource, contentFor[idx]);
632
+ }
633
+ idx++;
634
+ }
635
+ }
609
636
  for (const [resource, beforeSnapshot] of operation.snapshots) {
610
637
  let entry = this._getEntry(resource);
611
638
  if (!entry && beforeSnapshot === undefined) {
@@ -623,8 +650,19 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
623
650
  if (!entry) {
624
651
  continue;
625
652
  }
626
- await entry.revertToDisk();
627
- const afterSnapshot = this._getCurrentTextOrNotebookSnapshot(entry);
653
+ let afterSnapshot;
654
+ const contentSource = contentForMap.get(resource);
655
+ if (contentSource) {
656
+ try {
657
+ const data = await this._fileService.readFile(contentSource);
658
+ afterSnapshot = ( data.value.toString());
659
+ } catch (_e) {
660
+ afterSnapshot = "";
661
+ }
662
+ } else {
663
+ await entry.revertToDisk();
664
+ afterSnapshot = this._getCurrentTextOrNotebookSnapshot(entry) ?? "";
665
+ }
628
666
  let edits = [];
629
667
  if (beforeSnapshot === undefined) {
630
668
  this._timeline.recordFileOperation({
@@ -665,6 +703,10 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
665
703
  this._state.set(ChatEditingSessionState.Idle, undefined);
666
704
  }
667
705
  }
706
+ progress.push({
707
+ kind: "markdownContent",
708
+ content: ( new MarkdownString("\n````\n"))
709
+ });
668
710
  return progress;
669
711
  }
670
712
  async undoInteraction() {
@@ -2,7 +2,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
2
2
  import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
3
3
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
4
4
  import { IEditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
5
- import { INotebookTextDiffEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser";
5
+ import { INotebookTextDiffEditor } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser";
6
6
  import { NotebookTextModel } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/workbench/contrib/notebook/common/model/notebookTextModel";
7
7
  import { IModifiedFileEntryChangeHunk, IModifiedFileEntryEditorIntegration } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
8
8
  import { ChatEditingModifiedNotebookEntry } from "../chatEditingModifiedNotebookEntry.js";
@@ -16,8 +16,8 @@ import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/
16
16
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
17
17
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
18
18
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
19
- import { NotebookDeletedCellDecorator } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator';
20
- import { NotebookInsertedCellDecorator } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator';
19
+ import { NotebookDeletedCellDecorator } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator';
20
+ import { NotebookInsertedCellDecorator } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator';
21
21
  import { NotebookModifiedCellDecorator } from '../../../../notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js';
22
22
  import { getNotebookEditorFromEditorPane, CellEditState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
23
23
  import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
@@ -630,7 +630,7 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
630
630
  modified: {
631
631
  resource: this._entry.modifiedURI
632
632
  },
633
- label: ( localize(6014, "{0} (changes from chat)", basename(this._entry.modifiedURI)))
633
+ label: ( localize(6062, "{0} (changes from chat)", basename(this._entry.modifiedURI)))
634
634
  };
635
635
  await this._editorService.openEditor(diffInput);
636
636
  }
@@ -136,7 +136,7 @@ function findImageInListByData(images, data) {
136
136
  }
137
137
  function buildCollectionArgs(sections, clickedGlobalIndex, sessionResource) {
138
138
  const collectionId = ( sessionResource.toString()) + "_carousel";
139
- const defaultTitle = ( localize(6015, "Conversation Images"));
139
+ const defaultTitle = ( localize(6063, "Conversation Images"));
140
140
  return {
141
141
  collection: {
142
142
  id: collectionId,