Fix Generate More button dead when voice_typing_mode persists without whisper (#2354)

submit_generation_button() only performed normal generation when
voice_typing_mode==0. If a session saved voice_typing_mode>0 and is then
reopened without a Whisper model loaded, the option is greyed out and
cannot be reset, so onclick fell through and did nothing while the button
was still visually a submit button - Generate More (and Submit) stopped
working.

Guard the branch with is_using_kcpp_with_whisper(), matching the pattern
already used everywhere else voice_typing_mode is checked (init, submit
button rendering, ready_to_record). When Whisper is unavailable the button
now behaves as a normal generation button regardless of the stale saved
setting. Behaviour is unchanged when Whisper is loaded.

Fixes #2353
This commit is contained in:
Tai An 2026-07-21 05:12:38 -07:00 committed by GitHub
parent 01f2fa51e4
commit 7d465d2faa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19839,7 +19839,7 @@ Current version indicated by LITEVER below.
}
function submit_generation_button(aesthetic_ui)
{
if(localsettings.voice_typing_mode==0) //only when voice is off
if(localsettings.voice_typing_mode==0 || !is_using_kcpp_with_whisper()) //normal submit when voice off, or when whisper is unavailable (e.g. stale saved setting) so the button still works
{
if(aesthetic_ui)
{