@codingame/monaco-vscode-chat-service-override 27.0.0 → 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 (251) hide show
  1. package/index.js +5 -2
  2. package/package.json +5 -5
  3. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +54 -4
  4. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +179 -11
  5. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +5 -1
  6. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +6 -1
  7. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +25 -10
  8. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +67 -0
  9. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +263 -0
  10. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +6 -0
  11. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +25 -6
  12. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  13. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +15 -15
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +13 -5
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +5 -5
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +11 -11
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +5 -4
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +7 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +2 -2
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +13 -13
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +12 -12
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +49 -13
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +58 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +537 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +17 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +55 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +26 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +9 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/media/agentPluginEditor.css +32 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +17 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +89 -11
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +4 -26
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +146 -53
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +56 -54
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -25
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  58. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +13 -12
  60. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +7 -9
  61. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +189 -145
  62. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +42 -44
  63. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +3 -4
  65. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +20 -8
  66. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +210 -59
  67. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
  68. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +14 -3
  69. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +3 -3
  70. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +122 -53
  71. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +87 -9
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +62 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +702 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  75. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +279 -214
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +21 -21
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +12 -3
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +19 -19
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +12 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +63 -4
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +18 -18
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +6 -6
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +4 -1
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +62 -24
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +28 -28
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +9 -9
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +2 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +7 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -5
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +32 -36
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +4 -5
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +2 -2
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +49 -49
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +9 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +14 -14
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +26 -26
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +13 -13
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +3 -1
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +103 -60
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +61 -61
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +66 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +245 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +78 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.js +234 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +31 -126
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +229 -524
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +41 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +22 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +4 -3
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +54 -20
  137. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
  138. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +11 -12
  139. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +112 -39
  140. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +99 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +489 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  143. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +6 -3
  144. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +348 -285
  145. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +18 -1
  146. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +107 -5
  147. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  148. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +4 -4
  149. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  150. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  151. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  152. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  153. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +2 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +55 -38
  155. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +20 -1
  156. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +148 -60
  157. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -5
  158. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
  159. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -6
  160. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +29 -14
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +72 -14
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +5 -3
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +5 -2
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +11 -10
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +8 -0
  172. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +1 -0
  173. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +1 -0
  174. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +8 -0
  175. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +20 -0
  176. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +1 -1
  177. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +72 -23
  178. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +19 -1
  179. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +5 -1
  180. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +6 -1
  181. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +37 -8
  182. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +36 -3
  183. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +4 -4
  184. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +2 -2
  185. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +6 -1
  186. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +71 -25
  187. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +217 -91
  188. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +85 -3
  189. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +257 -63
  190. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
  191. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +3 -16
  192. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +7 -50
  193. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +2 -1
  194. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +32 -3
  195. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +1 -1
  196. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +3 -1
  197. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -1
  198. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +7 -6
  199. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
  200. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +26 -1
  201. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +287 -88
  202. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
  203. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +75 -20
  204. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +121 -0
  205. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1422 -0
  206. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
  207. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +5 -1
  208. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +81 -41
  209. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +3 -1
  210. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +8 -6
  211. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  212. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +14 -2
  213. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +54 -5
  214. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +6 -5
  215. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +4 -4
  216. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +38 -22
  217. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +8 -8
  219. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  220. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  221. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  222. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  223. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  224. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +8 -0
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +36 -18
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +6 -0
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +27 -13
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +1 -1
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +1 -0
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +8 -1
  250. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -12
  251. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -67
@@ -2,443 +2,35 @@
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
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 { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
6
5
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
7
6
  import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
8
7
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
9
- import { ChatModeKind, ChatConfiguration, ChatAgentLocation } 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';
10
9
  import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
11
10
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
12
11
  import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
13
12
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
14
13
  import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
15
14
  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
15
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
20
16
  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
17
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
24
18
  import { CreateSlashCommandsUsageTracker } from './createSlashCommandsUsageTracker.js';
25
19
  import { ChatEntitlement } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
26
20
  import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
27
21
  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';
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';
30
27
 
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";
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
- }, {
89
- id: "tip.agentMode",
90
- message: ( localize(
91
- 6151,
92
- "Tip: Try [Agents](command:workbench.action.chat.openEditSession) to make edits across your project and run commands."
93
- )),
94
- when: ( ChatContextKeys.chatModeKind.notEqualsTo(ChatModeKind.Agent)),
95
- enabledCommands: ["workbench.action.chat.openEditSession"],
96
- excludeWhenModesUsed: [ChatModeKind.Agent]
97
- }, {
98
- id: "tip.planMode",
99
- message: ( localize(
100
- 6152,
101
- "Tip: Try the [Plan agent](command:workbench.action.chat.openPlan) to research and plan before implementing changes."
102
- )),
103
- when: ( ChatContextKeys.chatModeName.notEqualsTo("Plan")),
104
- enabledCommands: ["workbench.action.chat.openPlan"],
105
- excludeWhenCommandsExecuted: ["workbench.action.chat.openPlan"],
106
- excludeWhenModesUsed: ["Plan"]
107
- }, {
108
- id: "tip.attachFiles",
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
- ]
120
- }, {
121
- id: "tip.codeActions",
122
- message: ( localize(
123
- 6154,
124
- "Tip: Select a code block in the editor and right-click to access more AI actions."
125
- )),
126
- excludeWhenCommandsExecuted: ["inlineChat.start"]
127
- }, {
128
- id: "tip.undoChanges",
129
- message: ( localize(
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."
143
- )),
144
- when: ( ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent)),
145
- excludeWhenCommandsExecuted: [
146
- "workbench.action.chat.queueMessage",
147
- "workbench.action.chat.steerWithMessage"
148
- ]
149
- }, {
150
- id: "tip.yoloMode",
151
- message: ( localize(
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."
154
- )),
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"]
195
- }];
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));
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;
426
33
  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
34
  constructor(
443
35
  _productService,
444
36
  _configurationService,
@@ -448,7 +40,8 @@ let ChatTipService = class ChatTipService extends Disposable {
448
40
  _logService,
449
41
  _chatEntitlementService,
450
42
  _commandService,
451
- _telemetryService
43
+ _telemetryService,
44
+ _keybindingService
452
45
  ) {
453
46
  super();
454
47
  this._productService = _productService;
@@ -459,6 +52,7 @@ let ChatTipService = class ChatTipService extends Disposable {
459
52
  this._chatEntitlementService = _chatEntitlementService;
460
53
  this._commandService = _commandService;
461
54
  this._telemetryService = _telemetryService;
55
+ this._keybindingService = _keybindingService;
462
56
  this._onDidDismissTip = this._register(( new Emitter()));
463
57
  this.onDidDismissTip = this._onDidDismissTip.event;
464
58
  this._onDidNavigateTip = this._register(( new Emitter()));
@@ -467,6 +61,7 @@ let ChatTipService = class ChatTipService extends Disposable {
467
61
  this.onDidHideTip = this._onDidHideTip.event;
468
62
  this._onDidDisableTips = this._register(( new Emitter()));
469
63
  this.onDidDisableTips = this._onDidDisableTips.event;
64
+ this._tipsHiddenForSession = false;
470
65
  this._tipCommandListener = this._register(( new MutableDisposable()));
471
66
  this._tracker = this._register(instantiationService.createInstance(TipEligibilityTracker, TIP_CATALOG));
472
67
  this._createSlashCommandsUsageTracker = this._register(( new CreateSlashCommandsUsageTracker(this._chatService, this._storageService, () => this._contextKeyService)));
@@ -481,49 +76,23 @@ let ChatTipService = class ChatTipService extends Disposable {
481
76
  return;
482
77
  }
483
78
  if (this._hasFileOrFolderReference(message)) {
484
- this._tracker.recordCommandExecuted(ATTACH_FILES_REFERENCE_TRACKING_COMMAND);
79
+ this._tracker.recordCommandExecuted(TipTrackingCommands.AttachFilesReferenceUsed);
485
80
  }
486
- const createCommandTrackingId = this._getCreateSlashCommandTrackingId(message);
487
- if (createCommandTrackingId) {
488
- this._tracker.recordCommandExecuted(createCommandTrackingId);
81
+ const slashCommandTrackingId = this._getSlashCommandTrackingId(message);
82
+ if (slashCommandTrackingId) {
83
+ this._tracker.recordCommandExecuted(slashCommandTrackingId);
489
84
  }
85
+ this._hideShownTipIfNowIneligible();
490
86
  }));
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
87
  this._thinkingPhrasesEverModified = this._storageService.getBoolean(
519
- ChatTipService_1._THINKING_PHRASES_EVER_MODIFIED_KEY,
88
+ ChatTipStorageKeys.ThinkingPhrasesEverModified,
520
89
  StorageScope.APPLICATION,
521
90
  false
522
91
  );
523
92
  if (!this._thinkingPhrasesEverModified && this._isSettingModified(ChatConfiguration.ThinkingPhrases)) {
524
93
  this._thinkingPhrasesEverModified = true;
525
94
  this._storageService.store(
526
- ChatTipService_1._THINKING_PHRASES_EVER_MODIFIED_KEY,
95
+ ChatTipStorageKeys.ThinkingPhrasesEverModified,
527
96
  true,
528
97
  StorageScope.APPLICATION,
529
98
  StorageTarget.MACHINE
@@ -534,7 +103,7 @@ let ChatTipService = class ChatTipService extends Disposable {
534
103
  if (e.affectsConfiguration(ChatConfiguration.ThinkingPhrases)) {
535
104
  this._thinkingPhrasesEverModified = true;
536
105
  this._storageService.store(
537
- ChatTipService_1._THINKING_PHRASES_EVER_MODIFIED_KEY,
106
+ ChatTipStorageKeys.ThinkingPhrasesEverModified,
538
107
  true,
539
108
  StorageScope.APPLICATION,
540
109
  StorageTarget.MACHINE
@@ -552,19 +121,24 @@ let ChatTipService = class ChatTipService extends Disposable {
552
121
  return dynamicPart.isFile === true || dynamicPart.isDirectory === true;
553
122
  }));
554
123
  }
555
- _getCreateSlashCommandTrackingId(message) {
124
+ _getSlashCommandTrackingId(message) {
556
125
  for (const part of message.parts) {
557
126
  if (part.kind === ChatRequestSlashCommandPart.Kind) {
558
127
  const slashCommand = part.slashCommand.command;
559
- return this._toCreateSlashCommandTrackingId(slashCommand);
128
+ return this._toSlashCommandTrackingId(slashCommand);
129
+ }
130
+ if (part.kind === ChatRequestAgentSubcommandPart.Kind) {
131
+ const subCommand = part.command.name;
132
+ return this._toSlashCommandTrackingId(subCommand);
560
133
  }
561
134
  }
562
135
  const trimmed = message.text.trimStart();
563
- const match = /^\/(create-(?:instructions|prompt|agent|skill))(?:\s|$)/.exec(trimmed);
564
- return match ? this._toCreateSlashCommandTrackingId(match[1]) : undefined;
136
+ const match = /^(?:@\S+\s+)?\/(init|create-(?:instructions|prompt|agent|skill)|fork)(?:\s|$)/.exec(trimmed);
137
+ return match ? this._toSlashCommandTrackingId(match[1]) : undefined;
565
138
  }
566
- _toCreateSlashCommandTrackingId(command) {
139
+ _toSlashCommandTrackingId(command) {
567
140
  switch (command) {
141
+ case "init":
568
142
  case "create-instructions":
569
143
  return CREATE_AGENT_INSTRUCTIONS_TRACKING_COMMAND;
570
144
  case "create-prompt":
@@ -573,14 +147,25 @@ let ChatTipService = class ChatTipService extends Disposable {
573
147
  return CREATE_AGENT_TRACKING_COMMAND;
574
148
  case "create-skill":
575
149
  return CREATE_SKILL_TRACKING_COMMAND;
150
+ case "fork":
151
+ return FORK_CONVERSATION_TRACKING_COMMAND;
576
152
  default:
577
153
  return undefined;
578
154
  }
579
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
+ }
580
164
  resetSession() {
581
165
  this._shownTip = undefined;
582
166
  this._tipRequestId = undefined;
583
167
  this._contextKeyService = undefined;
168
+ this._tipsHiddenForSession = false;
584
169
  }
585
170
  dismissTip() {
586
171
  if (this._shownTip) {
@@ -588,7 +173,7 @@ let ChatTipService = class ChatTipService extends Disposable {
588
173
  const dismissed = ( new Set(this._getDismissedTipIds()));
589
174
  dismissed.add(this._shownTip.id);
590
175
  this._storageService.store(
591
- ChatTipService_1._DISMISSED_TIP_KEY,
176
+ ChatTipStorageKeys.DismissedTips,
592
177
  JSON.stringify([...dismissed]),
593
178
  StorageScope.APPLICATION,
594
179
  StorageTarget.MACHINE
@@ -597,16 +182,21 @@ let ChatTipService = class ChatTipService extends Disposable {
597
182
  this._tipRequestId = undefined;
598
183
  this._onDidDismissTip.fire();
599
184
  }
185
+ dismissTipForSession() {
186
+ this.dismissTip();
187
+ this.hideTipsForSession();
188
+ }
600
189
  clearDismissedTips() {
601
- this._storageService.remove(ChatTipService_1._DISMISSED_TIP_KEY, StorageScope.APPLICATION);
602
- this._storageService.remove(ChatTipService_1._DISMISSED_TIP_KEY, StorageScope.PROFILE);
190
+ this._storageService.remove(ChatTipStorageKeys.DismissedTips, StorageScope.APPLICATION);
191
+ this._storageService.remove(ChatTipStorageKeys.DismissedTips, StorageScope.PROFILE);
603
192
  this._shownTip = undefined;
604
193
  this._tipRequestId = undefined;
605
194
  this._contextKeyService = undefined;
195
+ this._tipsHiddenForSession = false;
606
196
  this._onDidDismissTip.fire();
607
197
  }
608
198
  _getDismissedTipIds() {
609
- const raw = this._readApplicationWithProfileFallback(ChatTipService_1._DISMISSED_TIP_KEY);
199
+ const raw = this._readApplicationWithProfileFallback(ChatTipStorageKeys.DismissedTips);
610
200
  if (!raw) {
611
201
  return [];
612
202
  }
@@ -636,6 +226,15 @@ let ChatTipService = class ChatTipService extends Disposable {
636
226
  this._tipRequestId = undefined;
637
227
  this._onDidHideTip.fire();
638
228
  }
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
+ }
639
238
  async disableTips() {
640
239
  if (this._shownTip) {
641
240
  this._logTipTelemetry(this._shownTip.id, "disabled");
@@ -652,6 +251,9 @@ let ChatTipService = class ChatTipService extends Disposable {
652
251
  if (!this._configurationService.getValue("chat.tips.enabled")) {
653
252
  return undefined;
654
253
  }
254
+ if (this._tipsHiddenForSession) {
255
+ return undefined;
256
+ }
655
257
  this._contextKeyService = contextKeyService;
656
258
  if (!this._isCopilotEnabled()) {
657
259
  return undefined;
@@ -662,16 +264,44 @@ let ChatTipService = class ChatTipService extends Disposable {
662
264
  if (!this._isChatLocation(contextKeyService)) {
663
265
  return undefined;
664
266
  }
267
+ const foregroundSessionCount = contextKeyService.getContextKeyValue(ChatContextKeys.foregroundSessionCount.key);
268
+ if (foregroundSessionCount !== 1) {
269
+ return undefined;
270
+ }
665
271
  if (this._isChatQuotaExceeded(contextKeyService)) {
666
272
  return undefined;
667
273
  }
668
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
+ }
669
295
  if (!this._isEligible(this._shownTip, contextKeyService)) {
296
+ if (this._tracker.isExcluded(this._shownTip)) {
297
+ this.hideTip();
298
+ return undefined;
299
+ }
670
300
  const nextTip = this._findNextEligibleTip(this._shownTip.id, contextKeyService);
671
301
  if (nextTip) {
672
302
  this._shownTip = nextTip;
673
303
  this._storageService.store(
674
- ChatTipService_1._LAST_TIP_ID_KEY,
304
+ ChatTipStorageKeys.LastTipId,
675
305
  nextTip.id,
676
306
  StorageScope.APPLICATION,
677
307
  StorageTarget.USER
@@ -680,6 +310,8 @@ let ChatTipService = class ChatTipService extends Disposable {
680
310
  this._onDidNavigateTip.fire(tip);
681
311
  return tip;
682
312
  }
313
+ this.hideTip();
314
+ return undefined;
683
315
  }
684
316
  return this._createTip(this._shownTip);
685
317
  }
@@ -702,27 +334,29 @@ let ChatTipService = class ChatTipService extends Disposable {
702
334
  }
703
335
  return undefined;
704
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
+ }
705
349
  _pickTip(sourceId, contextKeyService) {
706
350
  this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
707
351
  this._tracker.recordCurrentMode(contextKeyService);
708
352
  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
- }
353
+ const eligibleTips = TIP_CATALOG.filter(tip => !( dismissedIds.has(tip.id)) && this._isEligible(tip, contextKeyService));
354
+ const selectedTip = this._selectTipByTier(eligibleTips);
721
355
  if (!selectedTip) {
722
356
  return undefined;
723
357
  }
724
358
  this._storageService.store(
725
- ChatTipService_1._LAST_TIP_ID_KEY,
359
+ ChatTipStorageKeys.LastTipId,
726
360
  selectedTip.id,
727
361
  StorageScope.APPLICATION,
728
362
  StorageTarget.USER
@@ -733,6 +367,18 @@ let ChatTipService = class ChatTipService extends Disposable {
733
367
  this._trackTipCommandClicks(selectedTip);
734
368
  return this._createTip(selectedTip);
735
369
  }
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
+ }
736
382
  navigateToNextTip() {
737
383
  if (!this._contextKeyService) {
738
384
  return undefined;
@@ -745,6 +391,51 @@ let ChatTipService = class ChatTipService extends Disposable {
745
391
  }
746
392
  return this._navigateTip(-1, this._contextKeyService);
747
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
+ }
748
439
  hasMultipleTips() {
749
440
  if (!this._contextKeyService) {
750
441
  return false;
@@ -757,17 +448,23 @@ let ChatTipService = class ChatTipService extends Disposable {
757
448
  if (!this._shownTip) {
758
449
  return undefined;
759
450
  }
760
- const currentIndex = TIP_CATALOG.findIndex(t => t.id === this._shownTip.id);
761
- if (currentIndex === -1) {
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) {
762
457
  return undefined;
763
458
  }
764
- const candidate = this._getNavigableTip(direction, currentIndex, contextKeyService);
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];
765
462
  if (candidate) {
766
463
  this._logTipTelemetry(this._shownTip.id, direction === 1 ? "navigateNext" : "navigatePrevious");
767
464
  this._shownTip = candidate;
768
465
  this._tipRequestId = "welcome";
769
466
  this._storageService.store(
770
- ChatTipService_1._LAST_TIP_ID_KEY,
467
+ ChatTipStorageKeys.LastTipId,
771
468
  candidate.id,
772
469
  StorageScope.APPLICATION,
773
470
  StorageTarget.USER
@@ -781,37 +478,44 @@ let ChatTipService = class ChatTipService extends Disposable {
781
478
  return undefined;
782
479
  }
783
480
  _hasNavigableTip(contextKeyService) {
784
- if (!this._shownTip) {
481
+ const orderedTips = this._getOrderedEligibleTips(contextKeyService);
482
+ if (!orderedTips.length) {
785
483
  return false;
786
484
  }
787
- const currentIndex = TIP_CATALOG.findIndex(t => t.id === this._shownTip.id);
788
- if (currentIndex === -1) {
789
- return false;
485
+ if (!this._shownTip) {
486
+ return orderedTips.length > 1;
487
+ }
488
+ if (orderedTips.length > 1) {
489
+ return true;
790
490
  }
791
- return !!this._getNavigableTip(1, currentIndex, contextKeyService);
491
+ return orderedTips[0].id !== this._shownTip.id;
792
492
  }
793
- _getNavigableTip(direction, currentIndex, contextKeyService) {
493
+ _getOrderedEligibleTips(contextKeyService, options) {
794
494
  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
- }
495
+ const eligibleTips = TIP_CATALOG.filter(tip => {
496
+ if (options?.includeTipId && tip.id === options.includeTipId) {
497
+ return true;
802
498
  }
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;
499
+ if (options?.excludeShownTip && this._shownTip && tip.id === this._shownTip.id) {
500
+ return false;
812
501
  }
813
- }
814
- return undefined;
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
+ });
815
519
  }
816
520
  _isEligible(tip, contextKeyService) {
817
521
  if (tip.onlyWhenModelIds?.length) {
@@ -842,17 +546,6 @@ let ChatTipService = class ChatTipService extends Disposable {
842
546
  if (this._tracker.isExcluded(tip)) {
843
547
  return false;
844
548
  }
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
- }
855
- }
856
549
  if (tip.id === "tip.thinkingPhrases" && this._thinkingPhrasesEverModified) {
857
550
  this._logService.debug(
858
551
  "#ChatTips: tip excluded because thinking phrases setting was previously modified",
@@ -909,15 +602,21 @@ let ChatTipService = class ChatTipService extends Disposable {
909
602
  return !!defaultChatAgent?.chatExtensionId;
910
603
  }
911
604
  _createTip(tipDef) {
912
- const markdown = ( new MarkdownString(tipDef.message, {
913
- isTrusted: tipDef.enabledCommands ? {
914
- 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
915
614
  } : false
916
615
  }));
917
616
  return {
918
617
  id: tipDef.id,
919
618
  content: markdown,
920
- enabledCommands: tipDef.enabledCommands
619
+ enabledCommands
921
620
  };
922
621
  }
923
622
  _logTipTelemetry(tipId, action, commandId) {
@@ -929,10 +628,15 @@ let ChatTipService = class ChatTipService extends Disposable {
929
628
  }
930
629
  _trackTipCommandClicks(tip) {
931
630
  this._tipCommandListener.clear();
932
- if (!tip.enabledCommands?.length) {
631
+ const ctx = {
632
+ keybindingService: this._keybindingService
633
+ };
634
+ const rawMessage = tip.buildMessage(ctx);
635
+ const enabledCommands = extractCommandIds(rawMessage.value);
636
+ if (!enabledCommands.length) {
933
637
  return;
934
638
  }
935
- const enabledCommandSet = ( new Set(tip.enabledCommands));
639
+ const enabledCommandSet = ( new Set(enabledCommands));
936
640
  const dismissCommandSet = ( new Set(tip.dismissWhenCommandsClicked));
937
641
  this._tipCommandListener.value = this._commandService.onDidExecuteCommand(e => {
938
642
  if (( enabledCommandSet.has(e.commandId)) && this._shownTip?.id === tip.id) {
@@ -940,6 +644,7 @@ let ChatTipService = class ChatTipService extends Disposable {
940
644
  if (( dismissCommandSet.has(e.commandId))) {
941
645
  this.dismissTip();
942
646
  }
647
+ this.hideTipsForSession();
943
648
  }
944
649
  });
945
650
  }
@@ -955,6 +660,6 @@ let ChatTipService = class ChatTipService extends Disposable {
955
660
  return profileValue;
956
661
  }
957
662
  };
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));
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));
959
664
 
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 };
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 };