From 4fd73f4cb3a17123cf3be3b82cc6173856d1e35b Mon Sep 17 00:00:00 2001 From: zstar <65890619+zstar1003@users.noreply.github.com> Date: Thu, 17 Apr 2025 16:44:52 +0800 Subject: [PATCH] =?UTF-8?q?refactor(header):=20=E9=BB=98=E8=AE=A4=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=81=A2=E5=A4=8DAgent=E5=8A=9F=E8=83=BD=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 ------------ web/src/layouts/components/header/index.tsx | 3 ++- web/src/layouts/components/right-toolbar/index.tsx | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 5241095..e50de38 100644 --- a/README.md +++ b/README.md @@ -95,18 +95,6 @@ docker cp dist ragflow-server:/ragflow/web/ ``` - -## Agent功能恢复 - -由于在我的应用场景中,不需要Agent功能,故隐藏了Agent按钮的入口,如需恢复Agent功能,可修改`web\src\layouts\components\header\index.tsx`,对以下内容取消注释: - -```tsx -{ path: '/flow', name: t('flow'), icon: GraphIcon }, -``` - -同时可将排列样式进行重置,以还原原本的样式布局,修改`web\src\layouts\components\header\index.less`文件,替换为ragflow原始样式:`https://github.com/infiniflow/ragflow/blob/main/web/src/layouts/components/header/index.less` - - ## 交流群 如果有其它需求或问题建议,可加入交流群进行讨论。 diff --git a/web/src/layouts/components/header/index.tsx b/web/src/layouts/components/header/index.tsx index 784b2a2..aa5540c 100644 --- a/web/src/layouts/components/header/index.tsx +++ b/web/src/layouts/components/header/index.tsx @@ -1,4 +1,5 @@ import { ReactComponent as FileIcon } from '@/assets/svg/file-management.svg'; +import { ReactComponent as GraphIcon } from '@/assets/svg/graph.svg'; import { ReactComponent as KnowledgeBaseIcon } from '@/assets/svg/knowledge-base.svg'; import { ReactComponent as WriteIcon } from '@/assets/svg/write.svg'; import { useTranslate } from '@/hooks/common-hooks'; @@ -30,7 +31,7 @@ const RagHeader = () => { { path: '/knowledge', name: t('knowledgeBase'), icon: KnowledgeBaseIcon }, { path: '/write', name: t('write'), icon: WriteIcon }, { path: '/search', name: t('search'), icon: SearchOutlined }, - // { path: '/flow', name: t('flow'), icon: GraphIcon }, + { path: '/flow', name: t('flow'), icon: GraphIcon }, { path: '/file', name: t('fileManager'), icon: FileIcon }, ], [t], diff --git a/web/src/layouts/components/right-toolbar/index.tsx b/web/src/layouts/components/right-toolbar/index.tsx index f7457ce..325f1fb 100644 --- a/web/src/layouts/components/right-toolbar/index.tsx +++ b/web/src/layouts/components/right-toolbar/index.tsx @@ -26,7 +26,7 @@ const RightToolBar = () => { const { setTheme, theme } = useTheme(); const { - data: { language = '简体中文' }, + data: { language = 'chinese' }, } = useFetchUserInfo(); const handleItemClick: MenuProps['onClick'] = ({ key }) => {