@lobehub/lobehub 2.0.0-next.72 → 2.0.0-next.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/changelog/v1.json +9 -0
- package/next.config.ts +5 -5
- package/package.json +1 -1
- package/scripts/prebuild.mts +1 -1
- package/src/app/(backend)/trpc/desktop/[trpc]/route.ts +6 -6
- package/src/app/[variants]/(main)/(mobile)/me/(home)/__tests__/UserBanner.test.tsx +7 -4
- package/src/app/[variants]/(main)/(mobile)/me/(home)/__tests__/useCategory.test.tsx +4 -4
- package/src/app/[variants]/(main)/(mobile)/me/(home)/features/UserBanner.tsx +5 -6
- package/src/app/[variants]/(main)/(mobile)/me/(home)/features/useCategory.tsx +5 -8
- package/src/app/[variants]/(main)/(mobile)/me/(home)/index.tsx +25 -0
- package/src/app/[variants]/(main)/(mobile)/me/(home)/layout.tsx +13 -16
- package/src/app/[variants]/(main)/(mobile)/me/profile/features/Category.tsx +6 -6
- package/src/app/[variants]/(main)/(mobile)/me/profile/features/Header.tsx +3 -3
- package/src/app/[variants]/(main)/(mobile)/me/profile/index.tsx +16 -0
- package/src/app/[variants]/(main)/(mobile)/me/profile/layout.tsx +9 -11
- package/src/app/[variants]/(main)/(mobile)/me/settings/features/Header.tsx +3 -3
- package/src/app/[variants]/(main)/(mobile)/me/settings/features/useCategory.tsx +3 -4
- package/src/app/[variants]/(main)/(mobile)/me/settings/index.tsx +16 -0
- package/src/app/[variants]/(main)/(mobile)/me/settings/layout.tsx +15 -13
- package/src/app/[variants]/(main)/changelog/_layout/Desktop/index.tsx +6 -5
- package/src/app/[variants]/(main)/changelog/_layout/Mobile/Header.tsx +3 -3
- package/src/app/[variants]/(main)/changelog/_layout/Mobile/index.tsx +5 -5
- package/src/app/[variants]/(main)/changelog/features/Post.tsx +7 -4
- package/src/app/[variants]/(main)/changelog/index.tsx +55 -0
- package/src/app/[variants]/(main)/chat/_layout/Desktop/index.tsx +6 -7
- package/src/app/[variants]/(main)/chat/_layout/Mobile.tsx +3 -3
- package/src/app/[variants]/(main)/chat/components/WorkspaceLayout.tsx +1 -14
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatHydration/index.tsx +2 -2
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/Desktop/MessageFromUrl.tsx +11 -13
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/Desktop/index.tsx +0 -1
- package/src/app/[variants]/(main)/chat/components/conversation/features/ThreadHydration.tsx +2 -2
- package/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/TopicContent.tsx +20 -11
- package/src/app/[variants]/(main)/chat/features/PageTitle/index.tsx +1 -2
- package/src/app/[variants]/(main)/chat/index.tsx +29 -0
- package/src/app/[variants]/(main)/chat/session/features/SessionHydration.tsx +8 -6
- package/src/app/[variants]/(main)/chat/session/features/SessionListContent/Inbox/index.tsx +2 -4
- package/src/app/[variants]/(main)/chat/session/features/SessionListContent/List/index.tsx +1 -1
- package/src/app/[variants]/(main)/chat/session/layout/Mobile/SessionHeader.tsx +3 -3
- package/src/app/[variants]/(main)/chat/settings/_layout/Desktop/Header.tsx +3 -3
- package/src/app/[variants]/(main)/chat/settings/_layout/Mobile/Header.tsx +3 -3
- package/src/app/[variants]/(main)/chat/settings/features/PublishResultModal/index.tsx +3 -3
- package/src/app/[variants]/(main)/chat/{components/SettingsPage.tsx → settings/index.tsx} +6 -35
- package/src/app/[variants]/(main)/components/Link.tsx +21 -0
- package/src/app/[variants]/(main)/discover/(detail)/_layout/{Desktop.tsx → Desktop/index.tsx} +15 -7
- package/src/app/[variants]/(main)/discover/(detail)/_layout/Mobile/index.tsx +3 -3
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Capabilities/Block.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Overview/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Related/index.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/SystemRole/index.tsx +3 -3
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Versions/index.tsx +4 -4
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Header.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Sidebar/ActionButton/AddAgent.tsx +3 -3
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Sidebar/ActionButton/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Sidebar/Related/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Sidebar/TocList/index.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/StatusPage/index.tsx +3 -3
- package/src/app/[variants]/(main)/discover/(detail)/assistant/{AssistantDetailPage.tsx → index.tsx} +18 -11
- package/src/app/[variants]/(main)/discover/(detail)/features/Breadcrumb.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/mcp/{[slug]/features → features}/Details/Related/index.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/mcp/{[slug]/features → features}/Details/Versions/index.tsx +5 -5
- package/src/app/[variants]/(main)/discover/(detail)/mcp/{[slug]/features → features}/Details/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/mcp/{[slug]/features → features}/Sidebar/Related/index.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/mcp/{[slug]/features → features}/Sidebar/ServerConfig.tsx +4 -4
- package/src/app/[variants]/(main)/discover/(detail)/mcp/{[slug]/features → features}/Sidebar/TocList/index.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/mcp/{McpDetailPage.tsx → index.tsx} +15 -7
- package/src/app/[variants]/(main)/discover/(detail)/mcp/loading.tsx +1 -0
- package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Details/Overview/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Details/Parameter/ParameterItem.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Details/Related/index.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Details/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Header.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Sidebar/ActionButton/ChatWithModel.tsx +3 -3
- package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Sidebar/ActionButton/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Sidebar/Related/index.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Sidebar/RelatedProviders/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/model/{ModelDetailPage.tsx → index.tsx} +17 -10
- package/src/app/[variants]/(main)/discover/(detail)/model/loading.tsx +1 -0
- package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Details/Related/index.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Details/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Sidebar/ActionButton/ProviderConfig.tsx +5 -4
- package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Sidebar/ActionButton/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Sidebar/Related/index.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Sidebar/RelatedModels/index.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(detail)/provider/{ProviderDetailPage.tsx → index.tsx} +17 -10
- package/src/app/[variants]/(main)/discover/(detail)/provider/loading.tsx +1 -0
- package/src/app/[variants]/(main)/discover/(list)/(home)/{HomePage.tsx → index.tsx} +14 -0
- package/src/app/[variants]/(main)/discover/(list)/_layout/Desktop/Nav.tsx +2 -3
- package/src/app/[variants]/(main)/discover/(list)/_layout/Desktop/index.tsx +4 -3
- package/src/app/[variants]/(main)/discover/(list)/_layout/Mobile/Nav.tsx +3 -4
- package/src/app/[variants]/(main)/discover/(list)/_layout/Mobile/index.tsx +4 -3
- package/src/app/[variants]/(main)/discover/(list)/assistant/_layout/Desktop.tsx +3 -4
- package/src/app/[variants]/(main)/discover/(list)/assistant/_layout/Mobile.tsx +3 -3
- package/src/app/[variants]/(main)/discover/(list)/assistant/features/List/Item.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(list)/assistant/{AssistantPage.tsx → index.tsx} +18 -4
- package/src/app/[variants]/(main)/discover/(list)/features/SortButton/index.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(list)/mcp/_layout/Desktop.tsx +3 -3
- package/src/app/[variants]/(main)/discover/(list)/mcp/_layout/Mobile.tsx +3 -3
- package/src/app/[variants]/(main)/discover/(list)/mcp/features/List/Item.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(list)/mcp/{McpPage.tsx → index.tsx} +9 -2
- package/src/app/[variants]/(main)/discover/(list)/model/_layout/Desktop.tsx +3 -3
- package/src/app/[variants]/(main)/discover/(list)/model/_layout/Mobile.tsx +3 -3
- package/src/app/[variants]/(main)/discover/(list)/model/features/List/Item.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(list)/model/{ModelPage.tsx → index.tsx} +9 -2
- package/src/app/[variants]/(main)/discover/(list)/provider/features/List/Item.tsx +1 -1
- package/src/app/[variants]/(main)/discover/(list)/provider/{Client.tsx → index.tsx} +9 -2
- package/src/app/[variants]/(main)/discover/_layout/Desktop/index.tsx +4 -4
- package/src/app/[variants]/(main)/discover/_layout/Mobile/index.tsx +3 -3
- package/src/app/[variants]/(main)/discover/components/Title.tsx +1 -1
- package/src/app/[variants]/(main)/discover/features/Search.tsx +2 -2
- package/src/app/[variants]/(main)/discover/features/useNav.tsx +11 -12
- package/src/app/[variants]/(main)/hooks/useActiveTabKey.ts +40 -0
- package/src/app/[variants]/(main)/hooks/usePathname.ts +10 -0
- package/src/app/[variants]/(main)/hooks/useQuery.ts +12 -0
- package/src/app/[variants]/(main)/hooks/useRouter.ts +22 -0
- package/src/app/[variants]/(main)/hooks/useSearchParams.ts +11 -0
- package/src/app/[variants]/(main)/image/@menu/features/ConfigPanel/components/ModelSelect/index.tsx +5 -5
- package/src/app/[variants]/(main)/image/@topic/features/Topics/TopicUrlSync.tsx +1 -1
- package/src/app/[variants]/(main)/image/ComingSoon.tsx +15 -0
- package/src/app/[variants]/(main)/image/_layout/Desktop/index.tsx +5 -2
- package/src/app/[variants]/(main)/image/_layout/DesktopWrapper.tsx +15 -0
- package/src/app/[variants]/(main)/image/_layout/Mobile/index.tsx +3 -1
- package/src/app/[variants]/(main)/image/features/ImageWorkspace/index.tsx +1 -2
- package/src/app/[variants]/(main)/image/index.tsx +18 -0
- package/src/app/[variants]/(main)/knowledge/_layout/Desktop.tsx +17 -0
- package/src/app/[variants]/(main)/knowledge/_layout/Mobile.tsx +17 -0
- package/src/app/[variants]/(main)/knowledge/components/KnowledgeBaseItem/index.tsx +1 -1
- package/src/app/[variants]/(main)/knowledge/components/modal/ModalPageClient.tsx +4 -4
- package/src/app/[variants]/(main)/knowledge/routes/KnowledgeBaseDetail/index.tsx +5 -8
- package/src/app/[variants]/(main)/knowledge/routes/KnowledgeBaseDetail/menu/Head.tsx +1 -1
- package/src/app/[variants]/(main)/knowledge/routes/KnowledgeHome/menu/CategoryMenu.tsx +2 -2
- package/src/app/[variants]/(main)/knowledge/routes/KnowledgeHome/menu/KnowledgeBase.tsx +1 -1
- package/src/app/[variants]/(main)/{_layout/Desktop → layouts/desktop}/DesktopLayoutContainer.tsx +3 -2
- package/src/app/[variants]/(main)/{_layout/Desktop → layouts/desktop}/SideBar/BottomActions.tsx +4 -4
- package/src/app/[variants]/(main)/{_layout/Desktop → layouts/desktop}/SideBar/TopActions.test.tsx +9 -9
- package/src/app/[variants]/(main)/layouts/desktop/SideBar/TopActions.tsx +117 -0
- package/src/app/[variants]/(main)/{_layout/Desktop → layouts/desktop}/index.tsx +9 -4
- package/src/app/[variants]/(main)/layouts/index.tsx +11 -0
- package/src/app/[variants]/(main)/{_layout/Mobile → layouts/mobile}/NavBar.tsx +5 -5
- package/src/app/[variants]/(main)/{_layout/Mobile → layouts/mobile}/index.tsx +10 -7
- package/src/app/[variants]/(main)/profile/(home)/desktop.tsx +26 -0
- package/src/app/[variants]/(main)/profile/(home)/index.tsx +26 -0
- package/src/app/[variants]/(main)/profile/@category/features/CategoryContent.tsx +5 -7
- package/src/app/[variants]/(main)/profile/_layout/Desktop/index.tsx +3 -2
- package/src/app/[variants]/(main)/profile/_layout/DesktopWrapper.tsx +14 -0
- package/src/app/[variants]/(main)/profile/_layout/Mobile/Header.tsx +3 -3
- package/src/app/[variants]/(main)/profile/_layout/Mobile/index.tsx +4 -3
- package/src/app/[variants]/(main)/profile/apikey/index.tsx +18 -0
- package/src/app/[variants]/(main)/profile/hooks/useCategory.tsx +6 -6
- package/src/app/[variants]/(main)/profile/security/index.tsx +29 -0
- package/src/app/[variants]/(main)/profile/stats/features/AssistantsRank.tsx +4 -4
- package/src/app/[variants]/(main)/profile/stats/features/TopicsRank.tsx +4 -4
- package/src/app/[variants]/(main)/profile/stats/index.tsx +20 -0
- package/src/app/[variants]/(main)/profile/usage/features/UsageTable.tsx +7 -9
- package/src/app/[variants]/(main)/profile/usage/index.tsx +13 -0
- package/src/app/[variants]/(main)/settings/_layout/Desktop/Header.tsx +2 -2
- package/src/app/[variants]/(main)/settings/_layout/Desktop/index.tsx +2 -2
- package/src/app/[variants]/(main)/settings/_layout/DesktopWrapper.tsx +23 -0
- package/src/app/[variants]/(main)/settings/_layout/Mobile/Header.tsx +8 -7
- package/src/app/[variants]/(main)/settings/_layout/Mobile/index.tsx +2 -5
- package/src/app/[variants]/(main)/settings/_layout/MobileWrapper.tsx +23 -0
- package/src/app/[variants]/(main)/settings/agent/AgentMenu/Menu.tsx +2 -4
- package/src/app/[variants]/(main)/settings/agent/index.tsx +2 -4
- package/src/app/[variants]/(main)/settings/provider/(list)/index.tsx +2 -3
- package/src/app/[variants]/(main)/settings/provider/ProviderMenu/All.tsx +2 -2
- package/src/app/[variants]/(main)/settings/provider/ProviderMenu/Item.tsx +38 -37
- package/src/app/[variants]/(main)/settings/provider/_layout/Mobile.tsx +2 -2
- package/src/app/[variants]/(main)/settings/provider/features/CreateNewProvider/index.tsx +3 -3
- package/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/UpdateProviderInfo/SettingModal.tsx +3 -3
- package/src/app/[variants]/DesktopRouter.tsx +40 -0
- package/src/app/[variants]/MobileRouter.tsx +41 -0
- package/src/app/[variants]/desktopRouter.config.tsx +381 -0
- package/src/app/[variants]/layout.tsx +1 -3
- package/src/app/[variants]/loaders/routeParams.ts +45 -0
- package/src/app/[variants]/loading/Server/Redirect.tsx +1 -1
- package/src/app/[variants]/mobileRouter.config.tsx +412 -0
- package/src/app/[variants]/page.tsx +16 -6
- package/src/app/desktop/devtools/page.tsx +1 -1
- package/src/app/desktop/layout.tsx +1 -1
- package/src/components/BootErrorBoundary/index.tsx +129 -0
- package/src/components/mdx/constants.ts +1 -0
- package/src/features/ChangelogModal/index.tsx +3 -3
- package/src/features/KnowledgeManager/FileExplorer/index.tsx +4 -4
- package/src/features/KnowledgeManager/Header/FilesSearchBar.tsx +1 -1
- package/src/features/User/UserPanel/PanelContent.tsx +4 -3
- package/src/features/User/UserPanel/useMenu.tsx +20 -14
- package/src/features/User/__tests__/PanelContent.test.tsx +13 -7
- package/src/hooks/useDiscoverTab.ts +2 -2
- package/src/hooks/useInterceptingRoutes.test.ts +23 -26
- package/src/hooks/useInterceptingRoutes.ts +5 -4
- package/src/hooks/usePinnedAgentState.ts +6 -6
- package/src/hooks/useQuery.ts +5 -0
- package/src/hooks/useQueryParam.ts +322 -0
- package/src/hooks/useQueryRoute.test.ts +2 -12
- package/src/hooks/useQueryRoute.ts +5 -5
- package/src/hooks/useShowMobileWorkspace.ts +1 -1
- package/src/hooks/useSwitchSession.ts +4 -3
- package/src/layout/GlobalProvider/ImportSettings.tsx +22 -9
- package/src/layout/GlobalProvider/StoreInitialization.tsx +9 -1
- package/src/proxy.ts +13 -1
- package/src/services/message/index.ts +11 -2
- package/src/store/chat/agents/createAgentExecutors.ts +31 -16
- package/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts +218 -0
- package/src/store/chat/slices/aiChat/actions/conversationControl.ts +4 -0
- package/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts +9 -3
- package/src/store/chat/slices/aiChat/actions/streamingExecutor.ts +142 -61
- package/src/store/chat/slices/builtinTool/actions/__tests__/search.test.ts +204 -10
- package/src/store/chat/slices/builtinTool/actions/search.ts +51 -26
- package/src/store/chat/slices/message/action.test.ts +182 -33
- package/src/store/chat/slices/message/actions/optimisticUpdate.ts +79 -36
- package/src/store/chat/slices/message/actions/query.ts +7 -5
- package/src/store/chat/slices/message/selectors/dbMessage.ts +11 -4
- package/src/store/chat/slices/plugin/action.test.ts +257 -54
- package/src/store/chat/slices/plugin/actions/optimisticUpdate.ts +63 -26
- package/src/store/chat/slices/plugin/actions/pluginTypes.ts +52 -19
- package/src/store/chat/slices/plugin/actions/publicApi.ts +6 -1
- package/src/store/chat/slices/plugin/actions/workflow.ts +17 -6
- package/src/store/chat/slices/thread/action.ts +2 -0
- package/src/store/global/action.test.ts +3 -3
- package/src/store/global/actions/workspacePane.ts +2 -1
- package/src/store/global/initialState.ts +10 -2
- package/src/store/user/slices/common/action.ts +4 -0
- package/src/app/[variants]/(main)/(mobile)/me/(home)/loading.tsx +0 -38
- package/src/app/[variants]/(main)/(mobile)/me/(home)/page.tsx +0 -40
- package/src/app/[variants]/(main)/(mobile)/me/profile/loading.tsx +0 -5
- package/src/app/[variants]/(main)/(mobile)/me/profile/page.tsx +0 -30
- package/src/app/[variants]/(main)/(mobile)/me/settings/loading.tsx +0 -5
- package/src/app/[variants]/(main)/(mobile)/me/settings/page.tsx +0 -30
- package/src/app/[variants]/(main)/_layout/Desktop/SideBar/TopActions.tsx +0 -106
- package/src/app/[variants]/(main)/changelog/layout.tsx +0 -10
- package/src/app/[variants]/(main)/changelog/modal/page.tsx +0 -23
- package/src/app/[variants]/(main)/changelog/page.tsx +0 -78
- package/src/app/[variants]/(main)/chat/ChatRouter.tsx +0 -83
- package/src/app/[variants]/(main)/chat/_layout/ChatLayout.tsx +0 -22
- package/src/app/[variants]/(main)/chat/components/MainChatPage.tsx +0 -25
- package/src/app/[variants]/(main)/chat/error.tsx +0 -3
- package/src/app/[variants]/(main)/chat/layout.tsx +0 -10
- package/src/app/[variants]/(main)/chat/loading.tsx +0 -3
- package/src/app/[variants]/(main)/chat/not-found.tsx +0 -1
- package/src/app/[variants]/(main)/chat/page.tsx +0 -12
- package/src/app/[variants]/(main)/chat/settings/error.tsx +0 -3
- package/src/app/[variants]/(main)/chat/settings/loading.tsx +0 -3
- package/src/app/[variants]/(main)/chat/settings/not-found.tsx +0 -1
- package/src/app/[variants]/(main)/discover/(detail)/_layout/DetailLayout.tsx +0 -22
- package/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/Client.tsx +0 -51
- package/src/app/[variants]/(main)/discover/(detail)/mcp/[slug]/Client.tsx +0 -43
- package/src/app/[variants]/(main)/discover/(detail)/mcp/[slug]/loading.tsx +0 -1
- package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/Client.tsx +0 -40
- package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/loading.tsx +0 -1
- package/src/app/[variants]/(main)/discover/(detail)/provider/[...slugs]/Client.tsx +0 -40
- package/src/app/[variants]/(main)/discover/(detail)/provider/[...slugs]/loading.tsx +0 -1
- package/src/app/[variants]/(main)/discover/(list)/_layout/ListLayout.tsx +0 -22
- package/src/app/[variants]/(main)/discover/(list)/assistant/AssistantLayout.tsx +0 -21
- package/src/app/[variants]/(main)/discover/(list)/mcp/Client.tsx +0 -44
- package/src/app/[variants]/(main)/discover/(list)/mcp/McpLayout.tsx +0 -21
- package/src/app/[variants]/(main)/discover/(list)/model/Client.tsx +0 -44
- package/src/app/[variants]/(main)/discover/(list)/model/ModelLayout.tsx +0 -21
- package/src/app/[variants]/(main)/discover/(list)/provider/ProviderPage.tsx +0 -43
- package/src/app/[variants]/(main)/discover/DiscoverRouter.tsx +0 -170
- package/src/app/[variants]/(main)/discover/[[...path]]/page.tsx +0 -12
- package/src/app/[variants]/(main)/discover/_layout/DiscoverLayout.tsx +0 -22
- package/src/app/[variants]/(main)/discover/error.tsx +0 -3
- package/src/app/[variants]/(main)/discover/not-found.tsx +0 -1
- package/src/app/[variants]/(main)/error.tsx +0 -3
- package/src/app/[variants]/(main)/image/layout.tsx +0 -15
- package/src/app/[variants]/(main)/image/page.tsx +0 -45
- package/src/app/[variants]/(main)/knowledge/KnowledgeRouter.tsx +0 -74
- package/src/app/[variants]/(main)/knowledge/[[...path]]/page.tsx +0 -12
- package/src/app/[variants]/(main)/knowledge/components/modal/page.tsx +0 -13
- package/src/app/[variants]/(main)/knowledge/layout.tsx +0 -12
- package/src/app/[variants]/(main)/layout.tsx +0 -10
- package/src/app/[variants]/(main)/not-found.tsx +0 -1
- package/src/app/[variants]/(main)/profile/apikey/page.tsx +0 -32
- package/src/app/[variants]/(main)/profile/error.tsx +0 -3
- package/src/app/[variants]/(main)/profile/layout.tsx +0 -11
- package/src/app/[variants]/(main)/profile/loading.tsx +0 -3
- package/src/app/[variants]/(main)/profile/not-found.tsx +0 -1
- package/src/app/[variants]/(main)/profile/security/page.tsx +0 -28
- package/src/app/[variants]/(main)/profile/stats/page.tsx +0 -23
- package/src/app/[variants]/(main)/profile/usage/page.tsx +0 -23
- package/src/app/[variants]/@modal/(.)changelog/modal/features/Cover.tsx +0 -48
- package/src/app/[variants]/@modal/(.)changelog/modal/features/Hero.tsx +0 -29
- package/src/app/[variants]/@modal/(.)changelog/modal/features/Post.tsx +0 -57
- package/src/app/[variants]/@modal/(.)changelog/modal/features/PublishedTime.tsx +0 -50
- package/src/app/[variants]/@modal/(.)changelog/modal/features/ReadDetail.tsx +0 -72
- package/src/app/[variants]/@modal/(.)changelog/modal/features/VersionTag.tsx +0 -26
- package/src/app/[variants]/@modal/(.)changelog/modal/layout.tsx +0 -41
- package/src/app/[variants]/@modal/(.)changelog/modal/loading.tsx +0 -10
- package/src/app/[variants]/@modal/(.)changelog/modal/page.tsx +0 -38
- package/src/app/[variants]/@modal/_layout/ModalLayout.tsx +0 -63
- package/src/app/[variants]/@modal/_layout/SettingModalLayout.tsx +0 -71
- package/src/app/[variants]/@modal/default.tsx +0 -3
- package/src/app/[variants]/@modal/error.tsx +0 -3
- package/src/app/[variants]/@modal/layout.tsx +0 -7
- package/src/app/[variants]/@modal/loading.tsx +0 -5
- /package/src/app/[variants]/{@modal/(.)changelog/modal → (main)/changelog}/features/Pagination.tsx +0 -0
- /package/src/app/[variants]/{@modal/(.)changelog/modal → (main)/changelog}/features/UpdateChangelogStatus.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/DetailProvider.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Capabilities/Knowledge.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Capabilities/KnowledgeItem.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Capabilities/PluginItem.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Capabilities/Plugins.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Capabilities/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Nav.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/Overview/TagList.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Details/SystemRole/TagList.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Sidebar/Related/Item.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Sidebar/Summary/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/features → features}/Sidebar/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/assistant/{[...slugs]/loading.tsx → loading.tsx} +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/mcp/{[slug]/features → features}/Sidebar/ActionButton/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/mcp/{[slug]/features → features}/Sidebar/ConnectionTypeAlert.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/mcp/{[slug]/features → features}/Sidebar/Related/Item.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/mcp/{[slug]/features → features}/Sidebar/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/DetailProvider.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Details/Nav.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Details/Overview/ProviderList/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Details/Parameter/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Sidebar/Related/Item.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Sidebar/RelatedProviders/Item.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/model/{[...slugs]/features → features}/Sidebar/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/DetailProvider.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Details/Guide/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Details/Nav.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Details/Overview/ModelList/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Details/Overview/index.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Header.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Sidebar/Related/Item.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Sidebar/RelatedModels/Item.tsx +0 -0
- /package/src/app/[variants]/(main)/discover/(detail)/provider/{[...slugs]/features → features}/Sidebar/index.tsx +0 -0
- /package/src/app/[variants]/(main)/labs/{page.tsx → index.tsx} +0 -0
- /package/src/app/[variants]/(main)/{_layout/Desktop → layouts/desktop}/RegisterHotkeys.tsx +0 -0
- /package/src/app/[variants]/(main)/{_layout/Desktop → layouts/desktop}/SideBar/Avatar.test.tsx +0 -0
- /package/src/app/[variants]/(main)/{_layout/Desktop → layouts/desktop}/SideBar/Avatar.tsx +0 -0
- /package/src/app/[variants]/(main)/{_layout/Desktop → layouts/desktop}/SideBar/PinList/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{_layout/Desktop → layouts/desktop}/SideBar/index.tsx +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { memo } from 'react';
|
|
4
|
-
import { Flexbox } from 'react-layout-kit';
|
|
5
|
-
|
|
6
|
-
import { withSuspense } from '@/components/withSuspense';
|
|
7
|
-
import { useQuery } from '@/hooks/useQuery';
|
|
8
|
-
import { useDiscoverStore } from '@/store/discover';
|
|
9
|
-
import { DiscoverTab, ProviderQueryParams } from '@/types/discover';
|
|
10
|
-
|
|
11
|
-
import Pagination from '../features/Pagination';
|
|
12
|
-
import List from './features/List';
|
|
13
|
-
import Loading from './loading';
|
|
14
|
-
|
|
15
|
-
const ProviderPage = memo<{ mobile?: boolean }>(() => {
|
|
16
|
-
const { q, page, sort, order } = useQuery() as ProviderQueryParams;
|
|
17
|
-
const useProviderList = useDiscoverStore((s) => s.useProviderList);
|
|
18
|
-
const { data, isLoading } = useProviderList({
|
|
19
|
-
order,
|
|
20
|
-
page,
|
|
21
|
-
pageSize: 21,
|
|
22
|
-
q,
|
|
23
|
-
sort,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
if (isLoading || !data) return <Loading />;
|
|
27
|
-
|
|
28
|
-
const { items, currentPage, pageSize, totalCount } = data;
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<Flexbox gap={32} width={'100%'}>
|
|
32
|
-
<List data={items} />
|
|
33
|
-
<Pagination
|
|
34
|
-
currentPage={currentPage}
|
|
35
|
-
pageSize={pageSize}
|
|
36
|
-
tab={DiscoverTab.Providers}
|
|
37
|
-
total={totalCount}
|
|
38
|
-
/>
|
|
39
|
-
</Flexbox>
|
|
40
|
-
);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export default withSuspense(ProviderPage);
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { memo, useEffect } from 'react';
|
|
4
|
-
import { useMediaQuery } from 'react-responsive';
|
|
5
|
-
import { MemoryRouter, Navigate, Route, Routes, useLocation, useNavigate } from 'react-router-dom';
|
|
6
|
-
|
|
7
|
-
import DetailLayout from './(detail)/_layout/DetailLayout';
|
|
8
|
-
import AssistantDetailPage from './(detail)/assistant/AssistantDetailPage';
|
|
9
|
-
import McpDetailPage from './(detail)/mcp/McpDetailPage';
|
|
10
|
-
import ModelDetailPage from './(detail)/model/ModelDetailPage';
|
|
11
|
-
import ProviderDetailPage from './(detail)/provider/ProviderDetailPage';
|
|
12
|
-
import HomePage from './(list)/(home)/HomePage';
|
|
13
|
-
import ListLayout from './(list)/_layout/ListLayout';
|
|
14
|
-
import AssistantLayout from './(list)/assistant/AssistantLayout';
|
|
15
|
-
import AssistantPage from './(list)/assistant/AssistantPage';
|
|
16
|
-
import McpLayout from './(list)/mcp/McpLayout';
|
|
17
|
-
import McpPage from './(list)/mcp/McpPage';
|
|
18
|
-
import ModelLayout from './(list)/model/ModelLayout';
|
|
19
|
-
import ModelPage from './(list)/model/ModelPage';
|
|
20
|
-
import ProviderPage from './(list)/provider/ProviderPage';
|
|
21
|
-
import DiscoverLayout from './_layout/DiscoverLayout';
|
|
22
|
-
|
|
23
|
-
// Get initial path from URL
|
|
24
|
-
const getInitialPath = () => {
|
|
25
|
-
if (typeof window === 'undefined') return '/';
|
|
26
|
-
const fullPath = window.location.pathname;
|
|
27
|
-
const searchParams = window.location.search;
|
|
28
|
-
const discoverIndex = fullPath.indexOf('/discover');
|
|
29
|
-
|
|
30
|
-
if (discoverIndex !== -1) {
|
|
31
|
-
const pathAfterDiscover = fullPath.slice(discoverIndex + '/discover'.length) || '/';
|
|
32
|
-
return pathAfterDiscover + searchParams;
|
|
33
|
-
}
|
|
34
|
-
return '/';
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// Helper component to sync URL with MemoryRouter
|
|
38
|
-
const UrlSynchronizer = () => {
|
|
39
|
-
const location = useLocation();
|
|
40
|
-
const navigate = useNavigate();
|
|
41
|
-
|
|
42
|
-
// Sync initial URL
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
const fullPath = window.location.pathname;
|
|
45
|
-
const searchParams = window.location.search;
|
|
46
|
-
const discoverIndex = fullPath.indexOf('/discover');
|
|
47
|
-
|
|
48
|
-
if (discoverIndex !== -1) {
|
|
49
|
-
const pathAfterDiscover = fullPath.slice(discoverIndex + '/discover'.length) || '/';
|
|
50
|
-
const targetPath = pathAfterDiscover + searchParams;
|
|
51
|
-
|
|
52
|
-
if (location.pathname + location.search !== targetPath) {
|
|
53
|
-
navigate(targetPath, { replace: true });
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}, []);
|
|
57
|
-
|
|
58
|
-
// Update browser URL when location changes
|
|
59
|
-
useEffect(() => {
|
|
60
|
-
const normalizedPath = location.pathname === '/' ? '' : location.pathname;
|
|
61
|
-
const newUrl = `/discover${normalizedPath}${location.search}`;
|
|
62
|
-
if (window.location.pathname + window.location.search !== newUrl) {
|
|
63
|
-
window.history.replaceState({}, '', newUrl);
|
|
64
|
-
}
|
|
65
|
-
}, [location.pathname, location.search]);
|
|
66
|
-
|
|
67
|
-
return null;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const DiscoverRouter = memo(() => {
|
|
71
|
-
const mobile = useMediaQuery({ maxWidth: 768 });
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<MemoryRouter initialEntries={[getInitialPath()]} initialIndex={0}>
|
|
75
|
-
<UrlSynchronizer />
|
|
76
|
-
<DiscoverLayout mobile={mobile}>
|
|
77
|
-
<Routes>
|
|
78
|
-
{/* List routes with ListLayout */}
|
|
79
|
-
<Route
|
|
80
|
-
element={
|
|
81
|
-
<ListLayout mobile={mobile}>
|
|
82
|
-
<HomePage mobile={mobile} />
|
|
83
|
-
</ListLayout>
|
|
84
|
-
}
|
|
85
|
-
path="/"
|
|
86
|
-
/>
|
|
87
|
-
<Route
|
|
88
|
-
element={
|
|
89
|
-
<ListLayout mobile={mobile}>
|
|
90
|
-
<AssistantLayout mobile={mobile}>
|
|
91
|
-
<AssistantPage mobile={mobile} />
|
|
92
|
-
</AssistantLayout>
|
|
93
|
-
</ListLayout>
|
|
94
|
-
}
|
|
95
|
-
path="/assistant"
|
|
96
|
-
/>
|
|
97
|
-
<Route
|
|
98
|
-
element={
|
|
99
|
-
<ListLayout mobile={mobile}>
|
|
100
|
-
<ModelLayout mobile={mobile}>
|
|
101
|
-
<ModelPage mobile={mobile} />
|
|
102
|
-
</ModelLayout>
|
|
103
|
-
</ListLayout>
|
|
104
|
-
}
|
|
105
|
-
path="/model"
|
|
106
|
-
/>
|
|
107
|
-
<Route
|
|
108
|
-
element={
|
|
109
|
-
<ListLayout mobile={mobile}>
|
|
110
|
-
<ProviderPage mobile={mobile} />
|
|
111
|
-
</ListLayout>
|
|
112
|
-
}
|
|
113
|
-
path="/provider"
|
|
114
|
-
/>
|
|
115
|
-
<Route
|
|
116
|
-
element={
|
|
117
|
-
<ListLayout mobile={mobile}>
|
|
118
|
-
<McpLayout mobile={mobile}>
|
|
119
|
-
<McpPage mobile={mobile} />
|
|
120
|
-
</McpLayout>
|
|
121
|
-
</ListLayout>
|
|
122
|
-
}
|
|
123
|
-
path="/mcp"
|
|
124
|
-
/>
|
|
125
|
-
|
|
126
|
-
{/* Detail routes with DetailLayout */}
|
|
127
|
-
<Route
|
|
128
|
-
element={
|
|
129
|
-
<DetailLayout mobile={mobile}>
|
|
130
|
-
<AssistantDetailPage mobile={mobile} />
|
|
131
|
-
</DetailLayout>
|
|
132
|
-
}
|
|
133
|
-
path="/assistant/*"
|
|
134
|
-
/>
|
|
135
|
-
<Route
|
|
136
|
-
element={
|
|
137
|
-
<DetailLayout mobile={mobile}>
|
|
138
|
-
<ModelDetailPage mobile={mobile} />
|
|
139
|
-
</DetailLayout>
|
|
140
|
-
}
|
|
141
|
-
path="/model/*"
|
|
142
|
-
/>
|
|
143
|
-
<Route
|
|
144
|
-
element={
|
|
145
|
-
<DetailLayout mobile={mobile}>
|
|
146
|
-
<ProviderDetailPage mobile={mobile} />
|
|
147
|
-
</DetailLayout>
|
|
148
|
-
}
|
|
149
|
-
path="/provider/*"
|
|
150
|
-
/>
|
|
151
|
-
<Route
|
|
152
|
-
element={
|
|
153
|
-
<DetailLayout mobile={mobile}>
|
|
154
|
-
<McpDetailPage mobile={mobile} />
|
|
155
|
-
</DetailLayout>
|
|
156
|
-
}
|
|
157
|
-
path="/mcp/*"
|
|
158
|
-
/>
|
|
159
|
-
|
|
160
|
-
{/* Fallback */}
|
|
161
|
-
<Route element={<Navigate replace to="/" />} path="*" />
|
|
162
|
-
</Routes>
|
|
163
|
-
</DiscoverLayout>
|
|
164
|
-
</MemoryRouter>
|
|
165
|
-
);
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
DiscoverRouter.displayName = 'DiscoverRouter';
|
|
169
|
-
|
|
170
|
-
export default DiscoverRouter;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import dynamic from 'next/dynamic';
|
|
4
|
-
|
|
5
|
-
import { BrandTextLoading } from '@/components/Loading';
|
|
6
|
-
|
|
7
|
-
const DiscoverRouter = dynamic(() => import('../DiscoverRouter'), {
|
|
8
|
-
loading: BrandTextLoading,
|
|
9
|
-
ssr: false,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export default DiscoverRouter;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { PropsWithChildren, memo } from 'react';
|
|
4
|
-
|
|
5
|
-
import Desktop from './Desktop';
|
|
6
|
-
import Mobile from './Mobile';
|
|
7
|
-
|
|
8
|
-
interface DiscoverLayoutProps extends PropsWithChildren {
|
|
9
|
-
mobile?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const DiscoverLayout = memo<DiscoverLayoutProps>(({ children, mobile }) => {
|
|
13
|
-
if (mobile) {
|
|
14
|
-
return <Mobile>{children}</Mobile>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return <Desktop>{children}</Desktop>;
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
DiscoverLayout.displayName = 'DiscoverLayout';
|
|
21
|
-
|
|
22
|
-
export default DiscoverLayout;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@/components/404';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import ServerLayout from '@/components/server/ServerLayout';
|
|
2
|
-
|
|
3
|
-
import Desktop from './_layout/Desktop';
|
|
4
|
-
import Mobile from './_layout/Mobile';
|
|
5
|
-
import { LayoutProps } from './_layout/type';
|
|
6
|
-
|
|
7
|
-
const AiImageLayout = ServerLayout({ Desktop, Mobile });
|
|
8
|
-
|
|
9
|
-
AiImageLayout.displayName = 'AiImageLayout';
|
|
10
|
-
|
|
11
|
-
const Layout = (props: LayoutProps) => {
|
|
12
|
-
return <AiImageLayout {...props} />;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default Layout;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Suspense } from 'react';
|
|
2
|
-
|
|
3
|
-
import StructuredData from '@/components/StructuredData';
|
|
4
|
-
import { BRANDING_NAME } from '@/const/branding';
|
|
5
|
-
import { ldModule } from '@/server/ld';
|
|
6
|
-
import { metadataModule } from '@/server/metadata';
|
|
7
|
-
import { translation } from '@/server/translation';
|
|
8
|
-
import { DynamicLayoutProps } from '@/types/next';
|
|
9
|
-
import { RouteVariants } from '@/utils/server/routeVariants';
|
|
10
|
-
|
|
11
|
-
import ImageWorkspace from './features/ImageWorkspace';
|
|
12
|
-
import SkeletonList from './features/ImageWorkspace/SkeletonList';
|
|
13
|
-
|
|
14
|
-
export const generateMetadata = async (props: DynamicLayoutProps) => {
|
|
15
|
-
const locale = await RouteVariants.getLocale(props);
|
|
16
|
-
const { t } = await translation('metadata', locale);
|
|
17
|
-
return metadataModule.generate({
|
|
18
|
-
description: t('image.description', { appName: BRANDING_NAME }),
|
|
19
|
-
title: t('image.title'),
|
|
20
|
-
url: '/image',
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const AiImage = async (props: DynamicLayoutProps) => {
|
|
25
|
-
const { locale } = await RouteVariants.getVariantsFromProps(props);
|
|
26
|
-
const { t } = await translation('metadata', locale);
|
|
27
|
-
const ld = ldModule.generate({
|
|
28
|
-
description: t('image.description', { appName: BRANDING_NAME }),
|
|
29
|
-
title: t('image.title'),
|
|
30
|
-
url: '/image',
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<>
|
|
35
|
-
<StructuredData ld={ld} />
|
|
36
|
-
<Suspense fallback={<SkeletonList />}>
|
|
37
|
-
<ImageWorkspace />
|
|
38
|
-
</Suspense>
|
|
39
|
-
</>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
AiImage.displayName = 'AiImage';
|
|
44
|
-
|
|
45
|
-
export default AiImage;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { App } from 'antd';
|
|
4
|
-
import { memo, useEffect } from 'react';
|
|
5
|
-
import { MemoryRouter, Navigate, Route, Routes, useLocation } from 'react-router-dom';
|
|
6
|
-
|
|
7
|
-
import KnowledgeBaseDetailPage from './routes/KnowledgeBaseDetail';
|
|
8
|
-
import KnowledgeBasesListPage from './routes/KnowledgeBasesList';
|
|
9
|
-
import KnowledgeHomePage from './routes/KnowledgeHome';
|
|
10
|
-
|
|
11
|
-
// Get initial path from URL
|
|
12
|
-
const getInitialPath = () => {
|
|
13
|
-
if (typeof window === 'undefined') return '/';
|
|
14
|
-
const fullPath = window.location.pathname;
|
|
15
|
-
const searchParams = window.location.search;
|
|
16
|
-
const knowledgeIndex = fullPath.indexOf('/knowledge');
|
|
17
|
-
|
|
18
|
-
if (knowledgeIndex !== -1) {
|
|
19
|
-
const pathAfterKnowledge = fullPath.slice(knowledgeIndex + '/knowledge'.length) || '/';
|
|
20
|
-
return pathAfterKnowledge + searchParams;
|
|
21
|
-
}
|
|
22
|
-
return '/';
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// Helper component to sync URL with MemoryRouter
|
|
26
|
-
const UrlSynchronizer = () => {
|
|
27
|
-
const location = useLocation();
|
|
28
|
-
|
|
29
|
-
// Update browser URL when location changes
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
const newUrl = `/knowledge${location.pathname}${location.search}`;
|
|
32
|
-
if (window.location.pathname + window.location.search !== newUrl) {
|
|
33
|
-
window.history.replaceState({}, '', newUrl);
|
|
34
|
-
}
|
|
35
|
-
}, [location.pathname, location.search]);
|
|
36
|
-
|
|
37
|
-
return null;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Main Knowledge Router component with MemoryRouter
|
|
42
|
-
* This serves as the entry point for all knowledge-related routes
|
|
43
|
-
* Uses MemoryRouter with URL synchronization to support query parameters like ?file=[id]
|
|
44
|
-
*
|
|
45
|
-
* Route structure:
|
|
46
|
-
* - / → Knowledge home (file list with categories)
|
|
47
|
-
* - /bases → Knowledge bases list
|
|
48
|
-
* - /bases/:id → Knowledge base detail (file list for specific base)
|
|
49
|
-
*/
|
|
50
|
-
const KnowledgeRouter = memo(() => {
|
|
51
|
-
return (
|
|
52
|
-
<App style={{ display: 'flex', flex: 1, height: '100%' }}>
|
|
53
|
-
<MemoryRouter initialEntries={[getInitialPath()]} initialIndex={0}>
|
|
54
|
-
<UrlSynchronizer />
|
|
55
|
-
<Routes>
|
|
56
|
-
{/* Knowledge home */}
|
|
57
|
-
<Route element={<KnowledgeHomePage />} path="/" />
|
|
58
|
-
<Route element={<KnowledgeHomePage />} path="/:id" />
|
|
59
|
-
|
|
60
|
-
{/* Knowledge bases routes */}
|
|
61
|
-
<Route element={<KnowledgeBasesListPage />} path="/bases" />
|
|
62
|
-
<Route element={<KnowledgeBaseDetailPage />} path="/bases/:id" />
|
|
63
|
-
|
|
64
|
-
{/* Fallback */}
|
|
65
|
-
<Route element={<Navigate replace to="/" />} path="*" />
|
|
66
|
-
</Routes>
|
|
67
|
-
</MemoryRouter>
|
|
68
|
-
</App>
|
|
69
|
-
);
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
KnowledgeRouter.displayName = 'KnowledgeRouter';
|
|
73
|
-
|
|
74
|
-
export default KnowledgeRouter;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import dynamic from 'next/dynamic';
|
|
4
|
-
|
|
5
|
-
import { BrandTextLoading } from '@/components/Loading';
|
|
6
|
-
|
|
7
|
-
const KnowledgeRouter = dynamic(() => import('../KnowledgeRouter'), {
|
|
8
|
-
loading: BrandTextLoading,
|
|
9
|
-
ssr: false,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export default KnowledgeRouter;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PagePropsWithId } from '@/types/next';
|
|
2
|
-
|
|
3
|
-
import ModalPageClient from './ModalPageClient';
|
|
4
|
-
|
|
5
|
-
const Page = async (props: PagePropsWithId) => {
|
|
6
|
-
const params = await props.params;
|
|
7
|
-
|
|
8
|
-
return <ModalPageClient id={params.id} />;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default Page;
|
|
12
|
-
|
|
13
|
-
export const dynamic = 'force-static';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { notFound } from 'next/navigation';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
3
|
-
|
|
4
|
-
import { serverFeatureFlags } from '@/config/featureFlags';
|
|
5
|
-
|
|
6
|
-
export default ({ children }: PropsWithChildren) => {
|
|
7
|
-
const enableKnowledgeBase = serverFeatureFlags().enableKnowledgeBase;
|
|
8
|
-
|
|
9
|
-
if (!enableKnowledgeBase) return notFound();
|
|
10
|
-
|
|
11
|
-
return children;
|
|
12
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import ServerLayout from '@/components/server/ServerLayout';
|
|
2
|
-
|
|
3
|
-
import Desktop from './_layout/Desktop';
|
|
4
|
-
import Mobile from './_layout/Mobile';
|
|
5
|
-
|
|
6
|
-
const MainLayout = ServerLayout({ Desktop, Mobile });
|
|
7
|
-
|
|
8
|
-
MainLayout.displayName = 'MainLayout';
|
|
9
|
-
|
|
10
|
-
export default MainLayout;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@/components/404';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { notFound } from 'next/navigation';
|
|
2
|
-
|
|
3
|
-
import { serverFeatureFlags } from '@/config/featureFlags';
|
|
4
|
-
import { metadataModule } from '@/server/metadata';
|
|
5
|
-
import { translation } from '@/server/translation';
|
|
6
|
-
import { DynamicLayoutProps } from '@/types/next';
|
|
7
|
-
import { RouteVariants } from '@/utils/server/routeVariants';
|
|
8
|
-
|
|
9
|
-
import Page from '../../settings/system-agent';
|
|
10
|
-
import Client from './Client';
|
|
11
|
-
|
|
12
|
-
export const generateMetadata = async (props: DynamicLayoutProps) => {
|
|
13
|
-
const locale = await RouteVariants.getLocale(props);
|
|
14
|
-
const { t } = await translation('auth', locale);
|
|
15
|
-
return metadataModule.generate({
|
|
16
|
-
description: t('header.desc'),
|
|
17
|
-
title: t('tab.apikey'),
|
|
18
|
-
url: '/profile/apikey',
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const page = () => {
|
|
23
|
-
const { showApiKeyManage } = serverFeatureFlags();
|
|
24
|
-
|
|
25
|
-
if (!showApiKeyManage) return notFound();
|
|
26
|
-
|
|
27
|
-
return <Client />;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
Page.displayName = 'ApiKey';
|
|
31
|
-
|
|
32
|
-
export default page;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import ServerLayout from '@/components/server/ServerLayout';
|
|
2
|
-
|
|
3
|
-
import Desktop from './_layout/Desktop';
|
|
4
|
-
import Mobile from './_layout/Mobile';
|
|
5
|
-
import { LayoutProps } from './_layout/type';
|
|
6
|
-
|
|
7
|
-
const ProfileLayout = ServerLayout<LayoutProps>({ Desktop, Mobile });
|
|
8
|
-
|
|
9
|
-
ProfileLayout.displayName = 'ProfileLayout';
|
|
10
|
-
|
|
11
|
-
export default ProfileLayout;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@/components/404';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { notFound } from 'next/navigation';
|
|
2
|
-
|
|
3
|
-
import { enableClerk } from '@/const/auth';
|
|
4
|
-
import { metadataModule } from '@/server/metadata';
|
|
5
|
-
import { translation } from '@/server/translation';
|
|
6
|
-
import { DynamicLayoutProps } from '@/types/next';
|
|
7
|
-
import { RouteVariants } from '@/utils/server/routeVariants';
|
|
8
|
-
|
|
9
|
-
import ClerkProfile from '../features/ClerkProfile';
|
|
10
|
-
|
|
11
|
-
export const generateMetadata = async (props: DynamicLayoutProps) => {
|
|
12
|
-
const locale = await RouteVariants.getLocale(props);
|
|
13
|
-
const { t } = await translation('auth', locale);
|
|
14
|
-
return metadataModule.generate({
|
|
15
|
-
description: t('header.desc'),
|
|
16
|
-
title: t('tab.security'),
|
|
17
|
-
url: '/profile/security',
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const Page = async (props: DynamicLayoutProps) => {
|
|
22
|
-
if (!enableClerk) return notFound();
|
|
23
|
-
const mobile = await RouteVariants.getIsMobile(props);
|
|
24
|
-
|
|
25
|
-
return <ClerkProfile mobile={mobile} />;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export default Page;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { metadataModule } from '@/server/metadata';
|
|
2
|
-
import { translation } from '@/server/translation';
|
|
3
|
-
import { DynamicLayoutProps } from '@/types/next';
|
|
4
|
-
import { RouteVariants } from '@/utils/server/routeVariants';
|
|
5
|
-
|
|
6
|
-
import Client from './Client';
|
|
7
|
-
|
|
8
|
-
export const generateMetadata = async (props: DynamicLayoutProps) => {
|
|
9
|
-
const locale = await RouteVariants.getLocale(props);
|
|
10
|
-
const { t } = await translation('auth', locale);
|
|
11
|
-
return metadataModule.generate({
|
|
12
|
-
description: t('header.desc'),
|
|
13
|
-
title: t('tab.stats'),
|
|
14
|
-
url: '/profile/stats',
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const Page = async (props: DynamicLayoutProps) => {
|
|
19
|
-
const mobile = await RouteVariants.getIsMobile(props);
|
|
20
|
-
return <Client mobile={mobile} />;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default Page;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { metadataModule } from '@/server/metadata';
|
|
2
|
-
import { translation } from '@/server/translation';
|
|
3
|
-
import { DynamicLayoutProps } from '@/types/next';
|
|
4
|
-
import { RouteVariants } from '@/utils/server/routeVariants';
|
|
5
|
-
|
|
6
|
-
import Client from './Client';
|
|
7
|
-
|
|
8
|
-
export const generateMetadata = async (props: DynamicLayoutProps) => {
|
|
9
|
-
const locale = await RouteVariants.getLocale(props);
|
|
10
|
-
const { t } = await translation('auth', locale);
|
|
11
|
-
return metadataModule.generate({
|
|
12
|
-
description: t('header.desc'),
|
|
13
|
-
title: t('tab.usage'),
|
|
14
|
-
url: '/profile/usage',
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const Page = async (props: DynamicLayoutProps) => {
|
|
19
|
-
const mobile = await RouteVariants.getIsMobile(props);
|
|
20
|
-
return <Client mobile={mobile} />;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default Page;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { createStyles } from 'antd-style';
|
|
4
|
-
import { PropsWithChildren, memo } from 'react';
|
|
5
|
-
import { Flexbox } from 'react-layout-kit';
|
|
6
|
-
|
|
7
|
-
const useStyles = createStyles(
|
|
8
|
-
({ css, token }) => css`
|
|
9
|
-
position: relative;
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
background: ${token.colorFillSecondary};
|
|
12
|
-
|
|
13
|
-
&::before {
|
|
14
|
-
content: '';
|
|
15
|
-
|
|
16
|
-
position: absolute;
|
|
17
|
-
z-index: 1;
|
|
18
|
-
inset-block-start: 0;
|
|
19
|
-
inset-inline-start: 0;
|
|
20
|
-
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 1px;
|
|
23
|
-
|
|
24
|
-
background: ${token.colorFillTertiary};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&::after {
|
|
28
|
-
content: '';
|
|
29
|
-
|
|
30
|
-
position: absolute;
|
|
31
|
-
z-index: 1;
|
|
32
|
-
inset-block-end: 0;
|
|
33
|
-
inset-inline-start: 0;
|
|
34
|
-
|
|
35
|
-
width: 100%;
|
|
36
|
-
height: 1px;
|
|
37
|
-
|
|
38
|
-
background: ${token.colorFillTertiary};
|
|
39
|
-
}
|
|
40
|
-
`,
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
const Cover = memo<PropsWithChildren>(({ children }) => {
|
|
44
|
-
const { styles } = useStyles();
|
|
45
|
-
return <Flexbox className={styles}>{children}</Flexbox>;
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export default Cover;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { FluentEmoji } from '@lobehub/ui';
|
|
4
|
-
import { createStyles } from 'antd-style';
|
|
5
|
-
import { memo } from 'react';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { Flexbox } from 'react-layout-kit';
|
|
8
|
-
|
|
9
|
-
const useStyles = createStyles(
|
|
10
|
-
({ css, token }) => css`
|
|
11
|
-
background: linear-gradient(to bottom, ${token.colorFillTertiary}, transparent);
|
|
12
|
-
`,
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
const Hero = memo(() => {
|
|
16
|
-
const { theme, styles } = useStyles();
|
|
17
|
-
const { t } = useTranslation('changelog');
|
|
18
|
-
return (
|
|
19
|
-
<Flexbox className={styles} gap={8} padding={24}>
|
|
20
|
-
<Flexbox align={'center'} gap={12} horizontal>
|
|
21
|
-
<h1 style={{ fontSize: 24, fontWeight: 'bold', margin: 0 }}>{t('welcomeBack')}</h1>
|
|
22
|
-
<FluentEmoji emoji={'🤯'} size={28} type={'anim'} />
|
|
23
|
-
</Flexbox>
|
|
24
|
-
<div style={{ color: theme.colorTextSecondary, fontSize: 16 }}>{t('addedWhileAway')}</div>
|
|
25
|
-
</Flexbox>
|
|
26
|
-
);
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export default Hero;
|