File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
webview-ui/src/components/settings/providers Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -271,16 +271,17 @@ export const Gemini = ({
271271 onValueChange = { ( [ value ] ) => setApiConfigurationField ( "contextLimit" , value ) }
272272 />
273273 < VSCodeTextField
274- value = { (
275- apiConfiguration . contextLimit ??
276- modelInfo ?. contextWindow ??
277- 1048576
278- ) . toString ( ) }
274+ value = { ( ( ) => {
275+ const val =
276+ apiConfiguration . contextLimit ?? modelInfo ?. contextWindow ?? 1048576
277+ return Number . isNaN ( val ) ? "" : val . toString ( )
278+ } ) ( ) }
279279 type = "text"
280280 inputMode = "numeric"
281- onInput = { handleInputChange ( "contextLimit" , ( e ) =>
282- parseInt ( ( e as any ) . target . value , 10 ) ,
283- ) }
281+ onInput = { handleInputChange ( "contextLimit" , ( e ) => {
282+ const val = parseInt ( ( e as any ) . target . value , 10 )
283+ return Number . isNaN ( val ) ? undefined : val
284+ } ) }
284285 className = "w-24"
285286 />
286287 < span className = "text-sm" >
You can’t perform that action at this time.
0 commit comments