From d85010bada1e3de842edcc9ce3cbc84125c4c4b4 Mon Sep 17 00:00:00 2001 From: PingChuan <1259732256@qq.com> Date: Sun, 30 Nov 2025 20:14:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AE=8C=E5=96=84=E7=9F=A5=E8=AF=86?= =?UTF-8?q?=E5=BA=93=E7=AE=A1=E7=90=86=E8=B7=AF=E7=94=B1=E6=9D=83=E9=99=90?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/layout/Sidebar.tsx | 3 +-- app/routes/_index.tsx | 2 +- ...-llm._index.tsx => chat-with-llm.chat.tsx} | 0 ....tsx => chat-with-llm.dataset-manager.tsx} | 0 app/routes/dataset-manager.tsx | 20 ------------------- 5 files changed, 2 insertions(+), 23 deletions(-) rename app/routes/{chat-with-llm._index.tsx => chat-with-llm.chat.tsx} (100%) rename app/routes/{dataset-manager._index.tsx => chat-with-llm.dataset-manager.tsx} (100%) delete mode 100644 app/routes/dataset-manager.tsx diff --git a/app/components/layout/Sidebar.tsx b/app/components/layout/Sidebar.tsx index 6123aac..78d8004 100644 --- a/app/components/layout/Sidebar.tsx +++ b/app/components/layout/Sidebar.tsx @@ -214,8 +214,7 @@ export function Sidebar({ onToggle, collapsed, userRole, frontendJWT = '' }: Sid // 🔑 如果选择了"智慧法务大模型",显示 /chat-with-llm 和 /dataset-manager 相关菜单 if (selectedModuleName === '智慧法务大模型') { - return item.path === '/chat-with-llm' || item.path?.startsWith('/chat-with-llm/') || - item.path === '/dataset-manager' || item.path?.startsWith('/dataset-manager/'); + return item.path === '/chat-with-llm' || item.path?.startsWith('/chat-with-llm/') } // 🔑 如果选择了包含"合同"的模块 diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index bf05f6a..3d83f7a 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -209,7 +209,7 @@ export default function Index() { // console.log('📌 [Index] 合同模块,跳转到:', targetPath); } else if (module.name === '智慧法务大模型') { // 智慧法务大模型 → 跳转到 AI 对话 - targetPath = '/chat-with-llm'; + targetPath = '/chat-with-llm/chat'; // console.log('📌 [Index] 智慧法务大模型,跳转到:', targetPath); } else { // console.log('📌 [Index] 其他模块,跳转到:', targetPath); diff --git a/app/routes/chat-with-llm._index.tsx b/app/routes/chat-with-llm.chat.tsx similarity index 100% rename from app/routes/chat-with-llm._index.tsx rename to app/routes/chat-with-llm.chat.tsx diff --git a/app/routes/dataset-manager._index.tsx b/app/routes/chat-with-llm.dataset-manager.tsx similarity index 100% rename from app/routes/dataset-manager._index.tsx rename to app/routes/chat-with-llm.dataset-manager.tsx diff --git a/app/routes/dataset-manager.tsx b/app/routes/dataset-manager.tsx deleted file mode 100644 index f6de4d7..0000000 --- a/app/routes/dataset-manager.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Outlet } from "@remix-run/react"; -import type { MetaFunction } from "@remix-run/node"; - -export const meta: MetaFunction = () => { - return [ - { title: "知识库管理 - 智能审核系统" }, - { name: "description", content: "Dify 知识库文档管理" }, - ]; -}; - -export const handle = { - breadcrumb: "知识库管理", -}; - -/** - * 知识库管理布局路由 - */ -export default function DatasetManagerLayout() { - return ; -}