mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-03-11 08:04:24 +01:00
Fix character dropdown sometimes disappearing in the Parameters tab
This commit is contained in:
parent
1c1fd3be46
commit
75da90190f
|
|
@ -298,7 +298,7 @@ def create_event_handlers():
|
|||
shared.gradio['mode'].change(
|
||||
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
||||
chat.handle_mode_change, gradio('interface_state'), gradio('history', 'display', 'chat_style', 'chat-instruct_command', 'unique_id'), show_progress=False).then(
|
||||
None, gradio('mode'), None, js="(mode) => {mode === 'instruct' ? document.getElementById('character-menu').parentNode.parentNode.style.display = 'none' : document.getElementById('character-menu').parentNode.parentNode.style.display = ''}")
|
||||
None, gradio('mode'), None, js="(mode) => {const characterContainer = document.getElementById('character-menu').parentNode.parentNode; const isInChatTab = document.querySelector('#chat-controls').contains(characterContainer); if (isInChatTab) { characterContainer.style.display = mode === 'instruct' ? 'none' : ''; }}")
|
||||
|
||||
shared.gradio['chat_style'].change(chat.redraw_html, gradio(reload_arr), gradio('display'), show_progress=False)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue