@codingame/monaco-vscode-chat-service-override 22.1.9 → 23.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/index.js +17 -8
  2. package/package.json +43 -40
  3. package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +1 -1
  4. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +6 -6
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +57 -48
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +19 -19
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +1 -1
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +26 -17
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +51 -5
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +2 -2
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +7 -7
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +19 -19
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/{chatClearActions.d.ts → chatNewActions.d.ts} +2 -1
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/{chatClearActions.js → chatNewActions.js} +32 -32
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +4 -4
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +9 -9
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +101 -98
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +35 -24
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +43 -25
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +1 -1
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +34 -33
  27. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.d.ts +53 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.js +154 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +7 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +13 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +44 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +347 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +85 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +250 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +24 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +97 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +290 -231
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +2 -2
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +7 -10
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.d.ts +1 -1
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +6 -6
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.d.ts +24 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.js +113 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +31 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +102 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +646 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +2 -3
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +46 -26
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +17 -4
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +44 -34
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +14 -14
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +25 -6
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +46 -10
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +45 -6
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +30 -10
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +10 -3
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +60 -9
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +117 -0
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +12 -0
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +6 -4
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +60 -55
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +29 -16
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +365 -143
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +2 -3
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +3 -30
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +7 -3
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +58 -22
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +1 -1
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +5 -4
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.d.ts +3 -3
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +3 -3
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +5 -5
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +6 -18
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.d.ts +1 -3
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +7 -11
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +1 -1
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +13 -1
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +38 -33
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +11 -6
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +83 -24
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.d.ts +1 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +91 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +64 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +370 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +25 -0
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +56 -0
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +61 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +349 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +43 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +787 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.d.ts +17 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +109 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +122 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +211 -0
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatUsageWidget.css +69 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +1 -1
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +21 -20
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +54 -54
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +31 -22
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +16 -6
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.d.ts +6 -3
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.js +29 -21
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.d.ts +5 -2
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +37 -33
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +15 -12
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +96 -131
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +12 -7
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +66 -34
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +5 -3
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +77 -71
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +91 -18
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +458 -138
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +3 -1
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +212 -150
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +96 -89
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +3 -2
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +5 -5
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +3 -4
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +15 -16
  124. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
  125. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +33 -17
  126. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
  127. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
  128. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.d.ts +27 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js +688 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +15 -10
  131. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +126 -135
  132. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +6 -1
  133. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorController.css +2 -1
  134. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +38 -1
  135. package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +14 -14
  136. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.d.ts +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +28 -26
  138. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +1 -1
  139. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +3 -3
  140. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +9 -6
  141. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +24 -13
  142. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +15 -14
  143. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +25 -23
  144. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.d.ts +21 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +89 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
  147. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +30 -29
  148. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +10 -19
  149. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +61 -43
  150. package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +7 -4
  151. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +28 -28
  152. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +254 -165
  153. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +4 -4
  154. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +2 -2
  155. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +1 -1
  156. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +4 -6
  157. package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.d.ts +10 -6
  158. package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +20 -12
  159. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +13 -17
  160. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +9 -8
  161. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +1 -0
  162. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +51 -21
  163. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +7 -3
  164. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +74 -20
  165. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +11 -6
  166. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -2
  167. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +83 -53
  168. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +2 -1
  169. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +136 -78
  170. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +4 -4
  171. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +18 -10
  172. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +357 -157
  173. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
  174. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +55 -28
  175. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +235 -108
  176. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +12 -2
  177. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +50 -4
  178. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +27 -27
  179. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
  180. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
  181. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +3 -1
  182. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +11 -7
  183. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +13 -15
  184. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
  185. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +2 -2
  186. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +20 -32
  187. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +63 -140
  188. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +1 -1
  189. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +17 -16
  190. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +1 -1
  191. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
  192. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
  193. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  194. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js +3 -0
  195. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  196. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +119 -15
  197. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +6 -4
  198. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +47 -0
  199. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +192 -0
  200. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +7 -5
  201. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +21 -16
  202. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +8 -3
  203. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +2 -2
  204. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +18 -27
  205. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +5 -2
  206. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +3 -1
  207. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +1 -1
  208. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -25
  209. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +2 -2
  210. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +18 -27
  211. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +12 -0
  212. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +31 -0
  213. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +3 -0
  214. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +24 -8
  215. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +8 -0
  216. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
  217. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +33 -4
  218. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +42 -13
  219. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +14 -21
  220. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +23 -0
  221. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +18 -0
  222. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +227 -0
  223. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +17 -0
  224. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +133 -0
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +36 -0
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +17 -0
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +5 -1
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +75 -37
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +1 -0
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +8 -0
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +71 -0
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +28 -15
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +366 -363
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +18 -18
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +9 -9
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +16 -16
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +19 -0
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +123 -0
  246. package/vscode/src/vs/base/common/yaml.d.ts +0 -74
  247. package/vscode/src/vs/base/common/yaml.js +0 -597
  248. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.d.ts +0 -8
  249. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +0 -239
  250. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.d.ts +0 -102
  251. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTimeline.js +0 -435
  252. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.d.ts +0 -14
  253. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +0 -67
  254. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +0 -49
  255. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +0 -380
  256. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +0 -37
  257. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +0 -137
  258. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts +0 -44
  259. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +0 -176
  260. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.d.ts +0 -4
  261. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +0 -206
  262. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.d.ts +0 -7
  263. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +0 -79
  264. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.d.ts +0 -8
  265. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +0 -145
  266. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +0 -65
  267. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +0 -306
  268. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.d.ts +0 -12
  269. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveToPromptAction.js +0 -102
  270. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/newPromptsParser.d.ts +0 -97
  271. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/newPromptsParser.js +0 -247
  272. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +0 -118
  273. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +0 -10
  274. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandSimplifier.d.ts +0 -10
  275. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandSimplifier.js +0 -55
  276. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/subCommands.d.ts +0 -2
  277. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/subCommands.js +0 -66
@@ -1,14 +1,15 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
- import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
4
+ import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
5
+ import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
5
6
  import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
6
7
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
7
8
  import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
8
9
  import { truncate } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
9
10
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
10
11
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
11
- import { DropdownWithPrimaryActionViewItem } from '@codingame/monaco-vscode-09e9b2e8-42a8-5a68-864f-bfcdad0ca1df-common/vscode/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem';
12
+ import { DropdownWithPrimaryActionViewItem } from '@codingame/monaco-vscode-262ed59d-4f76-57cd-9e9f-1877f26ae049-common/vscode/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem';
12
13
  import { getActionBarActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
13
14
  import { MenuItemAction, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
14
15
  import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
@@ -25,41 +26,42 @@ import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/
25
26
  import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
26
27
  import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
27
28
  import { fillEditorsDragData } from '@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common/vscode/vs/workbench/browser/dnd';
28
- import { ResourceLabels } from '@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/workbench/browser/labels';
29
+ import { ResourceLabels } from '@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/workbench/browser/labels';
29
30
  import { ViewPane } from '@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane';
30
31
  import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
31
32
  import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
32
33
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
33
34
  import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
34
35
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
35
- import { ChatSessionUri } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/common/chatUri';
36
- import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
37
- import { ChatViewId } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chat';
36
+ import { localChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
37
+ import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
38
+ import { ChatConfiguration, ChatEditorTitleMaxLength } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
39
+ import { ACTION_ID_OPEN_CHAT } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
40
+ import { ChatViewId } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/chat';
38
41
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
39
- import { ChatEditorInput } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
40
- import { ACTION_ID_OPEN_CHAT } from '@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
41
- import { NEW_CHAT_SESSION_ACTION_ID, findExistingChatEditorByUri, isLocalChatSessionItem, getSessionItemContextOverlay } from '../common.js';
42
+ import { NEW_CHAT_SESSION_ACTION_ID, findExistingChatEditorByUri, getSessionItemContextOverlay } from '@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/chatSessions/common';
42
43
  import { LocalChatSessionsProvider } from '../localChatSessionsProvider.js';
43
44
  import { SessionsDataSource, SessionsDelegate, SessionsRenderer, GettingStartedDelegate, GettingStartedRenderer } from './sessionsTreeRenderer.js';
44
45
 
45
46
  class SessionsIdentityProvider {
46
47
  getId(element) {
47
- return element.id;
48
+ return ( element.resource.toString());
48
49
  }
49
50
  }
50
51
  class SessionsAccessibilityProvider {
51
52
  getWidgetAriaLabel() {
52
- return localize(5244, 'Chat Sessions');
53
+ return localize(5408, 'Chat Sessions');
53
54
  }
54
55
  getAriaLabel(element) {
55
- return element.label || element.id;
56
+ return element.label;
56
57
  }
57
58
  }
58
59
  let SessionsViewPane = class SessionsViewPane extends ViewPane {
59
- constructor(provider, sessionTracker, options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService, chatService, editorService, viewsService, logService, progressService, menuService, commandService, chatWidgetService, editorGroupsService) {
60
+ constructor(provider, sessionTracker, viewId, options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService, chatService, editorService, viewsService, logService, progressService, menuService, commandService, chatWidgetService, editorGroupsService, chatSessionsService) {
60
61
  super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
61
62
  this.provider = provider;
62
63
  this.sessionTracker = sessionTracker;
64
+ this.viewId = viewId;
63
65
  this.chatService = chatService;
64
66
  this.editorService = editorService;
65
67
  this.viewsService = viewsService;
@@ -69,7 +71,9 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
69
71
  this.commandService = commandService;
70
72
  this.chatWidgetService = chatWidgetService;
71
73
  this.editorGroupsService = editorGroupsService;
74
+ this.chatSessionsService = chatSessionsService;
72
75
  this._isEmpty = true;
76
+ this.minimumBodySize = 44;
73
77
  if (provider instanceof LocalChatSessionsProvider) {
74
78
  this._register(provider.onDidChange(() => {
75
79
  if (this.tree && this.isBodyVisible()) {
@@ -84,6 +88,14 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
84
88
  }
85
89
  }
86
90
  }));
91
+ this._register(this.chatSessionsService.onDidChangeSessionItems((chatSessionType) => {
92
+ if (provider.chatSessionType === chatSessionType && this.tree && this.isBodyVisible()) {
93
+ this.refreshTreeWithProgress();
94
+ }
95
+ }));
96
+ if (provider) {
97
+ this.scopedContextKeyService.createKey('chatSessionType', provider.chatSessionType);
98
+ }
87
99
  }
88
100
  shouldShowWelcome() {
89
101
  return this._isEmpty;
@@ -100,8 +112,7 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
100
112
  title: defaultAction.label,
101
113
  icon: Codicon.plus,
102
114
  }, undefined, undefined, undefined, undefined);
103
- const menu = this.menuService.createMenu(MenuId.ChatSessionsMenu, this.contextKeyService);
104
- const actions = menu.getActions({ shouldForwardArgs: true });
115
+ const actions = this.menuService.getMenuActions(MenuId.ChatSessionsMenu, this.scopedContextKeyService, { shouldForwardArgs: true });
105
116
  const primaryActions = getActionBarActions(actions, 'submenu').primary.filter(action => {
106
117
  if (action instanceof MenuItemAction && defaultAction instanceof MenuItemAction) {
107
118
  if (!action.item.source?.id || !defaultAction.item.source?.id) {
@@ -116,18 +127,18 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
116
127
  if (!primaryActions || primaryActions.length === 0) {
117
128
  return;
118
129
  }
119
- const dropdownAction = ( new Action('selectNewChatSessionOption', ( localize(5245, 'More...')), 'codicon-chevron-down', true));
130
+ const dropdownAction = toAction({
131
+ id: 'selectNewChatSessionOption',
132
+ label: ( localize(5409, 'More...')),
133
+ class: 'codicon-chevron-down',
134
+ run: () => { }
135
+ });
120
136
  const dropdownActions = [];
121
137
  primaryActions.forEach(element => {
122
138
  dropdownActions.push(element);
123
139
  });
124
140
  return this.instantiationService.createInstance(DropdownWithPrimaryActionViewItem, primaryAction, dropdownAction, dropdownActions, '', options);
125
141
  }
126
- refreshTree() {
127
- if (this.tree && this.isBodyVisible()) {
128
- this.refreshTreeWithProgress();
129
- }
130
- }
131
142
  isEmpty() {
132
143
  if (!this.tree?.hasNode(this.provider)) {
133
144
  return true;
@@ -155,7 +166,7 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
155
166
  try {
156
167
  await this.progressService.withProgress({
157
168
  location: this.id,
158
- title: ( localize(5246, 'Refreshing chat sessions...')),
169
+ title: ( localize(5410, 'Refreshing chat sessions...')),
159
170
  }, async () => {
160
171
  await this.tree.updateChildren(this.provider);
161
172
  });
@@ -172,7 +183,7 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
172
183
  try {
173
184
  await this.progressService.withProgress({
174
185
  location: this.id,
175
- title: ( localize(5247, 'Loading chat sessions...')),
186
+ title: ( localize(5411, 'Loading chat sessions...')),
176
187
  }, async () => {
177
188
  await this.tree.setInput(this.provider);
178
189
  });
@@ -196,13 +207,13 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
196
207
  const delegate = ( new SessionsDelegate(this.configurationService));
197
208
  const identityProvider = ( new SessionsIdentityProvider());
198
209
  const accessibilityProvider = ( new SessionsAccessibilityProvider());
199
- const renderer = this.instantiationService.createInstance(SessionsRenderer);
210
+ const renderer = this.instantiationService.createInstance(SessionsRenderer, this.viewDescriptorService.getViewLocationById(this.viewId));
200
211
  this._register(renderer);
201
212
  const getResourceForElement = (element) => {
202
213
  if (element.id === LocalChatSessionsProvider.CHAT_WIDGET_VIEW_ID) {
203
214
  return null;
204
215
  }
205
- return ChatSessionUri.forSession(element.provider.chatSessionType, element.id);
216
+ return element.resource;
206
217
  };
207
218
  this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'ChatSessions', this.treeContainer, delegate, [renderer], dataSource, {
208
219
  dnd: {
@@ -225,7 +236,7 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
225
236
  if (elements.length === 1) {
226
237
  return elements[0].label;
227
238
  }
228
- return localize(5248, "{0} chat sessions", elements.length);
239
+ return localize(5412, "{0} agent sessions", elements.length);
229
240
  },
230
241
  drop: () => { },
231
242
  onDragOver: () => false,
@@ -233,6 +244,15 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
233
244
  },
234
245
  accessibilityProvider,
235
246
  identityProvider,
247
+ keyboardNavigationLabelProvider: {
248
+ getKeyboardNavigationLabel: (session) => {
249
+ const parts = [
250
+ session.label || '',
251
+ typeof session.description === 'string' ? session.description : (session.description ? renderAsPlaintext(session.description) : '')
252
+ ];
253
+ return parts.filter(text => text.length > 0).join(' ');
254
+ }
255
+ },
236
256
  multipleSelectionSupport: false,
237
257
  overrideStyles: {
238
258
  listBackground: undefined
@@ -254,7 +274,7 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
254
274
  this._register(this.tree.onMouseDblClick(e => {
255
275
  const scrollingByPage = this.configurationService.getValue('workbench.list.scrollByPage');
256
276
  if (e.element === null && !scrollingByPage) {
257
- if (this.provider?.chatSessionType && this.provider.chatSessionType !== 'local') {
277
+ if (this.provider?.chatSessionType && this.provider.chatSessionType !== localChatSessionType) {
258
278
  this.commandService.executeCommand(`workbench.action.chat.openNewSessionEditor.${this.provider?.chatSessionType}`);
259
279
  }
260
280
  else {
@@ -277,13 +297,13 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
277
297
  const items = [
278
298
  {
279
299
  id: 'install-extensions',
280
- label: ( localize(5249, "Install Chat Extensions")),
300
+ label: ( localize(5413, "Install Chat Extensions")),
281
301
  icon: Codicon.extensions,
282
302
  commandId: 'chat.sessions.gettingStarted'
283
303
  },
284
304
  {
285
305
  id: 'learn-more',
286
- label: ( localize(5250, "Learn More About GitHub Copilot coding agent")),
306
+ label: ( localize(5414, "Learn More About GitHub Copilot coding agent")),
287
307
  commandId: 'vscode.open',
288
308
  icon: Codicon.book,
289
309
  args: [( URI.parse('https://aka.ms/coding-agent-docs'))]
@@ -314,47 +334,32 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
314
334
  }
315
335
  }
316
336
  async openChatSession(session) {
317
- if (!session || !session.id) {
318
- return;
319
- }
320
337
  try {
321
- const uri = ChatSessionUri.forSession(session.provider.chatSessionType, session.id);
322
- const existingEditor = findExistingChatEditorByUri(uri, session.id, this.editorGroupsService);
338
+ const existingEditor = findExistingChatEditorByUri(session.resource, this.editorGroupsService);
323
339
  if (existingEditor) {
324
- await this.editorService.openEditor(existingEditor.editor, existingEditor.groupId);
340
+ await this.editorService.openEditor(existingEditor.editor, existingEditor.group);
325
341
  return;
326
342
  }
327
- if (this.chatWidgetService.getWidgetBySessionId(session.id)) {
343
+ if (this.chatWidgetService.getWidgetBySessionResource(session.resource)) {
328
344
  return;
329
345
  }
330
346
  if (session.id === LocalChatSessionsProvider.HISTORY_NODE_ID) {
331
347
  return;
332
348
  }
333
- if (isLocalChatSessionItem(session)) {
334
- const options = {
335
- target: { sessionId: session.id },
336
- pinned: true,
337
- ignoreInView: true,
338
- preserveFocus: true,
339
- };
340
- await this.editorService.openEditor({ resource: ChatEditorInput.getNewEditorUri(), options });
341
- return;
342
- }
343
- else if (session.id === LocalChatSessionsProvider.CHAT_WIDGET_VIEW_ID) {
344
- const chatViewPane = await this.viewsService.openView(ChatViewId);
345
- if (chatViewPane) {
346
- await chatViewPane.loadSession(session.id);
347
- }
349
+ if (session.id === LocalChatSessionsProvider.CHAT_WIDGET_VIEW_ID) {
350
+ await this.viewsService.openView(ChatViewId);
348
351
  return;
349
352
  }
350
353
  const options = {
351
354
  pinned: true,
352
355
  ignoreInView: true,
353
- preferredTitle: truncate(session.label, 30),
356
+ title: {
357
+ preferred: truncate(session.label, ChatEditorTitleMaxLength),
358
+ },
354
359
  preserveFocus: true,
355
360
  };
356
361
  await this.editorService.openEditor({
357
- resource: ChatSessionUri.forSession(session.provider.chatSessionType, session.id),
362
+ resource: session.resource,
358
363
  options,
359
364
  });
360
365
  }
@@ -386,24 +391,25 @@ let SessionsViewPane = class SessionsViewPane extends ViewPane {
386
391
  }
387
392
  };
388
393
  SessionsViewPane = ( __decorate([
389
- ( __param(3, IKeybindingService)),
390
- ( __param(4, IContextMenuService)),
391
- ( __param(5, IConfigurationService)),
392
- ( __param(6, IContextKeyService)),
393
- ( __param(7, IViewDescriptorService)),
394
- ( __param(8, IInstantiationService)),
395
- ( __param(9, IOpenerService)),
396
- ( __param(10, IThemeService)),
397
- ( __param(11, IHoverService)),
398
- ( __param(12, IChatService)),
399
- ( __param(13, IEditorService)),
400
- ( __param(14, IViewsService)),
401
- ( __param(15, ILogService)),
402
- ( __param(16, IProgressService)),
403
- ( __param(17, IMenuService)),
404
- ( __param(18, ICommandService)),
405
- ( __param(19, IChatWidgetService)),
406
- ( __param(20, IEditorGroupsService))
394
+ ( __param(4, IKeybindingService)),
395
+ ( __param(5, IContextMenuService)),
396
+ ( __param(6, IConfigurationService)),
397
+ ( __param(7, IContextKeyService)),
398
+ ( __param(8, IViewDescriptorService)),
399
+ ( __param(9, IInstantiationService)),
400
+ ( __param(10, IOpenerService)),
401
+ ( __param(11, IThemeService)),
402
+ ( __param(12, IHoverService)),
403
+ ( __param(13, IChatService)),
404
+ ( __param(14, IEditorService)),
405
+ ( __param(15, IViewsService)),
406
+ ( __param(16, ILogService)),
407
+ ( __param(17, IProgressService)),
408
+ ( __param(18, IMenuService)),
409
+ ( __param(19, ICommandService)),
410
+ ( __param(20, IChatWidgetService)),
411
+ ( __param(21, IEditorGroupsService)),
412
+ ( __param(22, IChatSessionsService))
407
413
  ], SessionsViewPane));
408
414
 
409
415
  export { SessionsViewPane };
@@ -1,35 +1,57 @@
1
1
  import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
2
  import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
3
3
  import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
+ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
5
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
6
+ import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
4
7
  import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
8
+ import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
5
9
  import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
10
+ import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
6
11
  import { IEditableData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views";
7
12
  import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
8
- import { IChatAgentRequest } from "@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/common/chatAgents";
13
+ import { IChatAgentAttachmentCapabilities, IChatAgentRequest } from "@codingame/monaco-vscode-aac7027b-326c-513a-95a9-e4eedd151b38-common/vscode/vs/workbench/contrib/chat/common/chatAgents";
9
14
  import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
10
- import { ChatSession, IChatSessionContentProvider, IChatSessionItem, IChatSessionItemProvider, IChatSessionsExtensionPoint } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
15
+ import { IChatSession, IChatSessionContentProvider, IChatSessionItem, IChatSessionItemProvider, IChatSessionProviderOptionGroup, IChatSessionsExtensionPoint, SessionOptionsChangedCallback } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
11
16
  import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
12
17
  export declare class ChatSessionsService extends Disposable implements IChatSessionsService {
13
18
  private readonly _logService;
14
19
  private readonly _chatAgentService;
15
20
  private readonly _extensionService;
16
21
  private readonly _contextKeyService;
22
+ private readonly _menuService;
23
+ private readonly _themeService;
24
+ private readonly _labelService;
17
25
  readonly _serviceBrand: undefined;
18
26
  private readonly _itemsProviders;
19
- private readonly _onDidChangeItemsProviders;
20
- readonly onDidChangeItemsProviders: Event<IChatSessionItemProvider>;
21
- private readonly _contentProviders;
22
27
  private readonly _contributions;
23
- private readonly _disposableStores;
28
+ private readonly _contributionDisposables;
29
+ private readonly _contentProviders;
30
+ private readonly _alternativeIdMap;
24
31
  private readonly _contextKeys;
32
+ private readonly _onDidChangeItemsProviders;
33
+ readonly onDidChangeItemsProviders: Event<IChatSessionItemProvider>;
25
34
  private readonly _onDidChangeSessionItems;
26
35
  readonly onDidChangeSessionItems: Event<string>;
27
36
  private readonly _onDidChangeAvailability;
28
37
  readonly onDidChangeAvailability: Event<void>;
29
38
  private readonly _onDidChangeInProgress;
30
39
  get onDidChangeInProgress(): Event<void>;
40
+ private readonly _onDidChangeContentProviderSchemes;
41
+ get onDidChangeContentProviderSchemes(): Event<{
42
+ readonly added: string[];
43
+ readonly removed: string[];
44
+ }>;
31
45
  private readonly inProgressMap;
32
- constructor(_logService: ILogService, _chatAgentService: IChatAgentService, _extensionService: IExtensionService, _contextKeyService: IContextKeyService);
46
+ private readonly _sessionTypeOptions;
47
+ private readonly _sessionTypeIcons;
48
+ private readonly _sessionTypeWelcomeTitles;
49
+ private readonly _sessionTypeWelcomeMessages;
50
+ private readonly _sessionTypeWelcomeTips;
51
+ private readonly _sessionTypeInputPlaceholders;
52
+ private readonly _sessions;
53
+ private readonly _editableSessions;
54
+ constructor(_logService: ILogService, _chatAgentService: IChatAgentService, _extensionService: IExtensionService, _contextKeyService: IContextKeyService, _menuService: IMenuService, _themeService: IThemeService, _labelService: ILabelService);
33
55
  reportInProgress(chatSessionType: string, count: number): void;
34
56
  getInProgress(): {
35
57
  displayName: string;
@@ -38,6 +60,12 @@ export declare class ChatSessionsService extends Disposable implements IChatSess
38
60
  private updateInProgressStatus;
39
61
  private registerContribution;
40
62
  private _isContributionAvailable;
63
+ /**
64
+ * Resolves a session type to its primary type, checking for alternative IDs.
65
+ * @param sessionType The session type or alternative ID to resolve
66
+ * @returns The primary session type, or undefined if not found or not available
67
+ */
68
+ private _resolveToPrimaryType;
41
69
  private _registerMenuItems;
42
70
  private _registerCommands;
43
71
  private _evaluateAvailability;
@@ -46,13 +74,15 @@ export declare class ChatSessionsService extends Disposable implements IChatSess
46
74
  private _registerAgent;
47
75
  getAllChatSessionContributions(): IChatSessionsExtensionPoint[];
48
76
  getAllChatSessionItemProviders(): IChatSessionItemProvider[];
49
- canResolveItemProvider(chatViewType: string): Promise<boolean>;
50
- canResolveContentProvider(chatViewType: string): Promise<boolean>;
51
- provideChatSessionItems(chatSessionType: string, token: CancellationToken): Promise<IChatSessionItem[]>;
77
+ hasChatSessionItemProvider(chatViewType: string): Promise<boolean>;
78
+ canResolveChatSession(chatSessionResource: URI): Promise<boolean>;
79
+ getAllChatSessionItems(token: CancellationToken): Promise<Array<{
80
+ readonly chatSessionType: string;
81
+ readonly items: IChatSessionItem[];
82
+ }>>;
83
+ private getChatSessionItems;
52
84
  registerChatSessionItemProvider(provider: IChatSessionItemProvider): IDisposable;
53
85
  registerChatSessionContentProvider(chatSessionType: string, provider: IChatSessionContentProvider): IDisposable;
54
- private readonly _sessions;
55
- private readonly _editableSessions;
56
86
  /**
57
87
  * Creates a new chat session by delegating to the appropriate provider
58
88
  * @param chatSessionType The type of chat session provider to use
@@ -60,14 +90,57 @@ export declare class ChatSessionsService extends Disposable implements IChatSess
60
90
  * @param token A cancellation token
61
91
  * @returns A session ID for the newly created session
62
92
  */
63
- provideNewChatSessionItem(chatSessionType: string, options: {
93
+ getNewChatSessionItem(chatSessionType: string, options: {
64
94
  request: IChatAgentRequest;
65
95
  metadata?: any;
66
96
  }, token: CancellationToken): Promise<IChatSessionItem>;
67
- provideChatSessionContent(chatSessionType: string, id: string, token: CancellationToken): Promise<ChatSession>;
68
- private _onWillDisposeSession;
69
- setEditableSession(sessionId: string, data: IEditableData | null): Promise<void>;
70
- getEditableData(sessionId: string): IEditableData | undefined;
71
- isEditable(sessionId: string): boolean;
97
+ getOrCreateChatSession(sessionResource: URI, token: CancellationToken): Promise<IChatSession>;
98
+ hasAnySessionOptions(sessionResource: URI): boolean;
99
+ getSessionOption(sessionResource: URI, optionId: string): string | undefined;
100
+ setSessionOption(sessionResource: URI, optionId: string, value: string): boolean;
101
+ setEditableSession(sessionResource: URI, data: IEditableData | null): Promise<void>;
102
+ getEditableData(sessionResource: URI): IEditableData | undefined;
103
+ isEditable(sessionResource: URI): boolean;
72
104
  notifySessionItemsChanged(chatSessionType: string): void;
105
+ /**
106
+ * Store option groups for a session type
107
+ */
108
+ setOptionGroupsForSessionType(chatSessionType: string, handle: number, optionGroups?: IChatSessionProviderOptionGroup[]): void;
109
+ /**
110
+ * Get available option groups for a session type
111
+ */
112
+ getOptionGroupsForSessionType(chatSessionType: string): IChatSessionProviderOptionGroup[] | undefined;
113
+ private _optionsChangeCallback?;
114
+ /**
115
+ * Set the callback for notifying extensions about option changes
116
+ */
117
+ setOptionsChangeCallback(callback: SessionOptionsChangedCallback): void;
118
+ /**
119
+ * Notify extension about option changes for a session
120
+ */
121
+ notifySessionOptionsChange(sessionResource: URI, updates: ReadonlyArray<{
122
+ optionId: string;
123
+ value: string;
124
+ }>): Promise<void>;
125
+ /**
126
+ * Get the icon for a specific session type
127
+ */
128
+ getIconForSessionType(chatSessionType: string): ThemeIcon | URI | undefined;
129
+ /**
130
+ * Get the welcome title for a specific session type
131
+ */
132
+ getWelcomeTitleForSessionType(chatSessionType: string): string | undefined;
133
+ /**
134
+ * Get the welcome message for a specific session type
135
+ */
136
+ getWelcomeMessageForSessionType(chatSessionType: string): string | undefined;
137
+ /**
138
+ * Get the input placeholder for a specific session type
139
+ */
140
+ getInputPlaceholderForSessionType(chatSessionType: string): string | undefined;
141
+ /**
142
+ * Get the capabilities for a specific session type
143
+ */
144
+ getCapabilitiesForSessionType(chatSessionType: string): IChatAgentAttachmentCapabilities | undefined;
145
+ getContentProviderSchemes(): string[];
73
146
  }