@codingame/monaco-vscode-chat-service-override 23.2.2 → 24.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/index.js +13 -10
  2. package/package.json +5 -41
  3. package/vscode/src/vs/platform/domWidget/browser/domWidget.d.ts +52 -0
  4. package/vscode/src/vs/platform/domWidget/browser/domWidget.js +53 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +10 -10
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +61 -50
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.d.ts +18 -0
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +152 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +14 -14
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +37 -28
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +9 -9
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +3 -5
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +7 -11
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +10 -10
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +12 -14
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +21 -18
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +27 -18
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +4 -4
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.d.ts +1 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +11 -11
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +6 -27
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +44 -208
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +17 -17
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +1 -1
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +23 -24
  30. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.d.ts +1 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +140 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +85 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +358 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +55 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +222 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +37 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +241 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +13 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +27 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +11 -19
  41. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +67 -230
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +65 -33
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +186 -62
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +23 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +140 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +2 -7
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +115 -29
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +389 -166
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +9 -6
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +22 -16
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.d.ts +1 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +8 -8
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.d.ts +10 -3
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.js +63 -3
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +7 -3
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +14 -5
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +173 -32
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +1 -0
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +66 -17
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +32 -29
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +12 -12
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -2
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +9 -6
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +2 -2
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +6 -4
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +4 -4
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +8 -18
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +1 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +12 -1
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +5 -6
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +15 -24
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +13 -11
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +66 -50
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +3 -2
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +6 -5
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +3 -1
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +7 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +2 -2
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +6 -7
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.d.ts +3 -3
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +4 -4
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +2 -2
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +1 -1
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +15 -4
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +1 -1
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +3 -4
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +30 -37
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +13 -10
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +23 -32
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -9
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -1
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +20 -19
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +47 -15
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +270 -143
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +3 -2
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +310 -170
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -2
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +1 -1
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +42 -42
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +3 -1
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +35 -25
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +4 -4
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +1 -4
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +22 -26
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +18 -14
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +80 -72
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +2 -8
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +48 -77
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +16 -17
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +257 -77
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +55 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +34 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/{chatSetup.d.ts → chatSetup/chatSetupContributions.d.ts} +4 -11
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +622 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +53 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +359 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +89 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +667 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +37 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +260 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/chatSetup.css +4 -6
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.d.ts +4 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +21 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +55 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatus.js → chatStatus/chatStatusDashboard.js} +193 -325
  132. package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatus.d.ts → chatStatus/chatStatusEntry.d.ts} +1 -1
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +190 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusItemService.d.ts → chatStatus/chatStatusItemService.d.ts} +1 -1
  135. package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatStatus/media}/chatStatus.css +22 -1
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusWidget.d.ts +25 -0
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusWidget.js +108 -0
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatTerminalOutputAccessibleView.d.ts +10 -0
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatTerminalOutputAccessibleView.js +34 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +1 -1
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +57 -18
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +478 -146
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewTitleControl.d.ts +43 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewTitleControl.js +204 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidgetService.d.ts +44 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidgetService.js +187 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
  148. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +108 -62
  149. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
  150. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
  151. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.d.ts +1 -1
  152. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js +37 -32
  153. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +37 -20
  154. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +232 -97
  155. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatusWidget.css +57 -0
  156. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewPane.css +142 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewTitleControl.css +39 -0
  158. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +51 -35
  159. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +1 -1
  160. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +5 -4
  161. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +2 -2
  162. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +5 -5
  163. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +12 -12
  164. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +19 -21
  165. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.d.ts +1 -1
  166. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +8 -8
  167. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
  168. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
  169. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +1 -1
  170. package/vscode/src/vs/workbench/contrib/chat/common/chatModelStore.d.ts +49 -0
  171. package/vscode/src/vs/workbench/contrib/chat/common/chatModelStore.js +100 -0
  172. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +1 -0
  173. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +2 -1
  174. package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +3 -4
  175. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +41 -15
  176. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +208 -162
  177. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +3 -3
  178. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +15 -7
  179. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +61 -7
  180. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +3 -2
  181. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +2 -2
  182. package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +1 -1
  183. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +10 -10
  184. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
  185. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +3 -3
  186. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +5 -1
  187. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +60 -43
  188. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
  189. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +27 -4
  190. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +37 -47
  191. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +5 -3
  192. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +120 -87
  193. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
  194. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +49 -42
  195. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +293 -187
  196. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -5
  197. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +43 -9
  198. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +2 -0
  199. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +48 -29
  200. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
  201. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
  202. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -13
  203. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
  204. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +2 -2
  205. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +3 -3
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +36 -41
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
  208. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +2 -2
  209. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
  210. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  211. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js +1 -1
  212. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +18 -18
  213. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
  214. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +142 -38
  215. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.d.ts +1 -1
  216. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +3 -7
  217. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
  218. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +19 -2
  219. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +78 -6
  220. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +7 -11
  221. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +26 -44
  222. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +3 -3
  223. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +1 -1
  224. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +9 -0
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +0 -1
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +23 -17
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +1 -1
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +4 -2
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +2 -0
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +26 -5
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +3 -1
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +32 -4
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +15 -29
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +10 -7
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +12 -0
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +3 -1
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +38 -19
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +1 -0
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +32 -7
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +5 -4
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -3
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -3
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -0
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +128 -62
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +2 -2
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +12 -2
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +5 -2
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +68 -22
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +20 -22
  250. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +13 -12
  251. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +20 -19
  252. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
  253. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  254. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +12 -0
  255. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +72 -0
  256. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +1 -2
  257. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +5 -17
  258. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.d.ts +0 -53
  259. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.js +0 -154
  260. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +0 -7
  261. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +0 -13
  262. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.d.ts +0 -25
  263. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.js +0 -135
  264. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.d.ts +0 -35
  265. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +0 -216
  266. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +0 -1617
  267. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +0 -44
  268. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +0 -313
  269. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/apple-dark.svg +0 -0
  270. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/apple-light.svg +0 -0
  271. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/github.svg +0 -0
  272. /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/google.svg +0 -0
  273. /package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusItemService.js → chatStatus/chatStatusItemService.js} +0 -0
@@ -1,21 +1,47 @@
1
1
 
2
- import { registerCss } from '@codingame/monaco-vscode-api/css';
3
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
- import * as chatStatus from './media/chatStatus.css';
3
+ import { $, append, EventType, addDisposableListener, EventHelper, disposableWindowInterval, getWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
+ import { Gesture, EventType as EventType$1 } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/touch';
5
+ import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
6
+ import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
7
+ import { renderLabelWithIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
8
+ import { Checkbox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/toggle/toggle';
9
+ import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
10
+ import { cancelOnDispose } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
11
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
5
12
  import { safeIntl } from '@codingame/monaco-vscode-api/vscode/vs/base/common/date';
6
- import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
13
+ import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
14
+ import { MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
15
+ import { parseLinkedText } from '@codingame/monaco-vscode-api/vscode/vs/base/common/linkedText';
7
16
  import { language } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
17
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
18
+ import { isObject } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
19
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
20
+ import { IInlineCompletionsService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/inlineCompletionsService.service';
21
+ import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
22
+ import { ITextResourceConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service';
23
+ import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service';
24
+ import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
8
25
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
9
- import { StatusbarAlignment, ShowTooltipCommand } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/statusbar/browser/statusbar';
10
- import { IStatusbarService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
11
- import { $, clearNode, append, EventType, addDisposableListener, EventHelper, disposableWindowInterval, getWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
12
- import { ChatEntitlement, isProUser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
13
- import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
14
- import { defaultButtonStyles, defaultCheckboxStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
15
- import { Checkbox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/toggle/toggle';
16
- import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
17
26
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
18
- import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
27
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
28
+ import { nativeHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover';
29
+ import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
30
+ import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
31
+ import { Link } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/browser/link';
32
+ import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
33
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
34
+ import { defaultButtonStyles, defaultCheckboxStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
35
+ import { DomWidget } from '../../../../../platform/domWidget/browser/domWidget.js';
36
+ import { EditorResourceAccessor, SideBySideEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
37
+ import { ChatEntitlement } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
38
+ import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
39
+ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
40
+ import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
41
+ import { openAgentSessionsView } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
42
+ import { isNewUser, isCompletionsEnabled } from './chatStatus.js';
43
+ import { IChatStatusItemService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.service';
44
+ import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
19
45
  import { registerColor, transparent } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
20
46
  import { contrastBorder } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
21
47
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
@@ -27,262 +53,54 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/mini
27
53
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
28
54
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
29
55
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
30
- import { nativeHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover';
31
- import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
32
56
  import { Color } from '@codingame/monaco-vscode-api/vscode/vs/base/common/color';
33
- import { Gesture, EventType as EventType$1 } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/touch';
34
- import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
35
- import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
36
- import { isObject } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
37
- import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
38
57
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
39
- import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
40
- import { renderLabelWithIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
41
- import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
42
- import { parseLinkedText } from '@codingame/monaco-vscode-api/vscode/vs/base/common/linkedText';
43
- import { Link } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/browser/link';
44
- import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
45
- import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
46
- import { IChatStatusItemService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatStatusItemService.service';
47
- import { ITextResourceConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service';
48
- import { EditorResourceAccessor, SideBySideEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
49
- import { getCodeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
50
- import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
51
- import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
52
- import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
53
- import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
54
- import { IInlineCompletionsService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/inlineCompletionsService.service';
55
- import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
56
- import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
57
- import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
58
- import { AGENT_SESSIONS_VIEWLET_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
59
58
 
60
- registerCss(chatStatus);
59
+ const defaultChat = product.defaultChatAgent;
61
60
  const gaugeForeground = registerColor('gauge.foreground', {
62
61
  dark: inputValidationInfoBorder,
63
62
  light: inputValidationInfoBorder,
64
63
  hcDark: contrastBorder,
65
64
  hcLight: contrastBorder
66
- }, ( localize(5480, "Gauge foreground color.")));
65
+ }, ( localize(5573, "Gauge foreground color.")));
67
66
  registerColor('gauge.background', {
68
67
  dark: ( transparent(gaugeForeground, 0.3)),
69
68
  light: ( transparent(gaugeForeground, 0.3)),
70
69
  hcDark: Color.white,
71
70
  hcLight: Color.white
72
- }, ( localize(5481, "Gauge background color.")));
71
+ }, ( localize(5574, "Gauge background color.")));
73
72
  registerColor('gauge.border', {
74
73
  dark: null,
75
74
  light: null,
76
75
  hcDark: contrastBorder,
77
76
  hcLight: contrastBorder
78
- }, ( localize(5482, "Gauge border color.")));
77
+ }, ( localize(5575, "Gauge border color.")));
79
78
  const gaugeWarningForeground = registerColor('gauge.warningForeground', {
80
79
  dark: inputValidationWarningBorder,
81
80
  light: inputValidationWarningBorder,
82
81
  hcDark: contrastBorder,
83
82
  hcLight: contrastBorder
84
- }, ( localize(5483, "Gauge warning foreground color.")));
83
+ }, ( localize(5576, "Gauge warning foreground color.")));
85
84
  registerColor('gauge.warningBackground', {
86
85
  dark: ( transparent(gaugeWarningForeground, 0.3)),
87
86
  light: ( transparent(gaugeWarningForeground, 0.3)),
88
87
  hcDark: Color.white,
89
88
  hcLight: Color.white
90
- }, ( localize(5484, "Gauge warning background color.")));
89
+ }, ( localize(5577, "Gauge warning background color.")));
91
90
  const gaugeErrorForeground = registerColor('gauge.errorForeground', {
92
91
  dark: inputValidationErrorBorder,
93
92
  light: inputValidationErrorBorder,
94
93
  hcDark: contrastBorder,
95
94
  hcLight: contrastBorder
96
- }, ( localize(5485, "Gauge error foreground color.")));
95
+ }, ( localize(5578, "Gauge error foreground color.")));
97
96
  registerColor('gauge.errorBackground', {
98
97
  dark: ( transparent(gaugeErrorForeground, 0.3)),
99
98
  light: ( transparent(gaugeErrorForeground, 0.3)),
100
99
  hcDark: Color.white,
101
100
  hcLight: Color.white
102
- }, ( localize(5486, "Gauge error background color.")));
103
- const defaultChat = {
104
- completionsEnablementSetting: product.defaultChatAgent?.completionsEnablementSetting ?? '',
105
- nextEditSuggestionsSetting: product.defaultChatAgent?.nextEditSuggestionsSetting ?? '',
106
- manageSettingsUrl: product.defaultChatAgent?.manageSettingsUrl ?? '',
107
- manageOverageUrl: product.defaultChatAgent?.manageOverageUrl ?? '',
108
- provider: product.defaultChatAgent?.provider ?? { default: { name: '' }},
109
- termsStatementUrl: product.defaultChatAgent?.termsStatementUrl ?? '',
110
- privacyStatementUrl: product.defaultChatAgent?.privacyStatementUrl ?? ''
111
- };
112
- let ChatStatusBarEntry = class ChatStatusBarEntry extends Disposable {
113
- static { this.ID = 'workbench.contrib.chatStatusBarEntry'; }
114
- constructor(chatEntitlementService, instantiationService, statusbarService, editorService, configurationService, completionsService, chatSessionsService) {
115
- super();
116
- this.chatEntitlementService = chatEntitlementService;
117
- this.instantiationService = instantiationService;
118
- this.statusbarService = statusbarService;
119
- this.editorService = editorService;
120
- this.configurationService = configurationService;
121
- this.completionsService = completionsService;
122
- this.chatSessionsService = chatSessionsService;
123
- this.entry = undefined;
124
- this.dashboard = ( new Lazy(() => this.instantiationService.createInstance(ChatStatusDashboard)));
125
- this.activeCodeEditorListener = this._register(( new MutableDisposable()));
126
- this.update();
127
- this.registerListeners();
128
- }
129
- update() {
130
- const sentiment = this.chatEntitlementService.sentiment;
131
- if (!sentiment.hidden) {
132
- const props = this.getEntryProps();
133
- if (this.entry) {
134
- this.entry.update(props);
135
- }
136
- else {
137
- this.entry = this.statusbarService.addEntry(props, 'chat.statusBarEntry', StatusbarAlignment.RIGHT, { location: { id: 'status.editor.mode', priority: 100.1 }, alignment: StatusbarAlignment.RIGHT });
138
- }
139
- }
140
- else {
141
- this.entry?.dispose();
142
- this.entry = undefined;
143
- }
144
- }
145
- registerListeners() {
146
- this._register(this.chatEntitlementService.onDidChangeQuotaExceeded(() => this.update()));
147
- this._register(this.chatEntitlementService.onDidChangeSentiment(() => this.update()));
148
- this._register(this.chatEntitlementService.onDidChangeEntitlement(() => this.update()));
149
- this._register(this.completionsService.onDidChangeIsSnoozing(() => this.update()));
150
- this._register(this.chatSessionsService.onDidChangeInProgress(() => this.update()));
151
- this._register(this.editorService.onDidActiveEditorChange(() => this.onDidActiveEditorChange()));
152
- this._register(this.configurationService.onDidChangeConfiguration(e => {
153
- if (e.affectsConfiguration(defaultChat.completionsEnablementSetting)) {
154
- this.update();
155
- }
156
- }));
157
- }
158
- onDidActiveEditorChange() {
159
- this.update();
160
- this.activeCodeEditorListener.clear();
161
- const activeCodeEditor = getCodeEditor(this.editorService.activeTextEditorControl);
162
- if (activeCodeEditor) {
163
- this.activeCodeEditorListener.value = activeCodeEditor.onDidChangeModelLanguage(() => {
164
- this.update();
165
- });
166
- }
167
- }
168
- getEntryProps() {
169
- let text = '$(copilot)';
170
- let ariaLabel = ( localize(5487, "Copilot status"));
171
- let kind;
172
- if (isNewUser(this.chatEntitlementService)) {
173
- const entitlement = this.chatEntitlementService.entitlement;
174
- if (this.chatEntitlementService.sentiment.later ||
175
- entitlement === ChatEntitlement.Available ||
176
- isProUser(entitlement) ||
177
- entitlement === ChatEntitlement.Free
178
- ) {
179
- const finishSetup = ( localize(5488, "Finish Setup"));
180
- text = `$(copilot) ${finishSetup}`;
181
- ariaLabel = finishSetup;
182
- kind = 'prominent';
183
- }
184
- }
185
- else {
186
- const chatQuotaExceeded = this.chatEntitlementService.quotas.chat?.percentRemaining === 0;
187
- const completionsQuotaExceeded = this.chatEntitlementService.quotas.completions?.percentRemaining === 0;
188
- const chatSessionsInProgressCount = this.chatSessionsService.getInProgress().reduce((total, item) => total + item.count, 0);
189
- if (this.chatEntitlementService.sentiment.disabled || this.chatEntitlementService.sentiment.untrusted) {
190
- text = '$(copilot-unavailable)';
191
- ariaLabel = ( localize(5489, "Copilot disabled"));
192
- }
193
- else if (chatSessionsInProgressCount > 0) {
194
- text = '$(copilot-in-progress)';
195
- if (chatSessionsInProgressCount > 1) {
196
- ariaLabel = ( localize(5490, "{0} agent sessions in progress", chatSessionsInProgressCount));
197
- }
198
- else {
199
- ariaLabel = ( localize(5491, "1 agent session in progress"));
200
- }
201
- }
202
- else if (this.chatEntitlementService.entitlement === ChatEntitlement.Unknown) {
203
- const signedOutWarning = ( localize(5492, "Signed out"));
204
- text = `${this.chatEntitlementService.anonymous ? '$(copilot)' : '$(copilot-not-connected)'} ${signedOutWarning}`;
205
- ariaLabel = signedOutWarning;
206
- kind = 'prominent';
207
- }
208
- else if (this.chatEntitlementService.entitlement === ChatEntitlement.Free && (chatQuotaExceeded || completionsQuotaExceeded)) {
209
- let quotaWarning;
210
- if (chatQuotaExceeded && !completionsQuotaExceeded) {
211
- quotaWarning = ( localize(5493, "Chat quota reached"));
212
- }
213
- else if (completionsQuotaExceeded && !chatQuotaExceeded) {
214
- quotaWarning = ( localize(5494, "Inline suggestions quota reached"));
215
- }
216
- else {
217
- quotaWarning = ( localize(5495, "Quota reached"));
218
- }
219
- text = `$(copilot-warning) ${quotaWarning}`;
220
- ariaLabel = quotaWarning;
221
- kind = 'prominent';
222
- }
223
- else if (this.editorService.activeTextEditorLanguageId && !isCompletionsEnabled(this.configurationService, this.editorService.activeTextEditorLanguageId)) {
224
- text = '$(copilot-unavailable)';
225
- ariaLabel = ( localize(5496, "Inline suggestions disabled"));
226
- }
227
- else if (this.completionsService.isSnoozing()) {
228
- text = '$(copilot-snooze)';
229
- ariaLabel = ( localize(5497, "Inline suggestions snoozed"));
230
- }
231
- }
232
- const baseResult = {
233
- name: ( localize(5498, "Copilot Status")),
234
- text,
235
- ariaLabel,
236
- command: ShowTooltipCommand,
237
- showInAllWindows: true,
238
- kind,
239
- tooltip: { element: (token) => this.dashboard.value.show(token) }
240
- };
241
- return baseResult;
242
- }
243
- dispose() {
244
- super.dispose();
245
- this.entry?.dispose();
246
- this.entry = undefined;
247
- }
248
- };
249
- ChatStatusBarEntry = ( __decorate([
250
- ( __param(0, IChatEntitlementService)),
251
- ( __param(1, IInstantiationService)),
252
- ( __param(2, IStatusbarService)),
253
- ( __param(3, IEditorService)),
254
- ( __param(4, IConfigurationService)),
255
- ( __param(5, IInlineCompletionsService)),
256
- ( __param(6, IChatSessionsService))
257
- ], ChatStatusBarEntry));
258
- function isNewUser(chatEntitlementService) {
259
- return !chatEntitlementService.sentiment.installed ||
260
- chatEntitlementService.entitlement === ChatEntitlement.Available;
261
- }
262
- function canUseChat(chatEntitlementService) {
263
- if (!chatEntitlementService.sentiment.installed || chatEntitlementService.sentiment.disabled || chatEntitlementService.sentiment.untrusted) {
264
- return false;
265
- }
266
- if (chatEntitlementService.entitlement === ChatEntitlement.Unknown || chatEntitlementService.entitlement === ChatEntitlement.Available) {
267
- return chatEntitlementService.anonymous;
268
- }
269
- if (chatEntitlementService.entitlement === ChatEntitlement.Free && chatEntitlementService.quotas.chat?.percentRemaining === 0 && chatEntitlementService.quotas.completions?.percentRemaining === 0) {
270
- return false;
271
- }
272
- return true;
273
- }
274
- function isCompletionsEnabled(configurationService, modeId = '*') {
275
- const result = configurationService.getValue(defaultChat.completionsEnablementSetting);
276
- if (!isObject(result)) {
277
- return false;
278
- }
279
- if (typeof result[modeId] !== 'undefined') {
280
- return Boolean(result[modeId]);
281
- }
282
- return Boolean(result['*']);
283
- }
284
- let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
285
- constructor(chatEntitlementService, chatStatusItemService, commandService, configurationService, editorService, hoverService, languageService, openerService, telemetryService, textResourceConfigurationService, inlineCompletionsService, chatSessionsService, markdownRendererService) {
101
+ }, ( localize(5579, "Gauge error background color.")));
102
+ let ChatStatusDashboard = class ChatStatusDashboard extends DomWidget {
103
+ constructor(chatEntitlementService, chatStatusItemService, commandService, configurationService, editorService, hoverService, languageService, openerService, telemetryService, textResourceConfigurationService, inlineCompletionsService, chatSessionsService, markdownRendererService, languageFeaturesService, quickInputService, instantiationService) {
286
104
  super();
287
105
  this.chatEntitlementService = chatEntitlementService;
288
106
  this.chatStatusItemService = chatStatusItemService;
@@ -297,53 +115,54 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
297
115
  this.inlineCompletionsService = inlineCompletionsService;
298
116
  this.chatSessionsService = chatSessionsService;
299
117
  this.markdownRendererService = markdownRendererService;
118
+ this.languageFeaturesService = languageFeaturesService;
119
+ this.quickInputService = quickInputService;
120
+ this.instantiationService = instantiationService;
300
121
  this.element = $('div.chat-status-bar-entry-tooltip');
301
122
  this.dateFormatter = safeIntl.DateTimeFormat(language, { year: 'numeric', month: 'long', day: 'numeric' });
302
123
  this.dateTimeFormatter = safeIntl.DateTimeFormat(language, { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric' });
303
124
  this.quotaPercentageFormatter = safeIntl.NumberFormat(undefined, { maximumFractionDigits: 1, minimumFractionDigits: 0 });
304
125
  this.quotaOverageFormatter = safeIntl.NumberFormat(undefined, { maximumFractionDigits: 2, minimumFractionDigits: 0 });
305
- this.entryDisposables = this._register(( new MutableDisposable()));
126
+ this.render();
306
127
  }
307
- show(token) {
308
- clearNode(this.element);
309
- const disposables = this.entryDisposables.value = ( new DisposableStore());
310
- disposables.add(token.onCancellationRequested(() => disposables.dispose()));
128
+ render() {
129
+ const token = cancelOnDispose(this._store);
311
130
  let needsSeparator = false;
312
131
  const addSeparator = (label, action) => {
313
132
  if (needsSeparator) {
314
133
  this.element.appendChild($('hr'));
315
134
  }
316
135
  if (label || action) {
317
- this.renderHeader(this.element, disposables, label ?? '', action);
136
+ this.renderHeader(this.element, this._store, label ?? '', action);
318
137
  }
319
138
  needsSeparator = true;
320
139
  };
321
140
  const { chat: chatQuota, completions: completionsQuota, premiumChat: premiumChatQuota, resetDate, resetDateHasTime } = this.chatEntitlementService.quotas;
322
141
  if (chatQuota || completionsQuota || premiumChatQuota) {
323
- addSeparator(( localize(5499, "Copilot Usage")), toAction({
142
+ addSeparator(( localize(5580, "Copilot Usage")), toAction({
324
143
  id: 'workbench.action.manageCopilot',
325
- label: ( localize(5500, "Manage Chat")),
326
- tooltip: ( localize(5501, "Manage Chat")),
144
+ label: ( localize(5581, "Manage Chat")),
145
+ tooltip: ( localize(5582, "Manage Chat")),
327
146
  class: ThemeIcon.asClassName(Codicon.settings),
328
147
  run: () => this.runCommandAndClose(() => this.openerService.open(( URI.parse(defaultChat.manageSettingsUrl)))),
329
148
  }));
330
- const completionsQuotaIndicator = completionsQuota && (completionsQuota.total > 0 || completionsQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, completionsQuota, ( localize(5502, "Inline Suggestions")), false) : undefined;
331
- const chatQuotaIndicator = chatQuota && (chatQuota.total > 0 || chatQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, chatQuota, ( localize(5503, "Chat messages")), false) : undefined;
332
- const premiumChatQuotaIndicator = premiumChatQuota && (premiumChatQuota.total > 0 || premiumChatQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, premiumChatQuota, ( localize(5504, "Premium requests")), true) : undefined;
149
+ const completionsQuotaIndicator = completionsQuota && (completionsQuota.total > 0 || completionsQuota.unlimited) ? this.createQuotaIndicator(this.element, this._store, completionsQuota, ( localize(5583, "Inline Suggestions")), false) : undefined;
150
+ const chatQuotaIndicator = chatQuota && (chatQuota.total > 0 || chatQuota.unlimited) ? this.createQuotaIndicator(this.element, this._store, chatQuota, ( localize(5584, "Chat messages")), false) : undefined;
151
+ const premiumChatQuotaIndicator = premiumChatQuota && (premiumChatQuota.total > 0 || premiumChatQuota.unlimited) ? this.createQuotaIndicator(this.element, this._store, premiumChatQuota, ( localize(5585, "Premium requests")), true) : undefined;
333
152
  if (resetDate) {
334
153
  this.element.appendChild($('div.description', undefined, ( localize(
335
- 5505,
154
+ 5586,
336
155
  "Allowance resets {0}.",
337
156
  resetDateHasTime ? this.dateTimeFormatter.value.format(( new Date(resetDate))) : this.dateFormatter.value.format(( new Date(resetDate)))
338
157
  ))));
339
158
  }
340
159
  if (this.chatEntitlementService.entitlement === ChatEntitlement.Free && (Number(chatQuota?.percentRemaining) <= 25 || Number(completionsQuota?.percentRemaining) <= 25)) {
341
- const upgradeProButton = disposables.add(( new Button(
160
+ const upgradeProButton = this._store.add(( new Button(
342
161
  this.element,
343
- { ...defaultButtonStyles, hoverDelegate: nativeHoverDelegate, secondary: canUseChat(this.chatEntitlementService) }
162
+ { ...defaultButtonStyles, hoverDelegate: nativeHoverDelegate, secondary: this.canUseChat() }
344
163
  )));
345
- upgradeProButton.label = ( localize(5506, "Upgrade to GitHub Copilot Pro"));
346
- disposables.add(upgradeProButton.onDidClick(() => this.runCommandAndClose('workbench.action.chat.upgradePlan')));
164
+ upgradeProButton.label = ( localize(5587, "Upgrade to GitHub Copilot Pro"));
165
+ this._store.add(upgradeProButton.onDidClick(() => this.runCommandAndClose('workbench.action.chat.upgradePlan')));
347
166
  }
348
167
  (async () => {
349
168
  await this.chatEntitlementService.update(token);
@@ -363,53 +182,41 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
363
182
  })();
364
183
  }
365
184
  else if (this.chatEntitlementService.anonymous && this.chatEntitlementService.sentiment.installed) {
366
- addSeparator(( localize(5507, "Copilot Usage")));
367
- this.createQuotaIndicator(this.element, disposables, ( localize(5508, "Limited")), ( localize(5502, "Inline Suggestions")), false);
368
- this.createQuotaIndicator(this.element, disposables, ( localize(5508, "Limited")), ( localize(5503, "Chat messages")), false);
185
+ addSeparator(( localize(5588, "Copilot Usage")));
186
+ this.createQuotaIndicator(this.element, this._store, ( localize(5589, "Limited")), ( localize(5583, "Inline Suggestions")), false);
187
+ this.createQuotaIndicator(this.element, this._store, ( localize(5589, "Limited")), ( localize(5584, "Chat messages")), false);
369
188
  }
370
189
  {
371
- let chatSessionsElement;
372
- const updateStatus = () => {
373
- const inProgress = this.chatSessionsService.getInProgress();
374
- if (( inProgress.some(item => item.count > 0))) {
375
- addSeparator(( localize(5509, "Agent Sessions")), toAction({
376
- id: 'workbench.view.chat.status.sessions',
377
- label: ( localize(5510, "View Agent Sessions")),
378
- tooltip: ( localize(5511, "View Agent Sessions")),
379
- class: ThemeIcon.asClassName(Codicon.eye),
380
- run: () => {
381
- if (this.configurationService.getValue('chat.agentSessionsViewLocation') === 'single-view') {
382
- this.runCommandAndClose('workbench.view.agentSessions');
383
- }
384
- else {
385
- this.runCommandAndClose(AGENT_SESSIONS_VIEWLET_ID);
386
- }
387
- }
388
- }));
389
- for (const { displayName, count } of inProgress) {
390
- if (count > 0) {
391
- const text = ( localize(5512, "$(loading~spin) {0} in progress", displayName));
392
- chatSessionsElement = this.element.appendChild($('div.description'));
393
- const parts = renderLabelWithIcons(text);
394
- chatSessionsElement.append(...parts);
395
- }
190
+ const inProgress = this.chatSessionsService.getInProgress();
191
+ if (( inProgress.some(item => item.count > 0))) {
192
+ addSeparator(( localize(5590, "Agent Sessions")), toAction({
193
+ id: 'workbench.view.chat.status.sessions',
194
+ label: ( localize(5591, "View Agent Sessions")),
195
+ tooltip: ( localize(5592, "View Agent Sessions")),
196
+ class: ThemeIcon.asClassName(Codicon.eye),
197
+ run: () => {
198
+ this.instantiationService.invokeFunction(openAgentSessionsView);
199
+ this.hoverService.hideHover(true);
200
+ }
201
+ }));
202
+ for (const { displayName, count } of inProgress) {
203
+ if (count > 0) {
204
+ const text = ( localize(5593, "$(loading~spin) {0} in progress", displayName));
205
+ const chatSessionsElement = this.element.appendChild($('div.description'));
206
+ const parts = renderLabelWithIcons(text);
207
+ chatSessionsElement.append(...parts);
396
208
  }
397
209
  }
398
- else {
399
- chatSessionsElement?.remove();
400
- }
401
- };
402
- updateStatus();
403
- disposables.add(this.chatSessionsService.onDidChangeInProgress(updateStatus));
210
+ }
404
211
  }
405
212
  {
406
213
  for (const item of this.chatStatusItemService.getEntries()) {
407
214
  addSeparator();
408
- const itemDisposables = disposables.add(( new MutableDisposable()));
215
+ const itemDisposables = this._store.add(( new MutableDisposable()));
409
216
  let rendered = this.renderContributedChatStatusItem(item);
410
217
  itemDisposables.value = rendered.disposables;
411
218
  this.element.appendChild(rendered.element);
412
- disposables.add(this.chatStatusItemService.onDidChange(e => {
219
+ this._store.add(this.chatStatusItemService.onDidChange(e => {
413
220
  if (e.entry.id === item.id) {
414
221
  const previousElement = rendered.element;
415
222
  rendered = this.renderContributedChatStatusItem(e.entry);
@@ -421,18 +228,41 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
421
228
  }
422
229
  {
423
230
  const chatSentiment = this.chatEntitlementService.sentiment;
424
- addSeparator(( localize(5513, "Inline Suggestions")), chatSentiment.installed && !chatSentiment.disabled && !chatSentiment.untrusted ? toAction({
231
+ addSeparator(( localize(5594, "Inline Suggestions")), chatSentiment.installed && !chatSentiment.disabled && !chatSentiment.untrusted ? toAction({
425
232
  id: 'workbench.action.openChatSettings',
426
- label: ( localize(5514, "Settings")),
427
- tooltip: ( localize(5515, "Open Settings")),
233
+ label: ( localize(5595, "Settings")),
234
+ tooltip: ( localize(5596, "Open Settings")),
428
235
  class: ThemeIcon.asClassName(Codicon.settingsGear),
429
236
  run: () => this.runCommandAndClose(() => this.commandService.executeCommand('workbench.action.openSettings', { query: `@id:${defaultChat.completionsEnablementSetting} @id:${defaultChat.nextEditSuggestionsSetting}` })),
430
237
  }) : undefined);
431
- this.createSettings(this.element, disposables);
238
+ this.createSettings(this.element, this._store);
432
239
  }
433
- if (canUseChat(this.chatEntitlementService)) {
240
+ {
241
+ const providers = this.languageFeaturesService.inlineCompletionsProvider.allNoModel();
242
+ const provider = providers.find(p => p.modelInfo && p.modelInfo.models.length > 0);
243
+ if (provider) {
244
+ const modelInfo = provider.modelInfo;
245
+ const currentModel = modelInfo.models.find(m => m.id === modelInfo.currentModelId);
246
+ if (currentModel) {
247
+ const modelContainer = this.element.appendChild($('div.model-selection'));
248
+ modelContainer.appendChild($('span.model-text', undefined, ( localize(5597, "Model: {0}", currentModel.name))));
249
+ const actionBar = modelContainer.appendChild($('div.model-action-bar'));
250
+ const toolbar = this._store.add(( new ActionBar(actionBar, { hoverDelegate: nativeHoverDelegate })));
251
+ toolbar.push([toAction({
252
+ id: 'workbench.action.selectInlineCompletionsModel',
253
+ label: ( localize(5598, "Select Model")),
254
+ tooltip: ( localize(5598, "Select Model")),
255
+ class: ThemeIcon.asClassName(Codicon.gear),
256
+ run: async () => {
257
+ await this.showModelPicker(provider);
258
+ }
259
+ })], { icon: true, label: false });
260
+ }
261
+ }
262
+ }
263
+ if (this.canUseChat()) {
434
264
  const snooze = append(this.element, $('div.snooze-completions'));
435
- this.createCompletionsSnooze(snooze, ( localize(5516, "Snooze")), disposables);
265
+ this.createCompletionsSnooze(snooze, ( localize(5599, "Snooze")), this._store);
436
266
  }
437
267
  {
438
268
  const newUser = isNewUser(this.chatEntitlementService);
@@ -445,7 +275,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
445
275
  let descriptionClass = '.description';
446
276
  if (newUser && anonymousUser) {
447
277
  descriptionText = ( new MarkdownString(( localize(
448
- 5517,
278
+ 5600,
449
279
  "By continuing with {0} Copilot, you agree to {1}'s [Terms]({2}) and [Privacy Statement]({3})",
450
280
  defaultChat.provider.default.name,
451
281
  defaultChat.provider.default.name,
@@ -455,29 +285,29 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
455
285
  descriptionClass = `${descriptionClass}.terms`;
456
286
  }
457
287
  else if (newUser) {
458
- descriptionText = ( localize(5518, "Set up Copilot to use AI features."));
288
+ descriptionText = ( localize(5601, "Set up Copilot to use AI features."));
459
289
  }
460
290
  else if (anonymousUser) {
461
- descriptionText = ( localize(5519, "Sign in to enable more Copilot AI features."));
291
+ descriptionText = ( localize(5602, "Sign in to enable more Copilot AI features."));
462
292
  }
463
293
  else if (disabled) {
464
- descriptionText = ( localize(5520, "Enable Copilot to use AI features."));
294
+ descriptionText = ( localize(5603, "Enable Copilot to use AI features."));
465
295
  }
466
296
  else {
467
- descriptionText = ( localize(5521, "Sign in to use Copilot AI features."));
297
+ descriptionText = ( localize(5604, "Sign in to use Copilot AI features."));
468
298
  }
469
299
  let buttonLabel;
470
300
  if (newUser) {
471
- buttonLabel = ( localize(5522, "Use AI Features"));
301
+ buttonLabel = ( localize(5605, "Use AI Features"));
472
302
  }
473
303
  else if (anonymousUser) {
474
- buttonLabel = ( localize(5523, "Enable more AI Features"));
304
+ buttonLabel = ( localize(5606, "Enable more AI Features"));
475
305
  }
476
306
  else if (disabled) {
477
- buttonLabel = ( localize(5524, "Enable AI Features"));
307
+ buttonLabel = ( localize(5607, "Enable AI Features"));
478
308
  }
479
309
  else {
480
- buttonLabel = ( localize(5525, "Sign in to use AI Features"));
310
+ buttonLabel = ( localize(5608, "Sign in to use AI Features"));
481
311
  }
482
312
  let commandId;
483
313
  if (newUser && anonymousUser) {
@@ -490,17 +320,28 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
490
320
  this.element.appendChild($(`div${descriptionClass}`, undefined, descriptionText));
491
321
  }
492
322
  else {
493
- this.element.appendChild($(`div${descriptionClass}`, undefined, disposables.add(this.markdownRendererService.render(descriptionText)).element));
323
+ this.element.appendChild($(`div${descriptionClass}`, undefined, this._store.add(this.markdownRendererService.render(descriptionText)).element));
494
324
  }
495
- const button = disposables.add(( new Button(
325
+ const button = this._store.add(( new Button(
496
326
  this.element,
497
327
  { ...defaultButtonStyles, hoverDelegate: nativeHoverDelegate }
498
328
  )));
499
329
  button.label = buttonLabel;
500
- disposables.add(button.onDidClick(() => this.runCommandAndClose(commandId)));
330
+ this._store.add(button.onDidClick(() => this.runCommandAndClose(commandId)));
501
331
  }
502
332
  }
503
- return this.element;
333
+ }
334
+ canUseChat() {
335
+ if (!this.chatEntitlementService.sentiment.installed || this.chatEntitlementService.sentiment.disabled || this.chatEntitlementService.sentiment.untrusted) {
336
+ return false;
337
+ }
338
+ if (this.chatEntitlementService.entitlement === ChatEntitlement.Unknown || this.chatEntitlementService.entitlement === ChatEntitlement.Available) {
339
+ return this.chatEntitlementService.anonymous;
340
+ }
341
+ if (this.chatEntitlementService.entitlement === ChatEntitlement.Free && this.chatEntitlementService.quotas.chat?.percentRemaining === 0 && this.chatEntitlementService.quotas.completions?.percentRemaining === 0) {
342
+ return false;
343
+ }
344
+ return true;
504
345
  }
505
346
  renderHeader(container, disposables, label, action) {
506
347
  const header = container.appendChild($('div.header', undefined, label ?? ''));
@@ -516,8 +357,8 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
516
357
  const headerLink = typeof item.label === 'string' ? undefined : item.label.link;
517
358
  this.renderHeader(itemElement, disposables, headerLabel, headerLink ? toAction({
518
359
  id: 'workbench.action.openChatStatusItemLink',
519
- label: ( localize(5526, "Learn More")),
520
- tooltip: ( localize(5526, "Learn More")),
360
+ label: ( localize(5609, "Learn More")),
361
+ tooltip: ( localize(5609, "Learn More")),
521
362
  class: ThemeIcon.asClassName(Codicon.linkExternal),
522
363
  run: () => this.runCommandAndClose(() => this.openerService.open(( URI.parse(headerLink)))),
523
364
  }) : undefined);
@@ -561,7 +402,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
561
402
  quotaIndicator,
562
403
  { ...defaultButtonStyles, secondary: true, hoverDelegate: nativeHoverDelegate }
563
404
  )));
564
- manageOverageButton.label = ( localize(5527, "Manage paid premium requests"));
405
+ manageOverageButton.label = ( localize(5610, "Manage paid premium requests"));
565
406
  disposables.add(manageOverageButton.onDidClick(() => this.runCommandAndClose(() => this.openerService.open(( URI.parse(defaultChat.manageOverageUrl))))));
566
407
  }
567
408
  const update = (quota) => {
@@ -578,17 +419,17 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
578
419
  quotaValue.textContent = quota;
579
420
  }
580
421
  else if (quota.unlimited) {
581
- quotaValue.textContent = ( localize(5528, "Included"));
422
+ quotaValue.textContent = ( localize(5611, "Included"));
582
423
  }
583
424
  else if (quota.overageCount) {
584
425
  quotaValue.textContent = ( localize(
585
- 5529,
426
+ 5612,
586
427
  "+{0} requests",
587
428
  this.quotaOverageFormatter.value.format(quota.overageCount)
588
429
  ));
589
430
  }
590
431
  else {
591
- quotaValue.textContent = ( localize(5530, "{0}%", this.quotaPercentageFormatter.value.format(usedPercentage)));
432
+ quotaValue.textContent = ( localize(5613, "{0}%", this.quotaPercentageFormatter.value.format(usedPercentage)));
592
433
  }
593
434
  quotaBit.style.width = `${usedPercentage}%`;
594
435
  if (usedPercentage >= 90) {
@@ -599,10 +440,10 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
599
440
  }
600
441
  if (supportsOverage) {
601
442
  if (typeof quota !== 'string' && quota?.overageEnabled) {
602
- overageLabel.textContent = ( localize(5531, "Additional paid premium requests enabled."));
443
+ overageLabel.textContent = ( localize(5614, "Additional paid premium requests enabled."));
603
444
  }
604
445
  else {
605
- overageLabel.textContent = ( localize(5532, "Additional paid premium requests disabled."));
446
+ overageLabel.textContent = ( localize(5615, "Additional paid premium requests disabled."));
606
447
  }
607
448
  }
608
449
  else {
@@ -617,15 +458,15 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
617
458
  const settings = container.appendChild($('div.settings'));
618
459
  {
619
460
  const globalSetting = append(settings, $('div.setting'));
620
- this.createInlineSuggestionsSetting(globalSetting, ( localize(5533, "All files")), '*', disposables);
461
+ this.createInlineSuggestionsSetting(globalSetting, ( localize(5616, "All files")), '*', disposables);
621
462
  if (modeId) {
622
463
  const languageSetting = append(settings, $('div.setting'));
623
- this.createInlineSuggestionsSetting(languageSetting, ( localize(5534, "{0}", this.languageService.getLanguageName(modeId) ?? modeId)), modeId, disposables);
464
+ this.createInlineSuggestionsSetting(languageSetting, ( localize(5617, "{0}", this.languageService.getLanguageName(modeId) ?? modeId)), modeId, disposables);
624
465
  }
625
466
  }
626
467
  {
627
468
  const setting = append(settings, $('div.setting'));
628
- this.createNextEditSuggestionsSetting(setting, ( localize(5535, "Next edit suggestions")), this.getCompletionsSettingAccessor(modeId), disposables);
469
+ this.createNextEditSuggestionsSetting(setting, ( localize(5618, "Next edit suggestions")), this.getCompletionsSettingAccessor(modeId), disposables);
629
470
  }
630
471
  return settings;
631
472
  }
@@ -652,7 +493,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
652
493
  checkbox.checked = Boolean(accessor.readSetting());
653
494
  }
654
495
  }));
655
- if (!canUseChat(this.chatEntitlementService)) {
496
+ if (!this.canUseChat()) {
656
497
  container.classList.add('disabled');
657
498
  checkbox.disable();
658
499
  checkbox.checked = false;
@@ -700,7 +541,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
700
541
  }
701
542
  disposables.add(this.configurationService.onDidChangeConfiguration(e => {
702
543
  if (e.affectsConfiguration(completionsSettingId)) {
703
- if (completionsSettingAccessor.readSetting() && canUseChat(this.chatEntitlementService)) {
544
+ if (completionsSettingAccessor.readSetting() && this.canUseChat()) {
704
545
  checkbox.enable();
705
546
  container.classList.remove('disabled');
706
547
  }
@@ -726,7 +567,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
726
567
  const toolbar = disposables.add(( new ActionBar(actionBar, { hoverDelegate: nativeHoverDelegate })));
727
568
  const cancelAction = toAction({
728
569
  id: 'workbench.action.cancelSnoozeStatusBarLink',
729
- label: ( localize(5536, "Cancel Snooze")),
570
+ label: ( localize(5619, "Cancel Snooze")),
730
571
  run: () => this.inlineCompletionsService.cancelSnooze(),
731
572
  class: ThemeIcon.asClassName(Codicon.stopCircle)
732
573
  });
@@ -735,19 +576,19 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
735
576
  toolbar.clear();
736
577
  const timeLeftMs = this.inlineCompletionsService.snoozeTimeLeft;
737
578
  if (!isEnabled || timeLeftMs <= 0) {
738
- timerDisplay.textContent = ( localize(5537, "Hide suggestions for 5 min"));
579
+ timerDisplay.textContent = ( localize(5620, "Hide suggestions for 5 min"));
739
580
  timerDisplay.title = '';
740
581
  button.label = label;
741
- button.setTitle(( localize(5538, "Hide inline suggestions for 5 min")));
582
+ button.setTitle(( localize(5621, "Hide inline suggestions for 5 min")));
742
583
  return true;
743
584
  }
744
585
  const timeLeftSeconds = Math.ceil(timeLeftMs / 1000);
745
586
  const minutes = Math.floor(timeLeftSeconds / 60);
746
587
  const seconds = timeLeftSeconds % 60;
747
- timerDisplay.textContent = `${minutes}:${seconds < 10 ? '0' : ''}${seconds} ${( localize(5539, "remaining"))}`;
748
- timerDisplay.title = ( localize(5540, "Inline suggestions are hidden for the remaining duration"));
749
- button.label = ( localize(5541, "+5 min"));
750
- button.setTitle(( localize(5542, "Snooze additional 5 min")));
588
+ timerDisplay.textContent = `${minutes}:${seconds < 10 ? '0' : ''}${seconds} ${( localize(5622, "remaining"))}`;
589
+ timerDisplay.title = ( localize(5623, "Inline suggestions are hidden for the remaining duration"));
590
+ button.label = ( localize(5624, "+5 min"));
591
+ button.setTitle(( localize(5625, "Snooze additional 5 min")));
751
592
  toolbar.push([cancelAction], { icon: true, label: false });
752
593
  return false;
753
594
  };
@@ -758,7 +599,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
758
599
  if (update(enabled)) {
759
600
  return;
760
601
  }
761
- timerDisposables.add(disposableWindowInterval(getWindow(container), () => update(enabled), 1_000));
602
+ timerDisposables.add(disposableWindowInterval(getWindow(container), () => update(enabled), 1000));
762
603
  }
763
604
  updateIntervalTimer();
764
605
  disposables.add(button.onDidClick(() => {
@@ -775,6 +616,30 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
775
616
  updateIntervalTimer();
776
617
  }));
777
618
  }
619
+ async showModelPicker(provider) {
620
+ if (!provider.modelInfo || !provider.setModelId) {
621
+ return;
622
+ }
623
+ const modelInfo = provider.modelInfo;
624
+ const items = ( modelInfo.models.map(model => ({
625
+ id: model.id,
626
+ label: model.name,
627
+ description: model.id === modelInfo.currentModelId ? ( localize(5626, "Currently selected")) : undefined,
628
+ picked: model.id === modelInfo.currentModelId
629
+ })));
630
+ const selected = await this.quickInputService.pick(items, {
631
+ placeHolder: ( localize(
632
+ 5627,
633
+ "Select a model for {0}",
634
+ provider.displayName || 'inline completions'
635
+ )),
636
+ canPickMany: false
637
+ });
638
+ if (selected && selected.id && selected.id !== modelInfo.currentModelId) {
639
+ await provider.setModelId(selected.id);
640
+ }
641
+ this.hoverService.hideHover(true);
642
+ }
778
643
  };
779
644
  ChatStatusDashboard = ( __decorate([
780
645
  ( __param(0, IChatEntitlementService)),
@@ -789,7 +654,10 @@ ChatStatusDashboard = ( __decorate([
789
654
  ( __param(9, ITextResourceConfigurationService)),
790
655
  ( __param(10, IInlineCompletionsService)),
791
656
  ( __param(11, IChatSessionsService)),
792
- ( __param(12, IMarkdownRendererService))
657
+ ( __param(12, IMarkdownRendererService)),
658
+ ( __param(13, ILanguageFeaturesService)),
659
+ ( __param(14, IQuickInputService)),
660
+ ( __param(15, IInstantiationService))
793
661
  ], ChatStatusDashboard));
794
662
 
795
- export { ChatStatusBarEntry };
663
+ export { ChatStatusDashboard };