@codingame/monaco-vscode-chat-service-override 25.1.2 → 26.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 (334) hide show
  1. package/index.js +24 -3
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +23 -3
  4. package/vscode/src/vs/platform/browserElements/common/browserElements.js +13 -6
  5. package/vscode/src/vs/platform/domWidget/browser/domWidget.js +4 -4
  6. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -1
  7. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +42 -27
  8. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +14 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +218 -74
  10. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatTerminalOutputAccessibleView.js +6 -8
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +14 -9
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +165 -168
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +27 -25
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +141 -140
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +189 -121
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +14 -15
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +60 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +435 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +28 -12
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +10 -12
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +3 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +37 -16
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.d.ts +11 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +54 -24
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +73 -34
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +71 -30
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +151 -89
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +12 -15
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +39 -40
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +90 -125
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +5 -2
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +263 -143
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +4 -4
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +188 -126
  35. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.d.ts +1 -1
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +37 -28
  37. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +21 -9
  38. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +392 -226
  39. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +31 -27
  40. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +25 -23
  41. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -3
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.d.ts +2 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +13 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +20 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +83 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +68 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +319 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.d.ts +1 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +215 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +179 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +951 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agentsessionprojection.css +20 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +388 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/unifiedQuickAccess.css +195 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +120 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +394 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.d.ts +38 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +95 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +3 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +31 -29
  61. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +49 -47
  62. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +4 -6
  63. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/media/simpleBrowserOverlay.css +0 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +188 -151
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +1012 -639
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +256 -151
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +8 -1
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +182 -101
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +79 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +193 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +9 -7
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.d.ts +68 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +253 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -5
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +69 -50
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +3 -4
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +52 -33
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +5 -6
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +274 -155
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +1 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +2 -10
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +130 -104
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +12 -2
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +385 -160
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +53 -36
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +112 -75
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +19 -10
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +31 -11
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +39 -17
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNewNotebookContentEdits.js +10 -14
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +0 -2
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +25 -16
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +265 -203
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +29 -26
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.js +114 -60
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.js +16 -19
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +44 -30
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +119 -45
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +152 -136
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +12 -8
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +51 -31
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +323 -217
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +4 -3
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +653 -401
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +52 -40
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -3
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +5 -2
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +43 -28
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +182 -136
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +33 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +548 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +0 -1
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +222 -138
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +3 -3
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +151 -113
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +6 -4
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +453 -217
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +1 -1
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +162 -88
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/chatSetup.css +2 -1
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.d.ts +0 -2
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +1 -13
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +309 -233
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +55 -53
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.js +3 -1
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +37 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +109 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +35 -23
  132. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.d.ts +9 -4
  133. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +73 -33
  134. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +47 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +333 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +39 -25
  137. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +9 -5
  138. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +23 -20
  139. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +2 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +20 -16
  141. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +65 -57
  142. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +48 -36
  143. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +20 -12
  144. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +52 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +155 -159
  147. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +24 -14
  148. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +521 -246
  149. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +107 -76
  150. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +28 -24
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.js +10 -6
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.d.ts +16 -0
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.js +57 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatLayoutService.js +4 -6
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +56 -44
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +0 -3
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +37 -47
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatEditorInputContentProvider.js +5 -7
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +10 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +1284 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +179 -125
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +9 -11
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/editorHoverWrapper.js +7 -6
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +96 -78
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +58 -53
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +25 -11
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +484 -292
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.d.ts +1 -6
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +65 -92
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -19
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +1 -0
  172. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +9 -1
  173. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +331 -189
  174. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +81 -93
  175. package/vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.js +1 -3
  176. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -3
  177. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +6 -7
  178. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +36 -8
  179. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +169 -31
  180. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.d.ts +6 -0
  181. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +141 -0
  182. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +6 -4
  183. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +218 -144
  184. package/vscode/src/vs/workbench/contrib/chat/common/model/chatTransferService.js +20 -10
  185. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +109 -0
  186. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +349 -0
  187. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +9 -8
  188. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +9 -0
  189. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +139 -36
  190. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +3 -6
  191. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +64 -51
  192. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +49 -34
  193. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +21 -13
  194. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -1
  195. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +125 -97
  196. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +91 -131
  197. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +8 -5
  198. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +5 -0
  199. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +488 -222
  200. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +32 -12
  201. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +58 -13
  202. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +717 -200
  203. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +79 -18
  204. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +371 -130
  205. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +0 -1
  206. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +3 -7
  207. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +79 -61
  208. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +27 -21
  209. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +7 -10
  210. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -1
  211. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +26 -32
  212. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +2 -2
  213. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -60
  214. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +115 -426
  215. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +15 -0
  216. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +127 -0
  217. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +1 -37
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +16 -0
  219. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +21 -0
  220. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +51 -0
  221. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +334 -0
  222. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +41 -0
  223. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +424 -0
  224. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +4 -0
  225. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +58 -0
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +7 -0
  227. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +195 -0
  228. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
  229. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +368 -0
  230. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +2 -0
  231. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +7 -0
  232. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +1 -1
  234. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +23 -25
  235. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.js +7 -8
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +34 -38
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +8 -12
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +103 -95
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +28 -16
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +4 -5
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +12 -8
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +65 -54
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +86 -60
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +13 -26
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +2 -1
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +56 -46
  250. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +2 -2
  251. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +63 -31
  252. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +2 -1
  253. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +35 -30
  254. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +2 -1
  255. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +44 -37
  256. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +3 -4
  257. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +3 -3
  258. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +11 -0
  259. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +70 -50
  260. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +26 -394
  261. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +85 -49
  262. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +68 -27
  263. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +1 -0
  264. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +67 -45
  265. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.d.ts +12 -0
  266. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +106 -0
  267. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +2 -2
  268. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +177 -97
  269. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +136 -49
  270. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +2 -1
  271. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +128 -112
  272. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +51 -49
  273. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +8 -0
  274. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +25 -0
  275. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
  276. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
  277. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
  278. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
  279. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
  280. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
  281. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
  282. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +12 -0
  283. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +21 -0
  284. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +5 -14
  285. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +2 -4
  286. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +1 -0
  287. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -0
  288. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +29 -0
  289. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +30 -31
  290. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +16 -17
  291. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +19 -20
  292. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.d.ts +11 -0
  293. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +58 -0
  294. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +31 -3
  295. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +325 -199
  296. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +1 -1
  297. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +1 -1
  298. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +33 -38
  299. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +45 -5
  300. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +746 -456
  301. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +145 -98
  302. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +88 -37
  303. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +120 -51
  304. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +25 -28
  305. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +5 -0
  306. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +58 -12
  307. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +12 -0
  308. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.js +17 -0
  309. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +8 -1
  310. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +47 -28
  311. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +37 -0
  312. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +171 -0
  313. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +0 -58
  314. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +0 -213
  315. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +0 -39
  316. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +0 -243
  317. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +0 -7
  318. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +0 -41
  319. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +0 -166
  320. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +0 -607
  321. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +0 -255
  322. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +0 -46
  323. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +0 -396
  324. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +0 -9
  325. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +0 -379
  326. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +0 -117
  327. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -141
  328. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -961
  329. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -36
  330. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -447
  331. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
  332. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -251
  333. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.d.ts +0 -10
  334. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +0 -42
@@ -10,8 +10,8 @@ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/in
10
10
  import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
11
11
  import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
12
12
  import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
13
- import { LineRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/lineRange';
14
13
  import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
14
+ import { LineRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/lineRange';
15
15
  import { nullDocumentDiff } from '../../../../../editor/common/diff/documentDiffProvider.js';
16
16
  import { RangeMapping, DetailedLineRangeMapping } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping';
17
17
  import { TextEdit } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages';
@@ -26,16 +26,17 @@ import { IUndoRedoService } from '@codingame/monaco-vscode-api/vscode/vs/platfor
26
26
  import { SaveReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
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
- import { NotebookTextDiffEditor } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor';
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
31
  import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
31
32
  import { CellEditType, NotebookCellsChangeType, NotebookSetting } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
32
- import { computeDiff } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/common/notebookDiff';
33
+ import { computeDiff } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookDiff';
33
34
  import { INotebookEditorModelResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service';
34
35
  import { INotebookLoggingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service';
35
36
  import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
36
37
  import { INotebookEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service';
37
- import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
38
38
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
39
+ import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
39
40
  import { AbstractChatEditingModifiedFileEntry } from './chatEditingModifiedFileEntry.js';
40
41
  import { getNotebookSnapshotFileURI, restoreSnapshot, createSnapshot, deserializeSnapshot, SnapshotComparer } from './notebook/chatEditingModifiedNotebookSnapshot.js';
41
42
  import { ChatEditingNewNotebookContentEdits } from './notebook/chatEditingNewNotebookContentEdits.js';
@@ -44,17 +45,20 @@ import { ChatEditingNotebookDiffEditorIntegration, ChatEditingNotebookEditorInte
44
45
  import { ChatEditingNotebookFileSystemProvider } from './notebook/chatEditingNotebookFileSystemProvider.js';
45
46
  import { isTransientIPyNbExtensionEvent, adjustCellDiffAndOriginalModelBasedOnCellMovements, getCorrespondingOriginalCellIndex, adjustCellDiffAndOriginalModelBasedOnCellAddDelete, calculateNotebookRewriteRatio, adjustCellDiffForRevertingAnInsertedCell, adjustCellDiffForKeepingAnInsertedCell, adjustCellDiffForRevertingADeletedCell } from './notebook/helpers.js';
46
47
  import { countChanges, sortCellChanges } from './notebook/notebookCellChanges.js';
47
- import { IAiEditTelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service';
48
48
  import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
49
49
  import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
50
50
  import { ObservablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/promise';
51
51
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
52
52
 
53
53
  var ChatEditingModifiedNotebookEntry_1;
54
- const SnapshotLanguageId = 'VSCodeChatNotebookSnapshotLanguage';
54
+ const SnapshotLanguageId = "VSCodeChatNotebookSnapshotLanguage";
55
55
  let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry extends AbstractChatEditingModifiedFileEntry {
56
- static { ChatEditingModifiedNotebookEntry_1 = this; }
57
- static { this.NewModelCounter = 0; }
56
+ static {
57
+ ChatEditingModifiedNotebookEntry_1 = this;
58
+ }
59
+ static {
60
+ this.NewModelCounter = 0;
61
+ }
58
62
  get isProcessingResponse() {
59
63
  return this._isProcessingResponse;
60
64
  }
@@ -64,14 +68,27 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
64
68
  get viewType() {
65
69
  return this.modifiedModel.viewType;
66
70
  }
67
- static async create(uri, _multiDiffEntryDelegate, telemetryInfo, chatKind, initialContent, instantiationService) {
68
- return instantiationService.invokeFunction(async (accessor) => {
71
+ static async create(
72
+ uri,
73
+ _multiDiffEntryDelegate,
74
+ telemetryInfo,
75
+ chatKind,
76
+ initialContent,
77
+ instantiationService
78
+ ) {
79
+ return instantiationService.invokeFunction(async accessor => {
69
80
  const notebookService = accessor.get(INotebookService);
70
81
  const resolver = accessor.get(INotebookEditorModelResolverService);
71
82
  const configurationServie = accessor.get(IConfigurationService);
72
83
  const resourceRef = await resolver.resolve(uri);
73
84
  const notebook = resourceRef.object.notebook;
74
- const originalUri = getNotebookSnapshotFileURI(telemetryInfo.sessionResource, telemetryInfo.requestId, generateUuid(), notebook.uri.scheme === Schemas.untitled ? `/${notebook.uri.path}` : notebook.uri.path, notebook.viewType);
85
+ const originalUri = getNotebookSnapshotFileURI(
86
+ telemetryInfo.sessionResource,
87
+ telemetryInfo.requestId,
88
+ generateUuid(),
89
+ notebook.uri.scheme === Schemas.untitled ? `/${notebook.uri.path}` : notebook.uri.path,
90
+ notebook.viewType
91
+ );
75
92
  const [options, buffer] = await Promise.all([
76
93
  notebookService.withNotebookDataProvider(resourceRef.object.notebook.notebookType),
77
94
  notebookService.createNotebookTextDocumentSnapshot(notebook.uri, SnapshotContext.Backup, CancellationToken.None).then(s => streamToBuffer(s))
@@ -82,24 +99,37 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
82
99
  if (initialContent !== undefined) {
83
100
  try {
84
101
  restoreSnapshot(originalRef.object.notebook, initialContent);
85
- }
86
- catch (ex) {
102
+ } catch (ex) {
87
103
  console.error(`Error restoring snapshot: ${initialContent}`, ex);
88
104
  initialContent = createSnapshot(notebook, options.serializer.options, configurationServie);
89
105
  }
90
- }
91
- else {
106
+ } else {
92
107
  initialContent = createSnapshot(notebook, options.serializer.options, configurationServie);
93
108
  restoreSnapshot(originalRef.object.notebook, initialContent);
94
109
  const edits = [];
95
110
  notebook.cells.forEach((cell, index) => {
96
111
  const internalId = generateCellHash(cell.uri);
97
- edits.push({ editType: CellEditType.PartialInternalMetadata, index, internalMetadata: { internalId } });
112
+ edits.push({
113
+ editType: CellEditType.PartialInternalMetadata,
114
+ index,
115
+ internalMetadata: {
116
+ internalId
117
+ }
118
+ });
98
119
  });
99
120
  resourceRef.object.notebook.applyEdits(edits, true, undefined, () => undefined, undefined, false);
100
121
  originalRef.object.notebook.applyEdits(edits, true, undefined, () => undefined, undefined, false);
101
122
  }
102
- const instance = instantiationService.createInstance(ChatEditingModifiedNotebookEntry_1, resourceRef, originalRef, _multiDiffEntryDelegate, options.serializer.options, telemetryInfo, chatKind, initialContent);
123
+ const instance = instantiationService.createInstance(
124
+ ChatEditingModifiedNotebookEntry_1,
125
+ resourceRef,
126
+ originalRef,
127
+ _multiDiffEntryDelegate,
128
+ options.serializer.options,
129
+ telemetryInfo,
130
+ chatKind,
131
+ initialContent
132
+ );
103
133
  instance._register(disposables);
104
134
  return instance;
105
135
  });
@@ -111,8 +141,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
111
141
  try {
112
142
  deserializeSnapshot(initialContent);
113
143
  return true;
114
- }
115
- catch (ex) {
144
+ } catch (ex) {
116
145
  return false;
117
146
  }
118
147
  }
@@ -122,8 +151,39 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
122
151
  }
123
152
  return false;
124
153
  }
125
- constructor(modifiedResourceRef, originalResourceRef, _multiDiffEntryDelegate, transientOptions, telemetryInfo, kind, initialContent, configurationService, fileConfigService, chatService, fileService, instantiationService, textModelService, modelService, undoRedoService, notebookEditorWorkerService, loggingService, notebookResolver, aiEditTelemetryService) {
126
- super(modifiedResourceRef.object.notebook.uri, telemetryInfo, kind, configurationService, fileConfigService, chatService, fileService, undoRedoService, instantiationService, aiEditTelemetryService);
154
+ constructor(
155
+ modifiedResourceRef,
156
+ originalResourceRef,
157
+ _multiDiffEntryDelegate,
158
+ transientOptions,
159
+ telemetryInfo,
160
+ kind,
161
+ initialContent,
162
+ configurationService,
163
+ fileConfigService,
164
+ chatService,
165
+ fileService,
166
+ instantiationService,
167
+ textModelService,
168
+ modelService,
169
+ undoRedoService,
170
+ notebookEditorWorkerService,
171
+ loggingService,
172
+ notebookResolver,
173
+ aiEditTelemetryService
174
+ ) {
175
+ super(
176
+ modifiedResourceRef.object.notebook.uri,
177
+ telemetryInfo,
178
+ kind,
179
+ configurationService,
180
+ fileConfigService,
181
+ chatService,
182
+ fileService,
183
+ undoRedoService,
184
+ instantiationService,
185
+ aiEditTelemetryService
186
+ );
127
187
  this.modifiedResourceRef = modifiedResourceRef;
128
188
  this._multiDiffEntryDelegate = _multiDiffEntryDelegate;
129
189
  this.transientOptions = transientOptions;
@@ -133,14 +193,14 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
133
193
  this.notebookEditorWorkerService = notebookEditorWorkerService;
134
194
  this.loggingService = loggingService;
135
195
  this.notebookResolver = notebookResolver;
136
- this._isProcessingResponse = observableValue('isProcessingResponse', false);
196
+ this._isProcessingResponse = observableValue("isProcessingResponse", false);
137
197
  this._isEditFromUs = false;
138
198
  this._allEditsAreFromUs = true;
139
199
  this._changesCount = observableValue(this, 0);
140
200
  this.changesCount = this._changesCount;
141
201
  this.cellEntryMap = ( new ResourceMap());
142
202
  this.modifiedToOriginalCell = ( new ResourceMap());
143
- this._cellsDiffInfo = observableValue('diffInfo', []);
203
+ this._cellsDiffInfo = observableValue("diffInfo", []);
144
204
  this.editedCells = ( new ResourceSet());
145
205
  this.computeRequestId = 0;
146
206
  this.cellTextModelMap = ( new ResourceMap());
@@ -152,20 +212,17 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
152
212
  this.initializeModelsFromDiff();
153
213
  this._register(this.modifiedModel.onDidChangeContent(this.mirrorNotebookEdits, this));
154
214
  }
155
- hasModificationAt(location) {
156
- return this.cellEntryMap.get(location.uri)?.hasModificationAt(location.range) ?? false;
157
- }
158
215
  initializeModelsFromDiffImpl(cellsDiffInfo) {
159
216
  this.cellEntryMap.forEach(entry => entry.dispose());
160
217
  this.cellEntryMap.clear();
161
218
  const diffs = ( cellsDiffInfo.map((cellDiff, i) => {
162
219
  switch (cellDiff.type) {
163
- case 'delete':
164
- return this.createDeleteCellDiffInfo(cellDiff.originalCellIndex);
165
- case 'insert':
166
- return this.createInsertedCellDiffInfo(cellDiff.modifiedCellIndex);
167
- default:
168
- return this.createModifiedCellDiffInfo(cellDiff.modifiedCellIndex, cellDiff.originalCellIndex);
220
+ case "delete":
221
+ return this.createDeleteCellDiffInfo(cellDiff.originalCellIndex);
222
+ case "insert":
223
+ return this.createInsertedCellDiffInfo(cellDiff.modifiedCellIndex);
224
+ default:
225
+ return this.createModifiedCellDiffInfo(cellDiff.modifiedCellIndex, cellDiff.originalCellIndex);
169
226
  }
170
227
  }));
171
228
  this._cellsDiffInfo.set(diffs, undefined);
@@ -178,7 +235,11 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
178
235
  const id = ++this.computeRequestId;
179
236
  if (this._areOriginalAndModifiedIdenticalImpl()) {
180
237
  const cellsDiffInfo = ( this.modifiedModel.cells.map((_, index) => {
181
- return { type: 'unchanged', originalCellIndex: index, modifiedCellIndex: index };
238
+ return {
239
+ type: "unchanged",
240
+ originalCellIndex: index,
241
+ modifiedCellIndex: index
242
+ };
182
243
  }));
183
244
  this.initializeModelsFromDiffImpl(cellsDiffInfo);
184
245
  return;
@@ -194,11 +255,9 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
194
255
  if (result.cellDiffInfo.length) {
195
256
  cellsDiffInfo.push(...result.cellDiffInfo);
196
257
  }
197
- }
198
- catch (ex) {
199
- this.loggingService.error('Notebook Chat', 'Error computing diff:\n' + ex);
200
- }
201
- finally {
258
+ } catch (ex) {
259
+ this.loggingService.error("Notebook Chat", "Error computing diff:\n" + ex);
260
+ } finally {
202
261
  this._isProcessingResponse.set(false, undefined);
203
262
  }
204
263
  this.initializeModelsFromDiffImpl(cellsDiffInfo);
@@ -217,7 +276,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
217
276
  this._stateObs.set(ModifiedFileEntryState.Rejected, undefined);
218
277
  this.updateCellDiffInfo([], undefined);
219
278
  this.initializeModelsFromDiff();
220
- this._notifySessionAction('rejected');
279
+ this._notifySessionAction("rejected");
221
280
  return;
222
281
  }
223
282
  if (!e.rawEvents.length) {
@@ -233,7 +292,8 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
233
292
  this._userEditScheduler.schedule();
234
293
  for (const event of e.rawEvents.filter(event => event.kind !== NotebookCellsChangeType.ChangeCellContent)) {
235
294
  switch (event.kind) {
236
- case NotebookCellsChangeType.ChangeDocumentMetadata: {
295
+ case NotebookCellsChangeType.ChangeDocumentMetadata:
296
+ {
237
297
  const edit = {
238
298
  editType: CellEditType.DocumentMetadata,
239
299
  metadata: this.modifiedModel.metadata
@@ -241,7 +301,8 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
241
301
  this.originalModel.applyEdits([edit], true, undefined, () => undefined, undefined, false);
242
302
  break;
243
303
  }
244
- case NotebookCellsChangeType.ModelChange: {
304
+ case NotebookCellsChangeType.ModelChange:
305
+ {
245
306
  let cellDiffs = sortCellChanges(this._cellsDiffInfo.get());
246
307
  this._applyEditsSync(() => {
247
308
  event.changes.forEach(change => {
@@ -251,7 +312,13 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
251
312
  }
252
313
  const index = change[0] + i;
253
314
  const internalId = generateCellHash(cell.uri);
254
- const edits = [{ editType: CellEditType.PartialInternalMetadata, index, internalMetadata: { internalId } }];
315
+ const edits = [{
316
+ editType: CellEditType.PartialInternalMetadata,
317
+ index,
318
+ internalMetadata: {
319
+ internalId
320
+ }
321
+ }];
255
322
  this.modifiedModel.applyEdits(edits, true, undefined, () => undefined, undefined, false);
256
323
  cell.internalMetadata ??= {};
257
324
  cell.internalMetadata.internalId = internalId;
@@ -259,15 +326,23 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
259
326
  });
260
327
  });
261
328
  event.changes.forEach(change => {
262
- cellDiffs = adjustCellDiffAndOriginalModelBasedOnCellAddDelete(change, cellDiffs, this.modifiedModel.cells.length, this.originalModel.cells.length, this.originalModel.applyEdits.bind(this.originalModel), this.createModifiedCellDiffInfo.bind(this));
329
+ cellDiffs = adjustCellDiffAndOriginalModelBasedOnCellAddDelete(
330
+ change,
331
+ cellDiffs,
332
+ this.modifiedModel.cells.length,
333
+ this.originalModel.cells.length,
334
+ this.originalModel.applyEdits.bind(this.originalModel),
335
+ this.createModifiedCellDiffInfo.bind(this)
336
+ );
263
337
  });
264
338
  this.updateCellDiffInfo(cellDiffs, undefined);
265
339
  this.disposeDeletedCellEntries();
266
340
  break;
267
341
  }
268
- case NotebookCellsChangeType.ChangeCellLanguage: {
342
+ case NotebookCellsChangeType.ChangeCellLanguage:
343
+ {
269
344
  const index = getCorrespondingOriginalCellIndex(event.index, this._cellsDiffInfo.get());
270
- if (typeof index === 'number') {
345
+ if (typeof index === "number") {
271
346
  const edit = {
272
347
  editType: CellEditType.CellLanguage,
273
348
  index,
@@ -277,9 +352,10 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
277
352
  }
278
353
  break;
279
354
  }
280
- case NotebookCellsChangeType.ChangeCellMetadata: {
355
+ case NotebookCellsChangeType.ChangeCellMetadata:
356
+ {
281
357
  const index = getCorrespondingOriginalCellIndex(event.index, this._cellsDiffInfo.get());
282
- if (typeof index === 'number') {
358
+ if (typeof index === "number") {
283
359
  const edit = {
284
360
  editType: CellEditType.Metadata,
285
361
  index,
@@ -289,11 +365,12 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
289
365
  }
290
366
  break;
291
367
  }
292
- case NotebookCellsChangeType.ChangeCellMime:
293
- break;
294
- case NotebookCellsChangeType.ChangeCellInternalMetadata: {
368
+ case NotebookCellsChangeType.ChangeCellMime:
369
+ break;
370
+ case NotebookCellsChangeType.ChangeCellInternalMetadata:
371
+ {
295
372
  const index = getCorrespondingOriginalCellIndex(event.index, this._cellsDiffInfo.get());
296
- if (typeof index === 'number') {
373
+ if (typeof index === "number") {
297
374
  const edit = {
298
375
  editType: CellEditType.PartialInternalMetadata,
299
376
  index,
@@ -303,9 +380,10 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
303
380
  }
304
381
  break;
305
382
  }
306
- case NotebookCellsChangeType.Output: {
383
+ case NotebookCellsChangeType.Output:
384
+ {
307
385
  const index = getCorrespondingOriginalCellIndex(event.index, this._cellsDiffInfo.get());
308
- if (typeof index === 'number') {
386
+ if (typeof index === "number") {
309
387
  const edit = {
310
388
  editType: CellEditType.Output,
311
389
  index,
@@ -316,10 +394,12 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
316
394
  }
317
395
  break;
318
396
  }
319
- case NotebookCellsChangeType.OutputItem: {
397
+ case NotebookCellsChangeType.OutputItem:
398
+ {
320
399
  break;
321
400
  }
322
- case NotebookCellsChangeType.Move: {
401
+ case NotebookCellsChangeType.Move:
402
+ {
323
403
  const result = adjustCellDiffAndOriginalModelBasedOnCellMovements(event, this._cellsDiffInfo.get().slice());
324
404
  if (result) {
325
405
  this.originalModel.applyEdits(result[1], true, undefined, () => undefined, undefined, false);
@@ -349,11 +429,9 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
349
429
  try {
350
430
  await this.modifiedResourceRef.object.save({
351
431
  reason: SaveReason.EXPLICIT,
352
- force: true,
432
+ force: true
353
433
  });
354
- }
355
- catch {
356
- }
434
+ } catch {}
357
435
  });
358
436
  }
359
437
  }
@@ -361,17 +439,21 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
361
439
  this.updateCellDiffInfo([], undefined);
362
440
  if (this.createdInRequestId === this._telemetryInfo.requestId) {
363
441
  await this._applyEdits(async () => {
364
- await this.modifiedResourceRef.object.revert({ soft: true });
442
+ await this.modifiedResourceRef.object.revert({
443
+ soft: true
444
+ });
365
445
  await this._fileService.del(this.modifiedURI);
366
446
  });
367
447
  this._onDidDelete.fire();
368
- }
369
- else {
448
+ } else {
370
449
  await this._applyEdits(async () => {
371
450
  const snapshot = createSnapshot(this.originalModel, this.transientOptions, this.configurationService);
372
451
  this.restoreSnapshotInModifiedModel(snapshot);
373
452
  if (this._allEditsAreFromUs && Array.from(( this.cellEntryMap.values())).every(entry => entry.allEditsAreFromUs)) {
374
- await this.modifiedResourceRef.object.save({ reason: SaveReason.EXPLICIT, skipSaveParticipants: true });
453
+ await this.modifiedResourceRef.object.save({
454
+ reason: SaveReason.EXPLICIT,
455
+ skipSaveParticipants: true
456
+ });
375
457
  }
376
458
  });
377
459
  this.initializeModelsFromDiff();
@@ -388,7 +470,14 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
388
470
  return this._instantiationService.createInstance(ChatEditingNotebookDiffEditorIntegration, diffEditor, this._cellsDiffInfo);
389
471
  }
390
472
  assertType(notebookEditor);
391
- return this._instantiationService.createInstance(ChatEditingNotebookEditorIntegration, this, editor, this.modifiedModel, this.originalModel, this._cellsDiffInfo);
473
+ return this._instantiationService.createInstance(
474
+ ChatEditingNotebookEditorIntegration,
475
+ this,
476
+ editor,
477
+ this.modifiedModel,
478
+ this.originalModel,
479
+ this._cellsDiffInfo
480
+ );
392
481
  }
393
482
  _resetEditsState(tx) {
394
483
  super._resetEditsState(tx);
@@ -396,17 +485,17 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
396
485
  }
397
486
  _createUndoRedoElement(response) {
398
487
  const request = response.session.getRequests().find(req => req.id === response.requestId);
399
- const label = request?.message.text ? ( localize(5170, "Chat Edit: '{0}'", request.message.text)) : ( localize(5171, "Chat Edit"));
488
+ const label = request?.message.text ? ( localize(5341, "Chat Edit: '{0}'", request.message.text)) : ( localize(5342, "Chat Edit"));
400
489
  const transientOptions = this.transientOptions;
401
490
  const outputSizeLimit = this.configurationService.getValue(NotebookSetting.outputBackupSizeLimit) * 1024;
402
491
  let initial = createSnapshot(this.modifiedModel, transientOptions, outputSizeLimit);
403
- let last = '';
492
+ let last = "";
404
493
  let redoState = ModifiedFileEntryState.Rejected;
405
494
  return {
406
495
  type: UndoRedoElementType.Resource,
407
496
  resource: this.modifiedURI,
408
497
  label,
409
- code: 'chat.edit',
498
+ code: "chat.edit",
410
499
  confirmBeforeUndo: false,
411
500
  undo: async () => {
412
501
  last = createSnapshot(this.modifiedModel, transientOptions, outputSizeLimit);
@@ -414,15 +503,14 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
414
503
  try {
415
504
  restoreSnapshot(this.modifiedModel, initial);
416
505
  restoreSnapshot(this.originalModel, initial);
417
- }
418
- finally {
506
+ } finally {
419
507
  this._isEditFromUs = false;
420
508
  }
421
509
  redoState = this._stateObs.get() === ModifiedFileEntryState.Accepted ? ModifiedFileEntryState.Accepted : ModifiedFileEntryState.Rejected;
422
510
  this._stateObs.set(ModifiedFileEntryState.Rejected, undefined);
423
511
  this.updateCellDiffInfo([], undefined);
424
512
  this.initializeModelsFromDiff();
425
- this._notifySessionAction('userModified');
513
+ this._notifySessionAction("userModified");
426
514
  },
427
515
  redo: async () => {
428
516
  initial = createSnapshot(this.modifiedModel, transientOptions, outputSizeLimit);
@@ -430,14 +518,13 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
430
518
  try {
431
519
  restoreSnapshot(this.modifiedModel, last);
432
520
  restoreSnapshot(this.originalModel, last);
433
- }
434
- finally {
521
+ } finally {
435
522
  this._isEditFromUs = false;
436
523
  }
437
524
  this._stateObs.set(redoState, undefined);
438
525
  this.updateCellDiffInfo([], undefined);
439
526
  this.initializeModelsFromDiff();
440
- this._notifySessionAction('userModified');
527
+ this._notifySessionAction("userModified");
441
528
  }
442
529
  };
443
530
  }
@@ -456,13 +543,13 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
456
543
  const index = this.modifiedModel.cells.indexOf(cell);
457
544
  const entry = this._cellsDiffInfo.get().slice().find(entry => entry.modifiedCellIndex === index);
458
545
  if (!entry) {
459
- console.error('Original cell model not found');
546
+ console.error("Original cell model not found");
460
547
  return;
461
548
  }
462
549
  cellEntry = this.getOrCreateModifiedTextFileEntryForCell(cell, await entry.modifiedModel.promise, await entry.originalModel.promise);
463
550
  }
464
551
  const finishPreviousCells = async () => {
465
- await Promise.all(( Array.from(this.editedCells).map(async (uri) => {
552
+ await Promise.all(( Array.from(this.editedCells).map(async uri => {
466
553
  const cell = this.modifiedModel.cells.find(cell => isEqual(cell.uri, uri));
467
554
  const cellEntry = cell && this.cellEntryMap.get(cell.uri);
468
555
  await cellEntry?.acceptAgentEdits([], true, responseModel);
@@ -476,8 +563,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
476
563
  if (isEqual(resource, this.modifiedModel.uri)) {
477
564
  this.newNotebookEditGenerator ??= this._instantiationService.createInstance(ChatEditingNewNotebookContentEdits, this.modifiedModel);
478
565
  this.newNotebookEditGenerator.acceptTextEdits([edit]);
479
- }
480
- else {
566
+ } else {
481
567
  this.newNotebookEditGenerator = undefined;
482
568
  if (!( this.editedCells.has(resource))) {
483
569
  await finishPreviousCells();
@@ -485,8 +571,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
485
571
  }
486
572
  await cellEntry?.acceptAgentEdits([edit], last, responseModel);
487
573
  }
488
- }
489
- else {
574
+ } else {
490
575
  this.newNotebookEditGenerator = undefined;
491
576
  this.acceptNotebookEdit(edit);
492
577
  }
@@ -501,13 +586,15 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
501
586
  this.newNotebookEditGenerator = undefined;
502
587
  notebookEdits.forEach(edit => this.acceptNotebookEdit(edit));
503
588
  }
504
- transaction((tx) => {
589
+ transaction(tx => {
505
590
  this._stateObs.set(ModifiedFileEntryState.Modified, tx);
506
591
  if (!isLastEdits) {
507
- const newRewriteRation = Math.max(this._rewriteRatioObs.get(), calculateNotebookRewriteRatio(this._cellsDiffInfo.get(), this.originalModel, this.modifiedModel));
592
+ const newRewriteRation = Math.max(
593
+ this._rewriteRatioObs.get(),
594
+ calculateNotebookRewriteRatio(this._cellsDiffInfo.get(), this.originalModel, this.modifiedModel)
595
+ );
508
596
  this._rewriteRatioObs.set(Math.min(1, newRewriteRation), tx);
509
- }
510
- else {
597
+ } else {
511
598
  this.editedCells.clear();
512
599
  this._resetEditsState(tx);
513
600
  this._rewriteRatioObs.set(1, tx);
@@ -537,26 +624,31 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
537
624
  return;
538
625
  }
539
626
  const internalId = generateCellHash(cell.uri);
540
- const edits = [{ editType: CellEditType.PartialInternalMetadata, index, internalMetadata: { internalId } }];
627
+ const edits = [{
628
+ editType: CellEditType.PartialInternalMetadata,
629
+ index,
630
+ internalMetadata: {
631
+ internalId
632
+ }
633
+ }];
541
634
  this.modifiedModel.applyEdits(edits, true, undefined, () => undefined, undefined, false);
542
635
  });
543
636
  let diff = [];
544
637
  if (edit.count === 0) {
545
638
  diff = sortCellChanges(this._cellsDiffInfo.get());
546
639
  diff.forEach(d => {
547
- if (d.type !== 'delete' && d.modifiedCellIndex >= edit.index) {
640
+ if (d.type !== "delete" && d.modifiedCellIndex >= edit.index) {
548
641
  d.modifiedCellIndex += edit.cells.length;
549
642
  }
550
643
  });
551
644
  const diffInsert = ( edit.cells.map((_, i) => this.createInsertedCellDiffInfo(edit.index + i)));
552
645
  diff.splice(edit.index, 0, ...diffInsert);
553
- }
554
- else {
555
- diff = ( sortCellChanges(this._cellsDiffInfo.get()).map((d) => {
556
- if (d.type === 'unchanged' && d.modifiedCellIndex >= edit.index && d.modifiedCellIndex <= (edit.index + edit.count - 1)) {
646
+ } else {
647
+ diff = ( sortCellChanges(this._cellsDiffInfo.get()).map(d => {
648
+ if (d.type === "unchanged" && d.modifiedCellIndex >= edit.index && d.modifiedCellIndex <= (edit.index + edit.count - 1)) {
557
649
  return this.createDeleteCellDiffInfo(d.originalCellIndex);
558
650
  }
559
- if (d.type !== 'delete' && d.modifiedCellIndex >= (edit.index + edit.count)) {
651
+ if (d.type !== "delete" && d.modifiedCellIndex >= (edit.index + edit.count)) {
560
652
  d.modifiedCellIndex -= edit.count;
561
653
  return d;
562
654
  }
@@ -570,7 +662,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
570
662
  if (( new SnapshotComparer(currentSnapshot)).isEqual(this.originalModel)) {
571
663
  const state = accepted ? ModifiedFileEntryState.Accepted : ModifiedFileEntryState.Rejected;
572
664
  this._stateObs.set(state, undefined);
573
- this._notifySessionAction(accepted ? 'accepted' : 'rejected');
665
+ this._notifySessionAction(accepted ? "accepted" : "rejected");
574
666
  }
575
667
  }
576
668
  createModifiedCellDiffInfo(modifiedCellIndex, originalCellIndex) {
@@ -582,17 +674,17 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
582
674
  Promise.all([modifiedCellModelPromise, originalCellModelPromise]).then(([modifiedCellModel, originalCellModel]) => {
583
675
  this.getOrCreateModifiedTextFileEntryForCell(modifiedCell, modifiedCellModel, originalCellModel);
584
676
  });
585
- const diff = observableValue('diff', nullDocumentDiff);
677
+ const diff = observableValue("diff", nullDocumentDiff);
586
678
  const unchangedCell = {
587
- type: 'unchanged',
679
+ type: "unchanged",
588
680
  modifiedCellIndex,
589
681
  originalCellIndex,
590
- keep: async (changes) => {
682
+ keep: async changes => {
591
683
  const [modifiedCellModel, originalCellModel] = await Promise.all([modifiedCellModelPromise, originalCellModelPromise]);
592
684
  const entry = this.getOrCreateModifiedTextFileEntryForCell(modifiedCell, modifiedCellModel, originalCellModel);
593
685
  return entry ? entry.keep(changes) : false;
594
686
  },
595
- undo: async (changes) => {
687
+ undo: async changes => {
596
688
  const [modifiedCellModel, originalCellModel] = await Promise.all([modifiedCellModelPromise, originalCellModelPromise]);
597
689
  const entry = this.getOrCreateModifiedTextFileEntryForCell(modifiedCell, modifiedCellModel, originalCellModel);
598
690
  return entry ? entry.undo(changes) : false;
@@ -610,8 +702,11 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
610
702
  const modifiedRange = ( new Range(1, 0, lines.length, lines[lines.length - 1].length));
611
703
  const innerChanges = ( new RangeMapping(originalRange, modifiedRange));
612
704
  const changes = [( new DetailedLineRangeMapping(( new LineRange(1, 1)), ( new LineRange(1, lines.length)), [innerChanges]))];
613
- const originalModelUri = this.modifiedModel.uri.with({ query: ( (ChatEditingModifiedNotebookEntry_1.NewModelCounter++).toString()), scheme: 'emptyCell' });
614
- const originalModel = this.modelService.getModel(originalModelUri) || this._register(this.modelService.createModel('', null, originalModelUri));
705
+ const originalModelUri = this.modifiedModel.uri.with({
706
+ query: ( (ChatEditingModifiedNotebookEntry_1.NewModelCounter++).toString()),
707
+ scheme: "emptyCell"
708
+ });
709
+ const originalModel = this.modelService.getModel(originalModelUri) || this._register(this.modelService.createModel("", null, originalModelUri));
615
710
  this.modifiedToOriginalCell.set(cell.uri, originalModelUri);
616
711
  const keep = async () => {
617
712
  this._applyEditsSync(() => this.keepPreviouslyInsertedCell(cell));
@@ -630,18 +725,18 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
630
725
  this.getOrCreateModifiedTextFileEntryForCell(cell, modifiedModel, originalModel);
631
726
  });
632
727
  return {
633
- type: 'insert',
728
+ type: "insert",
634
729
  originalCellIndex: undefined,
635
730
  modifiedCellIndex: modifiedCellIndex,
636
731
  keep,
637
732
  undo,
638
733
  modifiedModel: ( new ObservablePromise(this.resolveCellModel(cell.uri))),
639
734
  originalModel: ( new ObservablePromise(Promise.resolve(originalModel))),
640
- diff: observableValue('deletedCellDiff', {
735
+ diff: observableValue("deletedCellDiff", {
641
736
  changes,
642
737
  identical: false,
643
738
  moves: [],
644
- quitEarly: false,
739
+ quitEarly: false
645
740
  })
646
741
  };
647
742
  }
@@ -652,31 +747,38 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
652
747
  const modifiedRange = ( new Range(1, 0, 1, 0));
653
748
  const innerChanges = ( new RangeMapping(modifiedRange, originalRange));
654
749
  const changes = [( new DetailedLineRangeMapping(( new LineRange(1, lines.length)), ( new LineRange(1, 1)), [innerChanges]))];
655
- const modifiedModelUri = this.modifiedModel.uri.with({ query: ( (ChatEditingModifiedNotebookEntry_1.NewModelCounter++).toString()), scheme: 'emptyCell' });
656
- const modifiedModel = this.modelService.getModel(modifiedModelUri) || this._register(this.modelService.createModel('', null, modifiedModelUri));
750
+ const modifiedModelUri = this.modifiedModel.uri.with({
751
+ query: ( (ChatEditingModifiedNotebookEntry_1.NewModelCounter++).toString()),
752
+ scheme: "emptyCell"
753
+ });
754
+ const modifiedModel = this.modelService.getModel(modifiedModelUri) || this._register(this.modelService.createModel("", null, modifiedModelUri));
657
755
  const keep = async () => {
658
- this._applyEditsSync(() => this.keepPreviouslyDeletedCell(this.originalModel.cells.indexOf(originalCell)));
756
+ this._applyEditsSync(
757
+ () => this.keepPreviouslyDeletedCell(this.originalModel.cells.indexOf(originalCell))
758
+ );
659
759
  this.computeStateAfterAcceptingRejectingChanges(true);
660
760
  return true;
661
761
  };
662
762
  const undo = async () => {
663
- this._applyEditsSync(() => this.undoPreviouslyDeletedCell(this.originalModel.cells.indexOf(originalCell), originalCell));
763
+ this._applyEditsSync(
764
+ () => this.undoPreviouslyDeletedCell(this.originalModel.cells.indexOf(originalCell), originalCell)
765
+ );
664
766
  this.computeStateAfterAcceptingRejectingChanges(false);
665
767
  return true;
666
768
  };
667
769
  return {
668
- type: 'delete',
770
+ type: "delete",
669
771
  modifiedCellIndex: undefined,
670
772
  originalCellIndex,
671
773
  originalModel: ( new ObservablePromise(this.resolveCellModel(originalCell.uri))),
672
774
  modifiedModel: ( new ObservablePromise(Promise.resolve(modifiedModel))),
673
775
  keep,
674
776
  undo,
675
- diff: observableValue('cellDiff', {
777
+ diff: observableValue("cellDiff", {
676
778
  changes,
677
779
  identical: false,
678
780
  moves: [],
679
- quitEarly: false,
781
+ quitEarly: false
680
782
  })
681
783
  };
682
784
  }
@@ -684,7 +786,11 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
684
786
  let diffs = [];
685
787
  this._applyEditsSync(() => {
686
788
  const index = this.modifiedModel.cells.indexOf(cell);
687
- diffs = adjustCellDiffForRevertingAnInsertedCell(index, this._cellsDiffInfo.get(), this.modifiedModel.applyEdits.bind(this.modifiedModel));
789
+ diffs = adjustCellDiffForRevertingAnInsertedCell(
790
+ index,
791
+ this._cellsDiffInfo.get(),
792
+ this.modifiedModel.applyEdits.bind(this.modifiedModel)
793
+ );
688
794
  });
689
795
  this.disposeDeletedCellEntries();
690
796
  this.updateCellDiffInfo(diffs, undefined);
@@ -707,7 +813,13 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
707
813
  };
708
814
  this.cellEntryMap.get(cell.uri)?.dispose();
709
815
  this.cellEntryMap.delete(cell.uri);
710
- const cellDiffs = adjustCellDiffForKeepingAnInsertedCell(modifiedCellIndex, this._cellsDiffInfo.get().slice(), cellToInsert, this.originalModel.applyEdits.bind(this.originalModel), this.createModifiedCellDiffInfo.bind(this));
816
+ const cellDiffs = adjustCellDiffForKeepingAnInsertedCell(
817
+ modifiedCellIndex,
818
+ this._cellsDiffInfo.get().slice(),
819
+ cellToInsert,
820
+ this.originalModel.applyEdits.bind(this.originalModel),
821
+ this.createModifiedCellDiffInfo.bind(this)
822
+ );
711
823
  this.updateCellDiffInfo(cellDiffs, undefined);
712
824
  }
713
825
  undoPreviouslyDeletedCell(deletedOriginalIndex, originalCell) {
@@ -724,20 +836,31 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
724
836
  };
725
837
  let cellDiffs = [];
726
838
  this._applyEditsSync(() => {
727
- cellDiffs = adjustCellDiffForRevertingADeletedCell(deletedOriginalIndex, this._cellsDiffInfo.get(), cellToInsert, this.modifiedModel.applyEdits.bind(this.modifiedModel), this.createModifiedCellDiffInfo.bind(this));
839
+ cellDiffs = adjustCellDiffForRevertingADeletedCell(
840
+ deletedOriginalIndex,
841
+ this._cellsDiffInfo.get(),
842
+ cellToInsert,
843
+ this.modifiedModel.applyEdits.bind(this.modifiedModel),
844
+ this.createModifiedCellDiffInfo.bind(this)
845
+ );
728
846
  });
729
847
  this.updateCellDiffInfo(cellDiffs, undefined);
730
848
  }
731
849
  keepPreviouslyDeletedCell(deletedOriginalIndex) {
732
- const edit = { cells: [], count: 1, editType: CellEditType.Replace, index: deletedOriginalIndex, };
850
+ const edit = {
851
+ cells: [],
852
+ count: 1,
853
+ editType: CellEditType.Replace,
854
+ index: deletedOriginalIndex
855
+ };
733
856
  this.originalModel.applyEdits([edit], true, undefined, () => undefined, undefined, false);
734
- const diffs = ( sortCellChanges(this._cellsDiffInfo.get())
735
- .filter(d => !(d.type === 'delete' && d.originalCellIndex === deletedOriginalIndex))
736
- .map(diff => {
737
- if (diff.type !== 'insert' && diff.originalCellIndex > deletedOriginalIndex) {
857
+ const diffs = ( sortCellChanges(this._cellsDiffInfo.get()).filter(
858
+ d => !(d.type === "delete" && d.originalCellIndex === deletedOriginalIndex)
859
+ ).map(diff => {
860
+ if (diff.type !== "insert" && diff.originalCellIndex > deletedOriginalIndex) {
738
861
  return {
739
862
  ...diff,
740
- originalCellIndex: diff.originalCellIndex - 1,
863
+ originalCellIndex: diff.originalCellIndex - 1
741
864
  };
742
865
  }
743
866
  return diff;
@@ -748,8 +871,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
748
871
  this._isEditFromUs = true;
749
872
  try {
750
873
  await operation();
751
- }
752
- finally {
874
+ } finally {
753
875
  this._isEditFromUs = false;
754
876
  }
755
877
  }
@@ -757,8 +879,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
757
879
  this._isEditFromUs = true;
758
880
  try {
759
881
  operation();
760
- }
761
- finally {
882
+ } finally {
762
883
  this._isEditFromUs = false;
763
884
  }
764
885
  }
@@ -769,19 +890,21 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
769
890
  return {
770
891
  resource: this.modifiedURI,
771
892
  languageId: SnapshotLanguageId,
772
- snapshotUri: getNotebookSnapshotFileURI(chatSessionResource, requestId, undoStop, this.modifiedURI.path, this.modifiedModel.viewType),
893
+ snapshotUri: getNotebookSnapshotFileURI(
894
+ chatSessionResource,
895
+ requestId,
896
+ undoStop,
897
+ this.modifiedURI.path,
898
+ this.modifiedModel.viewType
899
+ ),
773
900
  original: createSnapshot(this.originalModel, this.transientOptions, this.configurationService),
774
901
  current: createSnapshot(this.modifiedModel, this.transientOptions, this.configurationService),
775
902
  state: this.state.get(),
776
- telemetryInfo: this.telemetryInfo,
903
+ telemetryInfo: this.telemetryInfo
777
904
  };
778
905
  }
779
906
  equalsSnapshot(snapshot) {
780
- return !!snapshot &&
781
- isEqual(this.modifiedURI, snapshot.resource) &&
782
- this.state.get() === snapshot.state &&
783
- ( new SnapshotComparer(snapshot.original)).isEqual(this.originalModel) &&
784
- ( new SnapshotComparer(snapshot.current)).isEqual(this.modifiedModel);
907
+ return !!snapshot && isEqual(this.modifiedURI, snapshot.resource) && this.state.get() === snapshot.state && ( new SnapshotComparer(snapshot.original)).isEqual(this.originalModel) && ( new SnapshotComparer(snapshot.current)).isEqual(this.modifiedModel);
785
908
  }
786
909
  async restoreFromSnapshot(snapshot, restoreToDisk = true) {
787
910
  this.updateCellDiffInfo([], undefined);
@@ -814,14 +937,13 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
814
937
  async resolveCellModel(cellURI) {
815
938
  const cell = this.originalModel.cells.concat(this.modifiedModel.cells).find(cell => isEqual(cell.uri, cellURI));
816
939
  if (!cell) {
817
- throw ( new Error('Cell not found'));
940
+ throw ( new Error("Cell not found"));
818
941
  }
819
942
  const model = this.cellTextModelMap.get(cell.uri);
820
943
  if (model) {
821
944
  this.cellTextModelMap.set(cell.uri, model);
822
945
  return model;
823
- }
824
- else {
946
+ } else {
825
947
  const textEditorModel = await thenRegisterOrDispose(this.textModelService.createModelReference(cell.uri), this._store);
826
948
  const model = textEditorModel.object.textEditorModel;
827
949
  this.cellTextModelMap.set(cell.uri, model);
@@ -837,7 +959,15 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
837
959
  return;
838
960
  }
839
961
  const disposables = ( new DisposableStore());
840
- cellEntry = this._register(this._instantiationService.createInstance(ChatEditingNotebookCellEntry, this.modifiedResourceRef.object.resource, cell, modifiedCellModel, originalCellModel, () => this._isExternalEditInProgress, disposables));
962
+ cellEntry = this._register(this._instantiationService.createInstance(
963
+ ChatEditingNotebookCellEntry,
964
+ this.modifiedResourceRef.object.resource,
965
+ cell,
966
+ modifiedCellModel,
967
+ originalCellModel,
968
+ () => this._isExternalEditInProgress,
969
+ disposables
970
+ ));
841
971
  this.cellEntryMap.set(cell.uri, cellEntry);
842
972
  disposables.add(autorun(r => {
843
973
  if (this.modifiedModel.cells.indexOf(cell) === -1) {
@@ -851,19 +981,21 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
851
981
  }
852
982
  const entryIndex = diffs.indexOf(entry);
853
983
  entry.diff.set(cellEntry.diffInfo.read(r), undefined);
854
- if (cellEntry.diffInfo.read(undefined).identical && entry.type === 'modified') {
984
+ if (cellEntry.diffInfo.read(undefined).identical && entry.type === "modified") {
855
985
  entry = {
856
986
  ...entry,
857
- type: 'unchanged',
987
+ type: "unchanged"
858
988
  };
859
989
  }
860
- if (!cellEntry.diffInfo.read(undefined).identical && entry.type === 'unchanged') {
990
+ if (!cellEntry.diffInfo.read(undefined).identical && entry.type === "unchanged") {
861
991
  entry = {
862
992
  ...entry,
863
- type: 'modified',
993
+ type: "modified"
864
994
  };
865
995
  }
866
- diffs.splice(entryIndex, 1, { ...entry });
996
+ diffs.splice(entryIndex, 1, {
997
+ ...entry
998
+ });
867
999
  transaction(tx => {
868
1000
  this.updateCellDiffInfo(diffs, tx);
869
1001
  });
@@ -875,8 +1007,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
875
1007
  const cellState = cellEntry.state.read(r);
876
1008
  if (cellState === ModifiedFileEntryState.Accepted) {
877
1009
  this.computeStateAfterAcceptingRejectingChanges(true);
878
- }
879
- else if (cellState === ModifiedFileEntryState.Rejected) {
1010
+ } else if (cellState === ModifiedFileEntryState.Rejected) {
880
1011
  this.computeStateAfterAcceptingRejectingChanges(false);
881
1012
  }
882
1013
  }));
@@ -893,8 +1024,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
893
1024
  count: beforeData.data.cells.length,
894
1025
  cells: afterData.data.cells
895
1026
  });
896
- }
897
- else if (afterData.data.cells.length > 0) {
1027
+ } else if (afterData.data.cells.length > 0) {
898
1028
  edits.push({
899
1029
  editType: CellEditType.Replace,
900
1030
  index: 0,
@@ -919,23 +1049,12 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
919
1049
  if (this.modifiedModel.uri.scheme === Schemas.untitled) {
920
1050
  return;
921
1051
  }
922
- await this.modifiedResourceRef.object.revert({ soft: false });
1052
+ await this.modifiedResourceRef.object.revert({
1053
+ soft: false
1054
+ });
923
1055
  }
924
1056
  };
925
- ChatEditingModifiedNotebookEntry = ChatEditingModifiedNotebookEntry_1 = ( __decorate([
926
- ( __param(7, IConfigurationService)),
927
- ( __param(8, IFilesConfigurationService)),
928
- ( __param(9, IChatService)),
929
- ( __param(10, IFileService)),
930
- ( __param(11, IInstantiationService)),
931
- ( __param(12, ITextModelService)),
932
- ( __param(13, IModelService)),
933
- ( __param(14, IUndoRedoService)),
934
- ( __param(15, INotebookEditorWorkerService)),
935
- ( __param(16, INotebookLoggingService)),
936
- ( __param(17, INotebookEditorModelResolverService)),
937
- ( __param(18, IAiEditTelemetryService))
938
- ], ChatEditingModifiedNotebookEntry));
1057
+ ChatEditingModifiedNotebookEntry = ChatEditingModifiedNotebookEntry_1 = ( __decorate([( __param(7, IConfigurationService)), ( __param(8, IFilesConfigurationService)), ( __param(9, IChatService)), ( __param(10, IFileService)), ( __param(11, IInstantiationService)), ( __param(12, ITextModelService)), ( __param(13, IModelService)), ( __param(14, IUndoRedoService)), ( __param(15, INotebookEditorWorkerService)), ( __param(16, INotebookLoggingService)), ( __param(17, INotebookEditorModelResolverService)), ( __param(18, IAiEditTelemetryService))], ChatEditingModifiedNotebookEntry));
939
1058
  function generateCellHash(cellUri) {
940
1059
  const hash = ( new StringSHA1());
941
1060
  hash.update(( cellUri.toString()));