@codingame/monaco-vscode-chat-service-override 24.3.0 → 25.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 (271) hide show
  1. package/index.js +35 -35
  2. package/package.json +5 -5
  3. package/vscode/src/vs/workbench/contrib/chat/browser/{chatAccessibilityService.d.ts → accessibility/chatAccessibilityService.d.ts} +10 -8
  4. package/vscode/src/vs/workbench/contrib/chat/browser/{chatAccessibilityService.js → accessibility/chatAccessibilityService.js} +23 -11
  5. package/vscode/src/vs/workbench/contrib/chat/browser/{chatResponseAccessibleView.d.ts → accessibility/chatResponseAccessibleView.d.ts} +6 -0
  6. package/vscode/src/vs/workbench/contrib/chat/browser/{chatResponseAccessibleView.js → accessibility/chatResponseAccessibleView.js} +38 -10
  7. package/vscode/src/vs/workbench/contrib/chat/browser/{chatTerminalOutputAccessibleView.js → accessibility/chatTerminalOutputAccessibleView.js} +1 -1
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +7 -7
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +69 -60
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +2 -12
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.d.ts +3 -0
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +25 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +24 -22
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +13 -13
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +5 -5
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +48 -4
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +7 -7
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +12 -12
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +10 -10
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +16 -19
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +4 -4
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +35 -19
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +4 -3
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +22 -17
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.d.ts +1 -1
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +1 -1
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +3 -3
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -21
  32. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +31 -53
  33. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +61 -25
  34. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +482 -125
  35. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +16 -13
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +84 -93
  37. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +2 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +10 -8
  39. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +7 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +41 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +23 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +137 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +15 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +92 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +81 -32
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +335 -102
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +3 -2
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +47 -51
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +80 -8
  50. package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentResolveService.d.ts → attachments/chatAttachmentResolveService.d.ts} +2 -2
  51. package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentResolveService.js → attachments/chatAttachmentResolveService.js} +4 -4
  52. package/vscode/src/vs/workbench/contrib/chat/browser/{chatVariables.d.ts → attachments/chatVariables.d.ts} +3 -3
  53. package/vscode/src/vs/workbench/contrib/chat/browser/{chatVariables.js → attachments/chatVariables.js} +1 -1
  54. package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditing → attachments}/simpleBrowserEditorOverlay.js +21 -21
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +171 -206
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.d.ts +1 -1
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +2 -2
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -2
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +2 -2
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +1 -1
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +3 -3
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.d.ts +1 -1
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +1 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +1 -1
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +20 -20
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +14 -14
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +3 -3
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -4
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +4 -4
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +3 -3
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +3 -3
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +3 -3
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +1 -1
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +1 -1
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +4 -4
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +10 -8
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +5 -5
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +6 -2
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +1 -1
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +2 -2
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +1 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +1 -1
  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 +1 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.d.ts +1 -1
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +2 -2
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +5 -5
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +18 -18
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +1 -1
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +41 -41
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +1 -1
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +35 -35
  98. package/vscode/src/vs/workbench/contrib/chat/browser/{chatSessions.contribution.d.ts → chatSessions/chatSessions.contribution.d.ts} +7 -11
  99. package/vscode/src/vs/workbench/contrib/chat/browser/{chatSessions.contribution.js → chatSessions/chatSessions.contribution.js} +53 -106
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +18 -22
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +3 -3
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -29
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +13 -13
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +3 -3
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +64 -64
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +22 -0
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +90 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/{chatContextService.d.ts → contextContrib/chatContextService.d.ts} +3 -3
  111. package/vscode/src/vs/workbench/contrib/chat/browser/{chatContextService.js → contextContrib/chatContextService.js} +1 -1
  112. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +7 -7
  113. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +3 -3
  114. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +3 -3
  115. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  116. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
  117. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +4 -4
  118. package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsConfirmationService.d.ts → tools/languageModelToolsConfirmationService.d.ts} +4 -4
  119. package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsConfirmationService.js → tools/languageModelToolsConfirmationService.js} +47 -58
  120. package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsService.d.ts → tools/languageModelToolsService.d.ts} +5 -5
  121. package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsService.js → tools/languageModelToolsService.js} +21 -21
  122. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +1 -1
  123. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
  124. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  125. package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMarkdownAnchorService.d.ts +2 -2
  126. package/vscode/src/vs/workbench/contrib/chat/browser/{chatLayoutService.d.ts → widget/chatLayoutService.d.ts} +1 -1
  127. package/vscode/src/vs/workbench/contrib/chat/browser/{chatWidgetService.d.ts → widget/chatWidgetService.d.ts} +6 -2
  128. package/vscode/src/vs/workbench/contrib/chat/browser/{chatWidgetService.js → widget/chatWidgetService.js} +27 -5
  129. package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusWidget.d.ts → widget/input/chatStatusWidget.d.ts} +4 -2
  130. package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusWidget.js → widget/input/chatStatusWidget.js} +17 -10
  131. package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorContrib.js +12 -6
  132. package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorHover.d.ts +1 -1
  133. package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorHover.js +3 -3
  134. package/vscode/src/vs/workbench/contrib/chat/browser/{chatQuick.d.ts → widgetHosts/chatQuick.d.ts} +1 -1
  135. package/vscode/src/vs/workbench/contrib/chat/browser/{chatQuick.js → widgetHosts/chatQuick.js} +4 -4
  136. package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditor.d.ts → widgetHosts/editor/chatEditor.d.ts} +4 -5
  137. package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditor.js → widgetHosts/editor/chatEditor.js} +6 -6
  138. package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewPane.d.ts → widgetHosts/viewPane/chatViewPane.d.ts} +46 -31
  139. package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewPane.js → widgetHosts/viewPane/chatViewPane.js} +258 -154
  140. package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewTitleControl.d.ts → widgetHosts/viewPane/chatViewTitleControl.d.ts} +5 -12
  141. package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewTitleControl.js → widgetHosts/viewPane/chatViewTitleControl.js} +97 -85
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +176 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +89 -0
  144. package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceImpl.d.ts → chatService/chatServiceImpl.d.ts} +16 -20
  145. package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceImpl.js → chatService/chatServiceImpl.js} +97 -151
  146. package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceTelemetry.d.ts → chatService/chatServiceTelemetry.d.ts} +4 -4
  147. package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceTelemetry.js → chatService/chatServiceTelemetry.js} +2 -2
  148. package/vscode/src/vs/workbench/contrib/chat/common/{chatCodeMapperService.d.ts → editing/chatCodeMapperService.d.ts} +1 -1
  149. package/vscode/src/vs/workbench/contrib/chat/common/{chatModelStore.d.ts → model/chatModelStore.d.ts} +2 -2
  150. package/vscode/src/vs/workbench/contrib/chat/common/{chatProgressTypes → model/chatProgressTypes}/chatToolInvocation.d.ts +2 -2
  151. package/vscode/src/vs/workbench/contrib/chat/common/{chatProgressTypes → model/chatProgressTypes}/chatToolInvocation.js +4 -4
  152. package/vscode/src/vs/workbench/contrib/chat/common/{chatSessionStore.d.ts → model/chatSessionStore.d.ts} +14 -7
  153. package/vscode/src/vs/workbench/contrib/chat/common/{chatSessionStore.js → model/chatSessionStore.js} +164 -39
  154. package/vscode/src/vs/workbench/contrib/chat/common/{chatTransferService.d.ts → model/chatTransferService.d.ts} +3 -3
  155. package/vscode/src/vs/workbench/contrib/chat/common/{chatTransferService.js → model/chatTransferService.js} +1 -1
  156. package/vscode/src/vs/workbench/contrib/chat/common/{chatSlashCommands.d.ts → participants/chatSlashCommands.d.ts} +2 -2
  157. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +25 -49
  158. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +1 -1
  159. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +2 -2
  160. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +1 -1
  161. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +6 -6
  162. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -1
  163. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +3 -3
  164. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +1 -1
  165. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +29 -29
  166. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
  167. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +54 -54
  168. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +11 -4
  169. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +83 -18
  170. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +11 -5
  171. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +27 -10
  172. package/vscode/src/vs/workbench/contrib/chat/common/{chatTodoListService.d.ts → tools/chatTodoListService.d.ts} +1 -1
  173. package/vscode/src/vs/workbench/contrib/chat/common/{chatTodoListService.js → tools/chatTodoListService.js} +1 -1
  174. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +1 -1
  175. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +29 -29
  176. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +2 -2
  177. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +3 -3
  178. package/vscode/src/vs/workbench/contrib/chat/common/{chatResponseResourceFileSystemProvider.d.ts → widget/chatResponseResourceFileSystemProvider.d.ts} +1 -1
  179. package/vscode/src/vs/workbench/contrib/chat/common/{chatResponseResourceFileSystemProvider.js → widget/chatResponseResourceFileSystemProvider.js} +4 -4
  180. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +5 -5
  181. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
  182. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +23 -23
  183. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  184. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.js +1 -1
  185. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +1 -0
  186. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  187. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +47 -30
  188. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +1 -1
  189. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.d.ts +1 -1
  190. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
  191. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +15 -1
  192. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +33 -11
  193. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +4 -3
  194. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +6 -5
  195. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +1 -1
  196. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +12 -2
  197. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -0
  198. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +17 -2
  199. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +12 -2
  200. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +10 -1
  201. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +22 -1
  202. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +3 -2
  203. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +100 -23
  204. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
  205. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +6 -6
  206. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +2 -1
  207. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +19 -6
  208. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{commandLineAutoApprover.d.ts → tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts} +11 -12
  209. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{commandLineAutoApprover.js → tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js} +83 -6
  210. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
  211. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +156 -0
  212. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +17 -2
  213. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
  214. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +1 -1
  215. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +64 -26
  216. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +1 -0
  217. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +16 -8
  218. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
  219. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +31 -0
  220. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.d.ts +1 -1
  221. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
  222. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +1 -1
  223. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -4
  224. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.d.ts +1 -1
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -4
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +3 -2
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +55 -23
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -1
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +3 -3
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +3 -3
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +85 -46
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.d.ts +1 -1
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +16 -16
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.d.ts +1 -1
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +9 -9
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.d.ts +1 -1
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +16 -16
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +9 -5
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +1 -1
  241. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +0 -46
  242. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +0 -248
  243. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +0 -36
  244. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +0 -184
  245. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +0 -19
  246. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +0 -22
  247. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +0 -229
  248. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +0 -102
  249. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +0 -495
  250. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +0 -64
  251. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +0 -386
  252. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +0 -299
  253. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewPane.css +0 -142
  254. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewTitleControl.css +0 -39
  255. /package/vscode/src/vs/workbench/contrib/chat/browser/{chatTerminalOutputAccessibleView.d.ts → accessibility/chatTerminalOutputAccessibleView.d.ts} +0 -0
  256. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → attachments/media}/simpleBrowserOverlay.css +0 -0
  257. /package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditing → attachments}/simpleBrowserEditorOverlay.d.ts +0 -0
  258. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatEditing/media}/chatEditingEditorOverlay.css +0 -0
  259. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatEditing/media}/chatEditorController.css +0 -0
  260. /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMarkdownAnchorService.js +0 -0
  261. /package/vscode/src/vs/workbench/contrib/chat/browser/{chatLayoutService.js → widget/chatLayoutService.js} +0 -0
  262. /package/vscode/src/vs/workbench/contrib/chat/browser/{chatEdinputInputContentProvider.d.ts → widget/input/editor/chatEditorInputContentProvider.d.ts} +0 -0
  263. /package/vscode/src/vs/workbench/contrib/chat/browser/{chatEdinputInputContentProvider.js → widget/input/editor/chatEditorInputContentProvider.js} +0 -0
  264. /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorContrib.d.ts +0 -0
  265. /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/editorHoverWrapper.d.ts +0 -0
  266. /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/editorHoverWrapper.js +0 -0
  267. /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/media/editorHoverWrapper.css +0 -0
  268. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/input/media}/chatStatusWidget.css +0 -0
  269. /package/vscode/src/vs/workbench/contrib/chat/common/{chatCodeMapperService.js → editing/chatCodeMapperService.js} +0 -0
  270. /package/vscode/src/vs/workbench/contrib/chat/common/{chatModelStore.js → model/chatModelStore.js} +0 -0
  271. /package/vscode/src/vs/workbench/contrib/chat/common/{chatSlashCommands.js → participants/chatSlashCommands.js} +0 -0
@@ -2,7 +2,7 @@
2
2
  import { registerCss } from '@codingame/monaco-vscode-api/css';
3
3
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
4
  import * as chatViewPane from './media/chatViewPane.css';
5
- import { $, append, setVisibility, getWindow, addDisposableListener, EventType, EventHelper } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
+ import { $, append, addDisposableListener, EventType, setVisibility, getWindow, EventHelper } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
6
6
  import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
7
7
  import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
8
8
  import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
@@ -44,38 +44,34 @@ import { ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/wo
44
44
  import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
45
45
  import { StartupKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
46
46
  import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
47
- import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
48
- import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
49
- import { CHAT_PROVIDER_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParticipantContribTypes';
50
- import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
47
+ import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service';
48
+ import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
49
+ import { CHAT_PROVIDER_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatParticipantContribTypes';
50
+ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
51
51
  import { localChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
52
52
  import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
53
- import { LocalChatSessionUri, getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatUri';
53
+ import { LocalChatSessionUri, getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
54
54
  import { ChatConfiguration, ChatAgentLocation, ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
55
- import { showCloseActiveChatNotification } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatCloseNotification';
56
- import { AgentSessionsControl } from './agentSessions/agentSessionsControl.js';
57
- import { AgentSessionsListDelegate } from './agentSessions/agentSessionsViewer.js';
58
- import { ChatWidget } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
55
+ import { AgentSessionsControl } from '../../agentSessions/agentSessionsControl.js';
56
+ import { AgentSessionsListDelegate } from '../../agentSessions/agentSessionsViewer.js';
57
+ import { ChatWidget } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatWidget';
59
58
  import { ChatViewWelcomeController } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController';
60
- import { Position } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
59
+ import { Position, LayoutSettings } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
61
60
  import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
62
61
  import { AgentSessionsViewerOrientation, AgentSessionsViewerPosition } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
63
62
  import { Link } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/browser/link';
64
63
  import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
65
64
  import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
66
65
  import { disposableTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
67
- import { AgentSessionsFilter } from './agentSessions/agentSessionsFilter.js';
66
+ import { AgentSessionsFilter } from '../../agentSessions/agentSessionsFilter.js';
68
67
  import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
68
+ import { HoverPosition } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverWidget';
69
69
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
70
70
 
71
71
  var ChatViewPane_1;
72
72
  registerCss(chatViewPane);
73
73
  let ChatViewPane = class ChatViewPane extends ViewPane {
74
74
  static { ChatViewPane_1 = this; }
75
- static { this.SESSIONS_LIMIT = 3; }
76
- static { this.SESSIONS_SIDEBAR_WIDTH = 300; }
77
- static { this.SESSIONS_SIDEBAR_VIEW_MIN_WIDTH = 300 + this.SESSIONS_SIDEBAR_WIDTH; }
78
- get widget() { return this._widget; }
79
75
  constructor(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService, storageService, chatService, chatAgentService, logService, layoutService, chatSessionsService, telemetryService, lifecycleService, progressService, agentSessionsService) {
80
76
  super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
81
77
  this.storageService = storageService;
@@ -87,25 +83,38 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
87
83
  this.telemetryService = telemetryService;
88
84
  this.progressService = progressService;
89
85
  this.agentSessionsService = agentSessionsService;
86
+ this.lastDimensionsPerOrientation = ( new Map());
87
+ this.modelRef = this._register(( new MutableDisposable()));
90
88
  this.sessionsCount = 0;
91
89
  this.sessionsViewerLimited = true;
92
90
  this.sessionsViewerOrientation = AgentSessionsViewerOrientation.Stacked;
93
- this.sessionsViewerPosition = AgentSessionsViewerPosition.Right;
94
- this.modelRef = this._register(( new MutableDisposable()));
91
+ this.sessionsViewerOrientationConfiguration = 'sideBySide';
95
92
  this.memento = ( new Memento(`interactive-session-view-${CHAT_PROVIDER_ID}`, this.storageService));
96
93
  this.viewState = this.memento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
97
94
  if (lifecycleService.startupKind !== StartupKind.ReloadedWindow &&
98
95
  this.configurationService.getValue(ChatConfiguration.RestoreLastPanelSession) === false) {
99
96
  this.viewState.sessionId = undefined;
100
97
  }
98
+ this.sessionsViewerLimited = this.viewState.sessionsViewerLimited ?? true;
101
99
  this.chatViewLocationContext = ChatContextKeys.panelLocation.bindTo(contextKeyService);
102
100
  this.sessionsViewerLimitedContext = ChatContextKeys.agentSessionsViewerLimited.bindTo(contextKeyService);
103
101
  this.sessionsViewerOrientationContext = ChatContextKeys.agentSessionsViewerOrientation.bindTo(contextKeyService);
104
102
  this.sessionsViewerPositionContext = ChatContextKeys.agentSessionsViewerPosition.bindTo(contextKeyService);
103
+ this.sessionsViewerVisibilityContext = ChatContextKeys.agentSessionsViewerVisible.bindTo(contextKeyService);
105
104
  this.updateContextKeys(false);
106
105
  this.registerListeners();
107
106
  }
108
107
  updateContextKeys(fromEvent) {
108
+ const { position, location } = this.getViewPositionAndLocation();
109
+ this.sessionsViewerLimitedContext.set(this.sessionsViewerLimited);
110
+ this.chatViewLocationContext.set(location ?? ViewContainerLocation.AuxiliaryBar);
111
+ this.sessionsViewerOrientationContext.set(this.sessionsViewerOrientation);
112
+ this.sessionsViewerPositionContext.set(position === Position.RIGHT ? AgentSessionsViewerPosition.Right : AgentSessionsViewerPosition.Left);
113
+ if (fromEvent && this.lastDimensions) {
114
+ this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
115
+ }
116
+ }
117
+ getViewPositionAndLocation() {
109
118
  const viewLocation = this.viewDescriptorService.getViewLocationById(this.id);
110
119
  const sideBarPosition = this.layoutService.getSideBarPosition();
111
120
  const panelPosition = this.layoutService.getPanelPosition();
@@ -121,44 +130,49 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
121
130
  sideSessionsOnRightPosition = sideBarPosition === Position.LEFT;
122
131
  break;
123
132
  }
124
- this.sessionsViewerPosition = sideSessionsOnRightPosition ? AgentSessionsViewerPosition.Right : AgentSessionsViewerPosition.Left;
125
- this.sessionsViewerLimitedContext.set(this.sessionsViewerLimited);
126
- this.chatViewLocationContext.set(viewLocation ?? ViewContainerLocation.AuxiliaryBar);
127
- this.sessionsViewerOrientationContext.set(this.sessionsViewerOrientation);
128
- this.sessionsViewerPositionContext.set(this.sessionsViewerPosition);
129
- if (fromEvent && this.lastDimensions) {
130
- this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
131
- }
133
+ return {
134
+ position: sideSessionsOnRightPosition ? Position.RIGHT : Position.LEFT,
135
+ location: viewLocation ?? ViewContainerLocation.AuxiliaryBar
136
+ };
132
137
  }
133
138
  updateViewPaneClasses(fromEvent) {
134
139
  const welcomeEnabled = this.configurationService.getValue(ChatConfiguration.ChatViewWelcomeEnabled) !== false;
135
140
  this.viewPaneContainer?.classList.toggle('chat-view-welcome-enabled', welcomeEnabled);
141
+ const activityBarLocationDefault = this.configurationService.getValue(LayoutSettings.ACTIVITY_BAR_LOCATION) === 'default';
142
+ this.viewPaneContainer?.classList.toggle('activity-bar-location-default', activityBarLocationDefault);
143
+ this.viewPaneContainer?.classList.toggle('activity-bar-location-other', !activityBarLocationDefault);
144
+ const { position, location } = this.getViewPositionAndLocation();
145
+ this.viewPaneContainer?.classList.toggle('chat-view-location-auxiliarybar', location === ViewContainerLocation.AuxiliaryBar);
146
+ this.viewPaneContainer?.classList.toggle('chat-view-location-sidebar', location === ViewContainerLocation.Sidebar);
147
+ this.viewPaneContainer?.classList.toggle('chat-view-location-panel', location === ViewContainerLocation.Panel);
148
+ this.viewPaneContainer?.classList.toggle('chat-view-position-left', position === Position.LEFT);
149
+ this.viewPaneContainer?.classList.toggle('chat-view-position-right', position === Position.RIGHT);
136
150
  if (fromEvent && this.lastDimensions) {
137
151
  this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
138
152
  }
139
153
  }
140
154
  registerListeners() {
141
155
  this._register(this.chatAgentService.onDidChangeAgents(() => this.onDidChangeAgents()));
142
- this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('workbench.sideBar.location'))(() => this.updateContextKeys(true)));
143
- this._register(this.layoutService.onDidChangePanelPosition(() => this.updateContextKeys(true)));
144
- this._register(Event.filter(this.viewDescriptorService.onDidChangeContainerLocation, e => e.viewContainer === this.viewDescriptorService.getViewContainerByViewId(this.id))(() => this.updateContextKeys(true)));
145
- this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration(ChatConfiguration.ChatViewWelcomeEnabled))(() => this.updateViewPaneClasses(true)));
156
+ this._register(Event.any(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('workbench.sideBar.location')), this.layoutService.onDidChangePanelPosition, Event.filter(this.viewDescriptorService.onDidChangeContainerLocation, e => e.viewContainer === this.viewDescriptorService.getViewContainerByViewId(this.id)))(() => {
157
+ this.updateContextKeys(false);
158
+ this.updateViewPaneClasses(true );
159
+ }));
160
+ this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => {
161
+ return e.affectsConfiguration(ChatConfiguration.ChatViewWelcomeEnabled) || e.affectsConfiguration(LayoutSettings.ACTIVITY_BAR_LOCATION);
162
+ })(() => this.updateViewPaneClasses(true)));
146
163
  }
147
164
  onDidChangeAgents() {
148
165
  if (this.chatAgentService.getDefaultAgent(ChatAgentLocation.Chat)) {
149
166
  if (!this._widget?.viewModel && !this.restoringSession) {
150
- const info = this.getTransferredOrPersistedSessionInfo();
167
+ const sessionResource = this.getTransferredOrPersistedSessionInfo();
151
168
  this.restoringSession =
152
- (info.sessionId ? this.chatService.getOrRestoreSession(LocalChatSessionUri.forSession(info.sessionId)) : Promise.resolve(undefined)).then(async (modelRef) => {
169
+ (sessionResource ? this.chatService.getOrRestoreSession(sessionResource) : Promise.resolve(undefined)).then(async (modelRef) => {
153
170
  if (!this._widget) {
154
171
  return;
155
172
  }
156
173
  const wasVisible = this._widget.visible;
157
174
  try {
158
175
  this._widget.setVisible(false);
159
- if (info.inputState && modelRef) {
160
- modelRef.object.inputModel.setState(info.inputState);
161
- }
162
176
  await this.showModel(modelRef);
163
177
  }
164
178
  finally {
@@ -171,58 +185,10 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
171
185
  this._onDidChangeViewWelcomeState.fire();
172
186
  }
173
187
  getTransferredOrPersistedSessionInfo() {
174
- if (this.chatService.transferredSessionData?.location === ChatAgentLocation.Chat) {
175
- const sessionId = this.chatService.transferredSessionData.sessionId;
176
- return {
177
- sessionId,
178
- inputState: this.chatService.transferredSessionData.inputState,
179
- };
180
- }
181
- return { sessionId: this.viewState.sessionId };
182
- }
183
- getActionsContext() {
184
- return this._widget?.viewModel ? {
185
- sessionResource: this._widget.viewModel.sessionResource,
186
- $mid: MarshalledId.ChatViewContext
187
- } : undefined;
188
- }
189
- async showModel(modelRef, startNewSession = true) {
190
- if (this.modelRef.value?.object.requestInProgress.get()) {
191
- const closingSessionResource = this.modelRef.value.object.sessionResource;
192
- this.instantiationService.invokeFunction(showCloseActiveChatNotification, closingSessionResource);
193
- }
194
- const oldModelResource = this.modelRef.value?.object.sessionResource;
195
- this.modelRef.value = undefined;
196
- let ref;
197
- if (startNewSession) {
198
- ref = modelRef ?? (this.chatService.transferredSessionData?.sessionId && this.chatService.transferredSessionData?.location === ChatAgentLocation.Chat
199
- ? await this.chatService.getOrRestoreSession(LocalChatSessionUri.forSession(this.chatService.transferredSessionData.sessionId))
200
- : this.chatService.startSession(ChatAgentLocation.Chat));
201
- if (!ref) {
202
- throw ( new Error('Could not start chat session'));
203
- }
204
- }
205
- this.modelRef.value = ref;
206
- const model = ref?.object;
207
- if (model) {
208
- await this.updateWidgetLockState(model.sessionResource);
209
- this.viewState.sessionId = model.sessionId;
210
- }
211
- this._widget.setModel(model);
212
- this.titleControl?.update(model);
213
- this.updateActions();
214
- if (oldModelResource) {
215
- this.agentSessionsService.model.getSession(oldModelResource)?.setRead(true);
188
+ if (this.chatService.transferredSessionResource) {
189
+ return this.chatService.transferredSessionResource;
216
190
  }
217
- return model;
218
- }
219
- shouldShowWelcome() {
220
- const noPersistedSessions = !this.chatService.hasSessions();
221
- const hasCoreAgent = ( this.chatAgentService.getAgents().some(agent => agent.isCore && agent.locations.includes(ChatAgentLocation.Chat)));
222
- const hasDefaultAgent = this.chatAgentService.getDefaultAgent(ChatAgentLocation.Chat) !== undefined;
223
- const shouldShow = !hasCoreAgent && (!hasDefaultAgent || !this._widget?.viewModel && noPersistedSessions);
224
- this.logService.trace(`ChatViewPane#shouldShowWelcome() = ${shouldShow}: hasCoreAgent=${hasCoreAgent} hasDefaultAgent=${hasDefaultAgent} || noViewModel=${!this._widget?.viewModel} && noPersistedSessions=${noPersistedSessions}`);
225
- return !!shouldShow;
191
+ return this.viewState.sessionId ? LocalChatSessionUri.forSession(this.viewState.sessionId) : undefined;
226
192
  }
227
193
  renderBody(parent) {
228
194
  super.renderBody(parent);
@@ -241,12 +207,19 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
241
207
  this.registerControlsListeners(sessionsControl, chatWidget, welcomeController);
242
208
  this.updateSessionsControlVisibility();
243
209
  }
210
+ static { this.SESSIONS_LIMIT = 3; }
211
+ static { this.SESSIONS_SIDEBAR_WIDTH = 300; }
212
+ static { this.SESSIONS_SIDEBAR_VIEW_MIN_WIDTH = 300 + this.SESSIONS_SIDEBAR_WIDTH; }
244
213
  createSessionsControl(parent) {
245
214
  const that = this;
246
215
  const sessionsContainer = this.sessionsContainer = parent.appendChild($('.agent-sessions-container'));
247
216
  const sessionsTitleContainer = this.sessionsTitleContainer = append(sessionsContainer, $('.agent-sessions-title-container'));
248
217
  const sessionsTitle = this.sessionsTitle = append(sessionsTitleContainer, $('span.agent-sessions-title'));
249
- sessionsTitle.textContent = this.sessionsViewerLimited ? ( localize(5646, "Recent Sessions")) : ( localize(5647, "All Sessions"));
218
+ this.updateSessionsControlTitle();
219
+ this._register(addDisposableListener(sessionsTitle, EventType.CLICK, () => {
220
+ this.sessionsControl?.scrollToTop();
221
+ this.sessionsControl?.focus();
222
+ }));
250
223
  const sessionsToolbarContainer = append(sessionsTitleContainer, $('.agent-sessions-toolbar'));
251
224
  const sessionsToolbar = this._register(this.instantiationService.createInstance(MenuWorkbenchToolBar, sessionsToolbarContainer, MenuId.AgentSessionsToolbar, {
252
225
  menuOptions: { shouldForwardArgs: true }
@@ -256,6 +229,9 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
256
229
  limitResults: () => {
257
230
  return that.sessionsViewerLimited ? ChatViewPane_1.SESSIONS_LIMIT : undefined;
258
231
  },
232
+ groupResults: () => {
233
+ return !that.sessionsViewerLimited;
234
+ },
259
235
  overrideExclude(session) {
260
236
  if (that.sessionsViewerLimited) {
261
237
  if (session.isArchived()) {
@@ -267,46 +243,96 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
267
243
  },
268
244
  notifyResults(count) {
269
245
  that.notifySessionsControlCountChanged(count);
270
- }
246
+ },
271
247
  }));
272
248
  this._register(Event.runAndSubscribe(sessionsFilter.onDidChange, () => {
273
249
  sessionsToolbarContainer.classList.toggle('filtered', !sessionsFilter.isDefault());
274
250
  }));
275
251
  this.sessionsControlContainer = append(sessionsContainer, $('.agent-sessions-control-container'));
276
252
  const sessionsControl = this.sessionsControl = this._register(this.instantiationService.createInstance(AgentSessionsControl, this.sessionsControlContainer, {
277
- allowOpenSessionsInPanel: true,
278
- filter: sessionsFilter
253
+ filter: sessionsFilter,
254
+ overrideStyles: this.getLocationBasedColors().listOverrideStyles,
255
+ getHoverPosition: () => {
256
+ const { position } = this.getViewPositionAndLocation();
257
+ return position === Position.RIGHT ? HoverPosition.LEFT : HoverPosition.RIGHT;
258
+ },
259
+ trackActiveEditorSession: () => {
260
+ return !this._widget || this._widget.isEmpty();
261
+ },
262
+ overrideCompare(sessionA, sessionB) {
263
+ if (that.sessionsViewerLimited) {
264
+ const aIsUnread = !sessionA.isRead();
265
+ const bIsUnread = !sessionB.isRead();
266
+ if (aIsUnread && !bIsUnread) {
267
+ return -1;
268
+ }
269
+ if (!aIsUnread && bIsUnread) {
270
+ return 1;
271
+ }
272
+ }
273
+ return undefined;
274
+ }
279
275
  }));
280
276
  this._register(this.onDidChangeBodyVisibility(visible => sessionsControl.setVisible(visible)));
281
277
  sessionsToolbar.context = sessionsControl;
282
278
  this.sessionsLinkContainer = append(sessionsContainer, $('.agent-sessions-link-container'));
283
279
  this.sessionsLink = this._register(this.instantiationService.createInstance(Link, this.sessionsLinkContainer, {
284
- label: this.sessionsViewerLimited ? ( localize(5648, "Show All Sessions")) : ( localize(5649, "Show Recent Sessions")),
280
+ label: this.sessionsViewerLimited ? ( localize(5874, "Show More")) : ( localize(5875, "Show Less")),
285
281
  href: '',
286
282
  }, {
287
283
  opener: () => {
288
284
  this.sessionsViewerLimited = !this.sessionsViewerLimited;
289
- this.notifySessionsControlLimitedChanged(true);
285
+ this.viewState.sessionsViewerLimited = this.sessionsViewerLimited;
286
+ this.notifySessionsControlLimitedChanged(true , true );
290
287
  sessionsControl.focus();
291
288
  }
292
289
  }));
290
+ this._register(Event.runAndSubscribe(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration(ChatConfiguration.ChatViewSessionsOrientation)), e => {
291
+ const newSessionsViewerOrientationConfiguration = this.configurationService.getValue(ChatConfiguration.ChatViewSessionsOrientation);
292
+ this.doUpdateConfiguredSessionsViewerOrientation(newSessionsViewerOrientationConfiguration, { updateConfiguration: false, layout: !!e });
293
+ }));
293
294
  return sessionsControl;
294
295
  }
295
- notifySessionsControlLimitedChanged(triggerLayout) {
296
- this.sessionsViewerLimitedContext.set(this.sessionsViewerLimited);
297
- if (this.sessionsTitle) {
298
- this.sessionsTitle.textContent = this.sessionsViewerLimited ? ( localize(5646, "Recent Sessions")) : ( localize(5647, "All Sessions"));
296
+ getSessionsViewerOrientation() {
297
+ return this.sessionsViewerOrientation;
298
+ }
299
+ updateConfiguredSessionsViewerOrientation(orientation) {
300
+ return this.doUpdateConfiguredSessionsViewerOrientation(orientation, { updateConfiguration: true, layout: true });
301
+ }
302
+ doUpdateConfiguredSessionsViewerOrientation(orientation, options) {
303
+ const oldSessionsViewerOrientationConfiguration = this.sessionsViewerOrientationConfiguration;
304
+ let validatedOrientation;
305
+ if (orientation === 'stacked' || orientation === 'sideBySide') {
306
+ validatedOrientation = orientation;
307
+ }
308
+ else {
309
+ validatedOrientation = 'sideBySide';
310
+ }
311
+ this.sessionsViewerOrientationConfiguration = validatedOrientation;
312
+ if (oldSessionsViewerOrientationConfiguration === this.sessionsViewerOrientationConfiguration) {
313
+ return;
314
+ }
315
+ if (options.updateConfiguration) {
316
+ this.configurationService.updateValue(ChatConfiguration.ChatViewSessionsOrientation, validatedOrientation);
299
317
  }
318
+ if (options.layout && this.lastDimensions) {
319
+ this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
320
+ }
321
+ }
322
+ notifySessionsControlLimitedChanged(triggerLayout, triggerUpdate) {
323
+ this.sessionsViewerLimitedContext.set(this.sessionsViewerLimited);
324
+ this.updateSessionsControlTitle();
300
325
  if (this.sessionsLink) {
301
326
  this.sessionsLink.link = {
302
- label: this.sessionsViewerLimited ? ( localize(5648, "Show All Sessions")) : ( localize(5649, "Show Recent Sessions")),
327
+ label: this.sessionsViewerLimited ? ( localize(5874, "Show More")) : ( localize(5875, "Show Less")),
303
328
  href: ''
304
329
  };
305
330
  }
306
- this.sessionsControl?.update();
331
+ const updatePromise = triggerUpdate ? this.sessionsControl?.update() : undefined;
307
332
  if (triggerLayout && this.lastDimensions) {
308
333
  this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
309
334
  }
335
+ return updatePromise ?? Promise.resolve();
310
336
  }
311
337
  notifySessionsControlCountChanged(newSessionsCount) {
312
338
  const countChanged = typeof newSessionsCount === 'number' && newSessionsCount !== this.sessionsCount;
@@ -318,6 +344,12 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
318
344
  }
319
345
  }
320
346
  }
347
+ updateSessionsControlTitle() {
348
+ if (!this.sessionsTitle) {
349
+ return;
350
+ }
351
+ this.sessionsTitle.textContent = this.sessionsViewerLimited ? ( localize(5876, "Recent Sessions")) : ( localize(5877, "Sessions"));
352
+ }
321
353
  updateSessionsControlVisibility() {
322
354
  if (!this.sessionsContainer || !this.viewPaneContainer) {
323
355
  return { changed: false, visible: false };
@@ -334,17 +366,25 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
334
366
  (this.sessionsCount > 0 || !this.sessionsViewerLimited);
335
367
  }
336
368
  else {
337
- newSessionsContainerVisible = !!this.lastDimensions && this.lastDimensions.width >= ChatViewPane_1.SESSIONS_SIDEBAR_VIEW_MIN_WIDTH;
369
+ newSessionsContainerVisible =
370
+ !this.welcomeController?.isShowingWelcome.get() &&
371
+ !!this.lastDimensions && this.lastDimensions.width >= ChatViewPane_1.SESSIONS_SIDEBAR_VIEW_MIN_WIDTH;
338
372
  }
339
373
  }
340
374
  this.viewPaneContainer.classList.toggle('has-sessions-control', newSessionsContainerVisible);
341
375
  const sessionsContainerVisible = this.sessionsContainer.style.display !== 'none';
342
376
  setVisibility(newSessionsContainerVisible, this.sessionsContainer);
377
+ this.sessionsViewerVisibilityContext.set(newSessionsContainerVisible);
343
378
  return {
344
379
  changed: sessionsContainerVisible !== newSessionsContainerVisible,
345
380
  visible: newSessionsContainerVisible
346
381
  };
347
382
  }
383
+ getFocusedSessions() {
384
+ return this.sessionsControl?.getFocus() ?? [];
385
+ }
386
+ static { this.MIN_CHAT_WIDGET_HEIGHT = 120; }
387
+ get widget() { return this._widget; }
348
388
  createChatControl(parent) {
349
389
  const chatControlsContainer = append(parent, $('.chat-controls-container'));
350
390
  const locationBasedColors = this.getLocationBasedColors();
@@ -383,7 +423,6 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
383
423
  }
384
424
  createChatTitleControl(parent) {
385
425
  this.titleControl = this._register(this.instantiationService.createInstance(ChatViewTitleControl, parent, {
386
- updateTitle: title => this.updateTitle(title),
387
426
  focusChat: () => this._widget.focusInput()
388
427
  }));
389
428
  this._register(this.titleControl.onDidChangeHeight(() => {
@@ -399,9 +438,13 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
399
438
  }
400
439
  this.notifySessionsControlCountChanged();
401
440
  }));
402
- this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration(ChatConfiguration.ChatViewSessionsOrientation))(() => {
403
- if (this.lastDimensions) {
404
- this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
441
+ this._register(chatWidget.onDidChangeViewModel(() => {
442
+ if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
443
+ return;
444
+ }
445
+ const sessionResource = chatWidget.viewModel?.sessionResource;
446
+ if (sessionResource) {
447
+ sessionsControl.reveal(sessionResource);
405
448
  }
406
449
  }));
407
450
  }
@@ -416,13 +459,61 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
416
459
  }));
417
460
  }
418
461
  async applyModel() {
419
- const info = this.getTransferredOrPersistedSessionInfo();
420
- const modelRef = info.sessionId ? await this.chatService.getOrRestoreSession(LocalChatSessionUri.forSession(info.sessionId)) : undefined;
421
- if (modelRef && info.inputState) {
422
- modelRef.object.inputModel.setState(info.inputState);
423
- }
462
+ const sessionResource = this.getTransferredOrPersistedSessionInfo();
463
+ const modelRef = sessionResource ? await this.chatService.getOrRestoreSession(sessionResource) : undefined;
424
464
  await this.showModel(modelRef);
425
465
  }
466
+ async showModel(modelRef, startNewSession = true) {
467
+ const oldModelResource = this.modelRef.value?.object.sessionResource;
468
+ this.modelRef.value = undefined;
469
+ let ref;
470
+ if (startNewSession) {
471
+ ref = modelRef ?? (this.chatService.transferredSessionResource
472
+ ? await this.chatService.getOrRestoreSession(this.chatService.transferredSessionResource)
473
+ : this.chatService.startSession(ChatAgentLocation.Chat));
474
+ if (!ref) {
475
+ throw ( new Error('Could not start chat session'));
476
+ }
477
+ }
478
+ this.modelRef.value = ref;
479
+ const model = ref?.object;
480
+ if (model) {
481
+ await this.updateWidgetLockState(model.sessionResource);
482
+ this.viewState.sessionId = model.sessionId;
483
+ }
484
+ this._widget.setModel(model);
485
+ this.titleControl?.update(model);
486
+ this.updateActions();
487
+ if (oldModelResource) {
488
+ this.agentSessionsService.model.getSession(oldModelResource)?.setRead(true);
489
+ }
490
+ return model;
491
+ }
492
+ async updateWidgetLockState(sessionResource) {
493
+ const sessionType = getChatSessionType(sessionResource);
494
+ if (sessionType === localChatSessionType) {
495
+ this._widget.unlockFromCodingAgent();
496
+ return;
497
+ }
498
+ let canResolve = false;
499
+ try {
500
+ canResolve = await this.chatSessionsService.canResolveChatSession(sessionResource);
501
+ }
502
+ catch (error) {
503
+ this.logService.warn(`Failed to resolve chat session '${( sessionResource.toString())}' for locking`, error);
504
+ }
505
+ if (!canResolve) {
506
+ this._widget.unlockFromCodingAgent();
507
+ return;
508
+ }
509
+ const contribution = this.chatSessionsService.getChatSessionContribution(sessionType);
510
+ if (contribution) {
511
+ this._widget.lockToCodingAgent(contribution.name, contribution.displayName, contribution.type);
512
+ }
513
+ else {
514
+ this._widget.unlockFromCodingAgent();
515
+ }
516
+ }
426
517
  async clear() {
427
518
  this.updateViewState();
428
519
  await this.showModel(undefined);
@@ -444,13 +535,20 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
444
535
  return this.showModel(newModelRef);
445
536
  });
446
537
  }
447
- focusInput() {
448
- this._widget.focusInput();
449
- }
450
538
  focus() {
451
539
  super.focus();
540
+ this.focusInput();
541
+ }
542
+ focusInput() {
452
543
  this._widget.focusInput();
453
544
  }
545
+ focusSessions() {
546
+ if (this.sessionsContainer?.style.display === 'none') {
547
+ return false;
548
+ }
549
+ this.sessionsControl?.focus();
550
+ return true;
551
+ }
454
552
  layoutBody(height, width) {
455
553
  super.layoutBody(height, width);
456
554
  this.lastDimensions = { height, width };
@@ -461,6 +559,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
461
559
  remainingWidth -= widthReduction;
462
560
  remainingHeight -= this.titleControl?.getHeight() ?? 0;
463
561
  this._widget.layout(remainingHeight, remainingWidth);
562
+ this.lastDimensionsPerOrientation.set(this.sessionsViewerOrientation, { height, width });
464
563
  }
465
564
  layoutSessionsControl(height, width) {
466
565
  let heightReduction = 0;
@@ -468,10 +567,9 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
468
567
  if (!this.sessionsContainer || !this.sessionsControlContainer || !this.sessionsControl || !this.viewPaneContainer || !this.sessionsTitleContainer || !this.sessionsLinkContainer || !this.sessionsTitle || !this.sessionsLink) {
469
568
  return { heightReduction, widthReduction };
470
569
  }
471
- const configuredSessionsViewerOrientation = this.configurationService.getValue(ChatConfiguration.ChatViewSessionsOrientation);
472
570
  const oldSessionsViewerOrientation = this.sessionsViewerOrientation;
473
571
  let newSessionsViewerOrientation;
474
- switch (configuredSessionsViewerOrientation) {
572
+ switch (this.sessionsViewerOrientationConfiguration) {
475
573
  case 'stacked':
476
574
  newSessionsViewerOrientation = AgentSessionsViewerOrientation.Stacked;
477
575
  break;
@@ -480,24 +578,47 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
480
578
  }
481
579
  this.sessionsViewerOrientation = newSessionsViewerOrientation;
482
580
  if (newSessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
483
- this.viewPaneContainer.classList.add('sessions-control-orientation-sidebyside');
484
- this.viewPaneContainer.classList.toggle('sessions-control-position-left', this.sessionsViewerPosition === AgentSessionsViewerPosition.Left);
581
+ this.viewPaneContainer.classList.toggle('sessions-control-orientation-sidebyside', true);
582
+ this.viewPaneContainer.classList.toggle('sessions-control-orientation-stacked', false);
485
583
  this.sessionsViewerOrientationContext.set(AgentSessionsViewerOrientation.SideBySide);
486
584
  }
487
585
  else {
488
- this.viewPaneContainer.classList.remove('sessions-control-orientation-sidebyside');
489
- this.viewPaneContainer.classList.remove('sessions-control-position-left');
586
+ this.viewPaneContainer.classList.toggle('sessions-control-orientation-sidebyside', false);
587
+ this.viewPaneContainer.classList.toggle('sessions-control-orientation-stacked', true);
490
588
  this.sessionsViewerOrientationContext.set(AgentSessionsViewerOrientation.Stacked);
491
589
  }
492
590
  if (oldSessionsViewerOrientation !== this.sessionsViewerOrientation) {
493
591
  const oldSessionsViewerLimited = this.sessionsViewerLimited;
494
- this.sessionsViewerLimited = this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked;
592
+ if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
593
+ this.sessionsViewerLimited = false;
594
+ }
595
+ else {
596
+ this.sessionsViewerLimited = this.viewState.sessionsViewerLimited ?? true;
597
+ }
598
+ let updatePromise;
495
599
  if (oldSessionsViewerLimited !== this.sessionsViewerLimited) {
496
- this.notifySessionsControlLimitedChanged(false );
600
+ updatePromise = this.notifySessionsControlLimitedChanged(false , true );
601
+ }
602
+ else {
603
+ updatePromise = this.sessionsControl?.update();
604
+ }
605
+ if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
606
+ updatePromise.then(() => {
607
+ const sessionResource = this._widget?.viewModel?.sessionResource;
608
+ if (sessionResource) {
609
+ this.sessionsControl?.reveal(sessionResource);
610
+ }
611
+ });
497
612
  }
498
613
  }
499
- this.updateSessionsControlVisibility();
500
- const availableSessionsHeight = height - this.sessionsTitleContainer.offsetHeight - this.sessionsLinkContainer.offsetHeight;
614
+ const { visible: sessionsContainerVisible } = this.updateSessionsControlVisibility();
615
+ if (!sessionsContainerVisible) {
616
+ return { heightReduction: 0, widthReduction: 0 };
617
+ }
618
+ let availableSessionsHeight = height - this.sessionsTitleContainer.offsetHeight - this.sessionsLinkContainer.offsetHeight;
619
+ if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
620
+ availableSessionsHeight -= ChatViewPane_1.MIN_CHAT_WIDGET_HEIGHT;
621
+ }
501
622
  if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
502
623
  this.sessionsControlContainer.style.height = `${availableSessionsHeight}px`;
503
624
  this.sessionsControlContainer.style.width = `${ChatViewPane_1.SESSIONS_SIDEBAR_WIDTH}px`;
@@ -511,7 +632,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
511
632
  sessionsHeight = this.sessionsCount * AgentSessionsListDelegate.ITEM_HEIGHT;
512
633
  }
513
634
  else {
514
- sessionsHeight = ((ChatViewPane_1.SESSIONS_LIMIT + 2) ) * AgentSessionsListDelegate.ITEM_HEIGHT;
635
+ sessionsHeight = ((ChatViewPane_1.SESSIONS_LIMIT * 2) ) * AgentSessionsListDelegate.ITEM_HEIGHT;
515
636
  }
516
637
  sessionsHeight = Math.min(availableSessionsHeight, sessionsHeight);
517
638
  this.sessionsControlContainer.style.height = `${sessionsHeight}px`;
@@ -522,6 +643,9 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
522
643
  }
523
644
  return { heightReduction, widthReduction };
524
645
  }
646
+ getLastDimensions(orientation) {
647
+ return this.lastDimensionsPerOrientation.get(orientation);
648
+ }
525
649
  saveState() {
526
650
  if (this._widget?.viewModel) {
527
651
  this._widget.saveState();
@@ -538,39 +662,19 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
538
662
  }
539
663
  }
540
664
  }
541
- async updateWidgetLockState(sessionResource) {
542
- const sessionType = getChatSessionType(sessionResource);
543
- if (sessionType === localChatSessionType) {
544
- this._widget.unlockFromCodingAgent();
545
- return;
546
- }
547
- let canResolve = false;
548
- try {
549
- canResolve = await this.chatSessionsService.canResolveChatSession(sessionResource);
550
- }
551
- catch (error) {
552
- this.logService.warn(`Failed to resolve chat session '${( sessionResource.toString())}' for locking`, error);
553
- }
554
- if (!canResolve) {
555
- this._widget.unlockFromCodingAgent();
556
- return;
557
- }
558
- const contribution = this.chatSessionsService.getChatSessionContribution(sessionType);
559
- if (contribution) {
560
- this._widget.lockToCodingAgent(contribution.name, contribution.displayName, contribution.type);
561
- }
562
- else {
563
- this._widget.unlockFromCodingAgent();
564
- }
665
+ shouldShowWelcome() {
666
+ const noPersistedSessions = !this.chatService.hasSessions();
667
+ const hasCoreAgent = ( this.chatAgentService.getAgents().some(agent => agent.isCore && agent.locations.includes(ChatAgentLocation.Chat)));
668
+ const hasDefaultAgent = this.chatAgentService.getDefaultAgent(ChatAgentLocation.Chat) !== undefined;
669
+ const shouldShow = !hasCoreAgent && (!hasDefaultAgent || !this._widget?.viewModel && noPersistedSessions);
670
+ this.logService.trace(`ChatViewPane#shouldShowWelcome() = ${shouldShow}: hasCoreAgent=${hasCoreAgent} hasDefaultAgent=${hasDefaultAgent} || noViewModel=${!this._widget?.viewModel} && noPersistedSessions=${noPersistedSessions}`);
671
+ return !!shouldShow;
565
672
  }
566
- get singleViewPaneContainerTitle() {
567
- if (this.titleControl) {
568
- const titleControlTitle = this.titleControl.getSingleViewPaneContainerTitle();
569
- if (titleControlTitle) {
570
- return titleControlTitle;
571
- }
572
- }
573
- return super.singleViewPaneContainerTitle;
673
+ getActionsContext() {
674
+ return this._widget?.viewModel ? {
675
+ sessionResource: this._widget.viewModel.sessionResource,
676
+ $mid: MarshalledId.ChatViewContext
677
+ } : undefined;
574
678
  }
575
679
  };
576
680
  ChatViewPane = ChatViewPane_1 = ( __decorate([