From 937048e5fb711a583ee6f070862107a720bd08a6 Mon Sep 17 00:00:00 2001 From: balibabu Date: Thu, 14 Mar 2024 19:22:39 +0800 Subject: [PATCH] feat: remove loading from document table and fixed the issue where gif images could not be uploaded on the configuration page (#122) * feat: fixed the issue where gif images could not be uploaded on the configuration page * feat: remove loading from document table --- .../components/knowledge-file/index.tsx | 18 +++++++++--------- .../knowledge-setting/configuration.tsx | 5 +++-- .../chat-configuration-modal/model-setting.tsx | 10 ++-------- web/src/pages/chat/chat-container/index.less | 1 + .../user-setting/setting-profile/index.tsx | 8 ++++++-- web/src/utils/fileUtil.ts | 6 ++++-- 6 files changed, 25 insertions(+), 23 deletions(-) diff --git a/web/src/pages/add-knowledge/components/knowledge-file/index.tsx b/web/src/pages/add-knowledge/components/knowledge-file/index.tsx index 713196d3..fe71ee36 100644 --- a/web/src/pages/add-knowledge/components/knowledge-file/index.tsx +++ b/web/src/pages/add-knowledge/components/knowledge-file/index.tsx @@ -227,14 +227,6 @@ const KnowledgeFile = () => { return parserList.find((x) => x.value === text)?.label; }, }, - { - title: 'Parsing Status', - dataIndex: 'run', - key: 'run', - render: (text, record) => { - return ; - }, - }, { title: 'Enabled', key: 'status', @@ -250,6 +242,14 @@ const KnowledgeFile = () => { ), }, + { + title: 'Parsing Status', + dataIndex: 'run', + key: 'run', + render: (text, record) => { + return ; + }, + }, { title: 'Action', key: 'action', @@ -301,7 +301,7 @@ const KnowledgeFile = () => { rowKey="id" columns={finalColumns} dataSource={data} - loading={loading} + // loading={loading} pagination={pagination} scroll={{ scrollToFirstRowOnChange: true, x: 1300, y: 'fill' }} /> diff --git a/web/src/pages/add-knowledge/components/knowledge-setting/configuration.tsx b/web/src/pages/add-knowledge/components/knowledge-setting/configuration.tsx index e57e7eac..f0e7e703 100644 --- a/web/src/pages/add-knowledge/components/knowledge-setting/configuration.tsx +++ b/web/src/pages/add-knowledge/components/knowledge-setting/configuration.tsx @@ -55,7 +55,7 @@ const Configuration = () => { const embeddingModelOptions = useSelectLlmOptions(); const onFinish = async (values: any) => { - const avatar = getBase64FromUploadFileList(values.avatar); + const avatar = await getBase64FromUploadFileList(values.avatar); dispatch({ type: 'kSModel/updateKb', payload: { @@ -123,6 +123,7 @@ const Configuration = () => { false} showUploadList={{ showPreviewIcon: false, showRemoveIcon: false }} >