@codingame/monaco-vscode-chat-service-override 26.2.2 → 27.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 (316) hide show
  1. package/index.js +31 -1
  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 +39 -0
  7. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +83 -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 +274 -0
  10. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +71 -0
  11. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +284 -0
  12. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +79 -0
  13. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +378 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -2
  15. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +27 -40
  16. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +9 -3
  17. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +74 -18
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +1 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +54 -8
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +87 -53
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +71 -15
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +43 -21
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -3
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +1 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +154 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -8
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +53 -43
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +4 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +84 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +1 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +33 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -29
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +13 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +16 -16
  42. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +12 -12
  43. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +33 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +204 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +77 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +541 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +10 -11
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -65
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +7 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +27 -18
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +1 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +4 -2
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +2 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +90 -51
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +20 -5
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +3 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +43 -27
  61. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +7 -2
  62. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +3 -1
  63. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +84 -22
  64. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  65. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.d.ts → localAgentSessionsController.d.ts} +7 -4
  66. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.js → localAgentSessionsController.js} +24 -17
  67. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +23 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +171 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +48 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +19 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +181 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +943 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +248 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +57 -0
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +27 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +118 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +727 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +22 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +38 -0
  81. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +72 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +45 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +165 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +75 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +623 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +858 -0
  88. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +2 -0
  89. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +30 -1
  90. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +32 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +26 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +19 -3
  93. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +529 -363
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +18 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +419 -0
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +12 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +46 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +34 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +198 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +55 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +305 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.d.ts +23 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +64 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +5 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +84 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +27 -0
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +110 -0
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +34 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +111 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +71 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +611 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +125 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +504 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.d.ts +10 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +914 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +19 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +128 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +58 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +429 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +31 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +113 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +14 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +126 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +38 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +279 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +18 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +122 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +45 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +85 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +781 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +5 -22
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +2 -1
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +12 -12
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +16 -15
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -76
  147. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +26 -15
  148. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +2 -2
  149. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  151. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +15 -7
  152. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +40 -413
  153. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +10 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +38 -6
  155. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +5 -1
  156. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +56 -46
  157. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +15 -11
  158. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +52 -0
  159. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +138 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +11 -1
  161. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +166 -41
  162. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +6 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +37 -23
  164. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +15 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +351 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +118 -63
  168. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
  169. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +28 -0
  170. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +182 -13
  171. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +892 -41
  172. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -1
  173. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +55 -25
  174. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +28 -19
  175. package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.d.ts +14 -0
  176. package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.js +62 -0
  177. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +36 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +110 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.d.ts +10 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +39 -0
  181. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +3 -3
  182. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
  183. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.d.ts +10 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +39 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +27 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +102 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  188. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +16 -1
  189. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +69 -47
  190. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +2 -41
  191. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  192. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +7 -7
  193. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  194. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +4 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
  196. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  197. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
  198. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
  199. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +22 -0
  200. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +76 -0
  201. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +5 -0
  202. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +30 -0
  203. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +43 -31
  204. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +67 -42
  205. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +31 -0
  206. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +242 -0
  207. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +34 -0
  208. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +45 -0
  209. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
  210. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +33 -0
  211. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +311 -0
  212. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  213. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +4 -0
  214. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +10 -1
  215. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +10 -10
  216. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
  217. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +64 -26
  218. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +4 -2
  219. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  220. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -2
  221. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +15 -4
  222. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +42 -8
  223. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +8 -1
  224. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +58 -31
  225. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +6 -5
  226. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +8 -20
  227. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +15 -6
  228. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +39 -0
  229. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +27 -0
  230. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +190 -0
  231. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +11 -0
  232. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +36 -0
  233. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +188 -0
  234. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +18 -8
  235. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +192 -85
  236. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +2 -1
  237. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +2 -1
  238. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -6
  239. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +16 -8
  240. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +8 -4
  241. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +111 -7
  242. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +2 -0
  243. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +52 -0
  244. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +29 -0
  245. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +73 -0
  246. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +622 -0
  247. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +64 -0
  248. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +478 -0
  249. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
  250. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +1 -30
  251. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -5
  252. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +2 -8
  253. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -1
  254. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +8 -8
  255. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +9 -9
  256. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +23 -22
  257. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +44 -14
  258. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +345 -113
  259. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +14 -1
  260. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +34 -24
  261. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +3 -0
  262. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +13 -0
  263. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  264. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +11 -5
  265. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +23 -0
  266. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +248 -24
  267. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +6 -11
  268. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +18 -81
  269. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +2 -3
  270. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +10 -10
  271. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  272. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  273. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  274. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
  275. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  276. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  277. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +6 -2
  278. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  279. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +35 -26
  280. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +0 -1
  281. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +1 -5
  282. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +3 -3
  283. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  284. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +4 -1
  285. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +13 -11
  286. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
  287. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +3 -1
  288. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  289. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  290. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  291. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  292. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  293. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  294. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  295. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  296. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +9 -0
  297. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +280 -65
  298. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +3 -1
  299. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +8 -0
  300. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -10
  301. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +1 -0
  302. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +47 -19
  303. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +8 -0
  304. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +31 -0
  305. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  306. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  307. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  308. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  309. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +6 -1
  310. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +38 -16
  311. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +0 -72
  312. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +0 -587
  313. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +0 -71
  314. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +0 -293
  315. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +0 -2
  316. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +0 -31
@@ -1,92 +1,908 @@
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
5
  import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
6
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
7
+ import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
7
8
  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';
9
+ import { ChatModeKind, ChatConfiguration, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
10
+ import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
9
11
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
12
+ import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
13
+ import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
14
+ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
15
+ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
16
+ import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
17
+ import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
18
+ import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
19
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
20
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
21
+ import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
22
+ import { localChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
23
+ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
24
+ import { CreateSlashCommandsUsageTracker } from './createSlashCommandsUsageTracker.js';
25
+ import { ChatEntitlement } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
26
+ import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
27
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
28
+ import { ChatRequestDynamicVariablePart, ChatRequestSlashCommandPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
29
+ import { GENERATE_ON_DEMAND_INSTRUCTIONS_COMMAND_ID, GENERATE_PROMPT_COMMAND_ID, GENERATE_AGENT_COMMAND_ID, GENERATE_SKILL_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
10
30
 
31
+ var TipEligibilityTracker_1, ChatTipService_1;
32
+ const ATTACH_FILES_REFERENCE_TRACKING_COMMAND = "chat.tips.attachFiles.referenceUsed";
33
+ const CREATE_AGENT_INSTRUCTIONS_TRACKING_COMMAND = "chat.tips.createAgentInstructions.commandUsed";
34
+ const CREATE_PROMPT_TRACKING_COMMAND = "chat.tips.createPrompt.commandUsed";
35
+ const CREATE_AGENT_TRACKING_COMMAND = "chat.tips.createAgent.commandUsed";
36
+ const CREATE_SKILL_TRACKING_COMMAND = "chat.tips.createSkill.commandUsed";
11
37
  const TIP_CATALOG = [{
38
+ id: "tip.switchToAuto",
39
+ message: ( localize(
40
+ 6146,
41
+ "Tip: Using gpt-4.1? Try switching to [Auto](command:workbench.action.chat.openModelPicker) in the model picker for better coding performance."
42
+ )),
43
+ enabledCommands: ["workbench.action.chat.openModelPicker"],
44
+ onlyWhenModelIds: ["gpt-4.1"]
45
+ }, {
46
+ id: "tip.createInstruction",
47
+ message: ( localize(
48
+ 6147,
49
+ "Tip: Use [/create-instructions](command:{0}) to generate an on-demand instructions file with the agent.",
50
+ GENERATE_ON_DEMAND_INSTRUCTIONS_COMMAND_ID
51
+ )),
52
+ when: ( ChatContextKeys.chatSessionType.isEqualTo(localChatSessionType)),
53
+ enabledCommands: [GENERATE_ON_DEMAND_INSTRUCTIONS_COMMAND_ID],
54
+ excludeWhenCommandsExecuted: [
55
+ GENERATE_ON_DEMAND_INSTRUCTIONS_COMMAND_ID,
56
+ CREATE_AGENT_INSTRUCTIONS_TRACKING_COMMAND
57
+ ]
58
+ }, {
59
+ id: "tip.createPrompt",
60
+ message: ( localize(
61
+ 6148,
62
+ "Tip: Use [/create-prompt](command:{0}) to generate a reusable prompt file with the agent.",
63
+ GENERATE_PROMPT_COMMAND_ID
64
+ )),
65
+ when: ( ChatContextKeys.chatSessionType.isEqualTo(localChatSessionType)),
66
+ enabledCommands: [GENERATE_PROMPT_COMMAND_ID],
67
+ excludeWhenCommandsExecuted: [GENERATE_PROMPT_COMMAND_ID, CREATE_PROMPT_TRACKING_COMMAND]
68
+ }, {
69
+ id: "tip.createAgent",
70
+ message: ( localize(
71
+ 6149,
72
+ "Tip: Use [/create-agent](command:{0}) to scaffold a custom agent for your workflow.",
73
+ GENERATE_AGENT_COMMAND_ID
74
+ )),
75
+ when: ( ChatContextKeys.chatSessionType.isEqualTo(localChatSessionType)),
76
+ enabledCommands: [GENERATE_AGENT_COMMAND_ID],
77
+ excludeWhenCommandsExecuted: [GENERATE_AGENT_COMMAND_ID, CREATE_AGENT_TRACKING_COMMAND]
78
+ }, {
79
+ id: "tip.createSkill",
80
+ message: ( localize(
81
+ 6150,
82
+ "Tip: Use [/create-skill](command:{0}) to create a skill the agent can load when relevant.",
83
+ GENERATE_SKILL_COMMAND_ID
84
+ )),
85
+ when: ( ChatContextKeys.chatSessionType.isEqualTo(localChatSessionType)),
86
+ enabledCommands: [GENERATE_SKILL_COMMAND_ID],
87
+ excludeWhenCommandsExecuted: [GENERATE_SKILL_COMMAND_ID, CREATE_SKILL_TRACKING_COMMAND]
88
+ }, {
12
89
  id: "tip.agentMode",
13
90
  message: ( localize(
14
- 5676,
15
- "Tip: Try [Agent mode](command:workbench.action.chat.openEditSession) for multi-file edits and running commands."
91
+ 6151,
92
+ "Tip: Try [Agents](command:workbench.action.chat.openEditSession) to make edits across your project and run commands."
16
93
  )),
17
94
  when: ( ChatContextKeys.chatModeKind.notEqualsTo(ChatModeKind.Agent)),
18
- enabledCommands: ["workbench.action.chat.openEditSession"]
95
+ enabledCommands: ["workbench.action.chat.openEditSession"],
96
+ excludeWhenModesUsed: [ChatModeKind.Agent]
19
97
  }, {
20
98
  id: "tip.planMode",
21
99
  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."
100
+ 6152,
101
+ "Tip: Try the [Plan agent](command:workbench.action.chat.openPlan) to research and plan before implementing changes."
24
102
  )),
25
103
  when: ( ChatContextKeys.chatModeName.notEqualsTo("Plan")),
26
- enabledCommands: ["workbench.action.chat.openPlan"]
104
+ enabledCommands: ["workbench.action.chat.openPlan"],
105
+ excludeWhenCommandsExecuted: ["workbench.action.chat.openPlan"],
106
+ excludeWhenModesUsed: ["Plan"]
27
107
  }, {
28
108
  id: "tip.attachFiles",
29
- message: ( localize(5678, "Tip: Attach files or folders with # to give Copilot more context."))
109
+ message: ( localize(
110
+ 6153,
111
+ "Tip: Reference files or folders with # to give the agent more context about the task."
112
+ )),
113
+ excludeWhenCommandsExecuted: [
114
+ "workbench.action.chat.attachContext",
115
+ "workbench.action.chat.attachFile",
116
+ "workbench.action.chat.attachFolder",
117
+ "workbench.action.chat.attachSelection",
118
+ ATTACH_FILES_REFERENCE_TRACKING_COMMAND
119
+ ]
30
120
  }, {
31
121
  id: "tip.codeActions",
32
122
  message: ( localize(
33
- 5679,
34
- "Tip: Select code and right-click for Copilot actions in the context menu."
35
- ))
123
+ 6154,
124
+ "Tip: Select a code block in the editor and right-click to access more AI actions."
125
+ )),
126
+ excludeWhenCommandsExecuted: ["inlineChat.start"]
36
127
  }, {
37
128
  id: "tip.undoChanges",
38
129
  message: ( localize(
39
- 5680,
40
- "Tip: You can undo Copilot's changes to any point by clicking Restore Checkpoint."
130
+ 6155,
131
+ "Tip: Select \"Restore Checkpoint\" to undo changes after that point in the chat conversation."
132
+ )),
133
+ when: ( ContextKeyExpr.and(( ChatContextKeys.chatSessionType.isEqualTo(localChatSessionType)), ( ContextKeyExpr.or(( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent)), ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Edit)))))),
134
+ excludeWhenCommandsExecuted: [
135
+ "workbench.action.chat.restoreCheckpoint",
136
+ "workbench.action.chat.restoreLastCheckpoint"
137
+ ]
138
+ }, {
139
+ id: "tip.messageQueueing",
140
+ message: ( localize(
141
+ 6156,
142
+ "Tip: Steer the agent mid-task by sending follow-up messages. They queue and apply in order."
41
143
  )),
42
- when: ( ContextKeyExpr.or(( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent)), ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Edit))))
144
+ when: ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent)),
145
+ excludeWhenCommandsExecuted: [
146
+ "workbench.action.chat.queueMessage",
147
+ "workbench.action.chat.steerWithMessage"
148
+ ]
43
149
  }, {
44
- id: "tip.customInstructions",
150
+ id: "tip.yoloMode",
45
151
  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."
152
+ 6157,
153
+ "Tip: Enable [auto approve](command:workbench.action.openSettings?%5B%22chat.tools.global.autoApprove%22%5D) to give the agent full control without manual confirmation."
48
154
  )),
49
- enabledCommands: ["workbench.action.chat.generateInstructions"]
155
+ when: ( ContextKeyExpr.and(( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent)), ( ContextKeyExpr.notEquals("config.chat.tools.global.autoApprove", true)))),
156
+ enabledCommands: ["workbench.action.openSettings"],
157
+ excludeWhenSettingsChanged: [ChatConfiguration.GlobalAutoApprove],
158
+ dismissWhenCommandsClicked: ["workbench.action.openSettings"]
159
+ }, {
160
+ id: "tip.agenticBrowser",
161
+ message: ( localize(
162
+ 6158,
163
+ "Tip: Enable [agentic browser integration](command:workbench.action.openSettings?%5B%22workbench.browser.enableChatTools%22%5D) to let the agent open and interact with pages in the Integrated Browser."
164
+ )),
165
+ when: ( ContextKeyExpr.and(( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent)), ( ContextKeyExpr.notEquals("config.workbench.browser.enableChatTools", true)))),
166
+ enabledCommands: ["workbench.action.openSettings"],
167
+ excludeWhenSettingsChanged: ["workbench.browser.enableChatTools"],
168
+ dismissWhenCommandsClicked: ["workbench.action.openSettings"]
169
+ }, {
170
+ id: "tip.mermaid",
171
+ message: ( localize(
172
+ 6159,
173
+ "Tip: Ask the agent to draw an architectural diagram or flow chart; it can render Mermaid diagrams directly in chat."
174
+ )),
175
+ when: ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent)),
176
+ excludeWhenToolsInvoked: ["renderMermaidDiagram"]
177
+ }, {
178
+ id: "tip.subagents",
179
+ message: ( localize(
180
+ 6160,
181
+ "Tip: Ask the agent to work in parallel to complete large tasks faster."
182
+ )),
183
+ when: ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent)),
184
+ excludeWhenToolsInvoked: ["runSubagent"]
185
+ }, {
186
+ id: "tip.thinkingPhrases",
187
+ message: ( localize(
188
+ 6161,
189
+ "Tip: Customize the loading messages shown while the agent works with [thinking phrases](command:workbench.action.openSettings?%5B%22chat.agent.thinking.phrases%22%5D)."
190
+ )),
191
+ when: ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent)),
192
+ enabledCommands: ["workbench.action.openSettings"],
193
+ excludeWhenSettingsChanged: ["chat.agent.thinking.phrases"],
194
+ dismissWhenCommandsClicked: ["workbench.action.openSettings"]
50
195
  }];
51
- let ChatTipService = class ChatTipService {
52
- constructor(_productService, _configurationService) {
196
+ let TipEligibilityTracker = class TipEligibilityTracker extends Disposable {
197
+ static {
198
+ TipEligibilityTracker_1 = this;
199
+ }
200
+ static {
201
+ this._COMMANDS_STORAGE_KEY = "chat.tips.executedCommands";
202
+ }
203
+ static {
204
+ this._MODES_STORAGE_KEY = "chat.tips.usedModes";
205
+ }
206
+ static {
207
+ this._TOOLS_STORAGE_KEY = "chat.tips.invokedTools";
208
+ }
209
+ constructor(
210
+ tips,
211
+ commandService,
212
+ _storageService,
213
+ _promptsService,
214
+ _languageModelToolsService,
215
+ _logService
216
+ ) {
217
+ super();
218
+ this._storageService = _storageService;
219
+ this._promptsService = _promptsService;
220
+ this._languageModelToolsService = _languageModelToolsService;
221
+ this._logService = _logService;
222
+ this._commandListener = this._register(( new MutableDisposable()));
223
+ this._toolListener = this._register(( new MutableDisposable()));
224
+ this._excludedByFiles = ( new Set());
225
+ this._fileCheckGeneration = ( new Map());
226
+ this._fileChecksInFlight = ( new Map());
227
+ const storedCmds = this._readApplicationWithProfileFallback(TipEligibilityTracker_1._COMMANDS_STORAGE_KEY);
228
+ this._executedCommands = ( new Set(storedCmds ? JSON.parse(storedCmds) : []));
229
+ const storedModes = this._readApplicationWithProfileFallback(TipEligibilityTracker_1._MODES_STORAGE_KEY);
230
+ this._usedModes = ( new Set(storedModes ? JSON.parse(storedModes) : []));
231
+ const storedTools = this._readApplicationWithProfileFallback(TipEligibilityTracker_1._TOOLS_STORAGE_KEY);
232
+ this._invokedTools = ( new Set(storedTools ? JSON.parse(storedTools) : []));
233
+ this._pendingCommands = ( new Set());
234
+ for (const tip of tips) {
235
+ for (const cmd of tip.excludeWhenCommandsExecuted ?? []) {
236
+ if (!( this._executedCommands.has(cmd))) {
237
+ this._pendingCommands.add(cmd);
238
+ }
239
+ }
240
+ }
241
+ this._pendingModes = ( new Set());
242
+ for (const tip of tips) {
243
+ for (const mode of tip.excludeWhenModesUsed ?? []) {
244
+ if (!( this._usedModes.has(mode))) {
245
+ this._pendingModes.add(mode);
246
+ }
247
+ }
248
+ }
249
+ this._pendingTools = ( new Set());
250
+ for (const tip of tips) {
251
+ for (const toolId of tip.excludeWhenToolsInvoked ?? []) {
252
+ if (!( this._invokedTools.has(toolId))) {
253
+ this._pendingTools.add(toolId);
254
+ }
255
+ }
256
+ }
257
+ if (this._pendingCommands.size > 0) {
258
+ this._commandListener.value = commandService.onDidExecuteCommand(e => {
259
+ this.recordCommandExecuted(e.commandId);
260
+ });
261
+ }
262
+ if (this._pendingTools.size > 0) {
263
+ this._toolListener.value = this._languageModelToolsService.onDidInvokeTool(e => {
264
+ if (( this._pendingTools.has(e.toolId))) {
265
+ this._invokedTools.add(e.toolId);
266
+ this._pendingTools.delete(e.toolId);
267
+ this._persistSet(TipEligibilityTracker_1._TOOLS_STORAGE_KEY, this._invokedTools);
268
+ }
269
+ if (this._pendingTools.size === 0) {
270
+ this._toolListener.clear();
271
+ }
272
+ });
273
+ }
274
+ this._tipsWithFileExclusions = tips.filter(t => t.excludeWhenPromptFilesExist);
275
+ for (const tip of this._tipsWithFileExclusions) {
276
+ if (tip.excludeWhenPromptFilesExist.excludeUntilChecked) {
277
+ this._excludedByFiles.add(tip.id);
278
+ }
279
+ this._checkForPromptFiles(tip);
280
+ }
281
+ this._register(this._promptsService.onDidChangeCustomAgents(() => {
282
+ for (const tip of this._tipsWithFileExclusions) {
283
+ if (tip.excludeWhenPromptFilesExist.promptType === PromptsType.agent) {
284
+ this._checkForPromptFiles(tip);
285
+ }
286
+ }
287
+ }));
288
+ }
289
+ recordCommandExecuted(commandId) {
290
+ if (!( this._pendingCommands.has(commandId))) {
291
+ return;
292
+ }
293
+ this._executedCommands.add(commandId);
294
+ this._persistSet(TipEligibilityTracker_1._COMMANDS_STORAGE_KEY, this._executedCommands);
295
+ this._pendingCommands.delete(commandId);
296
+ if (this._pendingCommands.size === 0) {
297
+ this._commandListener.clear();
298
+ }
299
+ }
300
+ recordCurrentMode(contextKeyService) {
301
+ if (this._pendingModes.size === 0) {
302
+ return;
303
+ }
304
+ let changed = false;
305
+ const kind = contextKeyService.getContextKeyValue(ChatContextKeys.chatModeKind.key);
306
+ if (kind && !( this._usedModes.has(kind))) {
307
+ this._usedModes.add(kind);
308
+ this._pendingModes.delete(kind);
309
+ changed = true;
310
+ }
311
+ const name = contextKeyService.getContextKeyValue(ChatContextKeys.chatModeName.key);
312
+ if (name && !( this._usedModes.has(name))) {
313
+ this._usedModes.add(name);
314
+ this._pendingModes.delete(name);
315
+ changed = true;
316
+ }
317
+ if (changed) {
318
+ this._persistSet(TipEligibilityTracker_1._MODES_STORAGE_KEY, this._usedModes);
319
+ }
320
+ }
321
+ isExcluded(tip) {
322
+ if (tip.excludeWhenCommandsExecuted) {
323
+ for (const cmd of tip.excludeWhenCommandsExecuted) {
324
+ if (( this._executedCommands.has(cmd))) {
325
+ this._logService.debug("#ChatTips: tip excluded because command was executed", tip.id, cmd);
326
+ return true;
327
+ }
328
+ }
329
+ }
330
+ if (tip.excludeWhenModesUsed) {
331
+ for (const mode of tip.excludeWhenModesUsed) {
332
+ if (( this._usedModes.has(mode))) {
333
+ this._logService.debug("#ChatTips: tip excluded because mode was used", tip.id, mode);
334
+ return true;
335
+ }
336
+ }
337
+ }
338
+ if (tip.excludeWhenToolsInvoked) {
339
+ for (const toolId of tip.excludeWhenToolsInvoked) {
340
+ if (( this._invokedTools.has(toolId))) {
341
+ this._logService.debug("#ChatTips: tip excluded because tool was invoked", tip.id, toolId);
342
+ return true;
343
+ }
344
+ }
345
+ }
346
+ if (tip.excludeWhenPromptFilesExist && ( this._excludedByFiles.has(tip.id))) {
347
+ this._logService.debug("#ChatTips: tip excluded because prompt files exist", tip.id);
348
+ return true;
349
+ }
350
+ return false;
351
+ }
352
+ refreshPromptFileExclusions() {
353
+ for (const tip of this._tipsWithFileExclusions) {
354
+ if (tip.excludeWhenPromptFilesExist.excludeUntilChecked) {
355
+ this._excludedByFiles.add(tip.id);
356
+ }
357
+ this._checkForPromptFiles(tip);
358
+ }
359
+ }
360
+ async _checkForPromptFiles(tip) {
361
+ const inFlight = this._fileChecksInFlight.get(tip.id);
362
+ if (inFlight) {
363
+ await inFlight;
364
+ return;
365
+ }
366
+ const checkPromise = this._doCheckForPromptFiles(tip);
367
+ this._fileChecksInFlight.set(tip.id, checkPromise);
368
+ try {
369
+ await checkPromise;
370
+ } finally {
371
+ if (this._fileChecksInFlight.get(tip.id) === checkPromise) {
372
+ this._fileChecksInFlight.delete(tip.id);
373
+ }
374
+ }
375
+ }
376
+ async _doCheckForPromptFiles(tip) {
377
+ const config = tip.excludeWhenPromptFilesExist;
378
+ const generation = (this._fileCheckGeneration.get(tip.id) ?? 0) + 1;
379
+ this._fileCheckGeneration.set(tip.id, generation);
380
+ try {
381
+ const [promptFiles, agentInstructions] = await Promise.all([
382
+ this._promptsService.listPromptFiles(config.promptType, CancellationToken.None),
383
+ config.agentFileType ? this._promptsService.listAgentInstructions(CancellationToken.None) : Promise.resolve([])
384
+ ]);
385
+ if (this._fileCheckGeneration.get(tip.id) !== generation) {
386
+ return;
387
+ }
388
+ const hasPromptFiles = promptFiles.length > 0;
389
+ const hasAgentFile = config.agentFileType ? ( agentInstructions.some(f => f.type === config.agentFileType)) : false;
390
+ const hasPromptFilesOrAgentFile = hasPromptFiles || hasAgentFile;
391
+ if (hasPromptFilesOrAgentFile) {
392
+ this._excludedByFiles.add(tip.id);
393
+ } else {
394
+ this._excludedByFiles.delete(tip.id);
395
+ }
396
+ } catch {
397
+ if (this._fileCheckGeneration.get(tip.id) !== generation) {
398
+ return;
399
+ }
400
+ if (config.excludeUntilChecked) {
401
+ this._excludedByFiles.add(tip.id);
402
+ }
403
+ }
404
+ }
405
+ _persistSet(key, set) {
406
+ this._storageService.store(
407
+ key,
408
+ JSON.stringify([...set]),
409
+ StorageScope.APPLICATION,
410
+ StorageTarget.MACHINE
411
+ );
412
+ }
413
+ _readApplicationWithProfileFallback(key) {
414
+ const applicationValue = this._storageService.get(key, StorageScope.APPLICATION);
415
+ if (applicationValue) {
416
+ return applicationValue;
417
+ }
418
+ const profileValue = this._storageService.get(key, StorageScope.PROFILE);
419
+ if (profileValue) {
420
+ this._storageService.store(key, profileValue, StorageScope.APPLICATION, StorageTarget.MACHINE);
421
+ }
422
+ return profileValue;
423
+ }
424
+ };
425
+ TipEligibilityTracker = TipEligibilityTracker_1 = ( __decorate([( __param(1, ICommandService)), ( __param(2, IStorageService)), ( __param(3, IPromptsService)), ( __param(4, ILanguageModelToolsService)), ( __param(5, ILogService))], TipEligibilityTracker));
426
+ let ChatTipService = class ChatTipService extends Disposable {
427
+ static {
428
+ ChatTipService_1 = this;
429
+ }
430
+ static {
431
+ this._DISMISSED_TIP_KEY = "chat.tip.dismissed";
432
+ }
433
+ static {
434
+ this._LAST_TIP_ID_KEY = "chat.tip.lastTipId";
435
+ }
436
+ static {
437
+ this._YOLO_EVER_ENABLED_KEY = "chat.tip.yoloModeEverEnabled";
438
+ }
439
+ static {
440
+ this._THINKING_PHRASES_EVER_MODIFIED_KEY = "chat.tip.thinkingPhrasesEverModified";
441
+ }
442
+ constructor(
443
+ _productService,
444
+ _configurationService,
445
+ _storageService,
446
+ _chatService,
447
+ instantiationService,
448
+ _logService,
449
+ _chatEntitlementService,
450
+ _commandService,
451
+ _telemetryService
452
+ ) {
453
+ super();
53
454
  this._productService = _productService;
54
455
  this._configurationService = _configurationService;
55
- this._createdAt = Date.now();
56
- this._hasShownTip = false;
456
+ this._storageService = _storageService;
457
+ this._chatService = _chatService;
458
+ this._logService = _logService;
459
+ this._chatEntitlementService = _chatEntitlementService;
460
+ this._commandService = _commandService;
461
+ this._telemetryService = _telemetryService;
462
+ this._onDidDismissTip = this._register(( new Emitter()));
463
+ this.onDidDismissTip = this._onDidDismissTip.event;
464
+ this._onDidNavigateTip = this._register(( new Emitter()));
465
+ this.onDidNavigateTip = this._onDidNavigateTip.event;
466
+ this._onDidHideTip = this._register(( new Emitter()));
467
+ this.onDidHideTip = this._onDidHideTip.event;
468
+ this._onDidDisableTips = this._register(( new Emitter()));
469
+ this.onDidDisableTips = this._onDidDisableTips.event;
470
+ this._tipCommandListener = this._register(( new MutableDisposable()));
471
+ this._tracker = this._register(instantiationService.createInstance(TipEligibilityTracker, TIP_CATALOG));
472
+ this._createSlashCommandsUsageTracker = this._register(( new CreateSlashCommandsUsageTracker(this._chatService, this._storageService, () => this._contextKeyService)));
473
+ this._register(this._chatEntitlementService.onDidChangeQuotaExceeded(() => {
474
+ if (this._chatEntitlementService.quotas.chat?.percentRemaining === 0 && this._shownTip) {
475
+ this.hideTip();
476
+ }
477
+ }));
478
+ this._register(this._chatService.onDidSubmitRequest(e => {
479
+ const message = e.message ?? this._chatService.getSession(e.chatSessionResource)?.lastRequest?.message;
480
+ if (!message) {
481
+ return;
482
+ }
483
+ if (this._hasFileOrFolderReference(message)) {
484
+ this._tracker.recordCommandExecuted(ATTACH_FILES_REFERENCE_TRACKING_COMMAND);
485
+ }
486
+ const createCommandTrackingId = this._getCreateSlashCommandTrackingId(message);
487
+ if (createCommandTrackingId) {
488
+ this._tracker.recordCommandExecuted(createCommandTrackingId);
489
+ }
490
+ }));
491
+ this._yoloModeEverEnabled = this._storageService.getBoolean(ChatTipService_1._YOLO_EVER_ENABLED_KEY, StorageScope.APPLICATION, false);
492
+ if (!this._yoloModeEverEnabled && this._configurationService.getValue(ChatConfiguration.GlobalAutoApprove)) {
493
+ this._yoloModeEverEnabled = true;
494
+ this._storageService.store(
495
+ ChatTipService_1._YOLO_EVER_ENABLED_KEY,
496
+ true,
497
+ StorageScope.APPLICATION,
498
+ StorageTarget.MACHINE
499
+ );
500
+ }
501
+ if (!this._yoloModeEverEnabled) {
502
+ const configListener = this._register(( new MutableDisposable()));
503
+ configListener.value = this._configurationService.onDidChangeConfiguration(e => {
504
+ if (e.affectsConfiguration(ChatConfiguration.GlobalAutoApprove)) {
505
+ if (this._configurationService.getValue(ChatConfiguration.GlobalAutoApprove)) {
506
+ this._yoloModeEverEnabled = true;
507
+ this._storageService.store(
508
+ ChatTipService_1._YOLO_EVER_ENABLED_KEY,
509
+ true,
510
+ StorageScope.APPLICATION,
511
+ StorageTarget.MACHINE
512
+ );
513
+ configListener.clear();
514
+ }
515
+ }
516
+ });
517
+ }
518
+ this._thinkingPhrasesEverModified = this._storageService.getBoolean(
519
+ ChatTipService_1._THINKING_PHRASES_EVER_MODIFIED_KEY,
520
+ StorageScope.APPLICATION,
521
+ false
522
+ );
523
+ if (!this._thinkingPhrasesEverModified && this._isSettingModified(ChatConfiguration.ThinkingPhrases)) {
524
+ this._thinkingPhrasesEverModified = true;
525
+ this._storageService.store(
526
+ ChatTipService_1._THINKING_PHRASES_EVER_MODIFIED_KEY,
527
+ true,
528
+ StorageScope.APPLICATION,
529
+ StorageTarget.MACHINE
530
+ );
531
+ }
532
+ if (!this._thinkingPhrasesEverModified) {
533
+ this._register(this._configurationService.onDidChangeConfiguration(e => {
534
+ if (e.affectsConfiguration(ChatConfiguration.ThinkingPhrases)) {
535
+ this._thinkingPhrasesEverModified = true;
536
+ this._storageService.store(
537
+ ChatTipService_1._THINKING_PHRASES_EVER_MODIFIED_KEY,
538
+ true,
539
+ StorageScope.APPLICATION,
540
+ StorageTarget.MACHINE
541
+ );
542
+ }
543
+ }));
544
+ }
545
+ }
546
+ _hasFileOrFolderReference(message) {
547
+ return ( message.parts.some(part => {
548
+ if (part.kind !== ChatRequestDynamicVariablePart.Kind) {
549
+ return false;
550
+ }
551
+ const dynamicPart = part;
552
+ return dynamicPart.isFile === true || dynamicPart.isDirectory === true;
553
+ }));
57
554
  }
58
- getNextTip(requestId, requestTimestamp, contextKeyService) {
555
+ _getCreateSlashCommandTrackingId(message) {
556
+ for (const part of message.parts) {
557
+ if (part.kind === ChatRequestSlashCommandPart.Kind) {
558
+ const slashCommand = part.slashCommand.command;
559
+ return this._toCreateSlashCommandTrackingId(slashCommand);
560
+ }
561
+ }
562
+ const trimmed = message.text.trimStart();
563
+ const match = /^\/(create-(?:instructions|prompt|agent|skill))(?:\s|$)/.exec(trimmed);
564
+ return match ? this._toCreateSlashCommandTrackingId(match[1]) : undefined;
565
+ }
566
+ _toCreateSlashCommandTrackingId(command) {
567
+ switch (command) {
568
+ case "create-instructions":
569
+ return CREATE_AGENT_INSTRUCTIONS_TRACKING_COMMAND;
570
+ case "create-prompt":
571
+ return CREATE_PROMPT_TRACKING_COMMAND;
572
+ case "create-agent":
573
+ return CREATE_AGENT_TRACKING_COMMAND;
574
+ case "create-skill":
575
+ return CREATE_SKILL_TRACKING_COMMAND;
576
+ default:
577
+ return undefined;
578
+ }
579
+ }
580
+ resetSession() {
581
+ this._shownTip = undefined;
582
+ this._tipRequestId = undefined;
583
+ this._contextKeyService = undefined;
584
+ }
585
+ dismissTip() {
586
+ if (this._shownTip) {
587
+ this._logTipTelemetry(this._shownTip.id, "dismissed");
588
+ const dismissed = ( new Set(this._getDismissedTipIds()));
589
+ dismissed.add(this._shownTip.id);
590
+ this._storageService.store(
591
+ ChatTipService_1._DISMISSED_TIP_KEY,
592
+ JSON.stringify([...dismissed]),
593
+ StorageScope.APPLICATION,
594
+ StorageTarget.MACHINE
595
+ );
596
+ }
597
+ this._tipRequestId = undefined;
598
+ this._onDidDismissTip.fire();
599
+ }
600
+ clearDismissedTips() {
601
+ this._storageService.remove(ChatTipService_1._DISMISSED_TIP_KEY, StorageScope.APPLICATION);
602
+ this._storageService.remove(ChatTipService_1._DISMISSED_TIP_KEY, StorageScope.PROFILE);
603
+ this._shownTip = undefined;
604
+ this._tipRequestId = undefined;
605
+ this._contextKeyService = undefined;
606
+ this._onDidDismissTip.fire();
607
+ }
608
+ _getDismissedTipIds() {
609
+ const raw = this._readApplicationWithProfileFallback(ChatTipService_1._DISMISSED_TIP_KEY);
610
+ if (!raw) {
611
+ return [];
612
+ }
613
+ try {
614
+ const parsed = JSON.parse(raw);
615
+ this._logService.debug("#ChatTips dismissed:", parsed);
616
+ if (!Array.isArray(parsed)) {
617
+ return [];
618
+ }
619
+ const knownTipIds = ( new Set(( TIP_CATALOG.map(tip => tip.id))));
620
+ const dismissed = ( new Set());
621
+ for (const value of parsed) {
622
+ if (typeof value === "string" && ( knownTipIds.has(value))) {
623
+ dismissed.add(value);
624
+ }
625
+ }
626
+ return [...dismissed];
627
+ } catch {
628
+ return [];
629
+ }
630
+ }
631
+ hideTip() {
632
+ if (this._shownTip) {
633
+ this._logTipTelemetry(this._shownTip.id, "hidden");
634
+ }
635
+ this._shownTip = undefined;
636
+ this._tipRequestId = undefined;
637
+ this._onDidHideTip.fire();
638
+ }
639
+ async disableTips() {
640
+ if (this._shownTip) {
641
+ this._logTipTelemetry(this._shownTip.id, "disabled");
642
+ }
643
+ this._shownTip = undefined;
644
+ this._tipRequestId = undefined;
645
+ await this._configurationService.updateValue("chat.tips.enabled", false, ConfigurationTarget.APPLICATION);
646
+ this._onDidDisableTips.fire();
647
+ }
648
+ getWelcomeTip(contextKeyService) {
649
+ this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
650
+ this._tracker.recordCurrentMode(contextKeyService);
651
+ this._tracker.refreshPromptFileExclusions();
59
652
  if (!this._configurationService.getValue("chat.tips.enabled")) {
60
653
  return undefined;
61
654
  }
655
+ this._contextKeyService = contextKeyService;
62
656
  if (!this._isCopilotEnabled()) {
63
657
  return undefined;
64
658
  }
65
- if (this._tipRequestId === requestId && this._shownTip) {
66
- return this._createTip(this._shownTip);
659
+ if (this._chatEntitlementService.entitlement === ChatEntitlement.Unknown) {
660
+ return undefined;
67
661
  }
68
- if (this._hasShownTip) {
662
+ if (!this._isChatLocation(contextKeyService)) {
69
663
  return undefined;
70
664
  }
71
- if (requestTimestamp < this._createdAt) {
665
+ if (this._isChatQuotaExceeded(contextKeyService)) {
72
666
  return undefined;
73
667
  }
74
- const eligibleTips = TIP_CATALOG.filter(tip => this._isEligible(tip, contextKeyService));
75
- if (eligibleTips.length === 0) {
668
+ if (this._tipRequestId === "welcome" && this._shownTip) {
669
+ if (!this._isEligible(this._shownTip, contextKeyService)) {
670
+ const nextTip = this._findNextEligibleTip(this._shownTip.id, contextKeyService);
671
+ if (nextTip) {
672
+ this._shownTip = nextTip;
673
+ this._storageService.store(
674
+ ChatTipService_1._LAST_TIP_ID_KEY,
675
+ nextTip.id,
676
+ StorageScope.APPLICATION,
677
+ StorageTarget.USER
678
+ );
679
+ const tip = this._createTip(nextTip);
680
+ this._onDidNavigateTip.fire(tip);
681
+ return tip;
682
+ }
683
+ }
684
+ return this._createTip(this._shownTip);
685
+ }
686
+ const tip = this._pickTip("welcome", contextKeyService);
687
+ return tip;
688
+ }
689
+ _findNextEligibleTip(currentTipId, contextKeyService) {
690
+ this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
691
+ const currentIndex = TIP_CATALOG.findIndex(tip => tip.id === currentTipId);
692
+ if (currentIndex === -1) {
76
693
  return undefined;
77
694
  }
78
- const randomIndex = Math.floor(Math.random() * eligibleTips.length);
79
- const selectedTip = eligibleTips[randomIndex];
80
- this._hasShownTip = true;
81
- this._tipRequestId = requestId;
695
+ const dismissedIds = ( new Set(this._getDismissedTipIds()));
696
+ for (let i = 1; i < TIP_CATALOG.length; i++) {
697
+ const idx = (currentIndex + i) % TIP_CATALOG.length;
698
+ const candidate = TIP_CATALOG[idx];
699
+ if (!( dismissedIds.has(candidate.id)) && this._isEligible(candidate, contextKeyService)) {
700
+ return candidate;
701
+ }
702
+ }
703
+ return undefined;
704
+ }
705
+ _pickTip(sourceId, contextKeyService) {
706
+ this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
707
+ this._tracker.recordCurrentMode(contextKeyService);
708
+ const dismissedIds = ( new Set(this._getDismissedTipIds()));
709
+ let selectedTip;
710
+ const lastTipId = this._readApplicationWithProfileFallback(ChatTipService_1._LAST_TIP_ID_KEY);
711
+ const lastCatalogIndex = lastTipId ? TIP_CATALOG.findIndex(tip => tip.id === lastTipId) : -1;
712
+ const startIndex = lastCatalogIndex === -1 ? 0 : (lastCatalogIndex + 1) % TIP_CATALOG.length;
713
+ for (let i = 0; i < TIP_CATALOG.length; i++) {
714
+ const idx = (startIndex + i) % TIP_CATALOG.length;
715
+ const candidate = TIP_CATALOG[idx];
716
+ if (!( dismissedIds.has(candidate.id)) && this._isEligible(candidate, contextKeyService)) {
717
+ selectedTip = candidate;
718
+ break;
719
+ }
720
+ }
721
+ if (!selectedTip) {
722
+ return undefined;
723
+ }
724
+ this._storageService.store(
725
+ ChatTipService_1._LAST_TIP_ID_KEY,
726
+ selectedTip.id,
727
+ StorageScope.APPLICATION,
728
+ StorageTarget.USER
729
+ );
730
+ this._tipRequestId = sourceId;
82
731
  this._shownTip = selectedTip;
732
+ this._logTipTelemetry(selectedTip.id, "shown");
733
+ this._trackTipCommandClicks(selectedTip);
83
734
  return this._createTip(selectedTip);
84
735
  }
736
+ navigateToNextTip() {
737
+ if (!this._contextKeyService) {
738
+ return undefined;
739
+ }
740
+ return this._navigateTip(1, this._contextKeyService);
741
+ }
742
+ navigateToPreviousTip() {
743
+ if (!this._contextKeyService) {
744
+ return undefined;
745
+ }
746
+ return this._navigateTip(-1, this._contextKeyService);
747
+ }
748
+ hasMultipleTips() {
749
+ if (!this._contextKeyService) {
750
+ return false;
751
+ }
752
+ this._createSlashCommandsUsageTracker.syncContextKey(this._contextKeyService);
753
+ return this._hasNavigableTip(this._contextKeyService);
754
+ }
755
+ _navigateTip(direction, contextKeyService) {
756
+ this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
757
+ if (!this._shownTip) {
758
+ return undefined;
759
+ }
760
+ const currentIndex = TIP_CATALOG.findIndex(t => t.id === this._shownTip.id);
761
+ if (currentIndex === -1) {
762
+ return undefined;
763
+ }
764
+ const candidate = this._getNavigableTip(direction, currentIndex, contextKeyService);
765
+ if (candidate) {
766
+ this._logTipTelemetry(this._shownTip.id, direction === 1 ? "navigateNext" : "navigatePrevious");
767
+ this._shownTip = candidate;
768
+ this._tipRequestId = "welcome";
769
+ this._storageService.store(
770
+ ChatTipService_1._LAST_TIP_ID_KEY,
771
+ candidate.id,
772
+ StorageScope.APPLICATION,
773
+ StorageTarget.USER
774
+ );
775
+ this._logTipTelemetry(candidate.id, "shown");
776
+ this._trackTipCommandClicks(candidate);
777
+ const tip = this._createTip(candidate);
778
+ this._onDidNavigateTip.fire(tip);
779
+ return tip;
780
+ }
781
+ return undefined;
782
+ }
783
+ _hasNavigableTip(contextKeyService) {
784
+ if (!this._shownTip) {
785
+ return false;
786
+ }
787
+ const currentIndex = TIP_CATALOG.findIndex(t => t.id === this._shownTip.id);
788
+ if (currentIndex === -1) {
789
+ return false;
790
+ }
791
+ return !!this._getNavigableTip(1, currentIndex, contextKeyService);
792
+ }
793
+ _getNavigableTip(direction, currentIndex, contextKeyService) {
794
+ const dismissedIds = ( new Set(this._getDismissedTipIds()));
795
+ let eligibleTipCount = 0;
796
+ for (const tip of TIP_CATALOG) {
797
+ if (!( dismissedIds.has(tip.id)) && this._isEligible(tip, contextKeyService)) {
798
+ eligibleTipCount++;
799
+ if (eligibleTipCount > 1) {
800
+ break;
801
+ }
802
+ }
803
+ }
804
+ if (eligibleTipCount <= 1) {
805
+ return undefined;
806
+ }
807
+ for (let i = 1; i < TIP_CATALOG.length; i++) {
808
+ const idx = ((currentIndex + direction * i) % TIP_CATALOG.length + TIP_CATALOG.length) % TIP_CATALOG.length;
809
+ const candidate = TIP_CATALOG[idx];
810
+ if (!( dismissedIds.has(candidate.id)) && this._isEligible(candidate, contextKeyService)) {
811
+ return candidate;
812
+ }
813
+ }
814
+ return undefined;
815
+ }
85
816
  _isEligible(tip, contextKeyService) {
86
- if (!tip.when) {
87
- return true;
817
+ if (tip.onlyWhenModelIds?.length) {
818
+ const currentModelId = this._getCurrentChatModelId(contextKeyService);
819
+ const isModelMatch = ( tip.onlyWhenModelIds.some(
820
+ modelId => currentModelId === modelId || currentModelId.startsWith(`${modelId}-`)
821
+ ));
822
+ if (!isModelMatch) {
823
+ return false;
824
+ }
825
+ }
826
+ if (tip.excludeWhenSettingsChanged?.some(setting => this._isSettingModified(setting))) {
827
+ this._logService.debug(
828
+ "#ChatTips: tip excluded because setting was modified",
829
+ tip.id,
830
+ tip.excludeWhenSettingsChanged
831
+ );
832
+ return false;
833
+ }
834
+ if (tip.when && !contextKeyService.contextMatchesRules(tip.when)) {
835
+ this._logService.debug(
836
+ "#ChatTips: tip is not eligible due to when clause",
837
+ tip.id,
838
+ tip.when.serialize()
839
+ );
840
+ return false;
841
+ }
842
+ if (this._tracker.isExcluded(tip)) {
843
+ return false;
844
+ }
845
+ if (tip.id === "tip.yoloMode") {
846
+ if (this._yoloModeEverEnabled) {
847
+ this._logService.debug("#ChatTips: tip excluded because yolo mode was previously enabled", tip.id);
848
+ return false;
849
+ }
850
+ const inspected = this._configurationService.inspect(ChatConfiguration.GlobalAutoApprove);
851
+ if (inspected.policyValue === false) {
852
+ this._logService.debug("#ChatTips: tip excluded because policy restricts auto-approve", tip.id);
853
+ return false;
854
+ }
88
855
  }
89
- return contextKeyService.contextMatchesRules(tip.when);
856
+ if (tip.id === "tip.thinkingPhrases" && this._thinkingPhrasesEverModified) {
857
+ this._logService.debug(
858
+ "#ChatTips: tip excluded because thinking phrases setting was previously modified",
859
+ tip.id
860
+ );
861
+ return false;
862
+ }
863
+ this._logService.debug("#ChatTips: tip is eligible", tip.id);
864
+ return true;
865
+ }
866
+ _isSettingModified(key) {
867
+ const inspected = this._configurationService.inspect(key);
868
+ return inspected.userValue !== undefined || inspected.userLocalValue !== undefined || inspected.userRemoteValue !== undefined || inspected.workspaceValue !== undefined || inspected.workspaceFolderValue !== undefined;
869
+ }
870
+ _getCurrentChatModelId(contextKeyService) {
871
+ const normalize = modelId => {
872
+ const normalizedModelId = modelId?.toLowerCase() ?? "";
873
+ if (!normalizedModelId) {
874
+ return "";
875
+ }
876
+ if (normalizedModelId.includes("/")) {
877
+ return normalizedModelId.split("/").at(-1) ?? "";
878
+ }
879
+ return normalizedModelId;
880
+ };
881
+ const contextKeyModelId = normalize(contextKeyService.getContextKeyValue(ChatContextKeys.chatModelId.key));
882
+ if (contextKeyModelId) {
883
+ return contextKeyModelId;
884
+ }
885
+ const location = contextKeyService.getContextKeyValue(ChatContextKeys.location.key) ?? ChatAgentLocation.Chat;
886
+ const sessionType = contextKeyService.getContextKeyValue(ChatContextKeys.chatSessionType.key) ?? "";
887
+ const candidateStorageKeys = sessionType ? [
888
+ `chat.currentLanguageModel.${location}.${sessionType}`,
889
+ `chat.currentLanguageModel.${location}`
890
+ ] : [`chat.currentLanguageModel.${location}`];
891
+ for (const storageKey of candidateStorageKeys) {
892
+ const persistedModelIdentifier = this._storageService.get(storageKey, StorageScope.APPLICATION);
893
+ const persistedModelId = normalize(persistedModelIdentifier);
894
+ if (persistedModelId) {
895
+ return persistedModelId;
896
+ }
897
+ }
898
+ return "";
899
+ }
900
+ _isChatLocation(contextKeyService) {
901
+ const location = contextKeyService.getContextKeyValue(ChatContextKeys.location.key);
902
+ return !location || location === ChatAgentLocation.Chat;
903
+ }
904
+ _isChatQuotaExceeded(contextKeyService) {
905
+ return contextKeyService.getContextKeyValue(ChatContextKeys.chatQuotaExceeded.key) === true;
90
906
  }
91
907
  _isCopilotEnabled() {
92
908
  const defaultChatAgent = this._productService.defaultChatAgent;
@@ -100,10 +916,45 @@ let ChatTipService = class ChatTipService {
100
916
  }));
101
917
  return {
102
918
  id: tipDef.id,
103
- content: markdown
919
+ content: markdown,
920
+ enabledCommands: tipDef.enabledCommands
104
921
  };
105
922
  }
923
+ _logTipTelemetry(tipId, action, commandId) {
924
+ this._telemetryService.publicLog2("chatTip", {
925
+ tipId,
926
+ action,
927
+ commandId
928
+ });
929
+ }
930
+ _trackTipCommandClicks(tip) {
931
+ this._tipCommandListener.clear();
932
+ if (!tip.enabledCommands?.length) {
933
+ return;
934
+ }
935
+ const enabledCommandSet = ( new Set(tip.enabledCommands));
936
+ const dismissCommandSet = ( new Set(tip.dismissWhenCommandsClicked));
937
+ this._tipCommandListener.value = this._commandService.onDidExecuteCommand(e => {
938
+ if (( enabledCommandSet.has(e.commandId)) && this._shownTip?.id === tip.id) {
939
+ this._logTipTelemetry(tip.id, "commandClicked", e.commandId);
940
+ if (( dismissCommandSet.has(e.commandId))) {
941
+ this.dismissTip();
942
+ }
943
+ }
944
+ });
945
+ }
946
+ _readApplicationWithProfileFallback(key) {
947
+ const applicationValue = this._storageService.get(key, StorageScope.APPLICATION);
948
+ if (applicationValue) {
949
+ return applicationValue;
950
+ }
951
+ const profileValue = this._storageService.get(key, StorageScope.PROFILE);
952
+ if (profileValue) {
953
+ this._storageService.store(key, profileValue, StorageScope.APPLICATION, StorageTarget.MACHINE);
954
+ }
955
+ return profileValue;
956
+ }
106
957
  };
107
- ChatTipService = ( __decorate([( __param(0, IProductService)), ( __param(1, IConfigurationService))], ChatTipService));
958
+ ChatTipService = ChatTipService_1 = ( __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))], ChatTipService));
108
959
 
109
- export { ChatTipService };
960
+ export { ATTACH_FILES_REFERENCE_TRACKING_COMMAND, CREATE_AGENT_INSTRUCTIONS_TRACKING_COMMAND, CREATE_AGENT_TRACKING_COMMAND, CREATE_PROMPT_TRACKING_COMMAND, CREATE_SKILL_TRACKING_COMMAND, ChatTipService, TipEligibilityTracker };