@codingame/monaco-vscode-chat-service-override 16.1.0 → 17.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 (188) hide show
  1. package/index.js +6 -6
  2. package/package.json +30 -27
  3. package/vscode/src/vs/base/common/objectCache.d.ts +1 -1
  4. package/vscode/src/vs/base/common/objectCache.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +41 -41
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +16 -15
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +4 -6
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +410 -443
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +6 -6
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +1 -7
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +3 -18
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -6
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +9 -12
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +1 -1
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +4 -2
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +32 -28
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.d.ts +10 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.js +61 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.d.ts +4 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.js +159 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.d.ts +9 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.js +140 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.d.ts +32 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.js +244 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.d.ts +12 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.js +30 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.d.ts +15 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.js +12 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.d.ts +2 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.js +13 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +171 -168
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.js +1 -1
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +5 -5
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +48 -45
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +5 -5
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +46 -44
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +118 -123
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +5 -7
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +45 -29
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +12 -7
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +48 -34
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +3 -3
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +53 -20
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +2 -2
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +32 -15
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +9 -23
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +80 -268
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +36 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +214 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +1 -1
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +7 -6
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +26 -10
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +7 -7
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +186 -106
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +19 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +129 -0
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.d.ts +9 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +313 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +4 -6
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +12 -16
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +0 -4
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +42 -181
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +3 -3
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +15 -1
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +2 -5
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +484 -384
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +2 -2
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +187 -101
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.d.ts +4 -1
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +3 -12
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +8 -52
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +53 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +264 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +28 -22
  85. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
  86. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
  87. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +2 -1
  88. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +41 -45
  89. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +8 -32
  90. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +2 -18
  91. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +20 -4
  92. package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +67 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.d.ts +6 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.js +73 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.d.ts +2 -1
  96. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +82 -67
  97. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.d.ts +4 -1
  98. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +44 -14
  99. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.d.ts +5 -4
  100. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +24 -14
  101. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.js +2 -2
  102. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +2 -2
  103. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
  104. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +2 -0
  105. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +7 -1
  106. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +14 -1
  107. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +8 -7
  108. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +84 -80
  109. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +1 -1
  110. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +3 -3
  111. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +1 -0
  112. package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.d.ts +5 -1
  113. package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.js +27 -3
  114. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.d.ts +5 -0
  115. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.js +62 -0
  116. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.d.ts +3 -0
  117. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.js +16 -0
  118. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.d.ts +2 -0
  119. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.js +17 -0
  120. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.d.ts +29 -0
  121. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.js +74 -0
  122. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.d.ts +14 -0
  123. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.js +40 -0
  124. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.d.ts +23 -0
  125. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.js +40 -0
  126. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.d.ts +5 -0
  127. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.js +9 -0
  128. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.d.ts +23 -0
  129. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.js +68 -0
  130. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/types.d.ts +13 -0
  131. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.d.ts +19 -0
  132. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.js +121 -0
  133. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.d.ts +13 -0
  134. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.js +13 -0
  135. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.d.ts +15 -0
  136. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.js +62 -0
  137. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.d.ts +15 -0
  138. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.js +65 -0
  139. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptLinkProvider.js +3 -8
  140. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptPathAutocompletion.d.ts +2 -2
  141. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptPathAutocompletion.js +14 -19
  142. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.d.ts +11 -0
  143. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.js +22 -0
  144. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.d.ts +17 -0
  145. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.js +83 -0
  146. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +4 -3
  147. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +8 -6
  148. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +17 -5
  149. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +223 -21
  150. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +5 -4
  151. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +28 -22
  152. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.d.ts +10 -0
  153. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.js +25 -0
  154. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +20 -31
  155. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
  156. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
  157. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +15 -12
  158. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
  159. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +2 -2
  160. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +12 -12
  161. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +2 -2
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
  164. package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.d.ts +0 -2
  165. package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.js +1 -14
  166. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.d.ts +0 -10
  167. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.js +0 -54
  168. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.d.ts +0 -25
  169. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.js +0 -79
  170. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.d.ts +0 -7
  171. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.js +0 -27
  172. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.d.ts +0 -5
  173. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.js +0 -53
  174. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.d.ts +0 -2
  175. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.js +0 -19
  176. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.d.ts +0 -5
  177. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.js +0 -27
  178. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.d.ts +0 -13
  179. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.js +0 -49
  180. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.d.ts +0 -6
  181. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js +0 -80
  182. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.d.ts +0 -3
  183. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.js +0 -13
  184. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +0 -21
  185. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +0 -64
  186. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.d.ts +0 -9
  187. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.js +0 -117
  188. /package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptLinkProvider.d.ts +0 -0
@@ -0,0 +1,214 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
4
+ import { StringSHA1 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hash';
5
+ import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
6
+ import { joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
7
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
8
+ import { OffsetEdit } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/offsetEdit';
9
+ import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
10
+ import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
11
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
12
+ import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
13
+
14
+ const STORAGE_CONTENTS_FOLDER = 'contents';
15
+ const STORAGE_STATE_FILE = 'state.json';
16
+ let ChatEditingSessionStorage = class ChatEditingSessionStorage {
17
+ constructor(chatSessionId, _fileService, _environmentService, _logService, _workspaceContextService) {
18
+ this.chatSessionId = chatSessionId;
19
+ this._fileService = _fileService;
20
+ this._environmentService = _environmentService;
21
+ this._logService = _logService;
22
+ this._workspaceContextService = _workspaceContextService;
23
+ }
24
+ _getStorageLocation() {
25
+ const workspaceId = this._workspaceContextService.getWorkspace().id;
26
+ return joinPath(this._environmentService.workspaceStorageHome, workspaceId, 'chatEditingSessions', this.chatSessionId);
27
+ }
28
+ async restoreState() {
29
+ const storageLocation = this._getStorageLocation();
30
+ const fileContents = ( new Map());
31
+ const getFileContent = (hash) => {
32
+ let readPromise = fileContents.get(hash);
33
+ if (!readPromise) {
34
+ readPromise = this._fileService.readFile(joinPath(storageLocation, STORAGE_CONTENTS_FOLDER, hash)).then(content => ( content.value.toString()));
35
+ fileContents.set(hash, readPromise);
36
+ }
37
+ return readPromise;
38
+ };
39
+ const deserializeSnapshotEntriesDTO = async (dtoEntries) => {
40
+ const entries = ( new ResourceMap());
41
+ for (const entryDTO of dtoEntries) {
42
+ const entry = await deserializeSnapshotEntry(entryDTO);
43
+ entries.set(entry.resource, entry);
44
+ }
45
+ return entries;
46
+ };
47
+ const deserializeChatEditingStopDTO = async (stopDTO) => {
48
+ const entries = await deserializeSnapshotEntriesDTO(stopDTO.entries);
49
+ return { stopId: 'stopId' in stopDTO ? stopDTO.stopId : undefined, entries };
50
+ };
51
+ const normalizeSnapshotDtos = (snapshot) => {
52
+ if ('stops' in snapshot) {
53
+ return snapshot;
54
+ }
55
+ return { requestId: snapshot.requestId, stops: [{ stopId: undefined, entries: snapshot.entries }], postEdit: undefined };
56
+ };
57
+ const deserializeChatEditingSessionSnapshot = async (startIndex, snapshot) => {
58
+ const stops = await Promise.all(( snapshot.stops.map(deserializeChatEditingStopDTO)));
59
+ return { startIndex, requestId: snapshot.requestId, stops, postEdit: snapshot.postEdit && (await deserializeSnapshotEntriesDTO(snapshot.postEdit)) };
60
+ };
61
+ const deserializeSnapshotEntry = async (entry) => {
62
+ return {
63
+ resource: ( URI.parse(entry.resource)),
64
+ languageId: entry.languageId,
65
+ original: await getFileContent(entry.originalHash),
66
+ current: await getFileContent(entry.currentHash),
67
+ originalToCurrentEdit: OffsetEdit.fromJson(entry.originalToCurrentEdit),
68
+ state: entry.state,
69
+ snapshotUri: ( URI.parse(entry.snapshotUri)),
70
+ telemetryInfo: { requestId: entry.telemetryInfo.requestId, agentId: entry.telemetryInfo.agentId, command: entry.telemetryInfo.command, sessionId: this.chatSessionId, result: undefined }
71
+ };
72
+ };
73
+ try {
74
+ const stateFilePath = joinPath(storageLocation, STORAGE_STATE_FILE);
75
+ if (!(await this._fileService.exists(stateFilePath))) {
76
+ this._logService.debug(`chatEditingSession: No editing session state found at ${( stateFilePath.toString())}`);
77
+ return undefined;
78
+ }
79
+ this._logService.debug(`chatEditingSession: Restoring editing session at ${( stateFilePath.toString())}`);
80
+ const stateFileContent = await this._fileService.readFile(stateFilePath);
81
+ const data = JSON.parse(( stateFileContent.value.toString()));
82
+ if (!COMPATIBLE_STORAGE_VERSIONS.includes(data.version)) {
83
+ return undefined;
84
+ }
85
+ let linearHistoryIndex = 0;
86
+ const linearHistory = await Promise.all(( data.linearHistory.map(snapshot => {
87
+ const norm = normalizeSnapshotDtos(snapshot);
88
+ const result = deserializeChatEditingSessionSnapshot(linearHistoryIndex, norm);
89
+ linearHistoryIndex += norm.stops.length;
90
+ return result;
91
+ })));
92
+ const initialFileContents = ( new ResourceMap());
93
+ for (const fileContentDTO of data.initialFileContents) {
94
+ initialFileContents.set(( URI.parse(fileContentDTO[0])), await getFileContent(fileContentDTO[1]));
95
+ }
96
+ const pendingSnapshot = data.pendingSnapshot ? await deserializeChatEditingStopDTO(data.pendingSnapshot) : undefined;
97
+ const recentSnapshot = await deserializeChatEditingStopDTO(data.recentSnapshot);
98
+ return {
99
+ initialFileContents,
100
+ pendingSnapshot,
101
+ recentSnapshot,
102
+ linearHistoryIndex: data.linearHistoryIndex,
103
+ linearHistory
104
+ };
105
+ }
106
+ catch (e) {
107
+ this._logService.error(`Error restoring chat editing session from ${( storageLocation.toString())}`, e);
108
+ }
109
+ return undefined;
110
+ }
111
+ async storeState(state) {
112
+ const storageFolder = this._getStorageLocation();
113
+ const contentsFolder = URI.joinPath(storageFolder, STORAGE_CONTENTS_FOLDER);
114
+ const existingContents = ( new Set());
115
+ try {
116
+ const stat = await this._fileService.resolve(contentsFolder);
117
+ stat.children?.forEach(child => {
118
+ if (child.isFile) {
119
+ existingContents.add(child.name);
120
+ }
121
+ });
122
+ }
123
+ catch (e) {
124
+ try {
125
+ await this._fileService.createFolder(contentsFolder);
126
+ }
127
+ catch (e) {
128
+ this._logService.error(`Error creating chat editing session content folder ${( contentsFolder.toString())}`, e);
129
+ return;
130
+ }
131
+ }
132
+ const fileContents = ( new Map());
133
+ const addFileContent = (content) => {
134
+ const shaComputer = ( new StringSHA1());
135
+ shaComputer.update(content);
136
+ const sha = shaComputer.digest().substring(0, 7);
137
+ fileContents.set(sha, content);
138
+ return sha;
139
+ };
140
+ const serializeResourceMap = (resourceMap, serialize) => {
141
+ return ( Array.from(resourceMap.entries()).map(([resourceURI, value]) => [( resourceURI.toString()), serialize(value)]));
142
+ };
143
+ const serializeChatEditingSessionStop = (stop) => {
144
+ return {
145
+ stopId: stop.stopId,
146
+ entries: ( Array.from(( stop.entries.values())).map(serializeSnapshotEntry))
147
+ };
148
+ };
149
+ const serializeChatEditingSessionSnapshot = (snapshot) => {
150
+ return {
151
+ requestId: snapshot.requestId,
152
+ stops: ( snapshot.stops.map(serializeChatEditingSessionStop)),
153
+ postEdit: snapshot.postEdit ? ( Array.from(( snapshot.postEdit.values())).map(serializeSnapshotEntry)) : undefined
154
+ };
155
+ };
156
+ const serializeSnapshotEntry = (entry) => {
157
+ return {
158
+ resource: ( entry.resource.toString()),
159
+ languageId: entry.languageId,
160
+ originalHash: addFileContent(entry.original),
161
+ currentHash: addFileContent(entry.current),
162
+ originalToCurrentEdit: ( entry.originalToCurrentEdit.edits.map(
163
+ edit => ({ pos: edit.replaceRange.start, len: edit.replaceRange.length, txt: edit.newText })
164
+ )),
165
+ state: entry.state,
166
+ snapshotUri: ( entry.snapshotUri.toString()),
167
+ telemetryInfo: { requestId: entry.telemetryInfo.requestId, agentId: entry.telemetryInfo.agentId, command: entry.telemetryInfo.command }
168
+ };
169
+ };
170
+ try {
171
+ const data = {
172
+ version: STORAGE_VERSION,
173
+ sessionId: this.chatSessionId,
174
+ linearHistory: ( state.linearHistory.map(serializeChatEditingSessionSnapshot)),
175
+ linearHistoryIndex: state.linearHistoryIndex,
176
+ initialFileContents: serializeResourceMap(state.initialFileContents, value => addFileContent(value)),
177
+ pendingSnapshot: state.pendingSnapshot ? serializeChatEditingSessionStop(state.pendingSnapshot) : undefined,
178
+ recentSnapshot: serializeChatEditingSessionStop(state.recentSnapshot),
179
+ };
180
+ this._logService.debug(`chatEditingSession: Storing editing session at ${( storageFolder.toString())}: ${fileContents.size} files`);
181
+ for (const [hash, content] of fileContents) {
182
+ if (!( existingContents.has(hash))) {
183
+ await this._fileService.writeFile(joinPath(contentsFolder, hash), VSBuffer.fromString(content));
184
+ }
185
+ }
186
+ await this._fileService.writeFile(joinPath(storageFolder, STORAGE_STATE_FILE), VSBuffer.fromString(JSON.stringify(data)));
187
+ }
188
+ catch (e) {
189
+ this._logService.debug(`Error storing chat editing session to ${( storageFolder.toString())}`, e);
190
+ }
191
+ }
192
+ async clearState() {
193
+ const storageFolder = this._getStorageLocation();
194
+ if (await this._fileService.exists(storageFolder)) {
195
+ this._logService.debug(`chatEditingSession: Clearing editing session at ${( storageFolder.toString())}`);
196
+ try {
197
+ await this._fileService.del(storageFolder, { recursive: true });
198
+ }
199
+ catch (e) {
200
+ this._logService.debug(`Error clearing chat editing session from ${( storageFolder.toString())}`, e);
201
+ }
202
+ }
203
+ }
204
+ };
205
+ ChatEditingSessionStorage = ( __decorate([
206
+ ( __param(1, IFileService)),
207
+ ( __param(2, IEnvironmentService)),
208
+ ( __param(3, ILogService)),
209
+ ( __param(4, IWorkspaceContextService))
210
+ ], ChatEditingSessionStorage));
211
+ const COMPATIBLE_STORAGE_VERSIONS = [1, 2];
212
+ const STORAGE_VERSION = 2;
213
+
214
+ export { ChatEditingSessionStorage };
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
- import { computeDiff } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/common/notebookDiff';
4
+ import { computeDiff } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/common/notebookDiff';
5
5
  import { INotebookEditorModelResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service';
6
6
  import { INotebookLoggingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service';
7
7
  import { INotebookEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service';
@@ -3,7 +3,7 @@ import { VSBuffer, encodeBase64, decodeBase64 } from '@codingame/monaco-vscode-a
3
3
  import { filter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
4
4
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
5
5
  import { SnapshotContext } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/services/workingCopy/common/fileWorkingCopy';
6
- import { NotebookCellTextModel } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel';
6
+ import { NotebookCellTextModel } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel';
7
7
  import { NotebookSetting, CellEditType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
8
8
 
9
9
  const BufferMarker = 'ArrayBuffer-4f56482b-5a03-49ba-8356-210d3b0c1c3d';
@@ -1,6 +1,6 @@
1
1
  import { DisposableStore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
2
  import { ITransaction, IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
3
- import { ObservableDisposable } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/base/common/observableDisposable";
3
+ import { ObservableDisposable } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/base/common/observableDisposable";
4
4
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
5
5
  import { IDocumentDiff } from "../../../../../../editor/common/diff/documentDiffProvider.js";
6
6
  import { DetailedLineRangeMapping } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping";
@@ -9,9 +9,9 @@ import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common
9
9
  import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service";
10
10
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
11
11
  import { INotebookEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service";
12
- import { NotebookCellTextModel } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel";
13
- import { WorkingSetEntryState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
14
- import { IChatResponseModel } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatModel";
12
+ import { NotebookCellTextModel } from "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel";
13
+ import { ModifiedFileEntryState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
14
+ import { IChatResponseModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
15
15
  export declare class ChatEditingNotebookCellEntry extends ObservableDisposable {
16
16
  readonly notebookUri: URI;
17
17
  readonly cell: NotebookCellTextModel;
@@ -35,8 +35,8 @@ export declare class ChatEditingNotebookCellEntry extends ObservableDisposable {
35
35
  private readonly _editDecorationClear;
36
36
  private _editDecorations;
37
37
  private readonly _diffTrimWhitespace;
38
- protected readonly _stateObs: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").ISettableObservable<WorkingSetEntryState, void>;
39
- readonly state: IObservable<WorkingSetEntryState>;
38
+ protected readonly _stateObs: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").ISettableObservable<ModifiedFileEntryState, void>;
39
+ readonly state: IObservable<ModifiedFileEntryState>;
40
40
  protected readonly _isCurrentlyBeingModifiedByObs: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").ISettableObservable<IChatResponseModel | undefined, void>;
41
41
  readonly isCurrentlyBeingModifiedBy: IObservable<IChatResponseModel | undefined>;
42
42
  private readonly initialContent;
@@ -45,6 +45,7 @@ export declare class ChatEditingNotebookCellEntry extends ObservableDisposable {
45
45
  private _mirrorEdits;
46
46
  acceptAgentEdits(textEdits: TextEdit[], isLastEdits: boolean, responseModel: IChatResponseModel): void;
47
47
  scheduleEditDecorations(): void;
48
+ revertMarkdownPreviewState(): void;
48
49
  protected _resetEditsState(tx: ITransaction): void;
49
50
  keep(change: DetailedLineRangeMapping): Promise<boolean>;
50
51
  private _acceptHunk;
@@ -3,7 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
4
4
  import { toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
5
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
6
- import { ObservableDisposable } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/base/common/observableDisposable';
6
+ import { ObservableDisposable } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/base/common/observableDisposable';
7
7
  import { themeColorFromId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
8
8
  import { EditOperation } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editOperation';
9
9
  import { OffsetEdit } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/offsetEdit';
@@ -27,9 +27,10 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/mini
27
27
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
28
28
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
29
29
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
30
- import { CellEditState } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
30
+ import { CellEditState } from '@codingame/monaco-vscode-324f9a6e-6231-5bfc-af17-e147abd2dfd2-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
31
31
  import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
32
- import { WorkingSetEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
32
+ import { CellKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
33
+ import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
33
34
  import { pendingRewriteMinimap } from '../chatEditingModifiedFileEntry.js';
34
35
  import { observableValue, transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/base';
35
36
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/autorun';
@@ -85,7 +86,7 @@ let ChatEditingNotebookCellEntry = class ChatEditingNotebookCellEntry extends Ob
85
86
  500
86
87
  )));
87
88
  this._editDecorations = [];
88
- this._stateObs = observableValue(this, WorkingSetEntryState.Modified);
89
+ this._stateObs = observableValue(this, ModifiedFileEntryState.Modified);
89
90
  this.state = this._stateObs;
90
91
  this._isCurrentlyBeingModifiedByObs = observableValue(this, undefined);
91
92
  this.isCurrentlyBeingModifiedBy = this._isCurrentlyBeingModifiedByObs;
@@ -133,9 +134,9 @@ let ChatEditingNotebookCellEntry = class ChatEditingNotebookCellEntry extends Ob
133
134
  const didResetToOriginalContent = this.modifiedModel.getValue() === this.initialContent;
134
135
  const currentState = this._stateObs.get();
135
136
  switch (currentState) {
136
- case WorkingSetEntryState.Modified:
137
+ case ModifiedFileEntryState.Modified:
137
138
  if (didResetToOriginalContent) {
138
- this._stateObs.set(WorkingSetEntryState.Rejected, undefined);
139
+ this._stateObs.set(ModifiedFileEntryState.Rejected, undefined);
139
140
  break;
140
141
  }
141
142
  }
@@ -165,7 +166,7 @@ let ChatEditingNotebookCellEntry = class ChatEditingNotebookCellEntry extends Ob
165
166
  this._editDecorations = this.modifiedModel.deltaDecorations(this._editDecorations, newDecorations);
166
167
  transaction((tx) => {
167
168
  if (!isLastEdits) {
168
- this._stateObs.set(WorkingSetEntryState.Modified, tx);
169
+ this._stateObs.set(ModifiedFileEntryState.Modified, tx);
169
170
  this._isCurrentlyBeingModifiedByObs.set(responseModel, tx);
170
171
  this._maxModifiedLineNumber.set(maxLineNumber, tx);
171
172
  }
@@ -180,6 +181,19 @@ let ChatEditingNotebookCellEntry = class ChatEditingNotebookCellEntry extends Ob
180
181
  scheduleEditDecorations() {
181
182
  this._editDecorationClear.schedule();
182
183
  }
184
+ revertMarkdownPreviewState() {
185
+ if (this.cell.cellKind !== CellKind.Markup) {
186
+ return;
187
+ }
188
+ const notebookEditor = this.notebookEditorService.retrieveExistingWidgetFromURI(this.notebookUri)?.value;
189
+ if (notebookEditor) {
190
+ const vm = notebookEditor.getCellByHandle(this.cell.handle);
191
+ if (vm?.getEditState() === CellEditState.Editing &&
192
+ (vm.editStateSource === 'chatEdit' || vm.editStateSource === 'chatEditNavigation')) {
193
+ vm?.updateEditState(CellEditState.Preview, 'chatEdit');
194
+ }
195
+ }
196
+ }
183
197
  _resetEditsState(tx) {
184
198
  this._isCurrentlyBeingModifiedByObs.set(undefined, tx);
185
199
  this._maxModifiedLineNumber.set(0, tx);
@@ -190,7 +204,7 @@ let ChatEditingNotebookCellEntry = class ChatEditingNotebookCellEntry extends Ob
190
204
  async _acceptHunk(change) {
191
205
  this._isEditFromUs = true;
192
206
  try {
193
- if (!this._diffInfo.get().changes.includes(change)) {
207
+ if (!this._diffInfo.get().changes.filter(c => c.modified.equals(change.modified) && c.original.equals(change.original)).length) {
194
208
  return false;
195
209
  }
196
210
  const edits = [];
@@ -205,7 +219,8 @@ let ChatEditingNotebookCellEntry = class ChatEditingNotebookCellEntry extends Ob
205
219
  }
206
220
  await this._updateDiffInfoSeq();
207
221
  if (this._diffInfo.get().identical) {
208
- this._stateObs.set(WorkingSetEntryState.Accepted, undefined);
222
+ this.revertMarkdownPreviewState();
223
+ this._stateObs.set(ModifiedFileEntryState.Accepted, undefined);
209
224
  }
210
225
  return true;
211
226
  }
@@ -230,7 +245,8 @@ let ChatEditingNotebookCellEntry = class ChatEditingNotebookCellEntry extends Ob
230
245
  }
231
246
  await this._updateDiffInfoSeq();
232
247
  if (this._diffInfo.get().identical) {
233
- this._stateObs.set(WorkingSetEntryState.Rejected, undefined);
248
+ this.revertMarkdownPreviewState();
249
+ this._stateObs.set(ModifiedFileEntryState.Rejected, undefined);
234
250
  }
235
251
  return true;
236
252
  }
@@ -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-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser";
5
+ import { INotebookTextDiffEditor } from "@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-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/chatEditingService";
8
8
  import { ChatEditingModifiedNotebookEntry } from "../chatEditingModifiedNotebookEntry.js";
@@ -17,9 +17,9 @@ export declare class ChatEditingNotebookEditorIntegration extends Disposable imp
17
17
  next(wrap: boolean): boolean;
18
18
  previous(wrap: boolean): boolean;
19
19
  enableAccessibleDiffView(): void;
20
- acceptNearestChange(change: IModifiedFileEntryChangeHunk): void;
21
- rejectNearestChange(change: IModifiedFileEntryChangeHunk): void;
22
- toggleDiff(change: IModifiedFileEntryChangeHunk | undefined): Promise<void>;
20
+ acceptNearestChange(change: IModifiedFileEntryChangeHunk | undefined): Promise<void>;
21
+ rejectNearestChange(change: IModifiedFileEntryChangeHunk | undefined): Promise<void>;
22
+ toggleDiff(change: IModifiedFileEntryChangeHunk | undefined, show?: boolean): Promise<void>;
23
23
  dispose(): void;
24
24
  }
25
25
  export declare class ChatEditingNotebookDiffEditorIntegration extends Disposable implements IModifiedFileEntryEditorIntegration {
@@ -32,7 +32,7 @@ export declare class ChatEditingNotebookDiffEditorIntegration extends Disposable
32
32
  next(_wrap: boolean): boolean;
33
33
  previous(_wrap: boolean): boolean;
34
34
  enableAccessibleDiffView(): void;
35
- acceptNearestChange(change: IModifiedFileEntryChangeHunk): void;
36
- rejectNearestChange(change: IModifiedFileEntryChangeHunk): void;
37
- toggleDiff(_change: IModifiedFileEntryChangeHunk | undefined): Promise<void>;
35
+ acceptNearestChange(change: IModifiedFileEntryChangeHunk): Promise<void>;
36
+ rejectNearestChange(change: IModifiedFileEntryChangeHunk): Promise<void>;
37
+ toggleDiff(_change: IModifiedFileEntryChangeHunk | undefined, _show?: boolean): Promise<void>;
38
38
  }