@@ -56,50 +56,26 @@ async function main(): Promise<void> {
5656 }
5757
5858 // Build new inputs
59- const newInputs : WorkflowInputs = { } ;
59+ const inputs : WorkflowInputs = { } ;
6060
61- // Group by agent for organization
62- const byAgent = new Map < string , string [ ] > ( ) ;
6361 for ( const { agent, model } of combinations ) {
64- if ( ! byAgent . has ( agent ) ) {
65- byAgent . set ( agent , [ ] ) ;
66- }
67- byAgent . get ( agent ) ! . push ( model ) ;
68- }
69-
70- // Build inputs with comments
71- const inputsWithComments : any = { } ;
72-
73- for ( const [ agent , models ] of byAgent . entries ( ) ) {
74- // Add comment for agent group
75- const agentKey = `__comment_${ agent } ` ;
76- inputsWithComments [ agentKey ] = `${ agent . charAt ( 0 ) . toUpperCase ( ) + agent . slice ( 1 ) } agent models` ;
77-
78- for ( const model of models ) {
79- const inputId = toInputId ( agent , model ) ;
80- inputsWithComments [ inputId ] = {
81- description : toDescription ( agent , model ) ,
82- type : "boolean" ,
83- default : false ,
84- } ;
85- }
62+ const inputId = toInputId ( agent , model ) ;
63+ inputs [ inputId ] = {
64+ description : toDescription ( agent , model ) ,
65+ type : "boolean" ,
66+ default : false ,
67+ } ;
8668 }
8769
8870 // Update the workflow
89- workflow . on . workflow_dispatch . inputs = inputsWithComments ;
71+ workflow . on . workflow_dispatch . inputs = inputs ;
9072
9173 // Convert back to YAML with proper formatting
92- let yamlOutput = YAML . stringify ( workflow , {
74+ const yamlOutput = YAML . stringify ( workflow , {
9375 indent : 2 ,
9476 lineWidth : 0 ,
9577 } ) ;
9678
97- // Replace comment placeholders with actual YAML comments
98- yamlOutput = yamlOutput . replace (
99- / _ _ c o m m e n t _ ( \w + ) : \s * [ " ' ] ? ( [ ^ " ' \n ] + ) [ " ' ] ? \n / g,
100- "# $2\n" ,
101- ) ;
102-
10379 // Write back to file
10480 writeFileSync ( workflowPath , yamlOutput , "utf8" ) ;
10581
0 commit comments