improve reset conversation ui
This commit is contained in:
2
main.py
2
main.py
@@ -34,7 +34,7 @@ def encode_plugin_info(k, plugin)->str:
|
||||
|
||||
def main():
|
||||
import gradio as gr
|
||||
if gr.__version__ not in ['3.32.12', '3.32.13']:
|
||||
if gr.__version__ not in ['3.32.14', '3.32.13']:
|
||||
raise ModuleNotFoundError("使用项目内置Gradio获取最优体验! 请运行 `pip install -r requirements.txt` 指令安装内置Gradio及其他依赖, 详情信息见requirements.txt.")
|
||||
|
||||
# 一些基础工具
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
https://public.agent-matrix.com/publish/gradio-3.32.13-py3-none-any.whl
|
||||
https://public.agent-matrix.com/publish/gradio-3.32.14-py3-none-any.whl
|
||||
fastapi==0.110
|
||||
gradio-client==0.8
|
||||
pypdf2==2.12.1
|
||||
|
||||
@@ -1184,6 +1184,15 @@ async function clear_conversation(a, b, c) {
|
||||
update_conversation_metadata();
|
||||
let stopButton = document.getElementById("elem_stop");
|
||||
stopButton.click();
|
||||
// Save back to local storage
|
||||
try {
|
||||
const EVENT_NAME = "gptac_reset_btn_clicked";
|
||||
window.dispatchEvent(
|
||||
new CustomEvent(EVENT_NAME, {
|
||||
detail: ""
|
||||
})
|
||||
);
|
||||
} catch (e) {}
|
||||
return reset_conversation(a, b);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user