File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ async function getToolsWithFilteredCategories(
176176 continue ;
177177 }
178178 const fileTools = await import ( `../src/tools/${ file } ` ) ;
179+
179180 for ( const maybeTool of Object . values < unknown > ( fileTools ) ) {
180181 let tool ;
181182 if ( typeof maybeTool === 'function' ) {
@@ -184,6 +185,11 @@ async function getToolsWithFilteredCategories(
184185 tool = maybeTool as ToolDefinition ;
185186 }
186187
188+ // Skipping all files that are not tool files
189+ if ( tool === null || typeof tool !== 'object' || ! ( 'name' in tool ) ) {
190+ continue ;
191+ }
192+
187193 if ( toolShouldBeSkipped ( tool , filterOutCategories ) ) {
188194 continue ;
189195 }
@@ -197,10 +203,6 @@ function toolShouldBeSkipped(
197203 tool : ToolDefinition ,
198204 filteredOutCategories : ToolCategory [ ] ,
199205) {
200- if ( tool === null || typeof tool !== 'object' || ! ( 'name' in tool ) ) {
201- return true ;
202- }
203-
204206 if ( tool . annotations ?. conditions ) {
205207 return true ;
206208 }
You can’t perform that action at this time.
0 commit comments