@@ -187,6 +187,9 @@ export function VisualConfigEditor({
187187 const routingStrategyLabelId = useId ( ) ;
188188 const routingStrategyHintId = `${ routingStrategyLabelId } -hint` ;
189189 const stickyTTLInputId = useId ( ) ;
190+ const quotaRefreshIntervalInputId = useId ( ) ;
191+ const quotaRefreshIntervalHintId = `${ quotaRefreshIntervalInputId } -hint` ;
192+ const quotaRefreshIntervalErrorId = `${ quotaRefreshIntervalInputId } -error` ;
190193 const keepaliveInputId = useId ( ) ;
191194 const keepaliveHintId = `${ keepaliveInputId } -hint` ;
192195 const keepaliveErrorId = `${ keepaliveInputId } -error` ;
@@ -220,6 +223,10 @@ export function VisualConfigEditor({
220223 ) ;
221224 const maxRetryCredentialsError = getValidationMessage ( t , validationErrors ?. maxRetryCredentials ) ;
222225 const maxRetryIntervalError = getValidationMessage ( t , validationErrors ?. maxRetryInterval ) ;
226+ const quotaCacheRefreshIntervalError = getValidationMessage (
227+ t ,
228+ validationErrors ?. quotaCacheRefreshInterval
229+ ) ;
223230 const routingStickyTTLError = getValidationMessage ( t , validationErrors ?. routingStickyTTL ) ;
224231 const keepaliveError = getValidationMessage ( t , validationErrors ?. [ 'streaming.keepaliveSeconds' ] ) ;
225232 const bootstrapRetriesError = getValidationMessage (
@@ -317,7 +324,7 @@ export function VisualConfigEditor({
317324 title : t ( 'config_management.visual.sections.quota.title' ) ,
318325 description : t ( 'config_management.visual.sections.quota.description' ) ,
319326 icon : IconTimer ,
320- errorCount : 0 ,
327+ errorCount : countErrors ( [ 'quotaCacheRefreshInterval' ] ) ,
321328 } ,
322329 {
323330 id : 'streaming' ,
@@ -982,31 +989,60 @@ export function VisualConfigEditor({
982989 title = { t ( 'config_management.visual.sections.quota.title' ) }
983990 description = { t ( 'config_management.visual.sections.quota.description' ) }
984991 >
985- < SectionGrid >
986- < ToggleRow
987- title = { t ( 'config_management.visual.sections.quota.switch_project' ) }
988- description = { t ( 'config_management.visual.sections.quota.switch_project_desc' ) }
989- checked = { values . quotaSwitchProject }
990- disabled = { disabled }
991- onChange = { ( quotaSwitchProject ) => onChange ( { quotaSwitchProject } ) }
992- />
993- < ToggleRow
994- title = { t ( 'config_management.visual.sections.quota.switch_preview_model' ) }
995- description = { t ( 'config_management.visual.sections.quota.switch_preview_model_desc' ) }
996- checked = { values . quotaSwitchPreviewModel }
997- disabled = { disabled }
998- onChange = { ( quotaSwitchPreviewModel ) => onChange ( { quotaSwitchPreviewModel } ) }
999- />
1000- < ToggleRow
1001- title = { t ( 'config_management.visual.sections.quota.antigravity_credits' ) }
1002- description = { t (
1003- 'config_management.visual.sections.quota.antigravity_credits_desc'
1004- ) }
1005- checked = { values . quotaAntigravityCredits }
1006- disabled = { disabled }
1007- onChange = { ( quotaAntigravityCredits ) => onChange ( { quotaAntigravityCredits } ) }
1008- />
1009- </ SectionGrid >
992+ < SectionStack >
993+ < SectionGrid >
994+ < FieldShell
995+ label = { t ( 'config_management.visual.sections.quota.refresh_interval' ) }
996+ htmlFor = { quotaRefreshIntervalInputId }
997+ hint = { t ( 'config_management.visual.sections.quota.refresh_interval_hint' ) }
998+ hintId = { quotaRefreshIntervalHintId }
999+ error = { quotaCacheRefreshIntervalError }
1000+ errorId = { quotaRefreshIntervalErrorId }
1001+ >
1002+ < input
1003+ id = { quotaRefreshIntervalInputId }
1004+ className = "input"
1005+ type = "number"
1006+ placeholder = "3600"
1007+ value = { values . quotaCacheRefreshInterval }
1008+ onChange = { ( e ) => onChange ( { quotaCacheRefreshInterval : e . target . value } ) }
1009+ disabled = { disabled }
1010+ aria-describedby = {
1011+ quotaCacheRefreshIntervalError
1012+ ? `${ quotaRefreshIntervalErrorId } ${ quotaRefreshIntervalHintId } `
1013+ : quotaRefreshIntervalHintId
1014+ }
1015+ aria-invalid = { quotaCacheRefreshIntervalError ? true : undefined }
1016+ />
1017+ </ FieldShell >
1018+ </ SectionGrid >
1019+
1020+ < SectionGrid >
1021+ < ToggleRow
1022+ title = { t ( 'config_management.visual.sections.quota.switch_project' ) }
1023+ description = { t ( 'config_management.visual.sections.quota.switch_project_desc' ) }
1024+ checked = { values . quotaSwitchProject }
1025+ disabled = { disabled }
1026+ onChange = { ( quotaSwitchProject ) => onChange ( { quotaSwitchProject } ) }
1027+ />
1028+ < ToggleRow
1029+ title = { t ( 'config_management.visual.sections.quota.switch_preview_model' ) }
1030+ description = { t ( 'config_management.visual.sections.quota.switch_preview_model_desc' ) }
1031+ checked = { values . quotaSwitchPreviewModel }
1032+ disabled = { disabled }
1033+ onChange = { ( quotaSwitchPreviewModel ) => onChange ( { quotaSwitchPreviewModel } ) }
1034+ />
1035+ < ToggleRow
1036+ title = { t ( 'config_management.visual.sections.quota.antigravity_credits' ) }
1037+ description = { t (
1038+ 'config_management.visual.sections.quota.antigravity_credits_desc'
1039+ ) }
1040+ checked = { values . quotaAntigravityCredits }
1041+ disabled = { disabled }
1042+ onChange = { ( quotaAntigravityCredits ) => onChange ( { quotaAntigravityCredits } ) }
1043+ />
1044+ </ SectionGrid >
1045+ </ SectionStack >
10101046 </ ConfigSection >
10111047
10121048 < ConfigSection
0 commit comments