diff --git a/electron.vite.config.ts b/electron.vite.config.ts
index f25f7da29..5a3d06715 100644
--- a/electron.vite.config.ts
+++ b/electron.vite.config.ts
@@ -50,7 +50,7 @@ export default defineConfig({
}
},
optimizeDeps: {
- exclude: ['chunk-QH6N6I7P.js', 'chunk-PB73W2YU.js']
+ exclude: ['chunk-QH6N6I7P.js', 'chunk-PB73W2YU.js', 'chunk-AFE5XGNG.js']
}
}
})
diff --git a/src/main/services/KnowledgeService.ts b/src/main/services/KnowledgeService.ts
index 655ff86b4..2b1b3e303 100644
--- a/src/main/services/KnowledgeService.ts
+++ b/src/main/services/KnowledgeService.ts
@@ -89,12 +89,14 @@ class KnowledgeService {
if (item.type === 'url') {
const content = item.content as string
if (content.startsWith('http')) {
+ // @ts-ignore loader type
return await ragApplication.addLoader(new WebLoader({ urlOrContent: content }), forceReload)
}
}
if (item.type === 'sitemap') {
const content = item.content as string
+ // @ts-ignore loader type
return await ragApplication.addLoader(new SitemapLoader({ url: content }), forceReload)
}
diff --git a/src/renderer/src/components/app/Sidebar.tsx b/src/renderer/src/components/app/Sidebar.tsx
index c8ac3a7e4..418312d31 100644
--- a/src/renderer/src/components/app/Sidebar.tsx
+++ b/src/renderer/src/components/app/Sidebar.tsx
@@ -21,8 +21,7 @@ const Sidebar: FC = () => {
const { minappShow } = useRuntime()
const { t } = useTranslation()
const navigate = useNavigate()
- const { windowStyle, showTranslateIcon, showPaintingIcon, showMinappIcon, showKnowledgeIcon, showFilesIcon } =
- useSettings()
+ const { windowStyle, sidebarIcons } = useSettings()
const { theme, toggleTheme } = useTheme()
const isRoute = (path: string): string => (pathname === path ? 'active' : '')
@@ -38,6 +37,41 @@ const Sidebar: FC = () => {
navigate(path)
}
+ const renderMainMenus = () => {
+ return sidebarIcons.visible.map((icon) => {
+ const iconMap = {
+ assistants: ,
+ agents: ,
+ paintings: ,
+ translate: ,
+ minapp: ,
+ knowledge: ,
+ files:
+ }
+
+ const pathMap = {
+ assistants: '/',
+ agents: '/agents',
+ paintings: '/paintings',
+ translate: '/translate',
+ minapp: '/apps',
+ knowledge: '/knowledge',
+ files: '/files'
+ }
+
+ const path = pathMap[icon]
+ const isActive = path === '/' ? isRoute(path) : isRoutes(path)
+
+ return (
+
+ to(path)}>
+ {iconMap[icon]}
+
+
+ )
+ })
+ }
+
return (