@codingame/monaco-vscode-chat-service-override 23.3.0 → 24.1.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 (273) hide show
  1. package/index.js +13 -10
  2. package/package.json +5 -41
  3. package/vscode/src/vs/platform/domWidget/browser/domWidget.d.ts +52 -0
  4. package/vscode/src/vs/platform/domWidget/browser/domWidget.js +53 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +10 -10
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +61 -50
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.d.ts +18 -0
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +152 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +14 -14
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +37 -28
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +9 -9
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +3 -5
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +7 -11
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +10 -10
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +12 -14
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +21 -18
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +27 -18
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +4 -4
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.d.ts +1 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +11 -11
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +6 -27
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +44 -208
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +17 -17
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +1 -1
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +23 -24
  30. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.d.ts +1 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +140 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +85 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +358 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +55 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +222 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +37 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +241 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +13 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +27 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +11 -19
  41. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +67 -230
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +65 -33
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +186 -62
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +23 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +140 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +2 -7
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +115 -29
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +389 -166
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +9 -6
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +22 -16
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.d.ts +1 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +8 -8
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.d.ts +10 -3
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.js +63 -3
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +7 -3
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +14 -5
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +173 -32
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +1 -0
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +66 -17
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +32 -29
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +12 -12
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -2
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +9 -6
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +2 -2
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +6 -4
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +4 -4
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +8 -18
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +1 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +12 -1
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +5 -6
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +15 -24
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +13 -11
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +66 -50
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +3 -2
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +6 -5
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +3 -1
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +7 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +2 -2
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +6 -7
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.d.ts +3 -3
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +4 -4
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +2 -2
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +1 -1
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +15 -4
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +1 -1
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +3 -4
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +30 -37
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +13 -10
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +23 -32
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -9
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -1
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +20 -19
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +47 -15
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +270 -143
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +3 -2
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +310 -170
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -2
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +1 -1
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +42 -42
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +3 -1
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +35 -25
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +4 -4
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +1 -4
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +22 -26
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +18 -14
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +80 -72
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +2 -8
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +48 -77
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +16 -17
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +257 -77
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +55 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +34 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/{chatSetup.d.ts → chatSetup/chatSetupContributions.d.ts} +4 -11
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +622 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +53 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +359 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +89 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +667 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +37 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +260 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/chatSetup.css +4 -6
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.d.ts +4 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +21 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +55 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatus.js → chatStatus/chatStatusDashboard.js} +193 -325
  132. package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatus.d.ts → chatStatus/chatStatusEntry.d.ts} +1 -1
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +190 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusItemService.d.ts → chatStatus/chatStatusItemService.d.ts} +1 -1
  135. package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatStatus/media}/chatStatus.css +22 -1
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusWidget.d.ts +25 -0
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusWidget.js +108 -0
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatTerminalOutputAccessibleView.d.ts +10 -0
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatTerminalOutputAccessibleView.js +34 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +1 -1
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +57 -18
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +478 -146
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewTitleControl.d.ts +43 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewTitleControl.js +204 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidgetService.d.ts +44 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidgetService.js +187 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
  148. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +108 -62
  149. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
  150. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
  151. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.d.ts +1 -1
  152. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js +37 -32
  153. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +37 -20
  154. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +232 -97
  155. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatusWidget.css +57 -0
  156. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewPane.css +142 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewTitleControl.css +39 -0
  158. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +51 -35
  159. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +1 -1
  160. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +5 -4
  161. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +2 -2
  162. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +5 -5
  163. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +12 -12
  164. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +19 -21
  165. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.d.ts +1 -1
  166. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +8 -8
  167. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
  168. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
  169. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +1 -1
  170. package/vscode/src/vs/workbench/contrib/chat/common/chatModelStore.d.ts +49 -0
  171. package/vscode/src/vs/workbench/contrib/chat/common/chatModelStore.js +100 -0
  172. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +1 -0
  173. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +2 -1
  174. package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +3 -4
  175. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +41 -15
  176. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +208 -162
  177. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +3 -3
  178. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +15 -7
  179. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +61 -7
  180. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +3 -2
  181. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +2 -2
  182. package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +1 -1
  183. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +10 -10
  184. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
  185. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +3 -3
  186. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +5 -1
  187. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +60 -43
  188. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
  189. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +27 -4
  190. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +37 -47
  191. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +5 -3
  192. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +120 -87
  193. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
  194. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +49 -42
  195. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +293 -187
  196. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -5
  197. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +43 -9
  198. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +2 -0
  199. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +48 -29
  200. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
  201. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
  202. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -13
  203. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
  204. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +2 -2
  205. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +3 -3
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +36 -41
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
  208. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +2 -2
  209. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
  210. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  211. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js +1 -1
  212. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +18 -18
  213. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
  214. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +142 -38
  215. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.d.ts +1 -1
  216. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +3 -7
  217. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
  218. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +19 -2
  219. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +78 -6
  220. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +7 -11
  221. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +26 -44
  222. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +3 -3
  223. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +1 -1
  224. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +9 -0
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +0 -1
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +23 -17
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +1 -1
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +4 -2
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +2 -0
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +26 -5
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +3 -1
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +32 -4
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +15 -29
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +10 -7
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +12 -0
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +3 -1
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +38 -19
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +1 -0
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +32 -7
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +5 -4
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -3
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -3
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -0
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +128 -62
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +2 -2
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +12 -2
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +5 -2
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +68 -22
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +20 -22
  250. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +13 -12
  251. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +20 -19
  252. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
  253. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  254. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +12 -0
  255. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +72 -0
  256. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +1 -2
  257. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +5 -17
  258. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.d.ts +0 -53
  259. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.js +0 -154
  260. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +0 -7
  261. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +0 -13
  262. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.d.ts +0 -25
  263. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.js +0 -135
  264. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.d.ts +0 -35
  265. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +0 -216
  266. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +0 -1617
  267. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +0 -44
  268. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +0 -313
  269. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/apple-dark.svg +0 -0
  270. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/apple-light.svg +0 -0
  271. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/github.svg +0 -0
  272. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/google.svg +0 -0
  273. /package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusItemService.js → chatStatus/chatStatusItemService.js} +0 -0
@@ -2,19 +2,11 @@
2
2
  import { registerCss } from '@codingame/monaco-vscode-api/css';
3
3
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
4
  import * as agentsessionsview from './media/agentsessionsview.css';
5
- import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
6
- import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
7
- import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
5
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
8
6
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
9
- import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
10
- import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
11
- import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
12
- import { ViewPane, ViewAction } from '@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane';
13
- import { ViewPaneContainer } from '@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
14
- import { Extensions, ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
7
+ import { ViewPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/views/viewPane';
15
8
  import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
16
9
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
17
- import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
18
10
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
19
11
  import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
20
12
  import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
@@ -22,168 +14,64 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
22
14
  import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
23
15
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
24
16
  import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
25
- import { WorkbenchCompressibleAsyncDataTree } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
26
17
  import { append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
27
- import { isLocalAgentSessionItem, AgentSessionsViewModel } from './agentSessionViewModel.js';
28
- import { AgentSessionsListDelegate, AgentSessionsCompressionDelegate, AgentSessionRenderer, AgentSessionsDataSource, AgentSessionsSorter, AgentSessionsKeyboardNavigationLabelProvider, AgentSessionsIdentityProvider, AgentSessionsDragAndDrop, AgentSessionsAccessibilityProvider } from './agentSessionsViewer.js';
29
18
  import { defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
30
19
  import { ButtonWithDropdown } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
31
20
  import { toAction, Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
32
- import { MenuId, registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
21
+ import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
33
22
  import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
34
23
  import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
35
24
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
36
- import { findExistingChatEditorByUri, getSessionItemContextOverlay, NEW_CHAT_SESSION_ACTION_ID } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/chatSessions/common';
37
- import { ACTION_ID_OPEN_CHAT } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
25
+ import { NEW_CHAT_SESSION_ACTION_ID } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatSessions/common';
26
+ import { ACTION_ID_OPEN_CHAT } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
38
27
  import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
39
- import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
40
- import { assertReturnsDefined, upcast } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
41
- import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
42
28
  import { DeferredPromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
43
29
  import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
44
30
  import { MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
45
- import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
46
31
  import { getActionBarActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
47
- import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
48
- import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
49
- import { AGENT_SESSIONS_VIEW_ID, AgentSessionProviders, AGENT_SESSIONS_VIEW_CONTAINER_ID } from './agentSessions.js';
50
- import { TreeFindMode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/abstractTree';
32
+ import { AgentSessionProviders } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
33
+ import { AgentSessionsFilter } from './agentSessionsFilter.js';
34
+ import { AgentSessionsControl } from './agentSessionsControl.js';
35
+ import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
36
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
51
37
 
52
38
  registerCss(agentsessionsview);
53
39
  let AgentSessionsView = class AgentSessionsView extends ViewPane {
54
- constructor(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService, chatSessionsService, commandService, progressService, editorService, editorGroupsService, chatService, menuService, chatWidgetService) {
55
- super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
40
+ constructor(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService, chatSessionsService, commandService, progressService, menuService, agentSessionsService, telemetryService) {
41
+ super({ ...options, titleMenuId: MenuId.AgentSessionsViewTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
56
42
  this.chatSessionsService = chatSessionsService;
57
43
  this.commandService = commandService;
58
44
  this.progressService = progressService;
59
- this.editorService = editorService;
60
- this.editorGroupsService = editorGroupsService;
61
- this.chatService = chatService;
62
45
  this.menuService = menuService;
63
- this.chatWidgetService = chatWidgetService;
64
- this.registerActions();
65
- }
66
- renderBody(container) {
67
- super.renderBody(container);
68
- container.classList.add('agent-sessions-view');
69
- this.createNewSessionButton(container);
70
- this.createList(container);
46
+ this.agentSessionsService = agentSessionsService;
47
+ this.telemetryService = telemetryService;
71
48
  this.registerListeners();
72
49
  }
73
50
  registerListeners() {
74
- const list = assertReturnsDefined(this.list);
75
- this._register(this.onDidChangeBodyVisibility(visible => {
76
- if (!visible || this.sessionsViewModel) {
77
- return;
78
- }
79
- if (!this.sessionsViewModel) {
80
- this.createViewModel();
81
- }
82
- else {
83
- this.list?.updateChildren();
84
- }
85
- }));
86
- this._register(list.onDidOpen(e => {
87
- this.openAgentSession(e);
88
- }));
89
- this._register(list.onMouseDblClick(({ element }) => {
90
- if (element === null) {
91
- this.commandService.executeCommand(ACTION_ID_OPEN_CHAT);
92
- }
93
- }));
94
- this._register(list.onContextMenu((e) => {
95
- this.showContextMenu(e);
51
+ const sessionsModel = this.agentSessionsService.model;
52
+ const didResolveDisposable = this._register(( new MutableDisposable()));
53
+ this._register(sessionsModel.onWillResolve(() => {
54
+ const didResolve = ( new DeferredPromise());
55
+ didResolveDisposable.value = Event.once(sessionsModel.onDidResolve)(() => didResolve.complete());
56
+ this.progressService.withProgress({
57
+ location: this.id,
58
+ title: ( localize(4859, 'Refreshing agent sessions...')),
59
+ delay: 500
60
+ }, () => didResolve.p);
96
61
  }));
97
62
  }
98
- async openAgentSession(e) {
99
- const session = e.element;
100
- if (!session) {
101
- return;
102
- }
103
- const existingSessionEditor = findExistingChatEditorByUri(session.resource, this.editorGroupsService);
104
- if (existingSessionEditor) {
105
- await existingSessionEditor.group.openEditor(existingSessionEditor.editor, e.editorOptions);
106
- return;
107
- }
108
- let sessionOptions;
109
- if (isLocalAgentSessionItem(session)) {
110
- sessionOptions = {};
111
- }
112
- else {
113
- sessionOptions = { title: { preferred: session.label } };
114
- }
115
- sessionOptions.ignoreInView = true;
116
- await this.editorService.openEditor({
117
- resource: session.resource,
118
- options: upcast({
119
- ...sessionOptions,
120
- title: { preferred: session.label },
121
- ...e.editorOptions
122
- })
123
- });
124
- }
125
- showContextMenu({ element: session, anchor }) {
126
- if (!session) {
127
- return;
128
- }
129
- const menu = this.menuService.createMenu(MenuId.ChatSessionsMenu, this.contextKeyService.createOverlay(getSessionItemContextOverlay({
130
- id: ( session.resource.toString()),
131
- ...session
132
- }, session.provider, this.chatWidgetService, this.chatService, this.editorGroupsService)));
133
- const marshalledSession = { session, $mid: MarshalledId.ChatSessionContext };
134
- const { secondary } = getActionBarActions(menu.getActions({ arg: marshalledSession, shouldForwardArgs: true }), 'inline');
135
- this.contextMenuService.showContextMenu({
136
- getActions: () => secondary,
137
- getAnchor: () => anchor,
138
- getActionsContext: () => marshalledSession,
139
- });
140
- menu.dispose();
141
- }
142
- registerActions() {
143
- this._register(registerAction2(class extends ViewAction {
144
- constructor() {
145
- super({
146
- id: 'agentSessionsView.refresh',
147
- title: ( localize2(4828, "Refresh Agent Sessions")),
148
- icon: Codicon.refresh,
149
- menu: {
150
- id: MenuId.ViewTitle,
151
- when: ( ContextKeyExpr.equals('view', AGENT_SESSIONS_VIEW_ID)),
152
- group: 'navigation',
153
- order: 1
154
- },
155
- viewId: AGENT_SESSIONS_VIEW_ID
156
- });
157
- }
158
- runInView(accessor, view) {
159
- view.sessionsViewModel?.resolve(undefined);
160
- }
161
- }));
162
- this._register(registerAction2(class extends ViewAction {
163
- constructor() {
164
- super({
165
- id: 'agentSessionsView.find',
166
- title: ( localize2(4829, "Find Agent Session")),
167
- icon: Codicon.search,
168
- menu: {
169
- id: MenuId.ViewTitle,
170
- when: ( ContextKeyExpr.equals('view', AGENT_SESSIONS_VIEW_ID)),
171
- group: 'navigation',
172
- order: 2
173
- },
174
- viewId: AGENT_SESSIONS_VIEW_ID
175
- });
176
- }
177
- runInView(accessor, view) {
178
- view.list?.openFind();
179
- }
180
- }));
63
+ renderBody(container) {
64
+ super.renderBody(container);
65
+ this.telemetryService.publicLog2('agentSessionsViewPaneOpened');
66
+ container.classList.add('agent-sessions-view');
67
+ this.createNewSessionButton(container);
68
+ this.createSessionsControl(container);
181
69
  }
182
70
  createNewSessionButton(container) {
183
71
  this.newSessionContainer = append(container, $('.agent-sessions-new-session-container'));
184
72
  const newSessionButton = this._register(( new ButtonWithDropdown(this.newSessionContainer, {
185
- title: ( localize(4830, "New Session")),
186
- ariaLabel: ( localize(4831, "New Session")),
73
+ title: ( localize(4860, "New Session")),
74
+ ariaLabel: ( localize(4861, "New Session")),
187
75
  contextMenuProvider: this.contextMenuService,
188
76
  actions: {
189
77
  getActions: () => {
@@ -193,24 +81,24 @@ let AgentSessionsView = class AgentSessionsView extends ViewPane {
193
81
  addPrimaryActionToDropdown: false,
194
82
  ...defaultButtonStyles,
195
83
  })));
196
- newSessionButton.label = ( localize(4830, "New Session"));
84
+ newSessionButton.label = ( localize(4860, "New Session"));
197
85
  this._register(newSessionButton.onDidClick(() => this.commandService.executeCommand(ACTION_ID_OPEN_CHAT)));
198
86
  }
199
87
  getNewSessionActions() {
200
88
  const actions = [];
201
89
  actions.push(toAction({
202
90
  id: 'newChatSession.default',
203
- label: ( localize(4832, "New Local Session")),
91
+ label: ( localize(4862, "New Local Session")),
204
92
  run: () => this.commandService.executeCommand(ACTION_ID_OPEN_CHAT)
205
93
  }));
206
94
  actions.push(toAction({
207
95
  id: 'newChatSessionFromProvider.background',
208
- label: ( localize(4833, "New Background Session")),
96
+ label: ( localize(4863, "New Background Session")),
209
97
  run: () => this.commandService.executeCommand(`${NEW_CHAT_SESSION_ACTION_ID}.${AgentSessionProviders.Background}`)
210
98
  }));
211
99
  actions.push(toAction({
212
100
  id: 'newChatSessionFromProvider.cloud',
213
- label: ( localize(4834, "New Cloud Session")),
101
+ label: ( localize(4864, "New Cloud Session")),
214
102
  run: () => this.commandService.executeCommand(`${NEW_CHAT_SESSION_ACTION_ID}.${AgentSessionProviders.Cloud}`)
215
103
  }));
216
104
  let addedSeparator = false;
@@ -222,8 +110,8 @@ let AgentSessionsView = class AgentSessionsView extends ViewPane {
222
110
  actions.push(( new Separator()));
223
111
  addedSeparator = true;
224
112
  }
225
- const menuActions = this.menuService.getMenuActions(MenuId.ChatSessionsCreateSubMenu, this.scopedContextKeyService.createOverlay([
226
- [ChatContextKeys.sessionType.key, provider.type]
113
+ const menuActions = this.menuService.getMenuActions(MenuId.AgentSessionsCreateSubMenu, this.scopedContextKeyService.createOverlay([
114
+ [ChatContextKeys.agentSessionType.key, provider.type]
227
115
  ]));
228
116
  const primaryActions = getActionBarActions(menuActions, () => true).primary;
229
117
  if (primaryActions.length > 0) {
@@ -232,66 +120,47 @@ let AgentSessionsView = class AgentSessionsView extends ViewPane {
232
120
  else {
233
121
  actions.push(toAction({
234
122
  id: `newChatSessionFromProvider.${provider.type}`,
235
- label: ( localize(4835, "New {0}", provider.displayName)),
123
+ label: ( localize(4865, "New {0}", provider.displayName)),
236
124
  run: () => this.commandService.executeCommand(`${NEW_CHAT_SESSION_ACTION_ID}.${provider.type}`)
237
125
  }));
238
126
  }
239
127
  }
240
- actions.push(( new Separator()));
241
- actions.push(toAction({
242
- id: 'install-extensions',
243
- label: ( localize(4836, "Install Chat Extensions...")),
244
- run: () => this.commandService.executeCommand('chat.sessions.gettingStarted')
245
- }));
128
+ const installMenuActions = this.menuService.getMenuActions(MenuId.AgentSessionsInstallMenu, this.scopedContextKeyService, { shouldForwardArgs: true });
129
+ const installActionBar = getActionBarActions(installMenuActions, () => true);
130
+ if (installActionBar.primary.length > 0) {
131
+ actions.push(( new Separator()));
132
+ actions.push(...installActionBar.primary);
133
+ }
246
134
  return actions;
247
135
  }
248
- createList(container) {
249
- this.listContainer = append(container, $('.agent-sessions-viewer'));
250
- this.list = this._register(this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'AgentSessionsView', this.listContainer, ( new AgentSessionsListDelegate()), ( new AgentSessionsCompressionDelegate()), [
251
- this.instantiationService.createInstance(AgentSessionRenderer)
252
- ], ( new AgentSessionsDataSource()), {
253
- accessibilityProvider: ( new AgentSessionsAccessibilityProvider()),
254
- dnd: this.instantiationService.createInstance(AgentSessionsDragAndDrop),
255
- identityProvider: ( new AgentSessionsIdentityProvider()),
256
- horizontalScrolling: false,
257
- multipleSelectionSupport: false,
258
- findWidgetEnabled: true,
259
- defaultFindMode: TreeFindMode.Filter,
260
- keyboardNavigationLabelProvider: ( new AgentSessionsKeyboardNavigationLabelProvider()),
261
- sorter: ( new AgentSessionsSorter()),
262
- paddingBottom: AgentSessionsListDelegate.ITEM_HEIGHT
136
+ createSessionsControl(container) {
137
+ const sessionsFilter = this._register(this.instantiationService.createInstance(AgentSessionsFilter, {
138
+ filterMenuId: MenuId.AgentSessionsFilterSubMenu,
263
139
  }));
264
- }
265
- createViewModel() {
266
- const sessionsViewModel = this.sessionsViewModel = this._register(this.instantiationService.createInstance(AgentSessionsViewModel));
267
- this.list?.setInput(sessionsViewModel);
268
- this._register(sessionsViewModel.onDidChangeSessions(() => {
269
- if (this.isBodyVisible()) {
270
- this.list?.updateChildren();
271
- }
140
+ this.sessionsControl = this._register(this.instantiationService.createInstance(AgentSessionsControl, container, {
141
+ filter: sessionsFilter,
142
+ trackActiveEditor: true,
272
143
  }));
273
- const didResolveDisposable = this._register(( new MutableDisposable()));
274
- this._register(sessionsViewModel.onWillResolve(() => {
275
- const didResolve = ( new DeferredPromise());
276
- didResolveDisposable.value = Event.once(sessionsViewModel.onDidResolve)(() => didResolve.complete());
277
- this.progressService.withProgress({
278
- location: this.id,
279
- title: ( localize(4837, 'Refreshing agent sessions...')),
280
- delay: 500
281
- }, () => didResolve.p);
144
+ this.sessionsControl.setVisible(this.isBodyVisible());
145
+ this._register(this.onDidChangeBodyVisibility(visible => {
146
+ this.sessionsControl?.setVisible(visible);
282
147
  }));
283
148
  }
149
+ openFind() {
150
+ this.sessionsControl?.openFind();
151
+ }
152
+ refresh() {
153
+ this.sessionsControl?.refresh();
154
+ }
284
155
  layoutBody(height, width) {
285
156
  super.layoutBody(height, width);
286
- let treeHeight = height;
287
- treeHeight -= this.newSessionContainer?.offsetHeight ?? 0;
288
- this.list?.layout(treeHeight, width);
157
+ let sessionsControlHeight = height;
158
+ sessionsControlHeight -= this.newSessionContainer?.offsetHeight ?? 0;
159
+ this.sessionsControl?.layout(sessionsControlHeight, width);
289
160
  }
290
161
  focus() {
291
162
  super.focus();
292
- if (this.list?.getFocus().length) {
293
- this.list.domFocus();
294
- }
163
+ this.sessionsControl?.focus();
295
164
  }
296
165
  };
297
166
  AgentSessionsView = ( __decorate([
@@ -307,41 +176,9 @@ AgentSessionsView = ( __decorate([
307
176
  ( __param(10, IChatSessionsService)),
308
177
  ( __param(11, ICommandService)),
309
178
  ( __param(12, IProgressService)),
310
- ( __param(13, IEditorService)),
311
- ( __param(14, IEditorGroupsService)),
312
- ( __param(15, IChatService)),
313
- ( __param(16, IMenuService)),
314
- ( __param(17, IChatWidgetService))
179
+ ( __param(13, IMenuService)),
180
+ ( __param(14, IAgentSessionsService)),
181
+ ( __param(15, ITelemetryService))
315
182
  ], AgentSessionsView));
316
- const chatAgentsIcon = registerIcon('chat-sessions-icon', Codicon.commentDiscussionSparkle, 'Icon for Agent Sessions View');
317
- const AGENT_SESSIONS_VIEW_TITLE = ( localize2(4838, "Agent Sessions"));
318
- const agentSessionsViewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
319
- id: AGENT_SESSIONS_VIEW_CONTAINER_ID,
320
- title: AGENT_SESSIONS_VIEW_TITLE,
321
- icon: chatAgentsIcon,
322
- ctorDescriptor: ( new SyncDescriptor(
323
- ViewPaneContainer,
324
- [AGENT_SESSIONS_VIEW_CONTAINER_ID, { mergeViewWithContainerWhenSingleView: true }]
325
- )),
326
- storageId: AGENT_SESSIONS_VIEW_CONTAINER_ID,
327
- hideIfEmpty: true,
328
- order: 6,
329
- }, ViewContainerLocation.AuxiliaryBar);
330
- const agentSessionsViewDescriptor = {
331
- id: AGENT_SESSIONS_VIEW_ID,
332
- containerIcon: chatAgentsIcon,
333
- containerTitle: AGENT_SESSIONS_VIEW_TITLE.value,
334
- singleViewPaneContainerTitle: AGENT_SESSIONS_VIEW_TITLE.value,
335
- name: AGENT_SESSIONS_VIEW_TITLE,
336
- canToggleVisibility: false,
337
- canMoveView: true,
338
- openCommandActionDescriptor: {
339
- id: AGENT_SESSIONS_VIEW_ID,
340
- title: AGENT_SESSIONS_VIEW_TITLE
341
- },
342
- ctorDescriptor: ( new SyncDescriptor(AgentSessionsView)),
343
- when: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabled.negate()), ( ContextKeyExpr.equals(`config.${ChatConfiguration.AgentSessionsViewLocation}`, 'single-view'))))
344
- };
345
- ( Registry.as(Extensions.ViewsRegistry)).registerViews([agentSessionsViewDescriptor], agentSessionsViewContainer);
346
183
 
347
184
  export { AgentSessionsView };
@@ -5,7 +5,7 @@ import { ICompressedTreeNode } from "@codingame/monaco-vscode-api/vscode/vs/base
5
5
  import { ICompressibleKeyboardNavigationLabelProvider, ICompressibleTreeRenderer } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/objectTree";
6
6
  import { ITreeNode, ITreeElementRenderDetails, IAsyncDataSource, ITreeSorter, ITreeDragAndDrop, ITreeDragOverReaction } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/tree";
7
7
  import { Disposable, DisposableStore, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
8
- import { IAgentSessionViewModel, IAgentSessionsViewModel } from "./agentSessionViewModel.js";
8
+ import { IAgentSession, IAgentSessionsModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel";
9
9
  import { IconLabel } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabel";
10
10
  import { FuzzyScore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/filters";
11
11
  import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
@@ -13,73 +13,105 @@ import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform
13
13
  import { IDragAndDropData } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dnd";
14
14
  import { ListViewTargetSector } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/list/listView";
15
15
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
16
+ import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
16
17
  import { IWorkbenchLayoutService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service";
17
18
  import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
18
19
  import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
20
+ import { MenuWorkbenchToolBar } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar";
21
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
22
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
19
23
  interface IAgentSessionItemTemplate {
20
24
  readonly element: HTMLElement;
21
25
  readonly icon: HTMLElement;
22
26
  readonly title: IconLabel;
27
+ readonly titleToolbar: MenuWorkbenchToolBar;
28
+ readonly diffContainer: HTMLElement;
29
+ readonly diffFilesSpan: HTMLSpanElement;
30
+ readonly diffAddedSpan: HTMLSpanElement;
31
+ readonly diffRemovedSpan: HTMLSpanElement;
23
32
  readonly description: HTMLElement;
24
- readonly diffAdded: HTMLElement;
25
- readonly diffRemoved: HTMLElement;
26
33
  readonly status: HTMLElement;
34
+ readonly contextKeyService: IContextKeyService;
27
35
  readonly elementDisposable: DisposableStore;
28
36
  readonly disposables: IDisposable;
29
37
  }
30
- export declare class AgentSessionRenderer implements ICompressibleTreeRenderer<IAgentSessionViewModel, FuzzyScore, IAgentSessionItemTemplate> {
38
+ export declare class AgentSessionRenderer implements ICompressibleTreeRenderer<IAgentSession, FuzzyScore, IAgentSessionItemTemplate> {
31
39
  private readonly markdownRendererService;
32
40
  private readonly productService;
33
41
  private readonly layoutService;
34
42
  private readonly viewDescriptorService;
35
43
  private readonly hoverService;
44
+ private readonly instantiationService;
45
+ private readonly contextKeyService;
46
+ private readonly chatSessionsService;
36
47
  static readonly TEMPLATE_ID = "agent-session";
37
48
  readonly templateId = "agent-session";
38
- constructor(markdownRendererService: IMarkdownRendererService, productService: IProductService, layoutService: IWorkbenchLayoutService, viewDescriptorService: IViewDescriptorService, hoverService: IHoverService);
49
+ constructor(markdownRendererService: IMarkdownRendererService, productService: IProductService, layoutService: IWorkbenchLayoutService, viewDescriptorService: IViewDescriptorService, hoverService: IHoverService, instantiationService: IInstantiationService, contextKeyService: IContextKeyService, chatSessionsService: IChatSessionsService);
39
50
  renderTemplate(container: HTMLElement): IAgentSessionItemTemplate;
40
- renderElement(session: ITreeNode<IAgentSessionViewModel, FuzzyScore>, index: number, template: IAgentSessionItemTemplate, details?: ITreeElementRenderDetails): void;
41
- private renderHover;
51
+ renderElement(session: ITreeNode<IAgentSession, FuzzyScore>, index: number, template: IAgentSessionItemTemplate, details?: ITreeElementRenderDetails): void;
52
+ private renderDiff;
42
53
  private getIcon;
43
- private getStatus;
44
- renderCompressedElements(node: ITreeNode<ICompressedTreeNode<IAgentSessionViewModel>, FuzzyScore>, index: number, templateData: IAgentSessionItemTemplate, details?: ITreeElementRenderDetails): void;
45
- disposeElement(element: ITreeNode<IAgentSessionViewModel, FuzzyScore>, index: number, template: IAgentSessionItemTemplate, details?: ITreeElementRenderDetails): void;
54
+ private renderDescription;
55
+ private toDuration;
56
+ private renderStatus;
57
+ private renderHover;
58
+ renderCompressedElements(node: ITreeNode<ICompressedTreeNode<IAgentSession>, FuzzyScore>, index: number, templateData: IAgentSessionItemTemplate, details?: ITreeElementRenderDetails): void;
59
+ disposeElement(element: ITreeNode<IAgentSession, FuzzyScore>, index: number, template: IAgentSessionItemTemplate, details?: ITreeElementRenderDetails): void;
46
60
  disposeTemplate(templateData: IAgentSessionItemTemplate): void;
47
61
  }
48
- export declare class AgentSessionsListDelegate implements IListVirtualDelegate<IAgentSessionViewModel> {
49
- static readonly ITEM_HEIGHT = 44;
50
- getHeight(element: IAgentSessionViewModel): number;
51
- getTemplateId(element: IAgentSessionViewModel): string;
62
+ export declare class AgentSessionsListDelegate implements IListVirtualDelegate<IAgentSession> {
63
+ static readonly ITEM_HEIGHT = 52;
64
+ getHeight(element: IAgentSession): number;
65
+ getTemplateId(element: IAgentSession): string;
52
66
  }
53
- export declare class AgentSessionsAccessibilityProvider implements IListAccessibilityProvider<IAgentSessionViewModel> {
67
+ export declare class AgentSessionsAccessibilityProvider implements IListAccessibilityProvider<IAgentSession> {
54
68
  getWidgetAriaLabel(): string;
55
- getAriaLabel(element: IAgentSessionViewModel): string | null;
69
+ getAriaLabel(element: IAgentSession): string | null;
70
+ }
71
+ export interface IAgentSessionsFilter {
72
+ readonly onDidChange?: Event<void>;
73
+ /**
74
+ * Optional limit on the number of sessions to show.
75
+ */
76
+ readonly limitResults?: () => number | undefined;
77
+ /**
78
+ * A callback to notify the filter about the number of
79
+ * results after filtering.
80
+ */
81
+ notifyResults?(count: number): void;
82
+ exclude?(session: IAgentSession): boolean;
56
83
  }
57
- export declare class AgentSessionsDataSource implements IAsyncDataSource<IAgentSessionsViewModel, IAgentSessionViewModel> {
58
- hasChildren(element: IAgentSessionsViewModel | IAgentSessionViewModel): boolean;
59
- getChildren(element: IAgentSessionsViewModel | IAgentSessionViewModel): Iterable<IAgentSessionViewModel>;
84
+ export declare class AgentSessionsDataSource implements IAsyncDataSource<IAgentSessionsModel, IAgentSession> {
85
+ private readonly filter;
86
+ private readonly sorter;
87
+ constructor(filter: IAgentSessionsFilter | undefined, sorter: ITreeSorter<IAgentSession>);
88
+ hasChildren(element: IAgentSessionsModel | IAgentSession): boolean;
89
+ getChildren(element: IAgentSessionsModel | IAgentSession): Iterable<IAgentSession>;
60
90
  }
61
- export declare class AgentSessionsIdentityProvider implements IIdentityProvider<IAgentSessionsViewModel | IAgentSessionViewModel> {
62
- getId(element: IAgentSessionsViewModel | IAgentSessionViewModel): string;
91
+ export declare class AgentSessionsIdentityProvider implements IIdentityProvider<IAgentSessionsModel | IAgentSession> {
92
+ getId(element: IAgentSessionsModel | IAgentSession): string;
63
93
  }
64
- export declare class AgentSessionsCompressionDelegate implements ITreeCompressionDelegate<IAgentSessionViewModel> {
65
- isIncompressible(element: IAgentSessionViewModel): boolean;
94
+ export declare class AgentSessionsCompressionDelegate implements ITreeCompressionDelegate<IAgentSession> {
95
+ isIncompressible(element: IAgentSession): boolean;
66
96
  }
67
- export declare class AgentSessionsSorter implements ITreeSorter<IAgentSessionViewModel> {
68
- compare(sessionA: IAgentSessionViewModel, sessionB: IAgentSessionViewModel): number;
97
+ export declare class AgentSessionsSorter implements ITreeSorter<IAgentSession> {
98
+ private readonly chatSessionsService;
99
+ constructor(chatSessionsService: IChatSessionsService);
100
+ compare(sessionA: IAgentSession, sessionB: IAgentSession): number;
69
101
  }
70
- export declare class AgentSessionsKeyboardNavigationLabelProvider implements ICompressibleKeyboardNavigationLabelProvider<IAgentSessionViewModel> {
71
- getKeyboardNavigationLabel(element: IAgentSessionViewModel): string;
72
- getCompressedNodeKeyboardNavigationLabel(elements: IAgentSessionViewModel[]): {
102
+ export declare class AgentSessionsKeyboardNavigationLabelProvider implements ICompressibleKeyboardNavigationLabelProvider<IAgentSession> {
103
+ getKeyboardNavigationLabel(element: IAgentSession): string;
104
+ getCompressedNodeKeyboardNavigationLabel(elements: IAgentSession[]): {
73
105
  toString(): string | undefined;
74
106
  } | undefined;
75
107
  }
76
- export declare class AgentSessionsDragAndDrop extends Disposable implements ITreeDragAndDrop<IAgentSessionViewModel> {
108
+ export declare class AgentSessionsDragAndDrop extends Disposable implements ITreeDragAndDrop<IAgentSession> {
77
109
  private readonly instantiationService;
78
110
  constructor(instantiationService: IInstantiationService);
79
111
  onDragStart(data: IDragAndDropData, originalEvent: DragEvent): void;
80
- getDragURI(element: IAgentSessionViewModel): string | null;
81
- getDragLabel?(elements: IAgentSessionViewModel[], originalEvent: DragEvent): string | undefined;
82
- onDragOver(data: IDragAndDropData, targetElement: IAgentSessionViewModel | undefined, targetIndex: number | undefined, targetSector: ListViewTargetSector | undefined, originalEvent: DragEvent): boolean | ITreeDragOverReaction;
83
- drop(data: IDragAndDropData, targetElement: IAgentSessionViewModel | undefined, targetIndex: number | undefined, targetSector: ListViewTargetSector | undefined, originalEvent: DragEvent): void;
112
+ getDragURI(element: IAgentSession): string | null;
113
+ getDragLabel?(elements: IAgentSession[], originalEvent: DragEvent): string | undefined;
114
+ onDragOver(data: IDragAndDropData, targetElement: IAgentSession | undefined, targetIndex: number | undefined, targetSector: ListViewTargetSector | undefined, originalEvent: DragEvent): boolean | ITreeDragOverReaction;
115
+ drop(data: IDragAndDropData, targetElement: IAgentSession | undefined, targetIndex: number | undefined, targetSector: ListViewTargetSector | undefined, originalEvent: DragEvent): void;
84
116
  }
85
117
  export {};