@@ -3,6 +3,7 @@ import chalk from 'chalk';
33import {
44 BUILT_IN_ENVIRONMENTS ,
55 DEFAULT_AUTORATER_MODEL_NAME ,
6+ DEFAULT_MAX_REPAIR_ATTEMPTS ,
67 DEFAULT_MODEL_NAME ,
78} from './configuration/constants.js' ;
89import { generateCodeAndAssess } from './orchestration/generate.js' ;
@@ -39,6 +40,7 @@ interface Options {
3940 a11yRepairAttempts ?: number ;
4041 logging ?: 'text-only' | 'dynamic' ;
4142 skipLighthouse ?: boolean ;
43+ maxBuildRepairAttempts ?: number ;
4244}
4345
4446function builder ( argv : Argv ) : Argv < Options > {
@@ -159,6 +161,11 @@ function builder(argv: Argv): Argv<Options> {
159161 default : false ,
160162 description : 'Whether to skip collecting Lighthouse data' ,
161163 } )
164+ . option ( 'max-build-repair-attempts' , {
165+ type : 'number' ,
166+ default : DEFAULT_MAX_REPAIR_ATTEMPTS ,
167+ description : 'Number of repair attempts when build errors are discovered' ,
168+ } )
162169 . strict ( )
163170 . version ( false )
164171 . help ( )
@@ -204,6 +211,7 @@ async function handler(cliArgs: Arguments<Options>): Promise<void> {
204211 skipAiSummary : cliArgs . skipAiSummary ,
205212 a11yRepairAttempts : cliArgs . a11yRepairAttempts ,
206213 skipLighthouse : cliArgs . skipLighthouse ,
214+ maxBuildRepairAttempts : cliArgs . maxBuildRepairAttempts ,
207215 } ) ;
208216
209217 logReportToConsole ( runInfo ) ;
0 commit comments