@lobehub/lobehub 2.0.0-next.71 → 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 +50 -0
- package/changelog/v1.json +18 -0
- package/next.config.ts +5 -5
- package/package.json +1 -1
- package/packages/model-bank/src/aiModels/qiniu.ts +126 -0
- 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
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { CheckCircleOutlined } from '@ant-design/icons';
|
|
4
4
|
import { Button, Modal, Space } from 'antd';
|
|
5
|
-
import { useRouter } from 'next/navigation';
|
|
6
5
|
import { memo } from 'react';
|
|
7
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import { useNavigate } from 'react-router-dom';
|
|
8
8
|
|
|
9
9
|
interface PublishResultModalProps {
|
|
10
10
|
identifier?: string;
|
|
@@ -13,13 +13,13 @@ interface PublishResultModalProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
const PublishResultModal = memo<PublishResultModalProps>(({ identifier, onCancel, open }) => {
|
|
16
|
-
const
|
|
16
|
+
const navigate = useNavigate();
|
|
17
17
|
const { t } = useTranslation('setting');
|
|
18
18
|
const { t: tCommon } = useTranslation('common');
|
|
19
19
|
|
|
20
20
|
const handleGoToMarket = () => {
|
|
21
21
|
if (identifier) {
|
|
22
|
-
|
|
22
|
+
navigate(`/discover/assistant/${identifier}`);
|
|
23
23
|
}
|
|
24
24
|
onCancel();
|
|
25
25
|
};
|
|
@@ -8,12 +8,9 @@ import { useTranslation } from 'react-i18next';
|
|
|
8
8
|
|
|
9
9
|
import MobileContentLayout from '@/components/server/MobileNavLayout';
|
|
10
10
|
import PageTitle from '@/components/PageTitle';
|
|
11
|
-
import SafeSpacing from '@/components/SafeSpacing';
|
|
12
|
-
import { HEADER_HEIGHT } from '@/const/layoutTokens';
|
|
13
11
|
import { useCategory } from '@/features/AgentSetting/AgentCategory/useCategory';
|
|
14
12
|
import AgentSettings from '@/features/AgentSetting/AgentSettings';
|
|
15
13
|
import Footer from '@/features/Setting/Footer';
|
|
16
|
-
import SettingContainer from '@/features/Setting/SettingContainer';
|
|
17
14
|
import { useInitAgentConfig } from '@/hooks/useInitAgentConfig';
|
|
18
15
|
import { useAgentStore } from '@/store/agent';
|
|
19
16
|
import { agentSelectors } from '@/store/agent/selectors';
|
|
@@ -21,14 +18,9 @@ import { ChatSettingsTabs } from '@/store/global/initialState';
|
|
|
21
18
|
import { useSessionStore } from '@/store/session';
|
|
22
19
|
import { sessionMetaSelectors } from '@/store/session/selectors';
|
|
23
20
|
|
|
24
|
-
import
|
|
25
|
-
import MobileHeader from '../settings/_layout/Mobile/Header';
|
|
21
|
+
import MobileHeader from './_layout/Mobile/Header';
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
mobile?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const SettingsPage = memo<SettingsPageProps>(({ mobile = false }) => {
|
|
23
|
+
export default memo(() => {
|
|
32
24
|
const { t } = useTranslation('setting');
|
|
33
25
|
const [tab, setTab] = useState(ChatSettingsTabs.Prompt);
|
|
34
26
|
const theme = useTheme();
|
|
@@ -46,8 +38,8 @@ const SettingsPage = memo<SettingsPageProps>(({ mobile = false }) => {
|
|
|
46
38
|
|
|
47
39
|
const { isLoading } = useInitAgentConfig();
|
|
48
40
|
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
return (
|
|
42
|
+
<MobileContentLayout header={<MobileHeader />}>
|
|
51
43
|
<PageTitle title={t('header.sessionWithName', { name: title })} />
|
|
52
44
|
<Tabs
|
|
53
45
|
activeKey={tab}
|
|
@@ -67,28 +59,7 @@ const SettingsPage = memo<SettingsPageProps>(({ mobile = false }) => {
|
|
|
67
59
|
onMetaChange={updateAgentMeta}
|
|
68
60
|
tab={tab}
|
|
69
61
|
/>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (mobile) {
|
|
74
|
-
return (
|
|
75
|
-
<MobileContentLayout header={<MobileHeader />}>
|
|
76
|
-
{content}
|
|
77
|
-
<Footer />
|
|
78
|
-
</MobileContentLayout>
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
<>
|
|
84
|
-
<DesktopHeader />
|
|
85
|
-
<SettingContainer addonAfter={<Footer />} addonBefore={<SafeSpacing height={HEADER_HEIGHT} />}>
|
|
86
|
-
{content}
|
|
87
|
-
</SettingContainer>
|
|
88
|
-
</>
|
|
62
|
+
<Footer />
|
|
63
|
+
</MobileContentLayout>
|
|
89
64
|
);
|
|
90
65
|
});
|
|
91
|
-
|
|
92
|
-
SettingsPage.displayName = 'SettingsPage';
|
|
93
|
-
|
|
94
|
-
export default SettingsPage;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import { Link as ReactRouterLink, LinkProps as ReactRouterLinkProps } from 'react-router-dom';
|
|
3
|
+
|
|
4
|
+
interface LinkProps extends Omit<ReactRouterLinkProps, 'to'> {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
href?: string;
|
|
7
|
+
to?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Link component for React Router
|
|
12
|
+
* Provides a Next.js-like API (href prop) while using React Router internally
|
|
13
|
+
*/
|
|
14
|
+
const Link = memo<LinkProps>(({ href, to, ...props }) => {
|
|
15
|
+
const linkTo = href || to || '/';
|
|
16
|
+
return <ReactRouterLink {...props} to={linkTo} />;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
Link.displayName = 'Link';
|
|
20
|
+
|
|
21
|
+
export default Link;
|
package/src/app/[variants]/(main)/discover/(detail)/_layout/{Desktop.tsx → Desktop/index.tsx}
RENAMED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { memo } from 'react';
|
|
4
|
+
import { Outlet } from 'react-router-dom';
|
|
2
5
|
import { Flexbox } from 'react-layout-kit';
|
|
3
6
|
|
|
4
|
-
import { SCROLL_PARENT_ID } from '
|
|
7
|
+
import { SCROLL_PARENT_ID } from '../../../features/const';
|
|
5
8
|
import Footer from '@/features/Setting/Footer';
|
|
6
9
|
|
|
7
10
|
const MAX_WIDTH = 1440;
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Desktop Discover Detail Layout
|
|
14
|
+
* Layout for detail pages (assistant, model, provider, mcp details)
|
|
15
|
+
*/
|
|
16
|
+
const DesktopDiscoverDetailLayout = memo(() => {
|
|
10
17
|
return (
|
|
11
18
|
<Flexbox
|
|
12
19
|
align={'center'}
|
|
@@ -17,14 +24,15 @@ const Layout = ({ children }: PropsWithChildren) => {
|
|
|
17
24
|
width={'100%'}
|
|
18
25
|
>
|
|
19
26
|
<Flexbox gap={24} style={{ maxWidth: MAX_WIDTH, minHeight: '100%' }} width={'100%'}>
|
|
20
|
-
|
|
27
|
+
<Outlet />
|
|
21
28
|
<div />
|
|
22
29
|
<Footer />
|
|
23
30
|
</Flexbox>
|
|
24
31
|
</Flexbox>
|
|
25
32
|
);
|
|
26
|
-
};
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
DesktopDiscoverDetailLayout.displayName = 'DesktopDiscoverDetailLayout';
|
|
27
36
|
|
|
28
|
-
Layout.displayName = 'DesktopDiscoverDetailLayout';
|
|
29
37
|
|
|
30
|
-
export default
|
|
38
|
+
export default DesktopDiscoverDetailLayout;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
1
|
|
|
3
2
|
import { SCROLL_PARENT_ID } from '@/app/[variants]/(main)/discover/features/const';
|
|
4
3
|
import MobileContentLayout from '@/components/server/MobileNavLayout';
|
|
5
4
|
import Footer from '@/features/Setting/Footer';
|
|
6
5
|
|
|
7
6
|
import Header from './Header';
|
|
7
|
+
import { Outlet } from 'react-router-dom';
|
|
8
8
|
|
|
9
|
-
const Layout = (
|
|
9
|
+
const Layout = () => {
|
|
10
10
|
return (
|
|
11
11
|
<MobileContentLayout gap={16} header={<Header />} id={SCROLL_PARENT_ID} padding={16}>
|
|
12
|
-
|
|
12
|
+
<Outlet />
|
|
13
13
|
<div />
|
|
14
14
|
<Footer />
|
|
15
15
|
</MobileContentLayout>
|
|
@@ -2,7 +2,7 @@ import { Tag } from '@lobehub/ui';
|
|
|
2
2
|
import { ReactNode, memo } from 'react';
|
|
3
3
|
import { Flexbox } from 'react-layout-kit';
|
|
4
4
|
|
|
5
|
-
import Title from '
|
|
5
|
+
import Title from '../../../../../features/Title';
|
|
6
6
|
|
|
7
7
|
interface BlockProps {
|
|
8
8
|
children?: ReactNode;
|
|
@@ -10,7 +10,7 @@ import { DEFAULT_USER_AVATAR_URL } from '@/const/meta';
|
|
|
10
10
|
import { useUserStore } from '@/store/user';
|
|
11
11
|
import { authSelectors, userProfileSelectors } from '@/store/user/selectors';
|
|
12
12
|
|
|
13
|
-
import Title from '
|
|
13
|
+
import Title from '../../../../../features/Title';
|
|
14
14
|
import { useDetailContext } from '../../DetailProvider';
|
|
15
15
|
|
|
16
16
|
const Overview = memo(() => {
|
|
@@ -6,8 +6,8 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
6
6
|
import { useQuery } from '@/hooks/useQuery';
|
|
7
7
|
import { AssistantMarketSource } from '@/types/discover';
|
|
8
8
|
|
|
9
|
-
import McpList from '
|
|
10
|
-
import Title from '
|
|
9
|
+
import McpList from '../../../../../(list)/assistant/features/List';
|
|
10
|
+
import Title from '../../../../../features/Title';
|
|
11
11
|
import { useDetailContext } from '../../DetailProvider';
|
|
12
12
|
|
|
13
13
|
const Related = memo(() => {
|
|
@@ -5,9 +5,9 @@ import { memo } from 'react';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
7
|
|
|
8
|
-
import TokenTag from '
|
|
9
|
-
import Title from '
|
|
10
|
-
import MarkdownRender from '
|
|
8
|
+
import TokenTag from '../../../../../(list)/assistant/features/List/TokenTag';
|
|
9
|
+
import Title from '../../../../../features/Title';
|
|
10
|
+
import MarkdownRender from '../../../../features/MakedownRender';
|
|
11
11
|
import { useDetailContext } from '../../DetailProvider';
|
|
12
12
|
import TagList from './TagList';
|
|
13
13
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Block, Icon, Tag } from '@lobehub/ui';
|
|
2
2
|
import { useTheme } from 'antd-style';
|
|
3
3
|
import { CheckIcon, MinusIcon } from 'lucide-react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
|
-
import { usePathname } from 'next/navigation';
|
|
6
4
|
import qs from 'query-string';
|
|
7
5
|
import { memo, useMemo } from 'react';
|
|
8
6
|
import { useTranslation } from 'react-i18next';
|
|
9
7
|
import { Flexbox } from 'react-layout-kit';
|
|
10
8
|
|
|
9
|
+
import Link from '@/app/[variants]/(main)/components/Link';
|
|
10
|
+
import { usePathname } from '@/app/[variants]/(main)/hooks/usePathname';
|
|
11
|
+
import { useQuery } from '@/app/[variants]/(main)/hooks/useQuery';
|
|
11
12
|
import InlineTable from '@/components/InlineTable';
|
|
12
13
|
import PublishedTime from '@/components/PublishedTime';
|
|
13
|
-
import { useQuery } from '@/hooks/useQuery';
|
|
14
14
|
import { AssistantMarketSource, AssistantNavKey } from '@/types/discover';
|
|
15
15
|
|
|
16
|
-
import Title from '
|
|
16
|
+
import Title from '../../../../../features/Title';
|
|
17
17
|
import { useDetailContext } from '../../DetailProvider';
|
|
18
18
|
|
|
19
19
|
const Versions = memo(() => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useResponsive } from 'antd-style';
|
|
4
|
-
import { useQueryState } from 'nuqs';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
import { Flexbox } from 'react-layout-kit';
|
|
7
6
|
|
|
7
|
+
import { useQueryState } from '@/hooks/useQueryParam';
|
|
8
8
|
import { AssistantNavKey } from '@/types/discover';
|
|
9
9
|
|
|
10
10
|
import Sidebar from '../Sidebar';
|
|
@@ -13,8 +13,8 @@ import urlJoin from 'url-join';
|
|
|
13
13
|
|
|
14
14
|
import { formatIntergerNumber } from '@/utils/format';
|
|
15
15
|
|
|
16
|
-
import { useCategory } from '
|
|
17
|
-
import PublishedTime from '
|
|
16
|
+
import { useCategory } from '../../../(list)/assistant/features/Category/useCategory';
|
|
17
|
+
import PublishedTime from '../../../../../../../components/PublishedTime';
|
|
18
18
|
import { useDetailContext } from './DetailProvider';
|
|
19
19
|
|
|
20
20
|
const useStyles = createStyles(({ css, token }) => {
|
|
@@ -4,9 +4,9 @@ import { Icon } from '@lobehub/ui';
|
|
|
4
4
|
import { App, Dropdown } from 'antd';
|
|
5
5
|
import { createStyles } from 'antd-style';
|
|
6
6
|
import { ChevronDownIcon } from 'lucide-react';
|
|
7
|
-
import { useRouter } from 'nextjs-toploader/app';
|
|
8
7
|
import { memo, useState } from 'react';
|
|
9
8
|
import { useTranslation } from 'react-i18next';
|
|
9
|
+
import { useNavigate } from 'react-router-dom';
|
|
10
10
|
|
|
11
11
|
import { SESSION_CHAT_URL } from '@/const/url';
|
|
12
12
|
import { useSessionStore } from '@/store/session';
|
|
@@ -70,7 +70,7 @@ const AddAgent = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
|
70
70
|
const createSession = useSessionStore((s) => s.createSession);
|
|
71
71
|
const sessions = useSessionStore((s) => s.sessions);
|
|
72
72
|
const { message, modal } = App.useApp();
|
|
73
|
-
const
|
|
73
|
+
const navigate = useNavigate();
|
|
74
74
|
const { t } = useTranslation('discover');
|
|
75
75
|
|
|
76
76
|
const meta = {
|
|
@@ -114,7 +114,7 @@ const AddAgent = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
|
114
114
|
try {
|
|
115
115
|
const session = await createSessionWithMarketIdentifier(true);
|
|
116
116
|
message.success(t('assistants.addAgentSuccess'));
|
|
117
|
-
|
|
117
|
+
navigate(SESSION_CHAT_URL(session, mobile));
|
|
118
118
|
} finally {
|
|
119
119
|
setIsLoading(false);
|
|
120
120
|
}
|
|
@@ -6,7 +6,7 @@ import urlJoin from 'url-join';
|
|
|
6
6
|
|
|
7
7
|
import { OFFICIAL_URL } from '@/const/url';
|
|
8
8
|
|
|
9
|
-
import ShareButton from '
|
|
9
|
+
import ShareButton from '../../../../features/ShareButton';
|
|
10
10
|
import { useDetailContext } from '../../DetailProvider';
|
|
11
11
|
import AddAgent from './AddAgent';
|
|
12
12
|
|
|
@@ -5,7 +5,7 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
5
5
|
import { Link } from 'react-router-dom';
|
|
6
6
|
import urlJoin from 'url-join';
|
|
7
7
|
|
|
8
|
-
import Title from '
|
|
8
|
+
import Title from '../../../../../features/Title';
|
|
9
9
|
import { useQuery } from '@/hooks/useQuery';
|
|
10
10
|
import { AssistantMarketSource } from '@/types/discover';
|
|
11
11
|
import { useDetailContext } from '../../DetailProvider';
|
|
@@ -9,8 +9,8 @@ import { useToc } from '@/app/[variants]/(main)/discover/(detail)/features/Toc/u
|
|
|
9
9
|
import { useQuery } from '@/hooks/useQuery';
|
|
10
10
|
import { AssistantNavKey } from '@/types/discover';
|
|
11
11
|
|
|
12
|
-
import Title from '
|
|
13
|
-
import Toc from '
|
|
12
|
+
import Title from '../../../../../features/Title';
|
|
13
|
+
import Toc from '../../../../features/Toc';
|
|
14
14
|
|
|
15
15
|
const TocList = memo(() => {
|
|
16
16
|
const { t } = useTranslation('discover');
|
|
@@ -6,20 +6,20 @@ import {
|
|
|
6
6
|
FolderOpenOutlined,
|
|
7
7
|
} from '@ant-design/icons';
|
|
8
8
|
import { Button, Result } from 'antd';
|
|
9
|
-
import { useRouter } from 'next/navigation';
|
|
10
9
|
import { memo } from 'react';
|
|
11
10
|
import { Trans, useTranslation } from 'react-i18next';
|
|
11
|
+
import { useNavigate } from 'react-router-dom';
|
|
12
12
|
|
|
13
13
|
interface StatusPageProps {
|
|
14
14
|
status: 'unpublished' | 'archived' | 'deprecated';
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const StatusPage = memo<StatusPageProps>(({ status }) => {
|
|
18
|
-
const
|
|
18
|
+
const navigate = useNavigate();
|
|
19
19
|
const { t } = useTranslation('discover');
|
|
20
20
|
|
|
21
21
|
const handleBackToMarket = () => {
|
|
22
|
-
|
|
22
|
+
navigate('/discover/assistant');
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
// 审核中状态
|
package/src/app/[variants]/(main)/discover/(detail)/assistant/{AssistantDetailPage.tsx → index.tsx}
RENAMED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
import { Flexbox } from 'react-layout-kit';
|
|
5
|
-
import {
|
|
5
|
+
import { useLoaderData } from 'react-router-dom';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import type { SlugParams } from '@/app/[variants]/loaders/routeParams';
|
|
8
8
|
import { useQuery } from '@/hooks/useQuery';
|
|
9
9
|
import { useDiscoverStore } from '@/store/discover';
|
|
10
10
|
import { AssistantMarketSource, DiscoverTab } from '@/types/discover';
|
|
@@ -12,20 +12,19 @@ import { AssistantMarketSource, DiscoverTab } from '@/types/discover';
|
|
|
12
12
|
import NotFound from '../components/NotFound';
|
|
13
13
|
import Breadcrumb from '../features/Breadcrumb';
|
|
14
14
|
import { TocProvider } from '../features/Toc/useToc';
|
|
15
|
-
import { DetailProvider } from './
|
|
16
|
-
import Details from './
|
|
17
|
-
import Header from './
|
|
18
|
-
import StatusPage from './
|
|
19
|
-
import Loading from './
|
|
15
|
+
import { DetailProvider } from './features/DetailProvider';
|
|
16
|
+
import Details from './features/Details';
|
|
17
|
+
import Header from './features/Header';
|
|
18
|
+
import StatusPage from './features/StatusPage';
|
|
19
|
+
import Loading from './loading';
|
|
20
20
|
|
|
21
21
|
interface AssistantDetailPageProps {
|
|
22
22
|
mobile?: boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const AssistantDetailPage = memo<AssistantDetailPageProps>(({ mobile }) => {
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const identifier = decodeURIComponent(slugs.join('/'));
|
|
26
|
+
const { slug } = useLoaderData() as SlugParams;
|
|
27
|
+
const identifier = decodeURIComponent(slug);
|
|
29
28
|
const { version, source } = useQuery() as { source?: AssistantMarketSource; version?: string };
|
|
30
29
|
|
|
31
30
|
const useAssistantDetail = useDiscoverStore((s) => s.useAssistantDetail);
|
|
@@ -53,4 +52,12 @@ const AssistantDetailPage = memo<AssistantDetailPageProps>(({ mobile }) => {
|
|
|
53
52
|
);
|
|
54
53
|
});
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
const DesktopDiscoverAssistantDetailPage = memo<{ mobile?: boolean }>(() => {
|
|
56
|
+
return <AssistantDetailPage mobile={false} />;
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const MobileDiscoverAssistantDetailPage = memo<{ mobile?: boolean }>(() => {
|
|
60
|
+
return <AssistantDetailPage mobile={true} />;
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export { DesktopDiscoverAssistantDetailPage, MobileDiscoverAssistantDetailPage };
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { CopyButton } from '@lobehub/ui';
|
|
4
4
|
import { Breadcrumb as AntdBreadcrumb } from 'antd';
|
|
5
5
|
import { useTheme } from 'antd-style';
|
|
6
|
-
import Link from 'next/link';
|
|
7
6
|
import { memo } from 'react';
|
|
8
7
|
import { useTranslation } from 'react-i18next';
|
|
9
8
|
import { Flexbox } from 'react-layout-kit';
|
|
10
9
|
import urlJoin from 'url-join';
|
|
11
10
|
|
|
11
|
+
import Link from '@/app/[variants]/(main)/components/Link';
|
|
12
12
|
import { DiscoverTab } from '@/types/discover';
|
|
13
13
|
|
|
14
14
|
const Breadcrumb = memo<{ identifier: string; tab: DiscoverTab }>(({ tab, identifier }) => {
|
|
@@ -5,8 +5,8 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
5
5
|
|
|
6
6
|
import { useDetailContext } from '@/features/MCPPluginDetail/DetailProvider';
|
|
7
7
|
|
|
8
|
-
import McpList from '
|
|
9
|
-
import Title from '
|
|
8
|
+
import McpList from '../../../../../(list)/mcp/features/List';
|
|
9
|
+
import Title from '../../../../../features/Title';
|
|
10
10
|
|
|
11
11
|
const Related = memo(() => {
|
|
12
12
|
const { t } = useTranslation('discover');
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Block, Icon, Tag } from '@lobehub/ui';
|
|
2
2
|
import { useTheme } from 'antd-style';
|
|
3
3
|
import { CheckIcon, MinusIcon } from 'lucide-react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
|
-
import { usePathname } from 'next/navigation';
|
|
6
4
|
import qs from 'query-string';
|
|
7
5
|
import { memo } from 'react';
|
|
8
6
|
import { useTranslation } from 'react-i18next';
|
|
9
7
|
import { Flexbox } from 'react-layout-kit';
|
|
10
8
|
|
|
9
|
+
import Link from '@/app/[variants]/(main)/components/Link';
|
|
10
|
+
import { usePathname } from '@/app/[variants]/(main)/hooks/usePathname';
|
|
11
11
|
import InlineTable from '@/components/InlineTable';
|
|
12
12
|
|
|
13
|
-
import PublishedTime from '
|
|
14
|
-
import { useDetailContext } from '
|
|
15
|
-
import Title from '
|
|
13
|
+
import PublishedTime from '../../../../../../../../../components/PublishedTime';
|
|
14
|
+
import { useDetailContext } from '../../../../../../../../../features/MCPPluginDetail/DetailProvider';
|
|
15
|
+
import Title from '../../../../../features/Title';
|
|
16
16
|
|
|
17
17
|
const Versions = memo(() => {
|
|
18
18
|
const theme = useTheme();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useResponsive } from 'antd-style';
|
|
4
|
-
import { useQueryState } from 'nuqs';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
import { Flexbox } from 'react-layout-kit';
|
|
7
6
|
|
|
@@ -10,6 +9,7 @@ import Nav from '@/features/MCPPluginDetail/Nav';
|
|
|
10
9
|
import Overview from '@/features/MCPPluginDetail/Overview';
|
|
11
10
|
import Schema from '@/features/MCPPluginDetail/Schema';
|
|
12
11
|
import Score from '@/features/MCPPluginDetail/Score';
|
|
12
|
+
import { useQueryState } from '@/hooks/useQueryParam';
|
|
13
13
|
import { McpNavKey } from '@/types/discover';
|
|
14
14
|
|
|
15
15
|
import Sidebar from '../Sidebar';
|
|
@@ -7,7 +7,7 @@ import urlJoin from 'url-join';
|
|
|
7
7
|
|
|
8
8
|
import { useDetailContext } from '@/features/MCPPluginDetail/DetailProvider';
|
|
9
9
|
|
|
10
|
-
import Title from '
|
|
10
|
+
import Title from '../../../../../features/Title';
|
|
11
11
|
import Item from './Item';
|
|
12
12
|
|
|
13
13
|
const Related = memo(() => {
|
|
@@ -29,7 +29,7 @@ const Related = memo(() => {
|
|
|
29
29
|
</Title>
|
|
30
30
|
<Flexbox gap={8}>
|
|
31
31
|
{related?.map((item, index) => {
|
|
32
|
-
const link = urlJoin('/mcp', item.identifier);
|
|
32
|
+
const link = urlJoin('/discover/mcp', item.identifier);
|
|
33
33
|
return (
|
|
34
34
|
<Link key={index} style={{ color: 'inherit', overflow: 'hidden' }} to={link}>
|
|
35
35
|
<Item {...item} />
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { usePathname } from 'next/navigation';
|
|
2
1
|
import qs from 'query-string';
|
|
3
2
|
import { memo } from 'react';
|
|
4
3
|
import { useTranslation } from 'react-i18next';
|
|
5
4
|
import { Flexbox } from 'react-layout-kit';
|
|
5
|
+
import { useLocation } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
import { getRecommendedDeployment } from '@/features/MCP/utils';
|
|
8
8
|
import Platform from '@/features/MCPPluginDetail/Deployment/Platform';
|
|
9
9
|
import { useDetailContext } from '@/features/MCPPluginDetail/DetailProvider';
|
|
10
10
|
import { McpNavKey } from '@/types/discover';
|
|
11
11
|
|
|
12
|
-
import Title from '
|
|
12
|
+
import Title from '../../../../features/Title';
|
|
13
13
|
|
|
14
14
|
const ServerConfig = memo(() => {
|
|
15
15
|
const { t } = useTranslation('discover');
|
|
16
|
-
const
|
|
16
|
+
const { pathname } = useLocation();
|
|
17
17
|
const installLink = qs.stringifyUrl({
|
|
18
18
|
query: {
|
|
19
19
|
activeTab: McpNavKey.Deployment,
|
|
20
20
|
},
|
|
21
|
-
url:
|
|
21
|
+
url: pathname,
|
|
22
22
|
});
|
|
23
23
|
const { deploymentOptions = [], identifier } = useDetailContext();
|
|
24
24
|
const recommendedDeployment = getRecommendedDeployment(deploymentOptions);
|
|
@@ -11,8 +11,8 @@ import { useDetailContext } from '@/features/MCPPluginDetail/DetailProvider';
|
|
|
11
11
|
import { useQuery } from '@/hooks/useQuery';
|
|
12
12
|
import { McpNavKey } from '@/types/discover';
|
|
13
13
|
|
|
14
|
-
import Title from '
|
|
15
|
-
import Toc from '
|
|
14
|
+
import Title from '../../../../../features/Title';
|
|
15
|
+
import Toc from '../../../../features/Toc';
|
|
16
16
|
|
|
17
17
|
const TocList = memo(() => {
|
|
18
18
|
const { t } = useTranslation('discover');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
import { Flexbox } from 'react-layout-kit';
|
|
5
|
-
import {
|
|
5
|
+
import { useLoaderData } from 'react-router-dom';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import type { SlugParams } from '@/app/[variants]/loaders/routeParams';
|
|
8
8
|
import { DetailProvider } from '@/features/MCPPluginDetail/DetailProvider';
|
|
9
9
|
import Header from '@/features/MCPPluginDetail/Header';
|
|
10
10
|
import { useFetchInstalledPlugins } from '@/hooks/useFetchInstalledPlugins';
|
|
@@ -15,16 +15,16 @@ import { DiscoverTab } from '@/types/discover';
|
|
|
15
15
|
import NotFound from '../components/NotFound';
|
|
16
16
|
import Breadcrumb from '../features/Breadcrumb';
|
|
17
17
|
import { TocProvider } from '../features/Toc/useToc';
|
|
18
|
-
import Details from './
|
|
19
|
-
import Loading from './
|
|
18
|
+
import Details from './features/Details';
|
|
19
|
+
import Loading from './loading';
|
|
20
20
|
|
|
21
21
|
interface McpDetailPageProps {
|
|
22
22
|
mobile?: boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const McpDetailPage = memo<McpDetailPageProps>(({ mobile }) => {
|
|
26
|
-
const
|
|
27
|
-
const identifier =
|
|
26
|
+
const { slug } = useLoaderData() as SlugParams;
|
|
27
|
+
const identifier = slug;
|
|
28
28
|
|
|
29
29
|
const { version } = useQuery() as { version?: string };
|
|
30
30
|
const useMcpDetail = useDiscoverStore((s) => s.useFetchMcpDetail);
|
|
@@ -48,4 +48,12 @@ const McpDetailPage = memo<McpDetailPageProps>(({ mobile }) => {
|
|
|
48
48
|
);
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
const DesktopMcpPage = memo<{ mobile?: boolean }>(() => {
|
|
52
|
+
return <McpDetailPage mobile={false} />;
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const MobileMcpPage = memo<{ mobile?: boolean }>(() => {
|
|
56
|
+
return <McpDetailPage mobile={true} />;
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export { DesktopMcpPage, MobileMcpPage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DetailsLoading as default } from '../../components/ListLoading';
|
|
@@ -3,7 +3,7 @@ import { memo } from 'react';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { Flexbox } from 'react-layout-kit';
|
|
5
5
|
|
|
6
|
-
import Title from '
|
|
6
|
+
import Title from '../../../../../features/Title';
|
|
7
7
|
import { useDetailContext } from '../../DetailProvider';
|
|
8
8
|
import ProviderList from './ProviderList';
|
|
9
9
|
|
|
@@ -5,7 +5,7 @@ import { memo } from 'react';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
7
|
|
|
8
|
-
import Statistic from '
|
|
8
|
+
import Statistic from '../../../../../components/Statistic';
|
|
9
9
|
|
|
10
10
|
const DEFAULT_DOC_URL = 'https://lobehub.com/docs/usage/agents/model';
|
|
11
11
|
|
|
@@ -3,8 +3,8 @@ import { memo } from 'react';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { Flexbox } from 'react-layout-kit';
|
|
5
5
|
|
|
6
|
-
import List from '
|
|
7
|
-
import Title from '
|
|
6
|
+
import List from '../../../../../(list)/model/features/List';
|
|
7
|
+
import Title from '../../../../../features/Title';
|
|
8
8
|
import { useDetailContext } from '../../DetailProvider';
|
|
9
9
|
|
|
10
10
|
const Related = memo(() => {
|