mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Fix a bug while deleting characters
This commit is contained in:
parent
ee7bf49804
commit
95976a9d4f
@ -57,7 +57,7 @@ def create_event_handlers():
|
|||||||
shared.gradio['delete_character_confirm'].click(
|
shared.gradio['delete_character_confirm'].click(
|
||||||
chat.delete_character, gradio('character_menu'), None).then(
|
chat.delete_character, gradio('character_menu'), None).then(
|
||||||
lambda: gr.update(visible=False), None, gradio('character_deleter')).then(
|
lambda: gr.update(visible=False), None, gradio('character_deleter')).then(
|
||||||
lambda: gr.update(choices=utils.get_available_characters(), value="None"), None, gradio('character_menu'))
|
lambda: gr.update(choices=(characters := utils.get_available_characters()), value=characters[0]), None, gradio('character_menu'))
|
||||||
|
|
||||||
shared.gradio['save_character_cancel'].click(lambda: gr.update(visible=False), None, gradio('character_saver'))
|
shared.gradio['save_character_cancel'].click(lambda: gr.update(visible=False), None, gradio('character_saver'))
|
||||||
shared.gradio['delete_character_cancel'].click(lambda: gr.update(visible=False), None, gradio('character_deleter'))
|
shared.gradio['delete_character_cancel'].click(lambda: gr.update(visible=False), None, gradio('character_deleter'))
|
||||||
|
Loading…
Reference in New Issue
Block a user