@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
@@ -0,0 +1,358 @@
1
+
2
+ import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
3
+ import { Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
4
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
5
+ import { ViewAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/views/viewPane';
6
+ import { AGENT_SESSIONS_VIEW_ID, AgentSessionsViewerOrientation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
7
+ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
8
+ import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
9
+ import { isMarshalledChatSessionContext } from '../actions/chatSessionActions.js';
10
+ import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
11
+ import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
12
+ import { ACTIVE_GROUP, SIDE_GROUP, AUX_WINDOW_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
13
+ import { ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
14
+ import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
15
+ import { getPartByLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/browser/viewsService';
16
+ import { Position } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
17
+ import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
18
+ import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
19
+ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
20
+ import { showClearEditingSessionConfirmation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
21
+ import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
22
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
23
+ import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
24
+
25
+ class BaseAgentSessionAction extends Action2 {
26
+ run(accessor, context) {
27
+ const agentSessionsService = accessor.get(IAgentSessionsService);
28
+ let session;
29
+ if (isMarshalledChatSessionContext(context)) {
30
+ session = agentSessionsService.getSession(context.session.resource);
31
+ }
32
+ else {
33
+ session = context;
34
+ }
35
+ if (session) {
36
+ this.runWithSession(session, accessor);
37
+ }
38
+ }
39
+ }
40
+ class ArchiveAgentSessionAction extends BaseAgentSessionAction {
41
+ constructor() {
42
+ super({
43
+ id: 'agentSession.archive',
44
+ title: ( localize2(4839, "Archive")),
45
+ icon: Codicon.archive,
46
+ menu: [{
47
+ id: MenuId.AgentSessionItemToolbar,
48
+ group: 'navigation',
49
+ order: 1,
50
+ when: ( ChatContextKeys.isArchivedAgentSession.negate()),
51
+ }, {
52
+ id: MenuId.AgentSessionsContext,
53
+ group: 'edit',
54
+ order: 2,
55
+ when: ( ChatContextKeys.isArchivedAgentSession.negate())
56
+ }]
57
+ });
58
+ }
59
+ async runWithSession(session, accessor) {
60
+ const chatService = accessor.get(IChatService);
61
+ const chatModel = chatService.getSession(session.resource);
62
+ const dialogService = accessor.get(IDialogService);
63
+ if (chatModel && !(await showClearEditingSessionConfirmation(chatModel, dialogService, {
64
+ isArchiveAction: true,
65
+ titleOverride: ( localize(4840, "Archive chat with pending edits?")),
66
+ messageOverride: ( localize(4841, "You have pending changes in this chat session."))
67
+ }))) {
68
+ return;
69
+ }
70
+ session.setArchived(true);
71
+ }
72
+ }
73
+ class UnarchiveAgentSessionAction extends BaseAgentSessionAction {
74
+ constructor() {
75
+ super({
76
+ id: 'agentSession.unarchive',
77
+ title: ( localize2(4842, "Unarchive")),
78
+ icon: Codicon.unarchive,
79
+ menu: [{
80
+ id: MenuId.AgentSessionItemToolbar,
81
+ group: 'navigation',
82
+ order: 1,
83
+ when: ChatContextKeys.isArchivedAgentSession,
84
+ }, {
85
+ id: MenuId.AgentSessionsContext,
86
+ group: 'edit',
87
+ order: 2,
88
+ when: ChatContextKeys.isArchivedAgentSession,
89
+ }]
90
+ });
91
+ }
92
+ runWithSession(session) {
93
+ session.setArchived(false);
94
+ }
95
+ }
96
+ class BaseOpenAgentSessionAction extends Action2 {
97
+ async run(accessor, context) {
98
+ if (!context) {
99
+ return;
100
+ }
101
+ const chatWidgetService = accessor.get(IChatWidgetService);
102
+ const uri = context.session.resource;
103
+ await chatWidgetService.openSession(uri, this.getTargetGroup(), {
104
+ ...this.getOptions(),
105
+ ignoreInView: true,
106
+ pinned: true
107
+ });
108
+ }
109
+ }
110
+ class OpenAgentSessionInEditorGroupAction extends BaseOpenAgentSessionAction {
111
+ static { this.id = 'workbench.action.chat.openSessionInEditorGroup'; }
112
+ constructor() {
113
+ super({
114
+ id: OpenAgentSessionInEditorGroupAction.id,
115
+ title: ( localize(4843, "Open as Editor")),
116
+ menu: {
117
+ id: MenuId.AgentSessionsContext,
118
+ order: 1,
119
+ group: 'navigation'
120
+ }
121
+ });
122
+ }
123
+ getTargetGroup() {
124
+ return ACTIVE_GROUP;
125
+ }
126
+ getOptions() {
127
+ return {};
128
+ }
129
+ }
130
+ class OpenAgentSessionInNewEditorGroupAction extends BaseOpenAgentSessionAction {
131
+ static { this.id = 'workbench.action.chat.openSessionInNewEditorGroup'; }
132
+ constructor() {
133
+ super({
134
+ id: OpenAgentSessionInNewEditorGroupAction.id,
135
+ title: ( localize(4844, "Open to the Side")),
136
+ menu: {
137
+ id: MenuId.AgentSessionsContext,
138
+ order: 2,
139
+ group: 'navigation'
140
+ }
141
+ });
142
+ }
143
+ getTargetGroup() {
144
+ return SIDE_GROUP;
145
+ }
146
+ getOptions() {
147
+ return {};
148
+ }
149
+ }
150
+ class OpenAgentSessionInNewWindowAction extends BaseOpenAgentSessionAction {
151
+ static { this.id = 'workbench.action.chat.openSessionInNewWindow'; }
152
+ constructor() {
153
+ super({
154
+ id: OpenAgentSessionInNewWindowAction.id,
155
+ title: ( localize(4845, "Open in New Window")),
156
+ menu: {
157
+ id: MenuId.AgentSessionsContext,
158
+ order: 3,
159
+ group: 'navigation'
160
+ }
161
+ });
162
+ }
163
+ getTargetGroup() {
164
+ return AUX_WINDOW_GROUP;
165
+ }
166
+ getOptions() {
167
+ return {
168
+ auxiliary: { compact: true, bounds: { width: 800, height: 640 } }
169
+ };
170
+ }
171
+ }
172
+ class MarkAgentSessionUnreadAction extends BaseAgentSessionAction {
173
+ constructor() {
174
+ super({
175
+ id: 'agentSession.markUnread',
176
+ title: ( localize2(4846, "Mark as Unread")),
177
+ menu: {
178
+ id: MenuId.AgentSessionsContext,
179
+ group: 'edit',
180
+ order: 1,
181
+ when: ( ContextKeyExpr.and(ChatContextKeys.isReadAgentSession, (
182
+ ChatContextKeys.isArchivedAgentSession.negate()))),
183
+ }
184
+ });
185
+ }
186
+ runWithSession(session) {
187
+ session.setRead(false);
188
+ }
189
+ }
190
+ class MarkAgentSessionReadAction extends BaseAgentSessionAction {
191
+ constructor() {
192
+ super({
193
+ id: 'agentSession.markRead',
194
+ title: ( localize2(4847, "Mark as Read")),
195
+ menu: {
196
+ id: MenuId.AgentSessionsContext,
197
+ group: 'edit',
198
+ order: 1,
199
+ when: ( ContextKeyExpr.and(( ChatContextKeys.isReadAgentSession.negate()), (
200
+ ChatContextKeys.isArchivedAgentSession.negate()))),
201
+ }
202
+ });
203
+ }
204
+ runWithSession(session) {
205
+ session.setRead(true);
206
+ }
207
+ }
208
+ class RefreshAgentSessionsViewAction extends ViewAction {
209
+ constructor() {
210
+ super({
211
+ id: 'agentSessionsView.refresh',
212
+ title: ( localize2(4848, "Refresh Agent Sessions")),
213
+ icon: Codicon.refresh,
214
+ menu: {
215
+ id: MenuId.AgentSessionsViewTitle,
216
+ group: 'navigation',
217
+ order: 1
218
+ },
219
+ viewId: AGENT_SESSIONS_VIEW_ID
220
+ });
221
+ }
222
+ runInView(accessor, view) {
223
+ view.refresh();
224
+ }
225
+ }
226
+ class FindAgentSessionAction extends ViewAction {
227
+ constructor() {
228
+ super({
229
+ id: 'agentSessionsView.find',
230
+ title: ( localize2(4849, "Find Agent Session")),
231
+ icon: Codicon.search,
232
+ menu: {
233
+ id: MenuId.AgentSessionsViewTitle,
234
+ group: 'navigation',
235
+ order: 2
236
+ },
237
+ viewId: AGENT_SESSIONS_VIEW_ID
238
+ });
239
+ }
240
+ runInView(accessor, view) {
241
+ view.openFind();
242
+ }
243
+ }
244
+ class RefreshAgentSessionsViewerAction extends Action2 {
245
+ constructor() {
246
+ super({
247
+ id: 'agentSessionsViewer.refresh',
248
+ title: ( localize2(4848, "Refresh Agent Sessions")),
249
+ icon: Codicon.refresh,
250
+ menu: {
251
+ id: MenuId.AgentSessionsToolbar,
252
+ group: 'navigation',
253
+ order: 1,
254
+ when: ( ChatContextKeys.agentSessionsViewerLimited.negate())
255
+ },
256
+ });
257
+ }
258
+ run(accessor, agentSessionsControl) {
259
+ agentSessionsControl.refresh();
260
+ }
261
+ }
262
+ class FindAgentSessionInViewerAction extends Action2 {
263
+ constructor() {
264
+ super({
265
+ id: 'agentSessionsViewer.find',
266
+ title: ( localize2(4849, "Find Agent Session")),
267
+ icon: Codicon.search,
268
+ menu: {
269
+ id: MenuId.AgentSessionsToolbar,
270
+ group: 'navigation',
271
+ order: 2,
272
+ when: ( ChatContextKeys.agentSessionsViewerLimited.negate())
273
+ }
274
+ });
275
+ }
276
+ run(accessor, agentSessionsControl) {
277
+ return agentSessionsControl.openFind();
278
+ }
279
+ }
280
+ class UpdateChatViewWidthAction extends Action2 {
281
+ async run(accessor) {
282
+ const layoutService = accessor.get(IWorkbenchLayoutService);
283
+ const viewDescriptorService = accessor.get(IViewDescriptorService);
284
+ const configurationService = accessor.get(IConfigurationService);
285
+ const orientation = this.getOrientation();
286
+ const chatLocation = viewDescriptorService.getViewLocationById(ChatViewId);
287
+ if (typeof chatLocation !== 'number') {
288
+ return;
289
+ }
290
+ const panelPosition = layoutService.getPanelPosition();
291
+ const canResizeView = chatLocation !== ViewContainerLocation.Panel || (panelPosition === Position.LEFT || panelPosition === Position.RIGHT);
292
+ const configuredSessionsViewerOrientation = configurationService.getValue(ChatConfiguration.ChatViewSessionsOrientation);
293
+ if ((!canResizeView || configuredSessionsViewerOrientation === 'sideBySide') && orientation === AgentSessionsViewerOrientation.Stacked) {
294
+ await configurationService.updateValue(ChatConfiguration.ChatViewSessionsOrientation, 'stacked');
295
+ }
296
+ else if ((!canResizeView || configuredSessionsViewerOrientation === 'stacked') && orientation === AgentSessionsViewerOrientation.SideBySide) {
297
+ await configurationService.updateValue(ChatConfiguration.ChatViewSessionsOrientation, 'sideBySide');
298
+ }
299
+ const part = getPartByLocation(chatLocation);
300
+ let currentSize = layoutService.getSize(part);
301
+ const sideBySideMinWidth = 600 + 1;
302
+ const stackedMaxWidth = 300 + 1;
303
+ if (configuredSessionsViewerOrientation !== 'auto') {
304
+ if ((orientation === AgentSessionsViewerOrientation.SideBySide && currentSize.width >= sideBySideMinWidth) ||
305
+ orientation === AgentSessionsViewerOrientation.Stacked
306
+ ) {
307
+ return;
308
+ }
309
+ }
310
+ if (!canResizeView) {
311
+ return;
312
+ }
313
+ if (chatLocation === ViewContainerLocation.AuxiliaryBar) {
314
+ layoutService.setAuxiliaryBarMaximized(false);
315
+ currentSize = layoutService.getSize(part);
316
+ }
317
+ let newWidth;
318
+ if (orientation === AgentSessionsViewerOrientation.SideBySide) {
319
+ newWidth = Math.max(sideBySideMinWidth, Math.round(layoutService.mainContainerDimension.width / 2));
320
+ }
321
+ else {
322
+ newWidth = stackedMaxWidth;
323
+ }
324
+ layoutService.setSize(part, {
325
+ width: newWidth,
326
+ height: currentSize.height
327
+ });
328
+ }
329
+ }
330
+ class ShowAgentSessionsSidebar extends UpdateChatViewWidthAction {
331
+ static { this.ID = 'agentSessions.showAgentSessionsSidebar'; }
332
+ static { this.TITLE = ( localize2(4850, "Show Agent Sessions Sidebar")); }
333
+ constructor() {
334
+ super({
335
+ id: ShowAgentSessionsSidebar.ID,
336
+ title: ShowAgentSessionsSidebar.TITLE,
337
+ });
338
+ }
339
+ getOrientation() {
340
+ return AgentSessionsViewerOrientation.SideBySide;
341
+ }
342
+ }
343
+ class HideAgentSessionsSidebar extends UpdateChatViewWidthAction {
344
+ static { this.ID = 'agentSessions.hideAgentSessionsSidebar'; }
345
+ static { this.TITLE = ( localize2(4851, "Hide Agent Sessions Sidebar")); }
346
+ constructor() {
347
+ super({
348
+ id: HideAgentSessionsSidebar.ID,
349
+ title: HideAgentSessionsSidebar.TITLE,
350
+ icon: Codicon.layoutSidebarRightOff,
351
+ });
352
+ }
353
+ getOrientation() {
354
+ return AgentSessionsViewerOrientation.Stacked;
355
+ }
356
+ }
357
+
358
+ export { ArchiveAgentSessionAction, FindAgentSessionAction, FindAgentSessionInViewerAction, HideAgentSessionsSidebar, MarkAgentSessionReadAction, MarkAgentSessionUnreadAction, OpenAgentSessionInEditorGroupAction, OpenAgentSessionInNewEditorGroupAction, OpenAgentSessionInNewWindowAction, RefreshAgentSessionsViewAction, RefreshAgentSessionsViewerAction, ShowAgentSessionsSidebar, UnarchiveAgentSessionAction };
@@ -0,0 +1,55 @@
1
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
2
+ import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
3
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
4
+ import { IAgentSessionsFilter } from "./agentSessionsViewer.js";
5
+ import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
6
+ import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
7
+ import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
8
+ import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
9
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
10
+ import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
11
+ import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
12
+ import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
13
+ import { IAgentSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service";
14
+ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
15
+ import { IListStyles } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/list/listWidget";
16
+ import { IStyleOverride } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles";
17
+ import { IAgentSessionsControl } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions";
18
+ export interface IAgentSessionsControlOptions {
19
+ readonly overrideStyles?: IStyleOverride<IListStyles>;
20
+ readonly filter?: IAgentSessionsFilter;
21
+ readonly allowOpenSessionsInPanel?: boolean;
22
+ readonly trackActiveEditor?: boolean;
23
+ }
24
+ export declare class AgentSessionsControl extends Disposable implements IAgentSessionsControl {
25
+ private readonly container;
26
+ private readonly options;
27
+ private readonly contextMenuService;
28
+ private readonly contextKeyService;
29
+ private readonly instantiationService;
30
+ private readonly chatSessionsService;
31
+ private readonly commandService;
32
+ private readonly editorGroupsService;
33
+ private readonly chatService;
34
+ private readonly menuService;
35
+ private readonly chatWidgetService;
36
+ private readonly agentSessionsService;
37
+ private readonly telemetryService;
38
+ private readonly editorService;
39
+ private sessionsContainer;
40
+ private sessionsList;
41
+ private visible;
42
+ constructor(container: HTMLElement, options: IAgentSessionsControlOptions | undefined, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, chatSessionsService: IChatSessionsService, commandService: ICommandService, editorGroupsService: IEditorGroupsService, chatService: IChatService, menuService: IMenuService, chatWidgetService: IChatWidgetService, agentSessionsService: IAgentSessionsService, telemetryService: ITelemetryService, editorService: IEditorService);
43
+ private registerListeners;
44
+ private revealAndFocusActiveEditorSession;
45
+ private createList;
46
+ private openAgentSession;
47
+ private showContextMenu;
48
+ openFind(): void;
49
+ refresh(): Promise<void>;
50
+ update(): void;
51
+ setVisible(visible: boolean): void;
52
+ layout(height: number, width: number): void;
53
+ focus(): void;
54
+ clearFocus(): void;
55
+ }
@@ -0,0 +1,222 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
4
+ import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
5
+ import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
6
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
7
+ import { WorkbenchCompressibleAsyncDataTree } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
8
+ import { append, $, EventHelper } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
9
+ import { isLocalAgentSessionItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
10
+ import { AgentSessionsSorter, AgentSessionsListDelegate, AgentSessionsCompressionDelegate, AgentSessionRenderer, AgentSessionsDataSource, AgentSessionsKeyboardNavigationLabelProvider, AgentSessionsIdentityProvider, AgentSessionsDragAndDrop, AgentSessionsAccessibilityProvider } from './agentSessionsViewer.js';
11
+ import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
12
+ import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
13
+ import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
14
+ import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
15
+ import { getSessionItemContextOverlay } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatSessions/common';
16
+ import { ACTION_ID_NEW_CHAT } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
17
+ import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
18
+ import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
19
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
20
+ import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
21
+ import { Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
22
+ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
23
+ import { ChatViewPaneTarget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
24
+ import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
25
+ import { TreeFindMode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/abstractTree';
26
+ import { ACTIVE_GROUP, SIDE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
27
+ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
28
+ import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
29
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
30
+ import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
31
+ import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
32
+
33
+ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
34
+ constructor(container, options, contextMenuService, contextKeyService, instantiationService, chatSessionsService, commandService, editorGroupsService, chatService, menuService, chatWidgetService, agentSessionsService, telemetryService, editorService) {
35
+ super();
36
+ this.container = container;
37
+ this.options = options;
38
+ this.contextMenuService = contextMenuService;
39
+ this.contextKeyService = contextKeyService;
40
+ this.instantiationService = instantiationService;
41
+ this.chatSessionsService = chatSessionsService;
42
+ this.commandService = commandService;
43
+ this.editorGroupsService = editorGroupsService;
44
+ this.chatService = chatService;
45
+ this.menuService = menuService;
46
+ this.chatWidgetService = chatWidgetService;
47
+ this.agentSessionsService = agentSessionsService;
48
+ this.telemetryService = telemetryService;
49
+ this.editorService = editorService;
50
+ this.visible = true;
51
+ this.createList(this.container);
52
+ this.registerListeners();
53
+ }
54
+ registerListeners() {
55
+ if (this.options?.trackActiveEditor) {
56
+ this._register(this.editorService.onDidActiveEditorChange(() => this.revealAndFocusActiveEditorSession()));
57
+ }
58
+ }
59
+ revealAndFocusActiveEditorSession() {
60
+ if (!this.visible) {
61
+ return;
62
+ }
63
+ const input = this.editorService.activeEditor;
64
+ if (!(input instanceof ChatEditorInput)) {
65
+ return;
66
+ }
67
+ const sessionResource = input.sessionResource;
68
+ if (!sessionResource) {
69
+ return;
70
+ }
71
+ const matchingSession = this.agentSessionsService.model.getSession(sessionResource);
72
+ if (matchingSession && this.sessionsList?.hasNode(matchingSession)) {
73
+ if (this.sessionsList.getRelativeTop(matchingSession) === null) {
74
+ this.sessionsList.reveal(matchingSession, 0.5);
75
+ }
76
+ this.sessionsList.setFocus([matchingSession]);
77
+ this.sessionsList.setSelection([matchingSession]);
78
+ }
79
+ }
80
+ createList(container) {
81
+ this.sessionsContainer = append(container, $('.agent-sessions-viewer'));
82
+ const sorter = this.instantiationService.createInstance(AgentSessionsSorter);
83
+ const list = this.sessionsList = this._register(this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'AgentSessionsView', this.sessionsContainer, ( new AgentSessionsListDelegate()), ( new AgentSessionsCompressionDelegate()), [
84
+ this.instantiationService.createInstance(AgentSessionRenderer)
85
+ ], ( new AgentSessionsDataSource(this.options?.filter, sorter)), {
86
+ accessibilityProvider: ( new AgentSessionsAccessibilityProvider()),
87
+ dnd: this.instantiationService.createInstance(AgentSessionsDragAndDrop),
88
+ identityProvider: ( new AgentSessionsIdentityProvider()),
89
+ horizontalScrolling: false,
90
+ multipleSelectionSupport: false,
91
+ findWidgetEnabled: true,
92
+ defaultFindMode: TreeFindMode.Filter,
93
+ keyboardNavigationLabelProvider: ( new AgentSessionsKeyboardNavigationLabelProvider()),
94
+ sorter,
95
+ overrideStyles: this.options?.overrideStyles,
96
+ twistieAdditionalCssClass: () => 'force-no-twistie',
97
+ }));
98
+ const model = this.agentSessionsService.model;
99
+ this._register(Event.any(this.options?.filter?.onDidChange ?? Event.None, model.onDidChangeSessions)(() => {
100
+ if (this.visible) {
101
+ list.updateChildren();
102
+ }
103
+ }));
104
+ list.setInput(model);
105
+ this._register(list.onDidOpen(e => this.openAgentSession(e)));
106
+ this._register(list.onContextMenu(e => this.showContextMenu(e)));
107
+ this._register(list.onMouseDblClick(({ element }) => {
108
+ if (element === null) {
109
+ this.commandService.executeCommand(ACTION_ID_NEW_CHAT);
110
+ }
111
+ }));
112
+ }
113
+ async openAgentSession(e) {
114
+ const session = e.element;
115
+ if (!session) {
116
+ return;
117
+ }
118
+ this.telemetryService.publicLog2('agentSessionOpened', {
119
+ source: this.options?.allowOpenSessionsInPanel ? 'chatView' : 'agentsView',
120
+ providerType: session.providerType
121
+ });
122
+ session.setRead(true);
123
+ let sessionOptions;
124
+ if (isLocalAgentSessionItem(session)) {
125
+ sessionOptions = {};
126
+ }
127
+ else {
128
+ sessionOptions = { title: { preferred: session.label } };
129
+ }
130
+ sessionOptions.ignoreInView = true;
131
+ const options = {
132
+ ...sessionOptions,
133
+ ...e.editorOptions,
134
+ revealIfOpened: this.options?.allowOpenSessionsInPanel
135
+ };
136
+ await this.chatSessionsService.activateChatSessionItemProvider(session.providerType);
137
+ let target;
138
+ if (e.sideBySide) {
139
+ target = this.options?.allowOpenSessionsInPanel ? ACTIVE_GROUP : SIDE_GROUP;
140
+ }
141
+ else if (this.options?.allowOpenSessionsInPanel) {
142
+ target = ChatViewPaneTarget;
143
+ }
144
+ else {
145
+ target = ACTIVE_GROUP;
146
+ }
147
+ const isLocalChatSession = session.resource.scheme === Schemas.vscodeChatEditor ||
148
+ session.resource.scheme === Schemas.vscodeLocalChatSession;
149
+ if (!isLocalChatSession && !(await this.chatSessionsService.canResolveChatSession(session.resource))) {
150
+ const editorTarget = target === ChatViewPaneTarget ? undefined : target;
151
+ await this.editorService.openEditor({
152
+ resource: session.resource,
153
+ options: {
154
+ ...options,
155
+ revealIfOpened: options?.revealIfOpened ?? true
156
+ }
157
+ }, editorTarget);
158
+ return;
159
+ }
160
+ await this.chatWidgetService.openSession(session.resource, target, options);
161
+ }
162
+ async showContextMenu({ element: session, anchor, browserEvent }) {
163
+ if (!session) {
164
+ return;
165
+ }
166
+ EventHelper.stop(browserEvent, true);
167
+ const provider = await this.chatSessionsService.activateChatSessionItemProvider(session.providerType);
168
+ const contextOverlay = getSessionItemContextOverlay(session, provider, this.chatService, this.editorGroupsService);
169
+ contextOverlay.push([ChatContextKeys.isCombinedAgentSessionsViewer.key, true]);
170
+ contextOverlay.push([ChatContextKeys.isReadAgentSession.key, session.isRead()]);
171
+ contextOverlay.push([ChatContextKeys.isArchivedAgentSession.key, session.isArchived()]);
172
+ const menu = this.menuService.createMenu(MenuId.AgentSessionsContext, this.contextKeyService.createOverlay(contextOverlay));
173
+ const marshalledSession = { session, $mid: MarshalledId.ChatSessionContext };
174
+ this.contextMenuService.showContextMenu({
175
+ getActions: () => Separator.join(...( menu.getActions({ arg: marshalledSession, shouldForwardArgs: true }).map(([, actions]) => actions))),
176
+ getAnchor: () => anchor,
177
+ getActionsContext: () => marshalledSession,
178
+ });
179
+ menu.dispose();
180
+ }
181
+ openFind() {
182
+ this.sessionsList?.openFind();
183
+ }
184
+ refresh() {
185
+ return this.agentSessionsService.model.resolve(undefined);
186
+ }
187
+ update() {
188
+ this.sessionsList?.updateChildren();
189
+ }
190
+ setVisible(visible) {
191
+ this.visible = visible;
192
+ if (this.visible) {
193
+ this.sessionsList?.updateChildren();
194
+ }
195
+ }
196
+ layout(height, width) {
197
+ this.sessionsList?.layout(height, width);
198
+ }
199
+ focus() {
200
+ this.sessionsList?.domFocus();
201
+ }
202
+ clearFocus() {
203
+ this.sessionsList?.setFocus([]);
204
+ this.sessionsList?.setSelection([]);
205
+ }
206
+ };
207
+ AgentSessionsControl = ( __decorate([
208
+ ( __param(2, IContextMenuService)),
209
+ ( __param(3, IContextKeyService)),
210
+ ( __param(4, IInstantiationService)),
211
+ ( __param(5, IChatSessionsService)),
212
+ ( __param(6, ICommandService)),
213
+ ( __param(7, IEditorGroupsService)),
214
+ ( __param(8, IChatService)),
215
+ ( __param(9, IMenuService)),
216
+ ( __param(10, IChatWidgetService)),
217
+ ( __param(11, IAgentSessionsService)),
218
+ ( __param(12, ITelemetryService)),
219
+ ( __param(13, IEditorService))
220
+ ], AgentSessionsControl));
221
+
222
+ export { AgentSessionsControl };
@@ -0,0 +1,37 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { MenuId } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
3
+ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
4
+ import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
5
+ import { IAgentSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel";
6
+ import { IAgentSessionsFilter } from "./agentSessionsViewer.js";
7
+ export interface IAgentSessionsFilterOptions extends Partial<IAgentSessionsFilter> {
8
+ readonly filterMenuId: MenuId;
9
+ readonly limitResults?: () => number | undefined;
10
+ notifyResults?(count: number): void;
11
+ overrideExclude?(session: IAgentSession): boolean | undefined;
12
+ }
13
+ export declare class AgentSessionsFilter extends Disposable implements Required<IAgentSessionsFilter> {
14
+ private readonly options;
15
+ private readonly chatSessionsService;
16
+ private readonly storageService;
17
+ private readonly STORAGE_KEY;
18
+ private readonly _onDidChange;
19
+ readonly onDidChange: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
20
+ readonly limitResults: () => number | undefined;
21
+ private excludes;
22
+ private readonly actionDisposables;
23
+ constructor(options: IAgentSessionsFilterOptions, chatSessionsService: IChatSessionsService, storageService: IStorageService);
24
+ private registerListeners;
25
+ private updateExcludes;
26
+ private resetExcludes;
27
+ private storeExcludes;
28
+ private updateFilterActions;
29
+ private registerProviderActions;
30
+ private registerStateActions;
31
+ private registerArchivedActions;
32
+ private registerReadActions;
33
+ private registerResetAction;
34
+ isDefault(): boolean;
35
+ exclude(session: IAgentSession): boolean;
36
+ notifyResults(count: number): void;
37
+ }