From 39af20ed138d34d53e4e319d2f781371da19170f Mon Sep 17 00:00:00 2001 From: weiweiw <14335254+weiweiw22@user.noreply.gitee.com> Date: Thu, 20 Feb 2025 18:06:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=87=E4=BB=B6=E5=86=85?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=88=97=E8=A1=A8=E4=B8=8D=E8=83=BD=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../knowledge_base/knowledge_base.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libs/chatchat-server/chatchat/webui_pages/knowledge_base/knowledge_base.py b/libs/chatchat-server/chatchat/webui_pages/knowledge_base/knowledge_base.py index be3c457..1442243 100644 --- a/libs/chatchat-server/chatchat/webui_pages/knowledge_base/knowledge_base.py +++ b/libs/chatchat-server/chatchat/webui_pages/knowledge_base/knowledge_base.py @@ -406,8 +406,8 @@ def knowledge_base_page(api: ApiRequest, is_lite: bool = None): editable=True, width=50, wrapHeaderText=True, - cellEditor="agCheckboxCellEditor", - cellRender="agCheckboxCellRenderer", + cellEditor="agTextCellEditor", + cellRender="agTextCellRenderer", ) # 启用分页 gb.configure_pagination( @@ -428,15 +428,15 @@ def knowledge_base_page(api: ApiRequest, is_lite: bool = None): changed_docs = [] for index, row in edit_docs.data.iterrows(): origin_doc = origin_docs[row["id"]] - if row["page_content"] != origin_doc["page_content"]: - if row["to_del"] not in ["Y", "y", 1]: - changed_docs.append( - { - "page_content": row["page_content"], - "type": row["type"], - "metadata": json.loads(row["metadata"]), - } - ) + # if row["page_content"] != origin_doc["page_content"]: + if row["to_del"] not in ["Y", "y", 1]: + changed_docs.append( + { + "page_content": row["page_content"], + "type": row["type"], + "metadata": json.loads(row["metadata"]), + } + ) if changed_docs: if api.update_kb_docs(