File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/vs/workbench/contrib/chat/browser/actions Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import { assertNever } from '../../../../../base/common/assert.js';
6
6
import { Codicon } from '../../../../../base/common/codicons.js' ;
7
7
import { diffSets } from '../../../../../base/common/collections.js' ;
8
8
import { Event } from '../../../../../base/common/event.js' ;
9
- import { Iterable } from '../../../../../base/common/iterator.js' ;
10
9
import { DisposableStore } from '../../../../../base/common/lifecycle.js' ;
11
10
import { ThemeIcon } from '../../../../../base/common/themables.js' ;
12
11
import { assertType } from '../../../../../base/common/types.js' ;
@@ -391,10 +390,11 @@ export async function showToolsPicker(
391
390
if ( item . source . type === 'mcp' ) {
392
391
mcpToolSets . add ( item ) ;
393
392
394
- if ( Iterable . every ( item . getTools ( ) , tool => result . get ( tool ) ) ) {
393
+ const toolsInSet = Array . from ( item . getTools ( ) ) ;
394
+ if ( toolsInSet . length && toolsInSet . every ( tool => result . get ( tool ) ) ) {
395
395
// ALL tools from the MCP tool set are here, replace them with just the toolset
396
396
// but only when computing the final result
397
- for ( const tool of item . getTools ( ) ) {
397
+ for ( const tool of toolsInSet ) {
398
398
result . delete ( tool ) ;
399
399
}
400
400
result . set ( item , true ) ;
You can’t perform that action at this time.
0 commit comments