@@ -106,18 +106,6 @@ export interface ITipDefinition {
106106 * The tip won't be shown if the tool it describes has already been used.
107107 */
108108 readonly excludeWhenToolsInvoked ?: string [ ] ;
109- /**
110- * Tool set reference names. If any tool belonging to one of these tool sets
111- * has ever been invoked in this workspace, the tip becomes ineligible.
112- * Unlike {@link excludeWhenToolsInvoked}, this does not require listing
113- * individual tool IDs, it checks all tools that belong to the named sets.
114- */
115- readonly excludeWhenAnyToolSetToolInvoked ?: string [ ] ;
116- /**
117- * Tool set reference names where at least one must be registered for the tip to be eligible.
118- * If none of the listed tool sets are registered, the tip is not shown.
119- */
120- readonly requiresAnyToolSetRegistered ?: string [ ] ;
121109 /**
122110 * If set, exclude this tip when prompt files of the specified type exist in the workspace.
123111 */
@@ -210,16 +198,6 @@ const TIP_CATALOG: ITipDefinition[] = [
210198 when : ChatContextKeys . chatModeKind . isEqualTo ( ChatModeKind . Agent ) ,
211199 excludeWhenToolsInvoked : [ 'renderMermaidDiagram' ] ,
212200 } ,
213- {
214- id : 'tip.githubRepo' ,
215- message : localize ( 'tip.githubRepo' , "Tip: Mention a GitHub repository (@owner/repo) in your prompt to let the agent search code, browse issues, and explore pull requests from that repo." ) ,
216- when : ContextKeyExpr . and (
217- ChatContextKeys . chatModeKind . isEqualTo ( ChatModeKind . Agent ) ,
218- ContextKeyExpr . notEquals ( 'gitOpenRepositoryCount' , '0' ) ,
219- ) ,
220- excludeWhenAnyToolSetToolInvoked : [ 'github' , 'github-pull-request' ] ,
221- requiresAnyToolSetRegistered : [ 'github' , 'github-pull-request' ] ,
222- } ,
223201 {
224202 id : 'tip.subagents' ,
225203 message : localize ( 'tip.subagents' , "Tip: Ask the agent to work in parallel to complete large tasks faster." ) ,
@@ -265,9 +243,6 @@ export class TipEligibilityTracker extends Disposable {
265243 private readonly _pendingModes : Set < string > ;
266244 private readonly _pendingTools : Set < string > ;
267245
268- /** Tool set reference names monitored via {@link ITipDefinition.excludeWhenAnyToolSetToolInvoked}. */
269- private readonly _monitoredToolSets : Set < string > ;
270-
271246 private readonly _commandListener = this . _register ( new MutableDisposable ( ) ) ;
272247 private readonly _toolListener = this . _register ( new MutableDisposable ( ) ) ;
273248
@@ -333,13 +308,6 @@ export class TipEligibilityTracker extends Disposable {
333308 }
334309 }
335310
336- this . _monitoredToolSets = new Set < string > ( ) ;
337- for ( const tip of tips ) {
338- for ( const name of tip . excludeWhenAnyToolSetToolInvoked ?? [ ] ) {
339- this . _monitoredToolSets . add ( name ) ;
340- }
341- }
342-
343311 // --- Set up command listener (auto-disposes when all seen) --------------
344312
345313 if ( this . _pendingCommands . size > 0 ) {
@@ -358,44 +326,17 @@ export class TipEligibilityTracker extends Disposable {
358326
359327 // --- Set up tool listener (auto-disposes when all seen) -----------------
360328
361- if ( this . _pendingTools . size > 0 || this . _monitoredToolSets . size > 0 ) {
329+ if ( this . _pendingTools . size > 0 ) {
362330 this . _toolListener . value = this . _languageModelToolsService . onDidInvokeTool ( e => {
363- let changed = false ;
364-
365331 // Track explicit tool IDs
366332 if ( this . _pendingTools . has ( e . toolId ) ) {
367333 this . _invokedTools . add ( e . toolId ) ;
368334 this . _pendingTools . delete ( e . toolId ) ;
369- changed = true ;
370- }
371-
372- // Track tools belonging to monitored tool sets
373- if ( this . _monitoredToolSets . size > 0 && ! this . _invokedTools . has ( e . toolId ) ) {
374- for ( const setName of this . _monitoredToolSets ) {
375- const toolSet = this . _languageModelToolsService . getToolSetByName ( setName ) ;
376- if ( toolSet ) {
377- for ( const tool of toolSet . getTools ( ) ) {
378- if ( tool . id === e . toolId ) {
379- this . _invokedTools . add ( e . toolId ) ;
380- // Remove set name from monitoring since ANY tool from the set excludes the tip.
381- // The tip remains excluded via _invokedTools even after we stop monitoring.
382- this . _monitoredToolSets . delete ( setName ) ;
383- changed = true ;
384- break ;
385- }
386- }
387- }
388- if ( changed ) {
389- break ;
390- }
391- }
392- }
393335
394- if ( changed ) {
395336 this . _persistSet ( TipEligibilityTracker . _TOOLS_STORAGE_KEY , this . _invokedTools ) ;
396337 }
397338
398- if ( this . _pendingTools . size === 0 && this . _monitoredToolSets . size === 0 ) {
339+ if ( this . _pendingTools . size === 0 ) {
399340 this . _toolListener . clear ( ) ;
400341 }
401342 } ) ;
@@ -477,30 +418,10 @@ export class TipEligibilityTracker extends Disposable {
477418 }
478419 }
479420 }
480- if ( tip . excludeWhenAnyToolSetToolInvoked ) {
481- for ( const setName of tip . excludeWhenAnyToolSetToolInvoked ) {
482- const toolSet = this . _languageModelToolsService . getToolSetByName ( setName ) ;
483- if ( toolSet ) {
484- for ( const tool of toolSet . getTools ( ) ) {
485- if ( this . _invokedTools . has ( tool . id ) ) {
486- this . _logService . debug ( '#ChatTips: tip excluded because tool set tool was invoked' , tip . id , setName , tool . id ) ;
487- return true ;
488- }
489- }
490- }
491- }
492- }
493421 if ( tip . excludeWhenPromptFilesExist && this . _excludedByFiles . has ( tip . id ) ) {
494422 this . _logService . debug ( '#ChatTips: tip excluded because prompt files exist' , tip . id ) ;
495423 return true ;
496424 }
497- if ( tip . requiresAnyToolSetRegistered ) {
498- const hasAny = tip . requiresAnyToolSetRegistered . some ( name => this . _languageModelToolsService . getToolSetByName ( name ) ) ;
499- if ( ! hasAny ) {
500- this . _logService . debug ( '#ChatTips: tip excluded because no required tool sets are registered' , tip . id ) ;
501- return true ;
502- }
503- }
504425 return false ;
505426 }
506427
0 commit comments