fix(frontend): 修复删除提示功能中的数据库连接错误

- 将 prompt_store 更改为 get_prompt_store(),以解决数据库连接未建立的问题
- 优化了删除提示功能的代码,提高了系统稳定性
This commit is contained in:
carry 2025-04-11 18:53:17 +08:00
parent 83427aaaba
commit a23ad88769

View File

@ -53,7 +53,7 @@ def prompt_manage_page():
if not selected_row:
raise gr.Error("请先选择要删除的行")
try:
db = prompt_store
db = get_prompt_store()
db.remove(doc_ids=[selected_row[0]])
return get_prompts()
except Exception as e: