File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,17 @@ export async function registerToolsets(
9191 const existingToolNames = new Set ( toolRegistry . map ( tool => tool . getName ( ) ) ) ;
9292 // Validate that all requested tools exist
9393 const invalidTools = tools . filter ( toolName => ! existingToolNames . has ( toolName ) ) ;
94+
95+ // This is a temporary fix to handle a tool rename. Tool alias support is coming soon.
96+ // If the invalid tools list includes the *old* create_lwc_component tool name
97+ if ( invalidTools . includes ( 'create_lwc_component' ) ) {
98+ ux . stderr ( 'Tool "create_lwc_component" has been renamed to "create_lwc_component_from_prd". Update config to remove this warning.' )
99+ // Remove that entry from invalidTools
100+ invalidTools . splice ( invalidTools . indexOf ( 'create_lwc_component' ) , 1 ) ;
101+ // Then rename the old tool with create_lwc_component_from_prd in the tools array
102+ tools [ tools . indexOf ( 'create_lwc_component' ) ] = 'create_lwc_component_from_prd' ;
103+ }
104+
94105 if ( invalidTools . length > 0 ) throw new Error ( `Invalid tool names provided to --tools: "${ invalidTools . join ( '", "' ) } "
95106Valid tools include:
96107- ${ Array . from ( existingToolNames ) . join ( `${ EOL } - ` ) } ` ) ;
You can’t perform that action at this time.
0 commit comments