@codingame/monaco-vscode-chat-service-override 25.1.2 → 26.0.1

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
@@ -1,607 +0,0 @@
1
-
2
- import { registerCss } from '@codingame/monaco-vscode-api/css';
3
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
- import * as agentsessionsviewer from './media/agentsessionsviewer.css';
5
- import { h } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
6
- import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
7
- import { DisposableStore, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
8
- import { hasValidDiff, getAgentChangesSummary, isAgentSessionSection, isAgentSessionsModel, AgentSessionSection, isAgentSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
9
- import { IconLabel } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabel';
10
- import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
11
- import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
12
- import { getDurationString, fromNow } from '@codingame/monaco-vscode-api/vscode/vs/base/common/date';
13
- import { createMatches } from '@codingame/monaco-vscode-api/vscode/vs/base/common/filters';
14
- import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
15
- import { allowedChatMarkdownHtmlTags } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer';
16
- import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
17
- import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
18
- import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
19
- import { fillEditorsDragData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/dnd';
20
- import { HoverStyle } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hover';
21
- import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
22
- import { IntervalTimer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
23
- import { MenuWorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
24
- import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
25
- import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
26
- import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
27
- import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
28
- import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
29
- import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
30
- import { isSessionInProgressStatus, ChatSessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
31
-
32
- var AgentSessionRenderer_1, AgentSessionSectionRenderer_1;
33
- registerCss(agentsessionsviewer);
34
- let AgentSessionRenderer = class AgentSessionRenderer {
35
- static { AgentSessionRenderer_1 = this; }
36
- static { this.TEMPLATE_ID = 'agent-session'; }
37
- constructor(options, markdownRendererService, productService, hoverService, instantiationService, contextKeyService) {
38
- this.options = options;
39
- this.markdownRendererService = markdownRendererService;
40
- this.productService = productService;
41
- this.hoverService = hoverService;
42
- this.instantiationService = instantiationService;
43
- this.contextKeyService = contextKeyService;
44
- this.templateId = AgentSessionRenderer_1.TEMPLATE_ID;
45
- }
46
- renderTemplate(container) {
47
- const disposables = ( new DisposableStore());
48
- const elementDisposable = disposables.add(( new DisposableStore()));
49
- const elements = h('div.agent-session-item@item', [
50
- h('div.agent-session-icon-col', [
51
- h('div.agent-session-icon@icon')
52
- ]),
53
- h('div.agent-session-main-col', [
54
- h('div.agent-session-title-row', [
55
- h('div.agent-session-title@title'),
56
- h('div.agent-session-title-toolbar@titleToolbar'),
57
- ]),
58
- h('div.agent-session-details-row', [
59
- h('div.agent-session-diff-container@diffContainer', [
60
- h('span.agent-session-diff-files@filesSpan'),
61
- h('span.agent-session-diff-added@addedSpan'),
62
- h('span.agent-session-diff-removed@removedSpan')
63
- ]),
64
- h('div.agent-session-badge@badge'),
65
- h('div.agent-session-description@description'),
66
- h('div.agent-session-status@status')
67
- ])
68
- ])
69
- ]);
70
- const contextKeyService = disposables.add(this.contextKeyService.createScoped(elements.item));
71
- const scopedInstantiationService = disposables.add(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyService]))));
72
- const titleToolbar = disposables.add(scopedInstantiationService.createInstance(MenuWorkbenchToolBar, elements.titleToolbar, MenuId.AgentSessionItemToolbar, {
73
- menuOptions: { shouldForwardArgs: true },
74
- }));
75
- container.appendChild(elements.item);
76
- return {
77
- element: elements.item,
78
- icon: elements.icon,
79
- title: disposables.add(( new IconLabel(elements.title, { supportHighlights: true, supportIcons: true }))),
80
- titleToolbar,
81
- diffContainer: elements.diffContainer,
82
- diffFilesSpan: elements.filesSpan,
83
- diffAddedSpan: elements.addedSpan,
84
- diffRemovedSpan: elements.removedSpan,
85
- badge: elements.badge,
86
- description: elements.description,
87
- status: elements.status,
88
- contextKeyService,
89
- elementDisposable,
90
- disposables
91
- };
92
- }
93
- renderElement(session, index, template, details) {
94
- template.elementDisposable.clear();
95
- template.diffFilesSpan.textContent = '';
96
- template.diffAddedSpan.textContent = '';
97
- template.diffRemovedSpan.textContent = '';
98
- template.badge.textContent = '';
99
- template.description.textContent = '';
100
- template.element.classList.toggle('archived', session.element.isArchived());
101
- template.icon.className = `agent-session-icon ${ThemeIcon.asClassName(this.getIcon(session.element))}`;
102
- const markdownTitle = ( new MarkdownString(session.element.label));
103
- template.title.setLabel(renderAsPlaintext(markdownTitle), undefined, { matches: createMatches(session.filterData) });
104
- ChatContextKeys.isArchivedAgentSession.bindTo(template.contextKeyService).set(session.element.isArchived());
105
- ChatContextKeys.isReadAgentSession.bindTo(template.contextKeyService).set(session.element.isRead());
106
- ChatContextKeys.agentSessionType.bindTo(template.contextKeyService).set(session.element.providerType);
107
- template.titleToolbar.context = session.element;
108
- let hasDiff = false;
109
- const { changes: diff } = session.element;
110
- if (!isSessionInProgressStatus(session.element.status) && diff && hasValidDiff(diff)) {
111
- if (this.renderDiff(session, template)) {
112
- hasDiff = true;
113
- }
114
- }
115
- template.diffContainer.classList.toggle('has-diff', hasDiff);
116
- let hasBadge = false;
117
- if (!isSessionInProgressStatus(session.element.status)) {
118
- hasBadge = this.renderBadge(session, template);
119
- }
120
- template.badge.classList.toggle('has-badge', hasBadge);
121
- if (!hasDiff) {
122
- this.renderDescription(session, template, hasBadge);
123
- }
124
- this.renderStatus(session, template);
125
- this.renderHover(session, template);
126
- }
127
- renderBadge(session, template) {
128
- const badge = session.element.badge;
129
- if (badge) {
130
- this.renderMarkdownOrText(badge, template.badge, template.elementDisposable);
131
- }
132
- return !!badge;
133
- }
134
- renderMarkdownOrText(content, container, disposables) {
135
- if (typeof content === 'string') {
136
- container.textContent = content;
137
- }
138
- else {
139
- disposables.add(this.markdownRendererService.render(content, {
140
- sanitizerConfig: {
141
- replaceWithPlaintext: true,
142
- allowedTags: {
143
- override: allowedChatMarkdownHtmlTags,
144
- },
145
- allowedLinkSchemes: { augment: [this.productService.urlProtocol] }
146
- },
147
- }, container));
148
- }
149
- }
150
- renderDiff(session, template) {
151
- const diff = getAgentChangesSummary(session.element.changes);
152
- if (!diff) {
153
- return false;
154
- }
155
- if (diff.files > 0) {
156
- template.diffFilesSpan.textContent = diff.files === 1 ? ( localize(4909, "1 file")) : ( localize(4910, "{0} files", diff.files));
157
- }
158
- if (diff.insertions >= 0 ) {
159
- template.diffAddedSpan.textContent = `+${diff.insertions}`;
160
- }
161
- if (diff.deletions >= 0 ) {
162
- template.diffRemovedSpan.textContent = `-${diff.deletions}`;
163
- }
164
- return true;
165
- }
166
- getIcon(session) {
167
- if (session.status === ChatSessionStatus.InProgress) {
168
- return Codicon.sessionInProgress;
169
- }
170
- if (session.status === ChatSessionStatus.NeedsInput) {
171
- return Codicon.report;
172
- }
173
- if (session.status === ChatSessionStatus.Failed) {
174
- return Codicon.error;
175
- }
176
- if (!session.isRead() && !session.isArchived()) {
177
- return Codicon.circleFilled;
178
- }
179
- return Codicon.circleSmallFilled;
180
- }
181
- renderDescription(session, template, hasBadge) {
182
- const description = session.element.description;
183
- if (description) {
184
- this.renderMarkdownOrText(description, template.description, template.elementDisposable);
185
- }
186
- else {
187
- if (session.element.status === ChatSessionStatus.InProgress) {
188
- template.description.textContent = ( localize(4911, "Working..."));
189
- }
190
- else if (session.element.status === ChatSessionStatus.NeedsInput) {
191
- template.description.textContent = ( localize(4912, "Input needed."));
192
- }
193
- else if (hasBadge && session.element.status === ChatSessionStatus.Completed) {
194
- template.description.textContent = '';
195
- }
196
- else if (session.element.timing.finishedOrFailedTime &&
197
- session.element.timing.inProgressTime &&
198
- session.element.timing.finishedOrFailedTime > session.element.timing.inProgressTime) {
199
- const duration = this.toDuration(session.element.timing.inProgressTime, session.element.timing.finishedOrFailedTime, false);
200
- template.description.textContent = session.element.status === ChatSessionStatus.Failed ?
201
- ( localize(4913, "Failed after {0}.", duration ?? '1s')) :
202
- ( localize(4914, "Completed in {0}.", duration ?? '1s'));
203
- }
204
- else {
205
- template.description.textContent = session.element.status === ChatSessionStatus.Failed ?
206
- ( localize(4915, "Failed")) :
207
- ( localize(4916, "Completed"));
208
- }
209
- }
210
- }
211
- toDuration(startTime, endTime, useFullTimeWords) {
212
- const elapsed = Math.round((endTime - startTime) / 1000) * 1000;
213
- if (elapsed < 1000) {
214
- return undefined;
215
- }
216
- return getDurationString(elapsed, useFullTimeWords);
217
- }
218
- renderStatus(session, template) {
219
- const getStatus = (session) => {
220
- let timeLabel;
221
- if (session.status === ChatSessionStatus.InProgress && session.timing.inProgressTime) {
222
- timeLabel = this.toDuration(session.timing.inProgressTime, Date.now(), false);
223
- }
224
- if (!timeLabel) {
225
- timeLabel = fromNow(session.timing.endTime || session.timing.startTime);
226
- }
227
- return `${session.providerLabel} • ${timeLabel}`;
228
- };
229
- template.status.textContent = getStatus(session.element);
230
- const timer = template.elementDisposable.add(( new IntervalTimer()));
231
- timer.cancelAndSet(() => template.status.textContent = getStatus(session.element), session.element.status === ChatSessionStatus.InProgress ? 1000 : 60 * 1000 );
232
- }
233
- renderHover(session, template) {
234
- template.elementDisposable.add(this.hoverService.setupDelayedHover(template.element, () => ({
235
- content: this.buildTooltip(session.element),
236
- style: HoverStyle.Pointer,
237
- position: {
238
- hoverPosition: this.options.getHoverPosition()
239
- }
240
- }), { groupId: 'agent.sessions' }));
241
- }
242
- buildTooltip(session) {
243
- const lines = [];
244
- lines.push(`**${session.label}**`);
245
- if (session.tooltip) {
246
- const tooltip = typeof session.tooltip === 'string' ? session.tooltip : session.tooltip.value;
247
- lines.push(tooltip);
248
- }
249
- else {
250
- if (session.description) {
251
- const description = typeof session.description === 'string' ? session.description : session.description.value;
252
- lines.push(description);
253
- }
254
- if (session.badge) {
255
- const badge = typeof session.badge === 'string' ? session.badge : session.badge.value;
256
- lines.push(badge);
257
- }
258
- }
259
- const details = [];
260
- details.push(toStatusLabel(session.status));
261
- details.push(session.providerLabel);
262
- if (session.timing.finishedOrFailedTime && session.timing.inProgressTime) {
263
- const duration = this.toDuration(session.timing.inProgressTime, session.timing.finishedOrFailedTime, true);
264
- if (duration) {
265
- details.push(duration);
266
- }
267
- }
268
- else {
269
- details.push(fromNow(session.timing.startTime, true, true));
270
- }
271
- lines.push(details.join(' • '));
272
- const diff = getAgentChangesSummary(session.changes);
273
- if (diff && hasValidDiff(session.changes)) {
274
- const diffParts = [];
275
- if (diff.files > 0) {
276
- diffParts.push(diff.files === 1 ? ( localize(4917, "1 file")) : ( localize(4918, "{0} files", diff.files)));
277
- }
278
- if (diff.insertions > 0) {
279
- diffParts.push(`+${diff.insertions}`);
280
- }
281
- if (diff.deletions > 0) {
282
- diffParts.push(`-${diff.deletions}`);
283
- }
284
- if (diffParts.length > 0) {
285
- lines.push(`$(diff) ${diffParts.join(', ')}`);
286
- }
287
- }
288
- if (session.isArchived()) {
289
- lines.push(`$(archive) ${( localize(4919, "Archived"))}`);
290
- }
291
- return ( new MarkdownString(lines.join('\n\n'), { supportThemeIcons: true }));
292
- }
293
- renderCompressedElements(node, index, templateData, details) {
294
- throw ( new Error('Should never happen since session is incompressible'));
295
- }
296
- disposeElement(element, index, template, details) {
297
- template.elementDisposable.clear();
298
- }
299
- disposeTemplate(templateData) {
300
- templateData.disposables.dispose();
301
- }
302
- };
303
- AgentSessionRenderer = AgentSessionRenderer_1 = ( __decorate([
304
- ( __param(1, IMarkdownRendererService)),
305
- ( __param(2, IProductService)),
306
- ( __param(3, IHoverService)),
307
- ( __param(4, IInstantiationService)),
308
- ( __param(5, IContextKeyService))
309
- ], AgentSessionRenderer));
310
- function toStatusLabel(status) {
311
- let statusLabel;
312
- switch (status) {
313
- case ChatSessionStatus.NeedsInput:
314
- statusLabel = ( localize(4920, "Needs Input"));
315
- break;
316
- case ChatSessionStatus.InProgress:
317
- statusLabel = ( localize(4921, "In Progress"));
318
- break;
319
- case ChatSessionStatus.Failed:
320
- statusLabel = ( localize(4922, "Failed"));
321
- break;
322
- default:
323
- statusLabel = ( localize(4923, "Completed"));
324
- }
325
- return statusLabel;
326
- }
327
- let AgentSessionSectionRenderer = class AgentSessionSectionRenderer {
328
- static { AgentSessionSectionRenderer_1 = this; }
329
- static { this.TEMPLATE_ID = 'agent-session-section'; }
330
- constructor(instantiationService, contextKeyService) {
331
- this.instantiationService = instantiationService;
332
- this.contextKeyService = contextKeyService;
333
- this.templateId = AgentSessionSectionRenderer_1.TEMPLATE_ID;
334
- }
335
- renderTemplate(container) {
336
- const disposables = ( new DisposableStore());
337
- const elements = h('div.agent-session-section@container', [
338
- h('span.agent-session-section-label@label'),
339
- h('div.agent-session-section-toolbar@toolbar')
340
- ]);
341
- const contextKeyService = disposables.add(this.contextKeyService.createScoped(elements.container));
342
- const scopedInstantiationService = disposables.add(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyService]))));
343
- const toolbar = disposables.add(scopedInstantiationService.createInstance(MenuWorkbenchToolBar, elements.toolbar, MenuId.AgentSessionSectionToolbar, {
344
- menuOptions: { shouldForwardArgs: true },
345
- }));
346
- container.appendChild(elements.container);
347
- return {
348
- container: elements.container,
349
- label: elements.label,
350
- toolbar,
351
- contextKeyService,
352
- disposables
353
- };
354
- }
355
- renderElement(element, index, template, details) {
356
- template.label.textContent = element.element.label;
357
- ChatContextKeys.agentSessionSection.bindTo(template.contextKeyService).set(element.element.section);
358
- template.toolbar.context = element.element;
359
- }
360
- renderCompressedElements(node, index, templateData, details) {
361
- throw ( new Error('Should never happen since section header is incompressible'));
362
- }
363
- disposeElement(element, index, template, details) {
364
- }
365
- disposeTemplate(templateData) {
366
- templateData.disposables.dispose();
367
- }
368
- };
369
- AgentSessionSectionRenderer = AgentSessionSectionRenderer_1 = ( __decorate([
370
- ( __param(0, IInstantiationService)),
371
- ( __param(1, IContextKeyService))
372
- ], AgentSessionSectionRenderer));
373
- class AgentSessionsListDelegate {
374
- static { this.ITEM_HEIGHT = 52; }
375
- static { this.SECTION_HEIGHT = 26; }
376
- getHeight(element) {
377
- if (isAgentSessionSection(element)) {
378
- return AgentSessionsListDelegate.SECTION_HEIGHT;
379
- }
380
- return AgentSessionsListDelegate.ITEM_HEIGHT;
381
- }
382
- getTemplateId(element) {
383
- if (isAgentSessionSection(element)) {
384
- return AgentSessionSectionRenderer.TEMPLATE_ID;
385
- }
386
- return AgentSessionRenderer.TEMPLATE_ID;
387
- }
388
- }
389
- class AgentSessionsAccessibilityProvider {
390
- getWidgetAriaLabel() {
391
- return localize(4924, "Agent Sessions");
392
- }
393
- getAriaLabel(element) {
394
- if (isAgentSessionSection(element)) {
395
- return localize(4925, "{0} sessions section", element.label);
396
- }
397
- return localize(
398
- 4926,
399
- "{0} session {1} ({2}), created {3}",
400
- element.providerLabel,
401
- element.label,
402
- toStatusLabel(element.status),
403
- ( new Date(element.timing.startTime)).toLocaleString()
404
- );
405
- }
406
- }
407
- class AgentSessionsDataSource {
408
- constructor(filter, sorter) {
409
- this.filter = filter;
410
- this.sorter = sorter;
411
- }
412
- hasChildren(element) {
413
- if (isAgentSessionsModel(element)) {
414
- return true;
415
- }
416
- else if (isAgentSessionSection(element)) {
417
- return element.sessions.length > 0;
418
- }
419
- else {
420
- return false;
421
- }
422
- }
423
- getChildren(element) {
424
- if (isAgentSessionsModel(element)) {
425
- let filteredSessions = element.sessions.filter(session => !this.filter?.exclude(session));
426
- const limitResultsCount = this.filter?.limitResults?.();
427
- if (!this.filter?.groupResults?.() || typeof limitResultsCount === 'number') {
428
- filteredSessions.sort(this.sorter.compare.bind(this.sorter));
429
- }
430
- if (typeof limitResultsCount === 'number') {
431
- filteredSessions = filteredSessions.slice(0, limitResultsCount);
432
- }
433
- this.filter?.notifyResults?.(filteredSessions.length);
434
- if (this.filter?.groupResults?.()) {
435
- return this.groupSessionsIntoSections(filteredSessions);
436
- }
437
- return filteredSessions;
438
- }
439
- else if (isAgentSessionSection(element)) {
440
- return element.sessions;
441
- }
442
- else {
443
- return [];
444
- }
445
- }
446
- groupSessionsIntoSections(sessions) {
447
- const result = [];
448
- const sortedSessions = sessions.sort(this.sorter.compare.bind(this.sorter));
449
- const groupedSessions = groupAgentSessions(sortedSessions);
450
- for (const { sessions, section, label } of ( groupedSessions.values())) {
451
- if (sessions.length === 0) {
452
- continue;
453
- }
454
- result.push({ section, label, sessions });
455
- }
456
- return result;
457
- }
458
- }
459
- const DAY_THRESHOLD = 24 * 60 * 60 * 1000;
460
- const WEEK_THRESHOLD = 7 * DAY_THRESHOLD;
461
- const AgentSessionSectionLabels = {
462
- [AgentSessionSection.InProgress]: ( localize(4927, "In Progress")),
463
- [AgentSessionSection.Today]: ( localize(4928, "Today")),
464
- [AgentSessionSection.Yesterday]: ( localize(4929, "Yesterday")),
465
- [AgentSessionSection.Week]: ( localize(4930, "Last Week")),
466
- [AgentSessionSection.Older]: ( localize(4931, "Older")),
467
- [AgentSessionSection.Archived]: ( localize(4932, "Archived")),
468
- };
469
- function groupAgentSessions(sessions) {
470
- const now = Date.now();
471
- const startOfToday = ( new Date(now)).setHours(0, 0, 0, 0);
472
- const startOfYesterday = startOfToday - DAY_THRESHOLD;
473
- const weekThreshold = now - WEEK_THRESHOLD;
474
- const inProgressSessions = [];
475
- const todaySessions = [];
476
- const yesterdaySessions = [];
477
- const weekSessions = [];
478
- const olderSessions = [];
479
- const archivedSessions = [];
480
- for (const session of sessions) {
481
- if (isSessionInProgressStatus(session.status)) {
482
- inProgressSessions.push(session);
483
- }
484
- else if (session.isArchived()) {
485
- archivedSessions.push(session);
486
- }
487
- else {
488
- const sessionTime = session.timing.endTime || session.timing.startTime;
489
- if (sessionTime >= startOfToday) {
490
- todaySessions.push(session);
491
- }
492
- else if (sessionTime >= startOfYesterday) {
493
- yesterdaySessions.push(session);
494
- }
495
- else if (sessionTime >= weekThreshold) {
496
- weekSessions.push(session);
497
- }
498
- else {
499
- olderSessions.push(session);
500
- }
501
- }
502
- }
503
- return ( new Map([
504
- [AgentSessionSection.InProgress, { section: AgentSessionSection.InProgress, label: AgentSessionSectionLabels[AgentSessionSection.InProgress], sessions: inProgressSessions }],
505
- [AgentSessionSection.Today, { section: AgentSessionSection.Today, label: AgentSessionSectionLabels[AgentSessionSection.Today], sessions: todaySessions }],
506
- [AgentSessionSection.Yesterday, { section: AgentSessionSection.Yesterday, label: AgentSessionSectionLabels[AgentSessionSection.Yesterday], sessions: yesterdaySessions }],
507
- [AgentSessionSection.Week, { section: AgentSessionSection.Week, label: AgentSessionSectionLabels[AgentSessionSection.Week], sessions: weekSessions }],
508
- [AgentSessionSection.Older, { section: AgentSessionSection.Older, label: AgentSessionSectionLabels[AgentSessionSection.Older], sessions: olderSessions }],
509
- [AgentSessionSection.Archived, { section: AgentSessionSection.Archived, label: AgentSessionSectionLabels[AgentSessionSection.Archived], sessions: archivedSessions }],
510
- ]));
511
- }
512
- class AgentSessionsIdentityProvider {
513
- getId(element) {
514
- if (isAgentSessionSection(element)) {
515
- return `section-${element.section}`;
516
- }
517
- if (isAgentSession(element)) {
518
- return ( element.resource.toString());
519
- }
520
- return 'agent-sessions-id';
521
- }
522
- }
523
- class AgentSessionsCompressionDelegate {
524
- isIncompressible(element) {
525
- return true;
526
- }
527
- }
528
- class AgentSessionsSorter {
529
- constructor(options) {
530
- this.options = options;
531
- }
532
- compare(sessionA, sessionB) {
533
- const aNeedsInput = sessionA.status === ChatSessionStatus.NeedsInput;
534
- const bNeedsInput = sessionB.status === ChatSessionStatus.NeedsInput;
535
- if (aNeedsInput && !bNeedsInput) {
536
- return -1;
537
- }
538
- if (!aNeedsInput && bNeedsInput) {
539
- return 1;
540
- }
541
- const aInProgress = sessionA.status === ChatSessionStatus.InProgress;
542
- const bInProgress = sessionB.status === ChatSessionStatus.InProgress;
543
- if (aInProgress && !bInProgress) {
544
- return -1;
545
- }
546
- if (!aInProgress && bInProgress) {
547
- return 1;
548
- }
549
- const aArchived = sessionA.isArchived();
550
- const bArchived = sessionB.isArchived();
551
- if (!aArchived && bArchived) {
552
- return -1;
553
- }
554
- if (aArchived && !bArchived) {
555
- return 1;
556
- }
557
- const override = this.options?.overrideCompare?.(sessionA, sessionB);
558
- if (typeof override === 'number') {
559
- return override;
560
- }
561
- return (sessionB.timing.endTime || sessionB.timing.startTime) - (sessionA.timing.endTime || sessionA.timing.startTime);
562
- }
563
- }
564
- class AgentSessionsKeyboardNavigationLabelProvider {
565
- getKeyboardNavigationLabel(element) {
566
- if (isAgentSessionSection(element)) {
567
- return element.label;
568
- }
569
- return element.label;
570
- }
571
- getCompressedNodeKeyboardNavigationLabel(elements) {
572
- return undefined;
573
- }
574
- }
575
- let AgentSessionsDragAndDrop = class AgentSessionsDragAndDrop extends Disposable {
576
- constructor(instantiationService) {
577
- super();
578
- this.instantiationService = instantiationService;
579
- }
580
- onDragStart(data, originalEvent) {
581
- const elements = data.getData().filter(e => isAgentSession(e));
582
- const uris = coalesce(( elements.map(e => e.resource)));
583
- this.instantiationService.invokeFunction(accessor => fillEditorsDragData(accessor, uris, originalEvent));
584
- }
585
- getDragURI(element) {
586
- if (isAgentSessionSection(element)) {
587
- return null;
588
- }
589
- return ( element.resource.toString());
590
- }
591
- getDragLabel(elements, originalEvent) {
592
- const sessions = elements.filter(e => isAgentSession(e));
593
- if (sessions.length === 1) {
594
- return sessions[0].label;
595
- }
596
- return localize(4933, "{0} agent sessions", sessions.length);
597
- }
598
- onDragOver(data, targetElement, targetIndex, targetSector, originalEvent) {
599
- return false;
600
- }
601
- drop(data, targetElement, targetIndex, targetSector, originalEvent) { }
602
- };
603
- AgentSessionsDragAndDrop = ( __decorate([
604
- ( __param(0, IInstantiationService))
605
- ], AgentSessionsDragAndDrop));
606
-
607
- export { AgentSessionRenderer, AgentSessionSectionLabels, AgentSessionSectionRenderer, AgentSessionsAccessibilityProvider, AgentSessionsCompressionDelegate, AgentSessionsDataSource, AgentSessionsDragAndDrop, AgentSessionsIdentityProvider, AgentSessionsKeyboardNavigationLabelProvider, AgentSessionsListDelegate, AgentSessionsSorter, groupAgentSessions };