@codingame/monaco-vscode-chat-service-override 26.2.2 → 28.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 (356) hide show
  1. package/index.js +35 -2
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +15 -0
  4. package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +53 -0
  5. package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +219 -0
  6. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +89 -0
  7. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +251 -0
  8. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
  9. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +278 -0
  10. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +76 -0
  11. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +299 -0
  12. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +67 -0
  13. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +263 -0
  14. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +85 -0
  15. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +397 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -2
  17. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +27 -40
  18. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +9 -3
  19. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +74 -18
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +1 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +54 -8
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +87 -53
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +71 -15
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +43 -21
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +13 -5
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -3
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +1 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +154 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -8
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +53 -43
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +4 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +85 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +8 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +33 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +18 -32
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  42. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +13 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
  44. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +49 -13
  45. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +58 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +537 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +17 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +55 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +26 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +9 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/media/agentPluginEditor.css +32 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +48 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +282 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +55 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +634 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +10 -11
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -67
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +7 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +27 -18
  61. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +1 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +4 -2
  63. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
  65. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +2 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +90 -51
  67. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +20 -5
  68. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +3 -1
  69. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +43 -27
  70. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +7 -2
  71. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +3 -1
  72. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +84 -22
  73. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  74. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.d.ts → localAgentSessionsController.d.ts} +7 -4
  75. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.js → localAgentSessionsController.js} +24 -17
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +23 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +171 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +52 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +20 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +179 -0
  81. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +987 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +246 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +56 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +26 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +130 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +878 -0
  88. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +22 -0
  89. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +38 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +83 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +45 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +165 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +75 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +692 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +936 -0
  97. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +62 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +702 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +2 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +30 -1
  101. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +32 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +26 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +622 -391
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +18 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +419 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +12 -0
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +46 -0
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +34 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +198 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +55 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +314 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.d.ts +23 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +64 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +5 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +84 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +27 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +110 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +46 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +170 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +71 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +611 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +125 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +504 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.d.ts +10 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +914 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +19 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +128 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +61 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +467 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +31 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +113 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +14 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +126 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +38 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +279 -0
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +18 -0
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +122 -0
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +47 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +85 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +788 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -5
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +32 -36
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +6 -24
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  147. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  148. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  149. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
  151. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +2 -1
  152. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +2 -2
  153. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  154. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +12 -12
  155. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
  156. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +16 -15
  157. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  158. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  159. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -76
  160. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +26 -15
  161. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +2 -2
  162. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  163. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  164. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +24 -7
  165. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +40 -413
  166. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +10 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +38 -6
  168. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +5 -1
  169. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +56 -46
  170. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +15 -11
  171. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +52 -0
  172. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +138 -0
  173. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +11 -1
  174. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +166 -41
  175. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +6 -0
  176. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +37 -23
  177. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +17 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +394 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +118 -63
  181. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
  182. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +28 -0
  183. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +66 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +245 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +78 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.js +234 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +88 -14
  188. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +624 -68
  189. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +41 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +22 -0
  191. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +88 -24
  193. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +28 -19
  194. package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.d.ts +14 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.js +62 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +36 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +110 -0
  198. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.d.ts +10 -0
  199. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +39 -0
  200. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +3 -3
  201. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
  202. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.d.ts +10 -0
  203. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +39 -0
  204. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +26 -0
  205. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +175 -0
  206. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +99 -0
  207. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +489 -0
  208. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  209. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +19 -1
  210. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +364 -279
  211. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +18 -1
  212. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +69 -6
  213. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  214. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +9 -9
  215. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  216. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +4 -0
  217. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
  218. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  219. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
  220. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
  221. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +22 -0
  222. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +76 -0
  223. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +5 -0
  224. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +30 -0
  225. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +2 -0
  226. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +67 -38
  227. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +20 -1
  228. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +187 -74
  229. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +31 -0
  230. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +242 -0
  231. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +34 -0
  232. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +45 -0
  233. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
  234. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +33 -0
  235. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +311 -0
  236. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  237. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +4 -0
  238. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +10 -1
  239. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
  240. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +29 -14
  241. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
  242. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +126 -30
  243. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +9 -5
  244. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  245. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -2
  246. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +15 -4
  247. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +46 -9
  248. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +8 -1
  249. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +65 -37
  250. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +6 -5
  251. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -20
  252. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +15 -6
  253. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +40 -0
  254. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +28 -0
  255. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +190 -0
  256. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +11 -0
  257. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +44 -0
  258. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +208 -0
  259. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +19 -9
  260. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +261 -105
  261. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +21 -2
  262. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -2
  263. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -6
  264. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +16 -8
  265. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +13 -4
  266. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +144 -11
  267. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +36 -3
  268. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
  269. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +2 -2
  270. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +57 -0
  271. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +29 -0
  272. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +119 -0
  273. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +748 -0
  274. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +146 -0
  275. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +672 -0
  276. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
  277. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +3 -16
  278. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +7 -50
  279. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +2 -1
  280. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +2 -2
  281. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +1 -6
  282. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +4 -8
  283. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
  284. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +10 -9
  285. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
  286. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +26 -1
  287. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +293 -94
  288. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
  289. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +86 -30
  290. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +121 -0
  291. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1422 -0
  292. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
  293. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +48 -14
  294. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +404 -132
  295. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -2
  296. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +40 -28
  297. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +3 -0
  298. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +13 -0
  299. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  300. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +14 -2
  301. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +54 -5
  302. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +12 -5
  303. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +27 -4
  304. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +265 -25
  305. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +6 -11
  306. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +18 -81
  307. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +2 -3
  308. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +10 -10
  309. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  310. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  311. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  312. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
  313. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  314. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  315. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +6 -2
  316. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  317. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +35 -26
  318. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +0 -1
  319. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +1 -5
  320. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +3 -3
  321. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  322. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +4 -1
  323. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +13 -11
  324. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
  325. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +3 -1
  326. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  327. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  328. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  329. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  330. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  331. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  332. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  333. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  334. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +17 -0
  335. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +302 -69
  336. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +3 -1
  337. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +8 -0
  338. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -10
  339. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +7 -0
  340. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +63 -21
  341. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +8 -0
  342. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +31 -0
  343. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  344. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  345. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  346. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  347. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +7 -1
  348. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +46 -17
  349. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +0 -72
  350. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +0 -587
  351. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -12
  352. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -51
  353. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +0 -71
  354. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +0 -293
  355. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +0 -2
  356. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +0 -31
@@ -1,109 +1,665 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
3
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
4
  import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
5
- import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
6
- import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
5
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
6
+ import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
7
7
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
8
- import { ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
8
+ import { ChatConfiguration, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
9
+ import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
9
10
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
11
+ import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
12
+ import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
13
+ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
14
+ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
15
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
16
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
17
+ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
18
+ import { CreateSlashCommandsUsageTracker } from './createSlashCommandsUsageTracker.js';
19
+ import { ChatEntitlement } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
20
+ import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
21
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
22
+ import { ChatRequestDynamicVariablePart, ChatRequestSlashCommandPart, ChatRequestAgentSubcommandPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
23
+ import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
24
+ import { TipEligibilityTracker } from './chatTipEligibilityTracker.js';
25
+ import { TIP_CATALOG, ChatTipTier, extractCommandIds } from './chatTipCatalog.js';
26
+ import { TipTrackingCommands, ChatTipStorageKeys } from './chatTipStorageKeys.js';
10
27
 
11
- const TIP_CATALOG = [{
12
- id: "tip.agentMode",
13
- message: ( localize(
14
- 5676,
15
- "Tip: Try [Agent mode](command:workbench.action.chat.openEditSession) for multi-file edits and running commands."
16
- )),
17
- when: ( ChatContextKeys.chatModeKind.notEqualsTo(ChatModeKind.Agent)),
18
- enabledCommands: ["workbench.action.chat.openEditSession"]
19
- }, {
20
- id: "tip.planMode",
21
- message: ( localize(
22
- 5677,
23
- "Tip: Try [Plan mode](command:workbench.action.chat.openPlan) to let the agent perform deep analysis and planning before implementing changes."
24
- )),
25
- when: ( ChatContextKeys.chatModeName.notEqualsTo("Plan")),
26
- enabledCommands: ["workbench.action.chat.openPlan"]
27
- }, {
28
- id: "tip.attachFiles",
29
- message: ( localize(5678, "Tip: Attach files or folders with # to give Copilot more context."))
30
- }, {
31
- id: "tip.codeActions",
32
- message: ( localize(
33
- 5679,
34
- "Tip: Select code and right-click for Copilot actions in the context menu."
35
- ))
36
- }, {
37
- id: "tip.undoChanges",
38
- message: ( localize(
39
- 5680,
40
- "Tip: You can undo Copilot's changes to any point by clicking Restore Checkpoint."
41
- )),
42
- when: ( ContextKeyExpr.or(( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent)), ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Edit))))
43
- }, {
44
- id: "tip.customInstructions",
45
- message: ( localize(
46
- 5681,
47
- "Tip: [Generate workspace instructions](command:workbench.action.chat.generateInstructions) so Copilot always has the context it needs when starting a task."
48
- )),
49
- enabledCommands: ["workbench.action.chat.generateInstructions"]
50
- }];
51
- let ChatTipService = class ChatTipService {
52
- constructor(_productService, _configurationService) {
28
+ const CREATE_AGENT_INSTRUCTIONS_TRACKING_COMMAND = TipTrackingCommands.CreateAgentInstructionsUsed;
29
+ const CREATE_PROMPT_TRACKING_COMMAND = TipTrackingCommands.CreatePromptUsed;
30
+ const CREATE_AGENT_TRACKING_COMMAND = TipTrackingCommands.CreateAgentUsed;
31
+ const CREATE_SKILL_TRACKING_COMMAND = TipTrackingCommands.CreateSkillUsed;
32
+ const FORK_CONVERSATION_TRACKING_COMMAND = TipTrackingCommands.ForkConversationUsed;
33
+ let ChatTipService = class ChatTipService extends Disposable {
34
+ constructor(
35
+ _productService,
36
+ _configurationService,
37
+ _storageService,
38
+ _chatService,
39
+ instantiationService,
40
+ _logService,
41
+ _chatEntitlementService,
42
+ _commandService,
43
+ _telemetryService,
44
+ _keybindingService
45
+ ) {
46
+ super();
53
47
  this._productService = _productService;
54
48
  this._configurationService = _configurationService;
55
- this._createdAt = Date.now();
56
- this._hasShownTip = false;
49
+ this._storageService = _storageService;
50
+ this._chatService = _chatService;
51
+ this._logService = _logService;
52
+ this._chatEntitlementService = _chatEntitlementService;
53
+ this._commandService = _commandService;
54
+ this._telemetryService = _telemetryService;
55
+ this._keybindingService = _keybindingService;
56
+ this._onDidDismissTip = this._register(( new Emitter()));
57
+ this.onDidDismissTip = this._onDidDismissTip.event;
58
+ this._onDidNavigateTip = this._register(( new Emitter()));
59
+ this.onDidNavigateTip = this._onDidNavigateTip.event;
60
+ this._onDidHideTip = this._register(( new Emitter()));
61
+ this.onDidHideTip = this._onDidHideTip.event;
62
+ this._onDidDisableTips = this._register(( new Emitter()));
63
+ this.onDidDisableTips = this._onDidDisableTips.event;
64
+ this._tipsHiddenForSession = false;
65
+ this._tipCommandListener = this._register(( new MutableDisposable()));
66
+ this._tracker = this._register(instantiationService.createInstance(TipEligibilityTracker, TIP_CATALOG));
67
+ this._createSlashCommandsUsageTracker = this._register(( new CreateSlashCommandsUsageTracker(this._chatService, this._storageService, () => this._contextKeyService)));
68
+ this._register(this._chatEntitlementService.onDidChangeQuotaExceeded(() => {
69
+ if (this._chatEntitlementService.quotas.chat?.percentRemaining === 0 && this._shownTip) {
70
+ this.hideTip();
71
+ }
72
+ }));
73
+ this._register(this._chatService.onDidSubmitRequest(e => {
74
+ const message = e.message ?? this._chatService.getSession(e.chatSessionResource)?.lastRequest?.message;
75
+ if (!message) {
76
+ return;
77
+ }
78
+ if (this._hasFileOrFolderReference(message)) {
79
+ this._tracker.recordCommandExecuted(TipTrackingCommands.AttachFilesReferenceUsed);
80
+ }
81
+ const slashCommandTrackingId = this._getSlashCommandTrackingId(message);
82
+ if (slashCommandTrackingId) {
83
+ this._tracker.recordCommandExecuted(slashCommandTrackingId);
84
+ }
85
+ this._hideShownTipIfNowIneligible();
86
+ }));
87
+ this._thinkingPhrasesEverModified = this._storageService.getBoolean(
88
+ ChatTipStorageKeys.ThinkingPhrasesEverModified,
89
+ StorageScope.APPLICATION,
90
+ false
91
+ );
92
+ if (!this._thinkingPhrasesEverModified && this._isSettingModified(ChatConfiguration.ThinkingPhrases)) {
93
+ this._thinkingPhrasesEverModified = true;
94
+ this._storageService.store(
95
+ ChatTipStorageKeys.ThinkingPhrasesEverModified,
96
+ true,
97
+ StorageScope.APPLICATION,
98
+ StorageTarget.MACHINE
99
+ );
100
+ }
101
+ if (!this._thinkingPhrasesEverModified) {
102
+ this._register(this._configurationService.onDidChangeConfiguration(e => {
103
+ if (e.affectsConfiguration(ChatConfiguration.ThinkingPhrases)) {
104
+ this._thinkingPhrasesEverModified = true;
105
+ this._storageService.store(
106
+ ChatTipStorageKeys.ThinkingPhrasesEverModified,
107
+ true,
108
+ StorageScope.APPLICATION,
109
+ StorageTarget.MACHINE
110
+ );
111
+ }
112
+ }));
113
+ }
114
+ }
115
+ _hasFileOrFolderReference(message) {
116
+ return ( message.parts.some(part => {
117
+ if (part.kind !== ChatRequestDynamicVariablePart.Kind) {
118
+ return false;
119
+ }
120
+ const dynamicPart = part;
121
+ return dynamicPart.isFile === true || dynamicPart.isDirectory === true;
122
+ }));
123
+ }
124
+ _getSlashCommandTrackingId(message) {
125
+ for (const part of message.parts) {
126
+ if (part.kind === ChatRequestSlashCommandPart.Kind) {
127
+ const slashCommand = part.slashCommand.command;
128
+ return this._toSlashCommandTrackingId(slashCommand);
129
+ }
130
+ if (part.kind === ChatRequestAgentSubcommandPart.Kind) {
131
+ const subCommand = part.command.name;
132
+ return this._toSlashCommandTrackingId(subCommand);
133
+ }
134
+ }
135
+ const trimmed = message.text.trimStart();
136
+ const match = /^(?:@\S+\s+)?\/(init|create-(?:instructions|prompt|agent|skill)|fork)(?:\s|$)/.exec(trimmed);
137
+ return match ? this._toSlashCommandTrackingId(match[1]) : undefined;
138
+ }
139
+ _toSlashCommandTrackingId(command) {
140
+ switch (command) {
141
+ case "init":
142
+ case "create-instructions":
143
+ return CREATE_AGENT_INSTRUCTIONS_TRACKING_COMMAND;
144
+ case "create-prompt":
145
+ return CREATE_PROMPT_TRACKING_COMMAND;
146
+ case "create-agent":
147
+ return CREATE_AGENT_TRACKING_COMMAND;
148
+ case "create-skill":
149
+ return CREATE_SKILL_TRACKING_COMMAND;
150
+ case "fork":
151
+ return FORK_CONVERSATION_TRACKING_COMMAND;
152
+ default:
153
+ return undefined;
154
+ }
155
+ }
156
+ recordSlashCommandUsage(command) {
157
+ const trackingId = this._toSlashCommandTrackingId(command);
158
+ if (!trackingId) {
159
+ return;
160
+ }
161
+ this._tracker.recordCommandExecuted(trackingId);
162
+ this._hideShownTipIfNowIneligible();
163
+ }
164
+ resetSession() {
165
+ this._shownTip = undefined;
166
+ this._tipRequestId = undefined;
167
+ this._contextKeyService = undefined;
168
+ this._tipsHiddenForSession = false;
169
+ }
170
+ dismissTip() {
171
+ if (this._shownTip) {
172
+ this._logTipTelemetry(this._shownTip.id, "dismissed");
173
+ const dismissed = ( new Set(this._getDismissedTipIds()));
174
+ dismissed.add(this._shownTip.id);
175
+ this._storageService.store(
176
+ ChatTipStorageKeys.DismissedTips,
177
+ JSON.stringify([...dismissed]),
178
+ StorageScope.APPLICATION,
179
+ StorageTarget.MACHINE
180
+ );
181
+ }
182
+ this._tipRequestId = undefined;
183
+ this._onDidDismissTip.fire();
184
+ }
185
+ dismissTipForSession() {
186
+ this.dismissTip();
187
+ this.hideTipsForSession();
188
+ }
189
+ clearDismissedTips() {
190
+ this._storageService.remove(ChatTipStorageKeys.DismissedTips, StorageScope.APPLICATION);
191
+ this._storageService.remove(ChatTipStorageKeys.DismissedTips, StorageScope.PROFILE);
192
+ this._shownTip = undefined;
193
+ this._tipRequestId = undefined;
194
+ this._contextKeyService = undefined;
195
+ this._tipsHiddenForSession = false;
196
+ this._onDidDismissTip.fire();
197
+ }
198
+ _getDismissedTipIds() {
199
+ const raw = this._readApplicationWithProfileFallback(ChatTipStorageKeys.DismissedTips);
200
+ if (!raw) {
201
+ return [];
202
+ }
203
+ try {
204
+ const parsed = JSON.parse(raw);
205
+ this._logService.debug("#ChatTips dismissed:", parsed);
206
+ if (!Array.isArray(parsed)) {
207
+ return [];
208
+ }
209
+ const knownTipIds = ( new Set(( TIP_CATALOG.map(tip => tip.id))));
210
+ const dismissed = ( new Set());
211
+ for (const value of parsed) {
212
+ if (typeof value === "string" && ( knownTipIds.has(value))) {
213
+ dismissed.add(value);
214
+ }
215
+ }
216
+ return [...dismissed];
217
+ } catch {
218
+ return [];
219
+ }
220
+ }
221
+ hideTip() {
222
+ if (this._shownTip) {
223
+ this._logTipTelemetry(this._shownTip.id, "hidden");
224
+ }
225
+ this._shownTip = undefined;
226
+ this._tipRequestId = undefined;
227
+ this._onDidHideTip.fire();
57
228
  }
58
- getNextTip(requestId, requestTimestamp, contextKeyService) {
229
+ hideTipsForSession() {
230
+ if (this._tipsHiddenForSession) {
231
+ return;
232
+ }
233
+ this._tipsHiddenForSession = true;
234
+ this._shownTip = undefined;
235
+ this._tipRequestId = undefined;
236
+ this._onDidHideTip.fire();
237
+ }
238
+ async disableTips() {
239
+ if (this._shownTip) {
240
+ this._logTipTelemetry(this._shownTip.id, "disabled");
241
+ }
242
+ this._shownTip = undefined;
243
+ this._tipRequestId = undefined;
244
+ await this._configurationService.updateValue("chat.tips.enabled", false, ConfigurationTarget.APPLICATION);
245
+ this._onDidDisableTips.fire();
246
+ }
247
+ getWelcomeTip(contextKeyService) {
248
+ this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
249
+ this._tracker.recordCurrentMode(contextKeyService);
250
+ this._tracker.refreshPromptFileExclusions();
59
251
  if (!this._configurationService.getValue("chat.tips.enabled")) {
60
252
  return undefined;
61
253
  }
254
+ if (this._tipsHiddenForSession) {
255
+ return undefined;
256
+ }
257
+ this._contextKeyService = contextKeyService;
62
258
  if (!this._isCopilotEnabled()) {
63
259
  return undefined;
64
260
  }
65
- if (this._tipRequestId === requestId && this._shownTip) {
66
- return this._createTip(this._shownTip);
261
+ if (this._chatEntitlementService.entitlement === ChatEntitlement.Unknown) {
262
+ return undefined;
263
+ }
264
+ if (!this._isChatLocation(contextKeyService)) {
265
+ return undefined;
67
266
  }
68
- if (this._hasShownTip) {
267
+ const foregroundSessionCount = contextKeyService.getContextKeyValue(ChatContextKeys.foregroundSessionCount.key);
268
+ if (foregroundSessionCount !== 1) {
69
269
  return undefined;
70
270
  }
71
- if (requestTimestamp < this._createdAt) {
271
+ if (this._isChatQuotaExceeded(contextKeyService)) {
272
+ return undefined;
273
+ }
274
+ if (this._tipRequestId === "welcome" && this._shownTip) {
275
+ if (this._shownTip.id !== "tip.switchToAuto") {
276
+ const switchToAutoTip = TIP_CATALOG.find(tip => tip.id === "tip.switchToAuto");
277
+ if (switchToAutoTip) {
278
+ const dismissedIds = ( new Set(this._getDismissedTipIds()));
279
+ if (!( dismissedIds.has(switchToAutoTip.id)) && this._isEligible(switchToAutoTip, contextKeyService)) {
280
+ this._shownTip = switchToAutoTip;
281
+ this._storageService.store(
282
+ ChatTipStorageKeys.LastTipId,
283
+ switchToAutoTip.id,
284
+ StorageScope.APPLICATION,
285
+ StorageTarget.USER
286
+ );
287
+ const tip = this._createTip(switchToAutoTip);
288
+ this._logTipTelemetry(switchToAutoTip.id, "shown");
289
+ this._trackTipCommandClicks(switchToAutoTip);
290
+ this._onDidNavigateTip.fire(tip);
291
+ return tip;
292
+ }
293
+ }
294
+ }
295
+ if (!this._isEligible(this._shownTip, contextKeyService)) {
296
+ if (this._tracker.isExcluded(this._shownTip)) {
297
+ this.hideTip();
298
+ return undefined;
299
+ }
300
+ const nextTip = this._findNextEligibleTip(this._shownTip.id, contextKeyService);
301
+ if (nextTip) {
302
+ this._shownTip = nextTip;
303
+ this._storageService.store(
304
+ ChatTipStorageKeys.LastTipId,
305
+ nextTip.id,
306
+ StorageScope.APPLICATION,
307
+ StorageTarget.USER
308
+ );
309
+ const tip = this._createTip(nextTip);
310
+ this._onDidNavigateTip.fire(tip);
311
+ return tip;
312
+ }
313
+ this.hideTip();
314
+ return undefined;
315
+ }
316
+ return this._createTip(this._shownTip);
317
+ }
318
+ const tip = this._pickTip("welcome", contextKeyService);
319
+ return tip;
320
+ }
321
+ _findNextEligibleTip(currentTipId, contextKeyService) {
322
+ this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
323
+ const currentIndex = TIP_CATALOG.findIndex(tip => tip.id === currentTipId);
324
+ if (currentIndex === -1) {
72
325
  return undefined;
73
326
  }
74
- const eligibleTips = TIP_CATALOG.filter(tip => this._isEligible(tip, contextKeyService));
75
- if (eligibleTips.length === 0) {
327
+ const dismissedIds = ( new Set(this._getDismissedTipIds()));
328
+ for (let i = 1; i < TIP_CATALOG.length; i++) {
329
+ const idx = (currentIndex + i) % TIP_CATALOG.length;
330
+ const candidate = TIP_CATALOG[idx];
331
+ if (!( dismissedIds.has(candidate.id)) && this._isEligible(candidate, contextKeyService)) {
332
+ return candidate;
333
+ }
334
+ }
335
+ return undefined;
336
+ }
337
+ _hideShownTipIfNowIneligible() {
338
+ if (!this._shownTip || !this._contextKeyService) {
339
+ return;
340
+ }
341
+ if (this._tipsHiddenForSession) {
342
+ return;
343
+ }
344
+ if (this._isEligible(this._shownTip, this._contextKeyService)) {
345
+ return;
346
+ }
347
+ this.hideTip();
348
+ }
349
+ _pickTip(sourceId, contextKeyService) {
350
+ this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
351
+ this._tracker.recordCurrentMode(contextKeyService);
352
+ const dismissedIds = ( new Set(this._getDismissedTipIds()));
353
+ const eligibleTips = TIP_CATALOG.filter(tip => !( dismissedIds.has(tip.id)) && this._isEligible(tip, contextKeyService));
354
+ const selectedTip = this._selectTipByTier(eligibleTips);
355
+ if (!selectedTip) {
76
356
  return undefined;
77
357
  }
78
- const randomIndex = Math.floor(Math.random() * eligibleTips.length);
79
- const selectedTip = eligibleTips[randomIndex];
80
- this._hasShownTip = true;
81
- this._tipRequestId = requestId;
358
+ this._storageService.store(
359
+ ChatTipStorageKeys.LastTipId,
360
+ selectedTip.id,
361
+ StorageScope.APPLICATION,
362
+ StorageTarget.USER
363
+ );
364
+ this._tipRequestId = sourceId;
82
365
  this._shownTip = selectedTip;
366
+ this._logTipTelemetry(selectedTip.id, "shown");
367
+ this._trackTipCommandClicks(selectedTip);
83
368
  return this._createTip(selectedTip);
84
369
  }
85
- _isEligible(tip, contextKeyService) {
86
- if (!tip.when) {
370
+ _selectTipByTier(eligibleTips) {
371
+ const foundationalTips = eligibleTips.filter(tip => tip.tier === ChatTipTier.Foundational);
372
+ if (foundationalTips.length) {
373
+ return this._sortByPriorityAndCatalogOrder(foundationalTips)[0];
374
+ }
375
+ const qolTips = eligibleTips.filter(tip => tip.tier === ChatTipTier.Qol);
376
+ if (!qolTips.length) {
377
+ return undefined;
378
+ }
379
+ const randomIndex = Math.floor(Math.random() * qolTips.length);
380
+ return qolTips[randomIndex];
381
+ }
382
+ navigateToNextTip() {
383
+ if (!this._contextKeyService) {
384
+ return undefined;
385
+ }
386
+ return this._navigateTip(1, this._contextKeyService);
387
+ }
388
+ navigateToPreviousTip() {
389
+ if (!this._contextKeyService) {
390
+ return undefined;
391
+ }
392
+ return this._navigateTip(-1, this._contextKeyService);
393
+ }
394
+ getNextEligibleTip() {
395
+ if (!this._contextKeyService || !this._shownTip) {
396
+ return undefined;
397
+ }
398
+ const contextKeyService = this._contextKeyService;
399
+ this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
400
+ const currentTipId = this._shownTip.id;
401
+ const orderedTips = this._getOrderedEligibleTips(contextKeyService, {
402
+ includeTipId: currentTipId
403
+ });
404
+ if (!orderedTips.length) {
405
+ return undefined;
406
+ }
407
+ const currentIndex = orderedTips.findIndex(tip => tip.id === currentTipId);
408
+ const candidate = this._getNextTipFromOrderedList(orderedTips, currentIndex, currentTipId);
409
+ if (candidate) {
410
+ this._shownTip = candidate;
411
+ this._tipRequestId = "welcome";
412
+ this._storageService.store(
413
+ ChatTipStorageKeys.LastTipId,
414
+ candidate.id,
415
+ StorageScope.APPLICATION,
416
+ StorageTarget.USER
417
+ );
418
+ this._logTipTelemetry(candidate.id, "shown");
419
+ this._trackTipCommandClicks(candidate);
420
+ return this._createTip(candidate);
421
+ }
422
+ return undefined;
423
+ }
424
+ _getNextTipFromOrderedList(orderedTips, startIndex, currentTipId) {
425
+ if (!orderedTips.length) {
426
+ return undefined;
427
+ }
428
+ const fallbackIndex = 0;
429
+ const normalizedStartIndex = startIndex === -1 ? fallbackIndex : startIndex;
430
+ for (let i = 1; i <= orderedTips.length; i++) {
431
+ const index = (normalizedStartIndex + i) % orderedTips.length;
432
+ const candidate = orderedTips[index];
433
+ if (candidate.id !== currentTipId) {
434
+ return candidate;
435
+ }
436
+ }
437
+ return undefined;
438
+ }
439
+ hasMultipleTips() {
440
+ if (!this._contextKeyService) {
441
+ return false;
442
+ }
443
+ this._createSlashCommandsUsageTracker.syncContextKey(this._contextKeyService);
444
+ return this._hasNavigableTip(this._contextKeyService);
445
+ }
446
+ _navigateTip(direction, contextKeyService) {
447
+ this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
448
+ if (!this._shownTip) {
449
+ return undefined;
450
+ }
451
+ const orderedTips = this._getOrderedEligibleTips(contextKeyService);
452
+ if (!orderedTips.length) {
453
+ return undefined;
454
+ }
455
+ const currentIndex = orderedTips.findIndex(tip => tip.id === this._shownTip.id);
456
+ if (orderedTips.length === 1 && currentIndex !== -1) {
457
+ return undefined;
458
+ }
459
+ const fallbackIndex = direction === 1 ? 0 : orderedTips.length - 1;
460
+ const nextIndex = currentIndex === -1 ? fallbackIndex : (currentIndex + direction + orderedTips.length) % orderedTips.length;
461
+ const candidate = orderedTips[nextIndex];
462
+ if (candidate) {
463
+ this._logTipTelemetry(this._shownTip.id, direction === 1 ? "navigateNext" : "navigatePrevious");
464
+ this._shownTip = candidate;
465
+ this._tipRequestId = "welcome";
466
+ this._storageService.store(
467
+ ChatTipStorageKeys.LastTipId,
468
+ candidate.id,
469
+ StorageScope.APPLICATION,
470
+ StorageTarget.USER
471
+ );
472
+ this._logTipTelemetry(candidate.id, "shown");
473
+ this._trackTipCommandClicks(candidate);
474
+ const tip = this._createTip(candidate);
475
+ this._onDidNavigateTip.fire(tip);
476
+ return tip;
477
+ }
478
+ return undefined;
479
+ }
480
+ _hasNavigableTip(contextKeyService) {
481
+ const orderedTips = this._getOrderedEligibleTips(contextKeyService);
482
+ if (!orderedTips.length) {
483
+ return false;
484
+ }
485
+ if (!this._shownTip) {
486
+ return orderedTips.length > 1;
487
+ }
488
+ if (orderedTips.length > 1) {
87
489
  return true;
88
490
  }
89
- return contextKeyService.contextMatchesRules(tip.when);
491
+ return orderedTips[0].id !== this._shownTip.id;
492
+ }
493
+ _getOrderedEligibleTips(contextKeyService, options) {
494
+ const dismissedIds = ( new Set(this._getDismissedTipIds()));
495
+ const eligibleTips = TIP_CATALOG.filter(tip => {
496
+ if (options?.includeTipId && tip.id === options.includeTipId) {
497
+ return true;
498
+ }
499
+ if (options?.excludeShownTip && this._shownTip && tip.id === this._shownTip.id) {
500
+ return false;
501
+ }
502
+ return !( dismissedIds.has(tip.id)) && this._isEligible(tip, contextKeyService);
503
+ });
504
+ const foundationalTips = this._sortByPriorityAndCatalogOrder(eligibleTips.filter(tip => tip.tier === ChatTipTier.Foundational));
505
+ const qolTips = this._sortByPriorityAndCatalogOrder(eligibleTips.filter(tip => tip.tier === ChatTipTier.Qol));
506
+ return [...foundationalTips, ...qolTips];
507
+ }
508
+ _sortByPriorityAndCatalogOrder(tips) {
509
+ return [...tips].sort((a, b) => {
510
+ const aPriority = a.priority ?? Number.POSITIVE_INFINITY;
511
+ const bPriority = b.priority ?? Number.POSITIVE_INFINITY;
512
+ if (aPriority !== bPriority) {
513
+ return aPriority - bPriority;
514
+ }
515
+ const aCatalogIndex = TIP_CATALOG.findIndex(tip => tip.id === a.id);
516
+ const bCatalogIndex = TIP_CATALOG.findIndex(tip => tip.id === b.id);
517
+ return aCatalogIndex - bCatalogIndex;
518
+ });
519
+ }
520
+ _isEligible(tip, contextKeyService) {
521
+ if (tip.onlyWhenModelIds?.length) {
522
+ const currentModelId = this._getCurrentChatModelId(contextKeyService);
523
+ const isModelMatch = ( tip.onlyWhenModelIds.some(
524
+ modelId => currentModelId === modelId || currentModelId.startsWith(`${modelId}-`)
525
+ ));
526
+ if (!isModelMatch) {
527
+ return false;
528
+ }
529
+ }
530
+ if (tip.excludeWhenSettingsChanged?.some(setting => this._isSettingModified(setting))) {
531
+ this._logService.debug(
532
+ "#ChatTips: tip excluded because setting was modified",
533
+ tip.id,
534
+ tip.excludeWhenSettingsChanged
535
+ );
536
+ return false;
537
+ }
538
+ if (tip.when && !contextKeyService.contextMatchesRules(tip.when)) {
539
+ this._logService.debug(
540
+ "#ChatTips: tip is not eligible due to when clause",
541
+ tip.id,
542
+ tip.when.serialize()
543
+ );
544
+ return false;
545
+ }
546
+ if (this._tracker.isExcluded(tip)) {
547
+ return false;
548
+ }
549
+ if (tip.id === "tip.thinkingPhrases" && this._thinkingPhrasesEverModified) {
550
+ this._logService.debug(
551
+ "#ChatTips: tip excluded because thinking phrases setting was previously modified",
552
+ tip.id
553
+ );
554
+ return false;
555
+ }
556
+ this._logService.debug("#ChatTips: tip is eligible", tip.id);
557
+ return true;
558
+ }
559
+ _isSettingModified(key) {
560
+ const inspected = this._configurationService.inspect(key);
561
+ return inspected.userValue !== undefined || inspected.userLocalValue !== undefined || inspected.userRemoteValue !== undefined || inspected.workspaceValue !== undefined || inspected.workspaceFolderValue !== undefined;
562
+ }
563
+ _getCurrentChatModelId(contextKeyService) {
564
+ const normalize = modelId => {
565
+ const normalizedModelId = modelId?.toLowerCase() ?? "";
566
+ if (!normalizedModelId) {
567
+ return "";
568
+ }
569
+ if (normalizedModelId.includes("/")) {
570
+ return normalizedModelId.split("/").at(-1) ?? "";
571
+ }
572
+ return normalizedModelId;
573
+ };
574
+ const contextKeyModelId = normalize(contextKeyService.getContextKeyValue(ChatContextKeys.chatModelId.key));
575
+ if (contextKeyModelId) {
576
+ return contextKeyModelId;
577
+ }
578
+ const location = contextKeyService.getContextKeyValue(ChatContextKeys.location.key) ?? ChatAgentLocation.Chat;
579
+ const sessionType = contextKeyService.getContextKeyValue(ChatContextKeys.chatSessionType.key) ?? "";
580
+ const candidateStorageKeys = sessionType ? [
581
+ `chat.currentLanguageModel.${location}.${sessionType}`,
582
+ `chat.currentLanguageModel.${location}`
583
+ ] : [`chat.currentLanguageModel.${location}`];
584
+ for (const storageKey of candidateStorageKeys) {
585
+ const persistedModelIdentifier = this._storageService.get(storageKey, StorageScope.APPLICATION);
586
+ const persistedModelId = normalize(persistedModelIdentifier);
587
+ if (persistedModelId) {
588
+ return persistedModelId;
589
+ }
590
+ }
591
+ return "";
592
+ }
593
+ _isChatLocation(contextKeyService) {
594
+ const location = contextKeyService.getContextKeyValue(ChatContextKeys.location.key);
595
+ return !location || location === ChatAgentLocation.Chat;
596
+ }
597
+ _isChatQuotaExceeded(contextKeyService) {
598
+ return contextKeyService.getContextKeyValue(ChatContextKeys.chatQuotaExceeded.key) === true;
90
599
  }
91
600
  _isCopilotEnabled() {
92
601
  const defaultChatAgent = this._productService.defaultChatAgent;
93
602
  return !!defaultChatAgent?.chatExtensionId;
94
603
  }
95
604
  _createTip(tipDef) {
96
- const markdown = ( new MarkdownString(tipDef.message, {
97
- isTrusted: tipDef.enabledCommands ? {
98
- enabledCommands: tipDef.enabledCommands
605
+ const ctx = {
606
+ keybindingService: this._keybindingService
607
+ };
608
+ const rawMessage = tipDef.buildMessage(ctx);
609
+ const prefixedMessage = ( localize(6232, "**Tip:** {0}", rawMessage.value));
610
+ const enabledCommands = extractCommandIds(prefixedMessage);
611
+ const markdown = ( new MarkdownString(prefixedMessage, {
612
+ isTrusted: enabledCommands.length > 0 ? {
613
+ enabledCommands
99
614
  } : false
100
615
  }));
101
616
  return {
102
617
  id: tipDef.id,
103
- content: markdown
618
+ content: markdown,
619
+ enabledCommands
104
620
  };
105
621
  }
622
+ _logTipTelemetry(tipId, action, commandId) {
623
+ this._telemetryService.publicLog2("chatTip", {
624
+ tipId,
625
+ action,
626
+ commandId
627
+ });
628
+ }
629
+ _trackTipCommandClicks(tip) {
630
+ this._tipCommandListener.clear();
631
+ const ctx = {
632
+ keybindingService: this._keybindingService
633
+ };
634
+ const rawMessage = tip.buildMessage(ctx);
635
+ const enabledCommands = extractCommandIds(rawMessage.value);
636
+ if (!enabledCommands.length) {
637
+ return;
638
+ }
639
+ const enabledCommandSet = ( new Set(enabledCommands));
640
+ const dismissCommandSet = ( new Set(tip.dismissWhenCommandsClicked));
641
+ this._tipCommandListener.value = this._commandService.onDidExecuteCommand(e => {
642
+ if (( enabledCommandSet.has(e.commandId)) && this._shownTip?.id === tip.id) {
643
+ this._logTipTelemetry(tip.id, "commandClicked", e.commandId);
644
+ if (( dismissCommandSet.has(e.commandId))) {
645
+ this.dismissTip();
646
+ }
647
+ this.hideTipsForSession();
648
+ }
649
+ });
650
+ }
651
+ _readApplicationWithProfileFallback(key) {
652
+ const applicationValue = this._storageService.get(key, StorageScope.APPLICATION);
653
+ if (applicationValue) {
654
+ return applicationValue;
655
+ }
656
+ const profileValue = this._storageService.get(key, StorageScope.PROFILE);
657
+ if (profileValue) {
658
+ this._storageService.store(key, profileValue, StorageScope.APPLICATION, StorageTarget.MACHINE);
659
+ }
660
+ return profileValue;
661
+ }
106
662
  };
107
- ChatTipService = ( __decorate([( __param(0, IProductService)), ( __param(1, IConfigurationService))], ChatTipService));
663
+ ChatTipService = ( __decorate([( __param(0, IProductService)), ( __param(1, IConfigurationService)), ( __param(2, IStorageService)), ( __param(3, IChatService)), ( __param(4, IInstantiationService)), ( __param(5, ILogService)), ( __param(6, IChatEntitlementService)), ( __param(7, ICommandService)), ( __param(8, ITelemetryService)), ( __param(9, IKeybindingService))], ChatTipService));
108
664
 
109
- export { ChatTipService };
665
+ export { CREATE_AGENT_INSTRUCTIONS_TRACKING_COMMAND, CREATE_AGENT_TRACKING_COMMAND, CREATE_PROMPT_TRACKING_COMMAND, CREATE_SKILL_TRACKING_COMMAND, ChatTipService, FORK_CONVERSATION_TRACKING_COMMAND, TipEligibilityTracker, TipTrackingCommands };