🐛 fix: fixed the knowledge files cant open error (#10386)

fix: fixed the knowledge files cant open error
This commit is contained in:
Shinji-Li
2025-11-24 13:38:03 +08:00
committed by GitHub
parent c5fb6c8288
commit 8104c774d5
3 changed files with 11 additions and 1 deletions

View File

@@ -385,6 +385,11 @@ export const createDesktopRouter = (locale: Locales) =>
element: <KnowledgeHome />,
index: true,
},
{
element: <KnowledgeHome />,
loader: idLoader,
path: ':id',
},
{
element: <KnowledgeBasesList />,
path: 'bases',

View File

@@ -402,6 +402,11 @@ export const createMobileRouter = (locale: Locales) =>
element: <KnowledgeHome />,
index: true,
},
{
element: <KnowledgeHome />,
loader: idLoader,
path: ':id',
},
{
element: <KnowledgeBasesList />,
path: 'bases',

View File

@@ -104,7 +104,7 @@ const Home = memo<HomeProps>(({ knowledgeBaseId, onOpenFile }) => {
const handleDocumentClick = (documentId: string) => {
// Navigate to the document in the explorer
// The KnowledgeHomePage will automatically set category to 'documents' when it detects the id param
navigate(`/${documentId}`);
navigate(`/knowledge/${documentId}`);
};
return (