File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -81,15 +81,17 @@ export function installFetchWrapper(
8181
8282 // Run deduplication after handlers have populated toolParameters cache
8383 const sessionId = state . lastSeenSessionId
84- if ( sessionId && state . toolParameters . size > 1 ) {
84+ if ( sessionId && state . toolParameters . size > 0 ) {
8585 const toolIds = Array . from ( state . toolParameters . keys ( ) )
8686 const alreadyPruned = state . prunedIds . get ( sessionId ) ?? [ ]
8787 const alreadyPrunedLower = new Set ( alreadyPruned . map ( id => id . toLowerCase ( ) ) )
8888 const unpruned = toolIds . filter ( id => ! alreadyPrunedLower . has ( id . toLowerCase ( ) ) )
8989 if ( unpruned . length > 1 ) {
9090 const { duplicateIds } = detectDuplicates ( state . toolParameters , unpruned , config . protectedTools )
9191 if ( duplicateIds . length > 0 ) {
92- state . prunedIds . set ( sessionId , [ ...new Set ( [ ...alreadyPruned , ...duplicateIds ] ) ] )
92+ // Normalize to lowercase to match janitor's ID normalization
93+ const normalizedIds = duplicateIds . map ( id => id . toLowerCase ( ) )
94+ state . prunedIds . set ( sessionId , [ ...new Set ( [ ...alreadyPruned , ...normalizedIds ] ) ] )
9395 }
9496 }
9597 }
You can’t perform that action at this time.
0 commit comments