File tree Expand file tree Collapse file tree
packages/cli/src/extensions/compat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,12 +114,14 @@ export class HarnessToolRegistry {
114114 }
115115
116116 async applyActiveTools ( names : string [ ] ) : Promise < void > {
117- const active = new Set ( names ) ;
118- for ( const tool of [ ...this . extensionTools , ...this . runtimeTools . values ( ) ] ) {
119- if ( active . has ( tool . name ) ) this . inactiveExtensionTools . delete ( tool . name ) ;
120- else this . inactiveExtensionTools . add ( tool . name ) ;
121- }
122- await this . harness . setActiveTools ( names ) ;
117+ await this . mutateHarnessTools ( async ( ) => {
118+ const active = new Set ( names ) ;
119+ for ( const tool of [ ...this . extensionTools , ...this . runtimeTools . values ( ) ] ) {
120+ if ( active . has ( tool . name ) ) this . inactiveExtensionTools . delete ( tool . name ) ;
121+ else this . inactiveExtensionTools . add ( tool . name ) ;
122+ }
123+ await this . harness . setActiveTools ( names ) ;
124+ } ) ;
123125 }
124126
125127 private snapshot ( ) : RegistrySnapshot {
You can’t perform that action at this time.
0 commit comments