mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-18 14:40:53 +01:00
Fix selecting next chat when deleting with active search
This commit is contained in:
parent
4a369e070a
commit
f3388c2ab4
|
|
@ -1549,7 +1549,10 @@ def handle_start_new_chat_click(state):
|
|||
|
||||
|
||||
def handle_delete_chat_confirm_click(state):
|
||||
index = str(find_all_histories(state).index(state['unique_id']))
|
||||
filtered_histories = find_all_histories_with_first_prompts(state)
|
||||
filtered_ids = [h[1] for h in filtered_histories]
|
||||
index = str(filtered_ids.index(state['unique_id']))
|
||||
|
||||
delete_history(state['unique_id'], state['character_menu'], state['mode'])
|
||||
history, unique_id = load_history_after_deletion(state, index)
|
||||
html = redraw_html(history, state['name1'], state['name2'], state['mode'], state['chat_style'], state['character_menu'])
|
||||
|
|
|
|||
Loading…
Reference in a new issue