@@ -689,11 +689,12 @@ function OAuthStatusMessage({
689689
690690 const handleEnter = useCallback ( ( ) => {
691691 const idx = FIELDS . indexOf ( activeField )
692- setOAuthStatus ( buildState ( activeField , inputValue ) )
693692 if ( idx === FIELDS . length - 1 ) {
693+ setOAuthStatus ( buildState ( activeField , inputValue ) )
694694 doSave ( )
695695 } else {
696696 const next = FIELDS [ idx + 1 ] !
697+ setOAuthStatus ( buildState ( activeField , inputValue , next ) )
697698 setInputValue ( displayValues [ next ] ?? '' )
698699 setInputCursorOffset ( ( displayValues [ next ] ?? '' ) . length )
699700 }
@@ -885,11 +886,12 @@ function OAuthStatusMessage({
885886
886887 const handleOpenAIEnter = useCallback ( ( ) => {
887888 const idx = OPENAI_FIELDS . indexOf ( activeField )
888- setOAuthStatus ( buildOpenAIState ( activeField , openaiInputValue ) )
889889 if ( idx === OPENAI_FIELDS . length - 1 ) {
890+ setOAuthStatus ( buildOpenAIState ( activeField , openaiInputValue ) )
890891 doOpenAISave ( )
891892 } else {
892893 const next = OPENAI_FIELDS [ idx + 1 ] !
894+ setOAuthStatus ( buildOpenAIState ( activeField , openaiInputValue , next ) )
893895 setOpenaiInputValue ( openaiDisplayValues [ next ] ?? '' )
894896 setOpenaiInputCursorOffset ( ( openaiDisplayValues [ next ] ?? '' ) . length )
895897 }
@@ -1117,11 +1119,12 @@ function OAuthStatusMessage({
11171119
11181120 const handleGeminiEnter = useCallback ( ( ) => {
11191121 const idx = GEMINI_FIELDS . indexOf ( activeField )
1120- setOAuthStatus ( buildGeminiState ( activeField , geminiInputValue ) )
11211122 if ( idx === GEMINI_FIELDS . length - 1 ) {
1123+ setOAuthStatus ( buildGeminiState ( activeField , geminiInputValue ) )
11221124 doGeminiSave ( )
11231125 } else {
11241126 const next = GEMINI_FIELDS [ idx + 1 ] !
1127+ setOAuthStatus ( buildGeminiState ( activeField , geminiInputValue , next ) )
11251128 setGeminiInputValue ( geminiDisplayValues [ next ] ?? '' )
11261129 setGeminiInputCursorOffset ( ( geminiDisplayValues [ next ] ?? '' ) . length )
11271130 }
0 commit comments