fix version control bug
This commit is contained in:
parent
43b0b26b09
commit
0e42b8905b
4
main.py
4
main.py
|
|
@ -226,8 +226,8 @@ def main():
|
|||
multiplex_sel.select(
|
||||
None, [multiplex_sel], None, _js=f"""(multiplex_sel)=>run_multiplex_shift(multiplex_sel)""")
|
||||
cancel_handles.append(submit_btn.click(**predict_args))
|
||||
resetBtn.click(None, None, [chatbot, history, status], _js="""(a,b,c)=>reset_conversation(a,b,c)""") # 先在前端快速清除chatbot&status
|
||||
resetBtn2.click(None, None, [chatbot, history, status], _js="""(a,b,c)=>reset_conversation(a,b,c)""") # 先在前端快速清除chatbot&status
|
||||
resetBtn.click(None, None, [chatbot, history, status], _js="""(a,b,c)=>clear_conversation(a,b,c)""") # 先在前端快速清除chatbot&status
|
||||
resetBtn2.click(None, None, [chatbot, history, status], _js="""(a,b,c)=>clear_conversation(a,b,c)""") # 先在前端快速清除chatbot&status
|
||||
# reset_server_side_args = (lambda history: ([], [], "已重置"), [history], [chatbot, history, status])
|
||||
# resetBtn.click(*reset_server_side_args) # 再在后端清除history
|
||||
# resetBtn2.click(*reset_server_side_args) # 再在后端清除history
|
||||
|
|
|
|||
|
|
@ -1070,6 +1070,14 @@ function restore_chat_from_local_storage(event) {
|
|||
}
|
||||
|
||||
|
||||
function clear_conversation(a, b, c) {
|
||||
update_conversation_metadata();
|
||||
let stopButton = document.getElementById("elem_stop");
|
||||
stopButton.click();
|
||||
// console.log("clear_conversation");
|
||||
return reset_conversation(a, b);
|
||||
}
|
||||
|
||||
|
||||
function reset_conversation(a, b) {
|
||||
// console.log("js_code_reset");
|
||||
|
|
|
|||
Loading…
Reference in New Issue