@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
@@ -2,7 +2,7 @@
2
2
  import { encodeBase64 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
3
3
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
4
4
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
- import { ToolConfirmKind, IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
5
+ import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
6
6
  import { isToolResultOutputDetails } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
7
7
  import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
8
8
 
@@ -10,13 +10,35 @@ class ChatToolInvocation {
10
10
  get state() {
11
11
  return this._state;
12
12
  }
13
- constructor(preparedInvocation, toolData, toolCallId, fromSubAgent, parameters) {
13
+ static createStreaming(options) {
14
+ return ( new ChatToolInvocation(
15
+ undefined,
16
+ options.toolData,
17
+ options.toolCallId,
18
+ options.subagentInvocationId,
19
+ undefined,
20
+ true,
21
+ options.chatRequestId
22
+ ));
23
+ }
24
+ constructor(
25
+ preparedInvocation,
26
+ toolData,
27
+ toolCallId,
28
+ subAgentInvocationId,
29
+ parameters,
30
+ isStreaming = false,
31
+ chatRequestId
32
+ ) {
14
33
  this.toolCallId = toolCallId;
15
- this.kind = 'toolInvocation';
16
- this._progress = observableValue(this, { progress: 0 });
17
- const defaultMessage = ( localize(5965, "Using {0}", `"${toolData.displayName}"`));
18
- const invocationMessage = preparedInvocation?.invocationMessage ?? defaultMessage;
19
- this.invocationMessage = invocationMessage;
34
+ this.kind = "toolInvocation";
35
+ this._progress = observableValue(this, {
36
+ progress: 0
37
+ });
38
+ this._partialInput = observableValue(this, undefined);
39
+ this._streamingMessage = observableValue(this, undefined);
40
+ const defaultStreamingMessage = isStreaming ? ( localize(6252, "Using \"{0}\"", toolData.displayName)) : "";
41
+ this.invocationMessage = preparedInvocation?.invocationMessage ?? defaultStreamingMessage;
20
42
  this.pastTenseMessage = preparedInvocation?.pastTenseMessage;
21
43
  this.originMessage = preparedInvocation?.originMessage;
22
44
  this.confirmationMessages = preparedInvocation?.confirmationMessages;
@@ -24,55 +46,165 @@ class ChatToolInvocation {
24
46
  this.toolSpecificData = preparedInvocation?.toolSpecificData;
25
47
  this.toolId = toolData.id;
26
48
  this.source = toolData.source;
27
- this.fromSubAgent = fromSubAgent;
49
+ this.subAgentInvocationId = subAgentInvocationId;
28
50
  this.parameters = parameters;
29
- if (!this.confirmationMessages?.title) {
30
- this._state = observableValue(this, { type: IChatToolInvocation.StateKind.Executing, confirmed: { type: ToolConfirmKind.ConfirmationNotNeeded, reason: this.confirmationMessages?.confirmationNotNeededReason }, progress: this._progress });
31
- }
32
- else {
51
+ this.chatRequestId = chatRequestId;
52
+ if (isStreaming) {
53
+ this._state = observableValue(this, {
54
+ type: IChatToolInvocation.StateKind.Streaming,
55
+ partialInput: this._partialInput,
56
+ streamingMessage: this._streamingMessage
57
+ });
58
+ } else if (!this.confirmationMessages?.title) {
59
+ this._state = observableValue(this, {
60
+ type: IChatToolInvocation.StateKind.Executing,
61
+ confirmed: {
62
+ type: ToolConfirmKind.ConfirmationNotNeeded,
63
+ reason: this.confirmationMessages?.confirmationNotNeededReason
64
+ },
65
+ progress: this._progress,
66
+ parameters: this.parameters,
67
+ confirmationMessages: this.confirmationMessages
68
+ });
69
+ } else {
33
70
  this._state = observableValue(this, {
34
71
  type: IChatToolInvocation.StateKind.WaitingForConfirmation,
72
+ parameters: this.parameters,
73
+ confirmationMessages: this.confirmationMessages,
35
74
  confirm: reason => {
36
75
  if (reason.type === ToolConfirmKind.Denied || reason.type === ToolConfirmKind.Skipped) {
37
- this._state.set({ type: IChatToolInvocation.StateKind.Cancelled, reason: reason.type }, undefined);
38
- }
39
- else {
40
- this._state.set({ type: IChatToolInvocation.StateKind.Executing, confirmed: reason, progress: this._progress }, undefined);
76
+ this._state.set({
77
+ type: IChatToolInvocation.StateKind.Cancelled,
78
+ reason: reason.type,
79
+ parameters: this.parameters,
80
+ confirmationMessages: this.confirmationMessages
81
+ }, undefined);
82
+ } else {
83
+ this._state.set({
84
+ type: IChatToolInvocation.StateKind.Executing,
85
+ confirmed: reason,
86
+ progress: this._progress,
87
+ parameters: this.parameters,
88
+ confirmationMessages: this.confirmationMessages
89
+ }, undefined);
41
90
  }
42
91
  }
43
92
  });
44
93
  }
45
94
  }
95
+ updatePartialInput(input) {
96
+ if (this._state.get().type !== IChatToolInvocation.StateKind.Streaming) {
97
+ return;
98
+ }
99
+ this._partialInput.set(input, undefined);
100
+ }
101
+ updateStreamingMessage(message) {
102
+ const state = this._state.get();
103
+ if (state.type !== IChatToolInvocation.StateKind.Streaming) {
104
+ return;
105
+ }
106
+ this._streamingMessage.set(message, undefined);
107
+ }
108
+ transitionFromStreaming(preparedInvocation, parameters, autoConfirmed) {
109
+ const currentState = this._state.get();
110
+ if (currentState.type !== IChatToolInvocation.StateKind.Streaming) {
111
+ return;
112
+ }
113
+ const lastStreamingMessage = this._streamingMessage.get();
114
+ if (lastStreamingMessage && !preparedInvocation?.invocationMessage) {
115
+ this.invocationMessage = lastStreamingMessage;
116
+ }
117
+ this.parameters = parameters;
118
+ if (preparedInvocation) {
119
+ if (preparedInvocation.invocationMessage) {
120
+ this.invocationMessage = preparedInvocation.invocationMessage;
121
+ }
122
+ this.pastTenseMessage = preparedInvocation.pastTenseMessage;
123
+ this.confirmationMessages = preparedInvocation.confirmationMessages;
124
+ this.presentation = preparedInvocation.presentation;
125
+ this.toolSpecificData = preparedInvocation.toolSpecificData;
126
+ }
127
+ const confirm = reason => {
128
+ if (reason.type === ToolConfirmKind.Denied || reason.type === ToolConfirmKind.Skipped) {
129
+ this._state.set({
130
+ type: IChatToolInvocation.StateKind.Cancelled,
131
+ reason: reason.type,
132
+ parameters: this.parameters,
133
+ confirmationMessages: this.confirmationMessages
134
+ }, undefined);
135
+ } else {
136
+ this._state.set({
137
+ type: IChatToolInvocation.StateKind.Executing,
138
+ confirmed: reason,
139
+ progress: this._progress,
140
+ parameters: this.parameters,
141
+ confirmationMessages: this.confirmationMessages
142
+ }, undefined);
143
+ }
144
+ };
145
+ if (autoConfirmed) {
146
+ confirm(autoConfirmed);
147
+ } else if (!this.confirmationMessages?.title) {
148
+ this._state.set({
149
+ type: IChatToolInvocation.StateKind.Executing,
150
+ confirmed: {
151
+ type: ToolConfirmKind.ConfirmationNotNeeded,
152
+ reason: this.confirmationMessages?.confirmationNotNeededReason
153
+ },
154
+ progress: this._progress,
155
+ parameters: this.parameters,
156
+ confirmationMessages: this.confirmationMessages
157
+ }, undefined);
158
+ } else {
159
+ this._state.set({
160
+ type: IChatToolInvocation.StateKind.WaitingForConfirmation,
161
+ parameters: this.parameters,
162
+ confirmationMessages: this.confirmationMessages,
163
+ confirm
164
+ }, undefined);
165
+ }
166
+ }
46
167
  _setCompleted(result, postConfirmed) {
47
168
  if (postConfirmed && (postConfirmed.type === ToolConfirmKind.Denied || postConfirmed.type === ToolConfirmKind.Skipped)) {
48
- this._state.set({ type: IChatToolInvocation.StateKind.Cancelled, reason: postConfirmed.type }, undefined);
169
+ this._state.set({
170
+ type: IChatToolInvocation.StateKind.Cancelled,
171
+ reason: postConfirmed.type,
172
+ parameters: this.parameters,
173
+ confirmationMessages: this.confirmationMessages
174
+ }, undefined);
49
175
  return;
50
176
  }
51
177
  this._state.set({
52
178
  type: IChatToolInvocation.StateKind.Completed,
53
- confirmed: IChatToolInvocation.executionConfirmedOrDenied(this) || { type: ToolConfirmKind.ConfirmationNotNeeded },
179
+ confirmed: IChatToolInvocation.executionConfirmedOrDenied(this) || {
180
+ type: ToolConfirmKind.ConfirmationNotNeeded
181
+ },
54
182
  resultDetails: result?.toolResultDetails,
55
183
  postConfirmed,
56
184
  contentForModel: result?.content || [],
185
+ parameters: this.parameters,
186
+ confirmationMessages: this.confirmationMessages
57
187
  }, undefined);
58
188
  }
59
189
  didExecuteTool(result, final) {
60
190
  if (result?.toolResultMessage) {
61
191
  this.pastTenseMessage = result.toolResultMessage;
62
- }
63
- else if (this._progress.get().message) {
192
+ } else if (this._progress.get().message) {
64
193
  this.pastTenseMessage = this._progress.get().message;
65
194
  }
66
195
  if (this.confirmationMessages?.confirmResults && !result?.toolResultError && result?.confirmResults !== false && !final) {
67
196
  this._state.set({
68
197
  type: IChatToolInvocation.StateKind.WaitingForPostApproval,
69
- confirmed: IChatToolInvocation.executionConfirmedOrDenied(this) || { type: ToolConfirmKind.ConfirmationNotNeeded },
198
+ confirmed: IChatToolInvocation.executionConfirmedOrDenied(this) || {
199
+ type: ToolConfirmKind.ConfirmationNotNeeded
200
+ },
70
201
  resultDetails: result?.toolResultDetails,
71
202
  contentForModel: result?.content || [],
72
203
  confirm: reason => this._setCompleted(result, reason),
204
+ parameters: this.parameters,
205
+ confirmationMessages: this.confirmationMessages
73
206
  }, undefined);
74
- }
75
- else {
207
+ } else {
76
208
  this._setCompleted(result);
77
209
  }
78
210
  return this._state.get();
@@ -81,29 +213,35 @@ class ChatToolInvocation {
81
213
  const prev = this._progress.get();
82
214
  this._progress.set({
83
215
  progress: step.progress || prev.progress || 0,
84
- message: step.message,
216
+ message: step.message
85
217
  }, undefined);
86
218
  }
87
219
  toJSON() {
88
220
  const waitingForPostApproval = this.state.get().type === IChatToolInvocation.StateKind.WaitingForPostApproval;
89
221
  const details = waitingForPostApproval ? undefined : IChatToolInvocation.resultDetails(this);
90
222
  return {
91
- kind: 'toolInvocationSerialized',
223
+ kind: "toolInvocationSerialized",
92
224
  presentation: this.presentation,
93
225
  invocationMessage: this.invocationMessage,
94
226
  pastTenseMessage: this.pastTenseMessage,
95
227
  originMessage: this.originMessage,
96
- isConfirmed: waitingForPostApproval ? { type: ToolConfirmKind.Skipped } : IChatToolInvocation.executionConfirmedOrDenied(this),
228
+ isConfirmed: waitingForPostApproval ? {
229
+ type: ToolConfirmKind.Skipped
230
+ } : IChatToolInvocation.executionConfirmedOrDenied(this),
97
231
  isComplete: true,
98
232
  source: this.source,
99
- resultDetails: isToolResultOutputDetails(details)
100
- ? { output: { type: 'data', mimeType: details.output.mimeType, base64Data: encodeBase64(details.output.value) } }
101
- : details,
233
+ resultDetails: isToolResultOutputDetails(details) ? {
234
+ output: {
235
+ type: "data",
236
+ mimeType: details.output.mimeType,
237
+ base64Data: encodeBase64(details.output.value)
238
+ }
239
+ } : details,
102
240
  toolSpecificData: this.toolSpecificData,
103
241
  toolCallId: this.toolCallId,
104
242
  toolId: this.toolId,
105
- fromSubAgent: this.fromSubAgent,
106
- generatedTitle: this.generatedTitle,
243
+ subAgentInvocationId: this.subAgentInvocationId,
244
+ generatedTitle: this.generatedTitle
107
245
  };
108
246
  }
109
247
  }
@@ -0,0 +1,6 @@
1
+ import { IChatDataSerializerLog, IChatModel, ISerializableChatData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
2
+ import * as Adapt from "./objectMutationLog.js";
3
+ export declare const storageSchema: Adapt.TransformObject<IChatModel, import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel").ISerializableChatData3>;
4
+ export declare class ChatSessionOperationLog extends Adapt.ObjectMutationLog<IChatModel, ISerializableChatData> implements IChatDataSerializerLog {
5
+ constructor();
6
+ }
@@ -0,0 +1,141 @@
1
+
2
+ import { assertNever } from '@codingame/monaco-vscode-api/vscode/vs/base/common/assert';
3
+ import { isMarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
4
+ import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
5
+ import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
6
+ import { hasKey } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
7
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
8
+ import { ResponseModelState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
9
+ import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
10
+ import { v, object, t, array, value, key, ObjectMutationLog } from './objectMutationLog.js';
11
+
12
+ const toJson = obj => {
13
+ const cast = obj;
14
+ return (cast && typeof cast.toJSON === "function" ? cast.toJSON() : obj);
15
+ };
16
+ const responsePartSchema = v(
17
+ obj => obj.kind === "markdownContent" ? obj.content : toJson(obj),
18
+ (a, b) => {
19
+ if (isMarkdownString(a) && isMarkdownString(b)) {
20
+ return a.value === b.value;
21
+ }
22
+ if (hasKey(a, {
23
+ kind: true
24
+ }) && hasKey(b, {
25
+ kind: true
26
+ })) {
27
+ if (a.kind !== b.kind) {
28
+ return false;
29
+ }
30
+ switch (a.kind) {
31
+ case "markdownContent":
32
+ return a.content === b.content;
33
+ case "toolInvocationSerialized":
34
+ case "elicitationSerialized":
35
+ case "progressTaskSerialized":
36
+ case "textEditGroup":
37
+ case "multiDiffData":
38
+ case "mcpServersStarting":
39
+ return equals(a, b);
40
+ case "clearToPreviousToolInvocation":
41
+ case "codeblockUri":
42
+ case "command":
43
+ case "confirmation":
44
+ case "extensions":
45
+ case "inlineReference":
46
+ case "markdownVuln":
47
+ case "notebookEditGroup":
48
+ case "progressMessage":
49
+ case "pullRequest":
50
+ case "questionCarousel":
51
+ case "thinking":
52
+ case "undoStop":
53
+ case "warning":
54
+ case "treeData":
55
+ case "workspaceEdit":
56
+ return a.kind === b.kind;
57
+ default:
58
+ {
59
+ assertNever();
60
+ }
61
+ }
62
+ }
63
+ return false;
64
+ }
65
+ );
66
+ const urisEqual = (a, b) => {
67
+ return isEqual(( URI.from(a)), ( URI.from(b)));
68
+ };
69
+ const messageSchema = object({
70
+ text: v(m => m.text),
71
+ parts: v(
72
+ m => m.parts,
73
+ (a, b) => a.length === b.length && a.every((part, i) => part.text === b[i].text)
74
+ )
75
+ });
76
+ const agentEditedFileEventSchema = object({
77
+ uri: v(e => e.uri, urisEqual),
78
+ eventKind: v(e => e.eventKind)
79
+ });
80
+ const chatVariableSchema = object({
81
+ variables: t(v => v.variables, array(value((a, b) => a.name === b.name)))
82
+ });
83
+ const requestSchema = object({
84
+ requestId: t(m => m.id, key()),
85
+ timestamp: v(m => m.timestamp),
86
+ confirmation: v(m => m.confirmation),
87
+ message: t(m => m.message, messageSchema),
88
+ shouldBeRemovedOnSend: v(m => m.shouldBeRemovedOnSend, equals),
89
+ agent: v(m => m.response?.agent, (a, b) => a?.id === b?.id),
90
+ modelId: v(m => m.modelId),
91
+ editedFileEvents: t(m => m.editedFileEvents, array(agentEditedFileEventSchema)),
92
+ variableData: t(m => m.variableData, chatVariableSchema),
93
+ isHidden: v(() => undefined),
94
+ isCanceled: v(() => undefined),
95
+ response: t(m => m.response?.entireResponse.value, array(responsePartSchema)),
96
+ responseId: v(m => m.response?.id),
97
+ result: v(m => m.response?.result, equals),
98
+ responseMarkdownInfo: v(m => m.response?.codeBlockInfos?.map(info => ({
99
+ suggestionId: info.suggestionId
100
+ })), equals),
101
+ followups: v(m => m.response?.followups, equals),
102
+ modelState: v(m => m.response?.stateT, equals),
103
+ vote: v(m => m.response?.vote),
104
+ voteDownReason: v(m => m.response?.voteDownReason),
105
+ slashCommand: t(m => m.response?.slashCommand, value((a, b) => a?.name === b?.name)),
106
+ usedContext: v(m => m.response?.usedContext, equals),
107
+ contentReferences: v(m => m.response?.contentReferences, equals),
108
+ codeCitations: v(m => m.response?.codeCitations, equals),
109
+ timeSpentWaiting: v(m => m.response?.timestamp)
110
+ }, {
111
+ sealed: o => o.modelState?.value === ResponseModelState.Cancelled || o.modelState?.value === ResponseModelState.Failed || o.modelState?.value === ResponseModelState.Complete
112
+ });
113
+ const inputStateSchema = object({
114
+ attachments: v(i => i.attachments, equals),
115
+ mode: v(i => i.mode, (a, b) => a.id === b.id),
116
+ selectedModel: v(i => i.selectedModel, (a, b) => a?.identifier === b?.identifier),
117
+ inputText: v(i => i.inputText),
118
+ selections: v(i => i.selections, equals),
119
+ contrib: v(i => i.contrib, equals)
120
+ });
121
+ const storageSchema = object({
122
+ version: v(() => 3),
123
+ creationDate: v(m => m.timestamp),
124
+ customTitle: v(m => m.hasCustomTitle ? m.title : undefined),
125
+ initialLocation: v(m => m.initialLocation),
126
+ inputState: t(m => m.inputModel.toJSON(), inputStateSchema),
127
+ responderUsername: v(m => m.responderUsername),
128
+ sessionId: v(m => m.sessionId),
129
+ requests: t(m => m.getRequests(), array(requestSchema)),
130
+ hasPendingEdits: v(
131
+ m => m.editingSession?.entries.get().some(e => e.state.get() === ModifiedFileEntryState.Modified)
132
+ ),
133
+ repoData: v(m => m.repoData, equals)
134
+ });
135
+ class ChatSessionOperationLog extends ObjectMutationLog {
136
+ constructor() {
137
+ super(storageSchema, 1024);
138
+ }
139
+ }
140
+
141
+ export { ChatSessionOperationLog, storageSchema };
@@ -1,5 +1,6 @@
1
1
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
2
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
3
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
4
  import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
4
5
  import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
5
6
  import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
@@ -8,9 +9,9 @@ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platfo
8
9
  import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
9
10
  import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
10
11
  import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
11
- import { ChatModel, ISerializableChatData, ISerializableChatsData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
12
12
  import { IChatSessionStats, IChatSessionTiming, ResponseModelState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
13
13
  import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
14
+ import { ChatModel, ISerializableChatData, ISerializableChatsData, ISerializedChatDataReference } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
14
15
  export declare class ChatSessionStore extends Disposable {
15
16
  private readonly fileService;
16
17
  private readonly environmentService;
@@ -20,20 +21,21 @@ export declare class ChatSessionStore extends Disposable {
20
21
  private readonly storageService;
21
22
  private readonly lifecycleService;
22
23
  private readonly userDataProfilesService;
24
+ private readonly configurationService;
23
25
  private readonly storageRoot;
24
26
  private readonly previousEmptyWindowStorageRoot;
25
27
  private readonly transferredSessionStorageRoot;
26
28
  private readonly storeQueue;
27
29
  private storeTask;
28
30
  private shuttingDown;
29
- constructor(fileService: IFileService, environmentService: IEnvironmentService, logService: ILogService, workspaceContextService: IWorkspaceContextService, telemetryService: ITelemetryService, storageService: IStorageService, lifecycleService: ILifecycleService, userDataProfilesService: IUserDataProfilesService);
31
+ constructor(fileService: IFileService, environmentService: IEnvironmentService, logService: ILogService, workspaceContextService: IWorkspaceContextService, telemetryService: ITelemetryService, storageService: IStorageService, lifecycleService: ILifecycleService, userDataProfilesService: IUserDataProfilesService, configurationService: IConfigurationService);
30
32
  storeSessions(sessions: ChatModel[]): Promise<void>;
31
33
  storeSessionsMetadataOnly(sessions: ChatModel[]): Promise<void>;
32
34
  storeTransferSession(transferData: IChatTransfer, session: ChatModel): Promise<void>;
33
35
  private getTransferredSessionIndex;
34
36
  private static readonly TRANSFER_EXPIRATION_MS;
35
37
  getTransferredSessionData(): URI | undefined;
36
- readTransferredSession(sessionResource: URI): Promise<ISerializableChatData | undefined>;
38
+ readTransferredSession(sessionResource: URI): Promise<ISerializedChatDataReference | undefined>;
37
39
  private cleanupTransferredSession;
38
40
  private writeSession;
39
41
  private writeSessionMetadataOnly;
@@ -55,7 +57,7 @@ export declare class ChatSessionStore extends Disposable {
55
57
  logIndex(): void;
56
58
  migrateDataIfNeeded(getInitialData: () => ISerializableChatsData | undefined): Promise<void>;
57
59
  private migrate;
58
- readSession(sessionId: string): Promise<ISerializableChatData | undefined>;
60
+ readSession(sessionId: string): Promise<ISerializedChatDataReference | undefined>;
59
61
  private readSessionFromLocation;
60
62
  private readSessionFromPreviousLocation;
61
63
  private getStorageLocation;