@lobehub/chat 1.17.7 → 1.18.0
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.
Potentially problematic release.
This version of @lobehub/chat might be problematic. Click here for more details.
- package/CHANGELOG.md +25 -0
- package/locales/ar/common.json +1 -1
- package/locales/ar/discover.json +204 -0
- package/locales/ar/metadata.json +20 -3
- package/locales/ar/models.json +845 -0
- package/locales/ar/providers.json +80 -0
- package/locales/bg-BG/common.json +1 -1
- package/locales/bg-BG/discover.json +204 -0
- package/locales/bg-BG/metadata.json +20 -3
- package/locales/bg-BG/models.json +845 -0
- package/locales/bg-BG/providers.json +80 -0
- package/locales/de-DE/common.json +1 -1
- package/locales/de-DE/discover.json +204 -0
- package/locales/de-DE/metadata.json +20 -3
- package/locales/de-DE/models.json +845 -0
- package/locales/de-DE/providers.json +80 -0
- package/locales/en-US/common.json +1 -1
- package/locales/en-US/discover.json +204 -0
- package/locales/en-US/metadata.json +20 -3
- package/locales/en-US/models.json +845 -0
- package/locales/en-US/providers.json +80 -0
- package/locales/es-ES/common.json +1 -1
- package/locales/es-ES/discover.json +204 -0
- package/locales/es-ES/metadata.json +20 -3
- package/locales/es-ES/models.json +845 -0
- package/locales/es-ES/providers.json +80 -0
- package/locales/fr-FR/common.json +1 -1
- package/locales/fr-FR/discover.json +204 -0
- package/locales/fr-FR/metadata.json +20 -3
- package/locales/fr-FR/models.json +845 -0
- package/locales/fr-FR/providers.json +80 -0
- package/locales/it-IT/common.json +1 -1
- package/locales/it-IT/discover.json +204 -0
- package/locales/it-IT/metadata.json +20 -3
- package/locales/it-IT/models.json +845 -0
- package/locales/it-IT/providers.json +80 -0
- package/locales/ja-JP/common.json +1 -1
- package/locales/ja-JP/discover.json +204 -0
- package/locales/ja-JP/metadata.json +20 -3
- package/locales/ja-JP/models.json +845 -0
- package/locales/ja-JP/providers.json +80 -0
- package/locales/ko-KR/common.json +1 -1
- package/locales/ko-KR/discover.json +204 -0
- package/locales/ko-KR/metadata.json +20 -3
- package/locales/ko-KR/models.json +845 -0
- package/locales/ko-KR/providers.json +80 -0
- package/locales/nl-NL/common.json +1 -1
- package/locales/nl-NL/discover.json +204 -0
- package/locales/nl-NL/metadata.json +20 -3
- package/locales/nl-NL/models.json +845 -0
- package/locales/nl-NL/providers.json +80 -0
- package/locales/pl-PL/common.json +1 -1
- package/locales/pl-PL/discover.json +204 -0
- package/locales/pl-PL/metadata.json +20 -3
- package/locales/pl-PL/models.json +845 -0
- package/locales/pl-PL/providers.json +80 -0
- package/locales/pt-BR/common.json +1 -1
- package/locales/pt-BR/discover.json +204 -0
- package/locales/pt-BR/metadata.json +20 -3
- package/locales/pt-BR/models.json +845 -0
- package/locales/pt-BR/providers.json +80 -0
- package/locales/ru-RU/common.json +1 -1
- package/locales/ru-RU/discover.json +204 -0
- package/locales/ru-RU/metadata.json +20 -3
- package/locales/ru-RU/models.json +845 -0
- package/locales/ru-RU/providers.json +80 -0
- package/locales/tr-TR/common.json +1 -1
- package/locales/tr-TR/discover.json +204 -0
- package/locales/tr-TR/metadata.json +20 -3
- package/locales/tr-TR/models.json +845 -0
- package/locales/tr-TR/providers.json +80 -0
- package/locales/vi-VN/common.json +1 -1
- package/locales/vi-VN/discover.json +204 -0
- package/locales/vi-VN/metadata.json +20 -3
- package/locales/vi-VN/models.json +845 -0
- package/locales/vi-VN/providers.json +80 -0
- package/locales/zh-CN/common.json +1 -1
- package/locales/zh-CN/discover.json +204 -0
- package/locales/zh-CN/metadata.json +20 -3
- package/locales/zh-CN/models.json +845 -0
- package/locales/zh-CN/providers.json +80 -0
- package/locales/zh-CN/welcome.json +1 -1
- package/locales/zh-TW/common.json +1 -1
- package/locales/zh-TW/discover.json +204 -0
- package/locales/zh-TW/metadata.json +20 -3
- package/locales/zh-TW/models.json +845 -0
- package/locales/zh-TW/providers.json +80 -0
- package/package.json +3 -2
- package/src/app/(main)/@nav/_layout/Desktop/TopActions.test.tsx +3 -3
- package/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx +3 -3
- package/src/app/(main)/@nav/_layout/Mobile.tsx +3 -3
- package/src/app/(main)/_layout/Mobile.tsx +9 -1
- package/src/app/(main)/discover/(detail)/_layout/Desktop.tsx +24 -0
- package/src/app/(main)/discover/(detail)/_layout/Mobile/Header.tsx +25 -0
- package/src/app/(main)/discover/(detail)/_layout/Mobile/index.tsx +17 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/features/Actions.tsx +35 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/features/AddAgent.tsx +86 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/features/ConversationExample/TopicList.tsx +74 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/features/ConversationExample/index.tsx +100 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/features/Header.tsx +118 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/features/InfoSidebar/SuggestionItem.tsx +62 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/features/InfoSidebar/ToolItem.tsx +19 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/features/InfoSidebar/index.tsx +64 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/features/SystemRole.tsx +35 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/features/Temp.tsx +44 -0
- package/src/app/(main)/discover/(detail)/assistant/[slug]/page.tsx +121 -0
- package/src/app/(main)/discover/(detail)/error.tsx +5 -0
- package/src/app/(main)/discover/(detail)/features/Back.tsx +42 -0
- package/src/app/(main)/discover/(detail)/features/Block.tsx +50 -0
- package/src/app/(main)/discover/(detail)/features/DetailLayout.tsx +91 -0
- package/src/app/(main)/discover/(detail)/features/HighlightBlock.tsx +82 -0
- package/src/app/(main)/discover/(detail)/features/ShareButton.tsx +160 -0
- package/src/app/(main)/discover/(detail)/features/SidebarContainer.tsx +19 -0
- package/src/app/(main)/discover/(detail)/layout.tsx +12 -0
- package/src/app/(main)/discover/(detail)/loading.tsx +38 -0
- package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Actions.tsx +46 -0
- package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ChatWithModel.tsx +93 -0
- package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Header.tsx +85 -0
- package/src/app/(main)/discover/(detail)/model/[...slugs]/features/InfoSidebar/SuggestionItem.tsx +75 -0
- package/src/app/(main)/discover/(detail)/model/[...slugs]/features/InfoSidebar/index.tsx +49 -0
- package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ParameterList/ParameterItem.tsx +71 -0
- package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ParameterList/index.tsx +110 -0
- package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ProviderList/ProviderItem.tsx +152 -0
- package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ProviderList/index.tsx +45 -0
- package/src/app/(main)/discover/(detail)/model/[...slugs]/page.tsx +114 -0
- package/src/app/(main)/discover/(detail)/not-found.tsx +3 -0
- package/src/app/(main)/discover/(detail)/plugin/[slug]/features/Actions.tsx +35 -0
- package/src/app/(main)/discover/(detail)/plugin/[slug]/features/Header.tsx +114 -0
- package/src/app/(main)/discover/(detail)/plugin/[slug]/features/InfoSidebar/SuggestionItem.tsx +62 -0
- package/src/app/(main)/discover/(detail)/plugin/[slug]/features/InfoSidebar/index.tsx +49 -0
- package/src/app/(main)/discover/(detail)/plugin/[slug]/features/InstallPlugin.tsx +87 -0
- package/src/app/(main)/discover/(detail)/plugin/[slug]/features/ParameterList.tsx +95 -0
- package/src/app/(main)/discover/(detail)/plugin/[slug]/features/Schema.tsx +23 -0
- package/src/app/(main)/discover/(detail)/plugin/[slug]/page.tsx +103 -0
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/Actions.tsx +49 -0
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/Header.tsx +73 -0
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/SuggestionItem.tsx +75 -0
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/index.tsx +49 -0
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/ModelList/ModelItem.tsx +148 -0
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/ModelList/index.tsx +60 -0
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/ProviderConfig.tsx +80 -0
- package/src/app/(main)/discover/(detail)/provider/[slug]/page.tsx +116 -0
- package/src/app/(main)/discover/(list)/(home)/Client.tsx +42 -0
- package/src/app/(main)/discover/(list)/(home)/features/AssistantList.tsx +33 -0
- package/src/app/(main)/discover/(list)/(home)/features/ModelList.tsx +22 -0
- package/src/app/(main)/discover/(list)/(home)/features/PluginList.tsx +25 -0
- package/src/app/(main)/discover/(list)/(home)/loading.tsx +1 -0
- package/src/app/(main)/discover/(list)/(home)/page.tsx +54 -0
- package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +118 -0
- package/src/app/(main)/discover/(list)/_layout/Desktop/index.tsx +37 -0
- package/src/app/(main)/discover/(list)/_layout/Desktop/useScroll.ts +33 -0
- package/src/app/(main)/discover/(list)/_layout/Mobile/Header.tsx +62 -0
- package/src/app/(main)/discover/(list)/_layout/Mobile/Nav.tsx +94 -0
- package/src/app/(main)/discover/(list)/_layout/Mobile/index.tsx +27 -0
- package/src/app/(main)/discover/(list)/assistants/[slug]/page.tsx +64 -0
- package/src/app/(main)/discover/(list)/assistants/_layout/Desktop.tsx +22 -0
- package/src/app/(main)/discover/(list)/assistants/_layout/Mobile.tsx +9 -0
- package/src/app/(main)/discover/(list)/assistants/features/Card.tsx +176 -0
- package/src/app/(main)/discover/(list)/assistants/features/Category.tsx +48 -0
- package/src/app/(main)/discover/(list)/assistants/features/List.tsx +97 -0
- package/src/app/(main)/discover/(list)/assistants/features/useCategory.tsx +116 -0
- package/src/app/(main)/discover/(list)/assistants/layout.tsx +12 -0
- package/src/app/(main)/discover/(list)/assistants/loading.tsx +1 -0
- package/src/app/(main)/discover/(list)/assistants/page.tsx +51 -0
- package/src/app/(main)/discover/(list)/error.tsx +5 -0
- package/src/app/(main)/{market → discover/(list)}/layout.tsx +4 -3
- package/src/app/(main)/discover/(list)/loading.tsx +39 -0
- package/src/app/(main)/discover/(list)/models/[slug]/page.tsx +70 -0
- package/src/app/(main)/discover/(list)/models/_layout/Desktop.tsx +28 -0
- package/src/app/(main)/discover/(list)/models/_layout/Mobile.tsx +9 -0
- package/src/app/(main)/discover/(list)/models/features/Card.tsx +116 -0
- package/src/app/(main)/discover/(list)/models/features/Category.tsx +67 -0
- package/src/app/(main)/discover/(list)/models/features/List.tsx +72 -0
- package/src/app/(main)/discover/(list)/models/features/const.ts +9 -0
- package/src/app/(main)/discover/(list)/models/layout.tsx +12 -0
- package/src/app/(main)/discover/(list)/models/loading.tsx +1 -0
- package/src/app/(main)/discover/(list)/models/page.tsx +61 -0
- package/src/app/(main)/discover/(list)/not-found.tsx +3 -0
- package/src/app/(main)/discover/(list)/plugins/[slug]/page.tsx +64 -0
- package/src/app/(main)/discover/(list)/plugins/_layout/Desktop.tsx +22 -0
- package/src/app/(main)/discover/(list)/plugins/_layout/Mobile.tsx +9 -0
- package/src/app/(main)/discover/(list)/plugins/features/Card.tsx +154 -0
- package/src/app/(main)/discover/(list)/plugins/features/Category.tsx +45 -0
- package/src/app/(main)/discover/(list)/plugins/features/List.tsx +96 -0
- package/src/app/(main)/discover/(list)/plugins/features/useCategory.tsx +80 -0
- package/src/app/(main)/discover/(list)/plugins/layout.tsx +12 -0
- package/src/app/(main)/discover/(list)/plugins/loading.tsx +1 -0
- package/src/app/(main)/discover/(list)/plugins/page.tsx +52 -0
- package/src/app/(main)/discover/(list)/providers/features/Card.tsx +117 -0
- package/src/app/(main)/discover/(list)/providers/features/List.tsx +71 -0
- package/src/app/(main)/discover/(list)/providers/loading.tsx +1 -0
- package/src/app/(main)/discover/(list)/providers/page.tsx +52 -0
- package/src/app/(main)/discover/_layout/Desktop/Header.tsx +36 -0
- package/src/app/(main)/discover/_layout/Desktop/index.tsx +21 -0
- package/src/app/(main)/discover/_layout/Mobile/index.tsx +9 -0
- package/src/app/(main)/{market/features/AgentCard/AgentCardBanner.tsx → discover/components/CardBanner.tsx} +5 -5
- package/src/app/(main)/discover/components/CategoryContainer.tsx +18 -0
- package/src/app/(main)/discover/components/CategoryMenu.tsx +39 -0
- package/src/app/(main)/discover/components/GitHubAvatar.tsx +19 -0
- package/src/app/(main)/discover/components/GridLoadingCard.tsx +69 -0
- package/src/app/(main)/discover/components/ListLoading.tsx +66 -0
- package/src/app/(main)/discover/components/Loading.tsx +17 -0
- package/src/app/(main)/discover/components/SearchResultCount.tsx +37 -0
- package/src/app/(main)/discover/components/Statistic.tsx +92 -0
- package/src/app/(main)/discover/components/Title.tsx +76 -0
- package/src/app/(main)/discover/components/VirtuosoGridList/index.tsx +52 -0
- package/src/app/(main)/discover/components/VirtuosoGridList/useScrollParent.ts +19 -0
- package/src/app/(main)/discover/error.tsx +5 -0
- package/src/app/(main)/{market/features/ShareAgentButton → discover/features/CreateButton}/Inner.tsx +9 -10
- package/src/app/(main)/{market/features/ShareAgentButton → discover/features/CreateButton}/index.tsx +9 -9
- package/src/app/(main)/discover/features/LikeButton.tsx +73 -0
- package/src/app/(main)/discover/features/ModelFeatureTags.tsx +77 -0
- package/src/app/(main)/discover/features/StoreSearchBar.tsx +84 -0
- package/src/app/(main)/discover/features/const.ts +2 -0
- package/src/app/(main)/discover/features/useNav.tsx +71 -0
- package/src/app/(main)/discover/layout.tsx +12 -0
- package/src/app/(main)/discover/loading.tsx +9 -0
- package/src/app/(main)/discover/not-found.tsx +3 -0
- package/src/app/(main)/discover/search/_layout/Desktop.tsx +42 -0
- package/src/app/(main)/discover/search/_layout/Mobile/Header.tsx +31 -0
- package/src/app/(main)/discover/search/_layout/Mobile/Nav.tsx +56 -0
- package/src/app/(main)/discover/search/_layout/Mobile/index.tsx +32 -0
- package/src/app/(main)/discover/search/features/AssistantsResult.tsx +27 -0
- package/src/app/(main)/discover/search/features/Category.tsx +41 -0
- package/src/app/(main)/discover/search/features/ModelsResult.tsx +27 -0
- package/src/app/(main)/discover/search/features/PluginsResult.tsx +27 -0
- package/src/app/(main)/discover/search/features/ProvidersResult.tsx +26 -0
- package/src/app/(main)/discover/search/layout.tsx +12 -0
- package/src/app/(main)/discover/search/loading.tsx +1 -0
- package/src/app/(main)/discover/search/page.tsx +78 -0
- package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +0 -6
- package/src/app/(main)/welcome/features/Actions.tsx +1 -1
- package/src/app/@modal/(.)discover/assistant/[slug]/page.tsx +1 -0
- package/src/app/@modal/(.)discover/layout.tsx +29 -0
- package/src/app/@modal/(.)discover/loading.tsx +3 -0
- package/src/app/@modal/(.)discover/model/[...slugs]/page.tsx +1 -0
- package/src/app/@modal/(.)discover/plugin/[slug]/page.tsx +1 -0
- package/src/app/@modal/(.)discover/provider/[slug]/page.tsx +1 -0
- package/src/app/@modal/features/InterceptingContext.tsx +9 -0
- package/src/app/@modal/layout.tsx +58 -21
- package/src/app/api/{market → assistant}/[id]/route.ts +2 -3
- package/src/app/api/{market → assistant/store}/route.ts +2 -5
- package/src/app/api/plugin/store/route.ts +1 -4
- package/src/app/metadata.ts +3 -0
- package/src/app/redirect/page.tsx +15 -0
- package/src/components/FetchErrorNotification/Description.tsx +2 -0
- package/src/components/InterceptingLink/index.tsx +27 -0
- package/src/components/mdx/CodeBlock.tsx +46 -0
- package/src/components/mdx/Link.tsx +21 -0
- package/src/components/mdx/index.tsx +51 -0
- package/src/const/discover.ts +63 -1
- package/src/features/Conversation/Error/PluginSettings.tsx +1 -1
- package/src/features/Conversation/Messages/Tool/Inspector/Settings.tsx +1 -1
- package/src/features/Conversation/components/InboxWelcome/AgentsSuggest.tsx +41 -24
- package/src/features/MobileTabBar/index.tsx +3 -3
- package/src/features/PluginDetailModal/APIs.tsx +1 -1
- package/src/features/PluginDevModal/UrlManifestForm.tsx +1 -1
- package/src/features/PluginStore/PluginItem/Action.tsx +1 -1
- package/src/features/PluginsUI/Render/DefaultType/index.tsx +1 -1
- package/src/features/PluginsUI/Render/StandaloneType/index.tsx +1 -1
- package/src/hooks/useInterceptingRoutes.ts +21 -1
- package/src/hooks/useShare.tsx +191 -0
- package/src/locales/create.ts +1 -1
- package/src/locales/default/common.ts +1 -1
- package/src/locales/default/discover.ts +205 -0
- package/src/locales/default/index.ts +6 -2
- package/src/locales/default/metadata.ts +23 -3
- package/src/locales/default/models.ts +15 -0
- package/src/locales/default/providers.ts +15 -0
- package/src/locales/default/welcome.ts +1 -1
- package/src/locales/resources.ts +2 -0
- package/src/server/ld.ts +85 -11
- package/src/server/metadata.ts +41 -3
- package/src/{app/api/market/AgentMarket.test.ts → server/modules/AssistantStore/index.test.ts} +15 -15
- package/src/{app/api/market/AgentMarket.ts → server/modules/AssistantStore/index.ts} +7 -3
- package/src/{app/api/plugin/store/Store.test.ts → server/modules/PluginStore/index.test.ts} +1 -1
- package/src/server/services/discover/index.ts +352 -0
- package/src/server/services/doc/index.tsx +40 -0
- package/src/server/translation.ts +11 -5
- package/src/services/__tests__/__snapshots__/tool.test.ts.snap +1 -1
- package/src/services/{_auth.test.ts → __tests__/_auth.test.ts} +1 -1
- package/src/services/__tests__/assistant.test.ts +82 -0
- package/src/services/__tests__/tool.test.ts +13 -13
- package/src/services/_url.ts +2 -2
- package/src/services/assistant.ts +30 -0
- package/src/services/chat.ts +1 -1
- package/src/services/tool.ts +7 -129
- package/src/store/chat/slices/plugin/action.test.ts +112 -0
- package/src/store/chat/slices/plugin/action.ts +1 -3
- package/src/store/global/initialState.ts +1 -1
- package/src/store/tool/selectors/tool.test.ts +1 -1
- package/src/store/tool/slices/customPlugin/action.test.ts +1 -1
- package/src/store/tool/slices/customPlugin/action.ts +1 -1
- package/src/store/tool/slices/plugin/action.ts +1 -1
- package/src/store/tool/slices/plugin/selectors.test.ts +3 -3
- package/src/store/tool/slices/plugin/selectors.ts +3 -3
- package/src/store/tool/slices/store/action.test.ts +16 -22
- package/src/store/tool/slices/store/action.ts +8 -8
- package/src/types/discover.ts +152 -0
- package/src/types/llm.ts +4 -2
- package/src/types/meta.ts +1 -0
- package/src/utils/format.test.ts +191 -112
- package/src/utils/format.ts +36 -0
- package/src/utils/toolManifest.ts +124 -0
- package/src/app/(main)/market/@detail/default.tsx +0 -12
- package/src/app/(main)/market/@detail/features/AgentDetailContent.tsx +0 -73
- package/src/app/(main)/market/@detail/features/Banner.tsx +0 -46
- package/src/app/(main)/market/@detail/features/Comment.tsx +0 -16
- package/src/app/(main)/market/@detail/features/Header.tsx +0 -81
- package/src/app/(main)/market/@detail/features/Loading.tsx +0 -63
- package/src/app/(main)/market/@detail/features/TokenTag.tsx +0 -27
- package/src/app/(main)/market/@detail/features/style.ts +0 -32
- package/src/app/(main)/market/_layout/Desktop/DetailSidebar.tsx +0 -84
- package/src/app/(main)/market/_layout/Desktop/Header.tsx +0 -29
- package/src/app/(main)/market/_layout/Desktop/Hero.tsx +0 -40
- package/src/app/(main)/market/_layout/Desktop/index.tsx +0 -46
- package/src/app/(main)/market/_layout/Mobile/DetailModal.tsx +0 -32
- package/src/app/(main)/market/_layout/Mobile/Header.tsx +0 -20
- package/src/app/(main)/market/_layout/Mobile/index.tsx +0 -25
- package/src/app/(main)/market/_layout/type.ts +0 -6
- package/src/app/(main)/market/features/AgentCard/index.tsx +0 -139
- package/src/app/(main)/market/features/AgentList.tsx +0 -103
- package/src/app/(main)/market/features/AgentSearchBar.tsx +0 -42
- package/src/app/(main)/market/features/TagList.tsx +0 -69
- package/src/app/(main)/market/loading.tsx +0 -15
- package/src/app/(main)/market/page.tsx +0 -44
- package/src/const/market.ts +0 -15
- package/src/locales/default/market.ts +0 -32
- package/src/services/market.ts +0 -22
- package/src/store/market/action.ts +0 -82
- package/src/store/market/index.ts +0 -3
- package/src/store/market/initialState.ts +0 -19
- package/src/store/market/selectors.ts +0 -38
- package/src/store/market/store.ts +0 -48
- package/src/types/market.ts +0 -20
- /package/src/{app/api/plugin/store/Store.ts → server/modules/PluginStore/index.ts} +0 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
2
|
+
import { Flexbox } from 'react-layout-kit';
|
3
|
+
|
4
|
+
import Footer from '@/features/Setting/Footer';
|
5
|
+
|
6
|
+
import CategoryContainer from '../../components/CategoryContainer';
|
7
|
+
import { MAX_WIDTH, SCROLL_PARENT_ID } from '../../features/const';
|
8
|
+
import Category from '../features/Category';
|
9
|
+
|
10
|
+
const Layout = async ({ children }: PropsWithChildren) => {
|
11
|
+
return (
|
12
|
+
<Flexbox
|
13
|
+
align={'center'}
|
14
|
+
flex={1}
|
15
|
+
id={SCROLL_PARENT_ID}
|
16
|
+
padding={16}
|
17
|
+
style={{ overflowX: 'hidden', overflowY: 'scroll', position: 'relative' }}
|
18
|
+
width={'100%'}
|
19
|
+
>
|
20
|
+
<Flexbox
|
21
|
+
gap={16}
|
22
|
+
style={{ maxWidth: MAX_WIDTH, paddingTop: 32, position: 'relative' }}
|
23
|
+
width={'100%'}
|
24
|
+
>
|
25
|
+
<Flexbox gap={24} horizontal style={{ position: 'relative' }} width={'100%'}>
|
26
|
+
<CategoryContainer top={32}>
|
27
|
+
<Category />
|
28
|
+
</CategoryContainer>
|
29
|
+
<Flexbox flex={1} gap={16}>
|
30
|
+
{children}
|
31
|
+
</Flexbox>
|
32
|
+
</Flexbox>
|
33
|
+
<div />
|
34
|
+
<Footer />
|
35
|
+
</Flexbox>
|
36
|
+
</Flexbox>
|
37
|
+
);
|
38
|
+
};
|
39
|
+
|
40
|
+
Layout.displayName = 'DesktopDiscoverSearchLayout';
|
41
|
+
|
42
|
+
export default Layout;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
'use client';
|
2
|
+
|
3
|
+
import { MobileNavBar } from '@lobehub/ui';
|
4
|
+
import { useRouter } from 'next/navigation';
|
5
|
+
import { memo } from 'react';
|
6
|
+
import urlJoin from 'url-join';
|
7
|
+
|
8
|
+
import { useQuery } from '@/hooks/useQuery';
|
9
|
+
import { mobileHeaderSticky } from '@/styles/mobileHeader';
|
10
|
+
|
11
|
+
import StoreSearchBar from '../../../features/StoreSearchBar';
|
12
|
+
|
13
|
+
const Header = memo(() => {
|
14
|
+
const router = useRouter();
|
15
|
+
const { type = 'assistants' } = useQuery();
|
16
|
+
|
17
|
+
return (
|
18
|
+
<MobileNavBar
|
19
|
+
contentStyles={{ center: { display: 'none' }, left: { flex: 'none' } }}
|
20
|
+
onBackClick={() => router.push(urlJoin('/discover', type as string))}
|
21
|
+
right={<StoreSearchBar autoFocus={false} mobile style={{ width: '100%' }} />}
|
22
|
+
showBackButton
|
23
|
+
style={{
|
24
|
+
...mobileHeaderSticky,
|
25
|
+
overflow: 'unset',
|
26
|
+
}}
|
27
|
+
/>
|
28
|
+
);
|
29
|
+
});
|
30
|
+
|
31
|
+
export default Header;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
'use client';
|
2
|
+
|
3
|
+
import { TabsNav } from '@lobehub/ui';
|
4
|
+
import { createStyles } from 'antd-style';
|
5
|
+
import { memo } from 'react';
|
6
|
+
import { Flexbox } from 'react-layout-kit';
|
7
|
+
|
8
|
+
import { useQueryRoute } from '@/hooks/useQueryRoute';
|
9
|
+
import { DiscoverTab } from '@/types/discover';
|
10
|
+
|
11
|
+
import { useNav } from '../../../features/useNav';
|
12
|
+
|
13
|
+
export const useStyles = createStyles(({ css, token }) => ({
|
14
|
+
activeNavItem: css`
|
15
|
+
background: ${token.colorFillTertiary};
|
16
|
+
`,
|
17
|
+
container: css`
|
18
|
+
height: auto;
|
19
|
+
padding-block: 4px;
|
20
|
+
background: ${token.colorBgLayout};
|
21
|
+
`,
|
22
|
+
navItem: css`
|
23
|
+
font-weight: 500;
|
24
|
+
`,
|
25
|
+
title: css`
|
26
|
+
font-size: 18px;
|
27
|
+
font-weight: 700;
|
28
|
+
line-height: 1.2;
|
29
|
+
`,
|
30
|
+
}));
|
31
|
+
|
32
|
+
const Nav = memo(() => {
|
33
|
+
const { items, activeKey } = useNav();
|
34
|
+
const router = useQueryRoute();
|
35
|
+
|
36
|
+
return (
|
37
|
+
<Flexbox style={{ paddingInline: 16 }}>
|
38
|
+
<TabsNav
|
39
|
+
activeKey={activeKey}
|
40
|
+
items={items
|
41
|
+
.filter((item: any) => item?.key !== DiscoverTab.Home)
|
42
|
+
.map((item: any) => ({
|
43
|
+
key: item.key,
|
44
|
+
label: (
|
45
|
+
<div onClick={() => router.push('/discover/search', { query: { type: item.key } })}>
|
46
|
+
{item.label}
|
47
|
+
</div>
|
48
|
+
),
|
49
|
+
}))}
|
50
|
+
variant={'compact'}
|
51
|
+
/>
|
52
|
+
</Flexbox>
|
53
|
+
);
|
54
|
+
});
|
55
|
+
|
56
|
+
export default Nav;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
2
|
+
|
3
|
+
import MobileContentLayout from '@/components/server/MobileNavLayout';
|
4
|
+
import Footer from '@/features/Setting/Footer';
|
5
|
+
|
6
|
+
import { SCROLL_PARENT_ID } from '../../../features/const';
|
7
|
+
import Header from './Header';
|
8
|
+
import Nav from './Nav';
|
9
|
+
|
10
|
+
const Layout = ({ children }: PropsWithChildren) => {
|
11
|
+
return (
|
12
|
+
<MobileContentLayout
|
13
|
+
gap={16}
|
14
|
+
header={
|
15
|
+
<>
|
16
|
+
<Header />
|
17
|
+
<Nav />
|
18
|
+
</>
|
19
|
+
}
|
20
|
+
id={SCROLL_PARENT_ID}
|
21
|
+
style={{ paddingInline: 16 }}
|
22
|
+
>
|
23
|
+
{children}
|
24
|
+
<div />
|
25
|
+
<Footer />
|
26
|
+
</MobileContentLayout>
|
27
|
+
);
|
28
|
+
};
|
29
|
+
|
30
|
+
Layout.displayName = 'MobileDiscoverSearchLayout';
|
31
|
+
|
32
|
+
export default Layout;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Locales } from '@/locales/resources';
|
2
|
+
import { DiscoverService } from '@/server/services/discover';
|
3
|
+
|
4
|
+
import Back from '../../(detail)/features/Back';
|
5
|
+
import List from '../../(list)/assistants/features/List';
|
6
|
+
|
7
|
+
const AssistantsResult = async ({
|
8
|
+
locale,
|
9
|
+
q,
|
10
|
+
mobile,
|
11
|
+
}: {
|
12
|
+
locale: Locales;
|
13
|
+
mobile?: boolean;
|
14
|
+
q: string;
|
15
|
+
}) => {
|
16
|
+
const discoverService = new DiscoverService();
|
17
|
+
const items = await discoverService.searchAssistant(locale, q);
|
18
|
+
|
19
|
+
return (
|
20
|
+
<>
|
21
|
+
{!mobile && <Back href={'/discover/assistants'} style={{ marginBottom: 0 }} />}
|
22
|
+
<List items={items} mobile={mobile} searchKeywords={q} />
|
23
|
+
</>
|
24
|
+
);
|
25
|
+
};
|
26
|
+
|
27
|
+
export default AssistantsResult;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
'use client';
|
2
|
+
|
3
|
+
import Link from 'next/link';
|
4
|
+
import qs from 'query-string';
|
5
|
+
import { memo } from 'react';
|
6
|
+
|
7
|
+
import { useQueryRoute } from '@/hooks/useQueryRoute';
|
8
|
+
import { DiscoverTab } from '@/types/discover';
|
9
|
+
|
10
|
+
import CategoryMenu from '../../components/CategoryMenu';
|
11
|
+
import { useNav } from '../../features/useNav';
|
12
|
+
|
13
|
+
const Category = memo(() => {
|
14
|
+
const router = useQueryRoute();
|
15
|
+
|
16
|
+
const { items, activeKey } = useNav();
|
17
|
+
|
18
|
+
return (
|
19
|
+
<CategoryMenu
|
20
|
+
items={items
|
21
|
+
.filter((item) => item?.key !== DiscoverTab.Home)
|
22
|
+
.map((item: any) => ({
|
23
|
+
...item,
|
24
|
+
label: (
|
25
|
+
<Link
|
26
|
+
href={qs.stringifyUrl({
|
27
|
+
query: { type: item.key },
|
28
|
+
url: '/discover/search',
|
29
|
+
})}
|
30
|
+
>
|
31
|
+
{item.label}
|
32
|
+
</Link>
|
33
|
+
),
|
34
|
+
}))}
|
35
|
+
onSelect={({ key }) => router.push('/discover/search', { query: { type: key } })}
|
36
|
+
selectedKeys={[activeKey]}
|
37
|
+
/>
|
38
|
+
);
|
39
|
+
});
|
40
|
+
|
41
|
+
export default Category;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Locales } from '@/locales/resources';
|
2
|
+
import { DiscoverService } from '@/server/services/discover';
|
3
|
+
|
4
|
+
import Back from '../../(detail)/features/Back';
|
5
|
+
import List from '../../(list)/models/features/List';
|
6
|
+
|
7
|
+
const ModelsResult = async ({
|
8
|
+
locale,
|
9
|
+
q,
|
10
|
+
mobile,
|
11
|
+
}: {
|
12
|
+
locale: Locales;
|
13
|
+
mobile?: boolean;
|
14
|
+
q: string;
|
15
|
+
}) => {
|
16
|
+
const discoverService = new DiscoverService();
|
17
|
+
const items = await discoverService.searchModel(locale, q);
|
18
|
+
|
19
|
+
return (
|
20
|
+
<>
|
21
|
+
{!mobile && <Back href={'/discover/models'} style={{ marginBottom: 0 }} />}
|
22
|
+
<List items={items} mobile={mobile} searchKeywords={q} />
|
23
|
+
</>
|
24
|
+
);
|
25
|
+
};
|
26
|
+
|
27
|
+
export default ModelsResult;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Locales } from '@/locales/resources';
|
2
|
+
import { DiscoverService } from '@/server/services/discover';
|
3
|
+
|
4
|
+
import Back from '../../(detail)/features/Back';
|
5
|
+
import List from '../../(list)/plugins/features/List';
|
6
|
+
|
7
|
+
const PluginsResult = async ({
|
8
|
+
locale,
|
9
|
+
q,
|
10
|
+
mobile,
|
11
|
+
}: {
|
12
|
+
locale: Locales;
|
13
|
+
mobile?: boolean;
|
14
|
+
q: string;
|
15
|
+
}) => {
|
16
|
+
const discoverService = new DiscoverService();
|
17
|
+
const items = await discoverService.searchPlugin(locale, q);
|
18
|
+
|
19
|
+
return (
|
20
|
+
<>
|
21
|
+
{!mobile && <Back href={'/discover/plugins'} style={{ marginBottom: 0 }} />}
|
22
|
+
<List items={items} mobile={mobile} searchKeywords={q} />
|
23
|
+
</>
|
24
|
+
);
|
25
|
+
};
|
26
|
+
|
27
|
+
export default PluginsResult;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { Locales } from '@/locales/resources';
|
2
|
+
import { DiscoverService } from '@/server/services/discover';
|
3
|
+
|
4
|
+
import Back from '../../(detail)/features/Back';
|
5
|
+
import List from '../../(list)/providers/features/List';
|
6
|
+
|
7
|
+
const ProvidersResult = async ({
|
8
|
+
locale,
|
9
|
+
q,
|
10
|
+
mobile,
|
11
|
+
}: {
|
12
|
+
locale: Locales;
|
13
|
+
mobile?: boolean;
|
14
|
+
q: string;
|
15
|
+
}) => {
|
16
|
+
const discoverService = new DiscoverService();
|
17
|
+
const items = await discoverService.searchProvider(locale, q);
|
18
|
+
|
19
|
+
return (
|
20
|
+
<>
|
21
|
+
{!mobile && <Back href={'/discover/providers'} style={{ marginBottom: 0 }} />}
|
22
|
+
<List items={items} mobile={mobile} searchKeywords={q} />
|
23
|
+
</>
|
24
|
+
);
|
25
|
+
};
|
26
|
+
export default ProvidersResult;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
2
|
+
|
3
|
+
import ServerLayout from '@/components/server/ServerLayout';
|
4
|
+
|
5
|
+
import Desktop from './_layout/Desktop';
|
6
|
+
import Mobile from './_layout/Mobile';
|
7
|
+
|
8
|
+
const MainLayout = ServerLayout<PropsWithChildren>({ Desktop, Mobile });
|
9
|
+
|
10
|
+
MainLayout.displayName = 'DiscoverSearchLayout';
|
11
|
+
|
12
|
+
export default MainLayout;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { ListLoadingWithoutBanner as default } from '../components/ListLoading';
|
@@ -0,0 +1,78 @@
|
|
1
|
+
import dynamic from 'next/dynamic';
|
2
|
+
import { redirect } from 'next/navigation';
|
3
|
+
import urlJoin from 'url-join';
|
4
|
+
|
5
|
+
import StructuredData from '@/components/StructuredData';
|
6
|
+
import { Locales } from '@/locales/resources';
|
7
|
+
import { ldModule } from '@/server/ld';
|
8
|
+
import { metadataModule } from '@/server/metadata';
|
9
|
+
import { translation } from '@/server/translation';
|
10
|
+
import { isMobileDevice } from '@/utils/responsive';
|
11
|
+
|
12
|
+
import { ListLoadingWithoutBanner } from '../components/ListLoading';
|
13
|
+
|
14
|
+
const AssistantsResult = dynamic(() => import('./features/AssistantsResult'), {
|
15
|
+
loading: () => <ListLoadingWithoutBanner />,
|
16
|
+
});
|
17
|
+
const PluginsResult = dynamic(() => import('./features/PluginsResult'), {
|
18
|
+
loading: () => <ListLoadingWithoutBanner />,
|
19
|
+
});
|
20
|
+
const ModelsResult = dynamic(() => import('./features/ModelsResult'), {
|
21
|
+
loading: () => <ListLoadingWithoutBanner />,
|
22
|
+
});
|
23
|
+
const ProvidersResult = dynamic(() => import('./features/ProvidersResult'), {
|
24
|
+
loading: () => <ListLoadingWithoutBanner />,
|
25
|
+
});
|
26
|
+
|
27
|
+
type Props = {
|
28
|
+
searchParams: {
|
29
|
+
hl?: Locales;
|
30
|
+
q?: string;
|
31
|
+
type?: 'assistants' | 'plugins' | 'models' | 'providers';
|
32
|
+
};
|
33
|
+
};
|
34
|
+
|
35
|
+
export const generateMetadata = async ({ searchParams }: Props) => {
|
36
|
+
const { t, locale } = await translation('metadata', searchParams?.hl);
|
37
|
+
|
38
|
+
return metadataModule.generate({
|
39
|
+
alternate: true,
|
40
|
+
description: t('discover.description'),
|
41
|
+
locale,
|
42
|
+
title: t('discover.search'),
|
43
|
+
url: '/discover/search',
|
44
|
+
});
|
45
|
+
};
|
46
|
+
|
47
|
+
const Page = async ({ searchParams }: Props) => {
|
48
|
+
const { q, type = 'assistants' } = searchParams;
|
49
|
+
if (!q) redirect(urlJoin(`/discover`, type));
|
50
|
+
const keywords = decodeURIComponent(q);
|
51
|
+
|
52
|
+
const { t, locale } = await translation('metadata', searchParams?.hl);
|
53
|
+
const mobile = isMobileDevice();
|
54
|
+
|
55
|
+
const ld = ldModule.generate({
|
56
|
+
description: t('discover.description'),
|
57
|
+
title: t('discover.search'),
|
58
|
+
url: '/discover/search',
|
59
|
+
webpage: {
|
60
|
+
enable: true,
|
61
|
+
search: '/discover/search',
|
62
|
+
},
|
63
|
+
});
|
64
|
+
|
65
|
+
return (
|
66
|
+
<>
|
67
|
+
<StructuredData ld={ld} />
|
68
|
+
{type === 'assistants' && <AssistantsResult locale={locale} mobile={mobile} q={keywords} />}
|
69
|
+
{type === 'plugins' && <PluginsResult locale={locale} mobile={mobile} q={keywords} />}
|
70
|
+
{type === 'models' && <ModelsResult locale={locale} mobile={mobile} q={keywords} />}
|
71
|
+
{type === 'providers' && <ProvidersResult locale={locale} mobile={mobile} q={keywords} />}
|
72
|
+
</>
|
73
|
+
);
|
74
|
+
};
|
75
|
+
|
76
|
+
Page.DisplayName = 'DiscoverSearch';
|
77
|
+
|
78
|
+
export default Page;
|
@@ -80,11 +80,6 @@ const useStyles = createStyles(({ css, prefixCls, responsive, token }) => ({
|
|
80
80
|
background: ${token.colorFill};
|
81
81
|
}
|
82
82
|
`,
|
83
|
-
safariIconWidthFix: css`
|
84
|
-
svg {
|
85
|
-
width: unset !important;
|
86
|
-
}
|
87
|
-
`,
|
88
83
|
}));
|
89
84
|
|
90
85
|
export interface ProviderConfigProps extends Omit<ModelProviderCard, 'id' | 'chatModels'> {
|
@@ -269,7 +264,6 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
269
264
|
title: (
|
270
265
|
<Flexbox
|
271
266
|
align={'center'}
|
272
|
-
className={styles.safariIconWidthFix}
|
273
267
|
horizontal
|
274
268
|
style={{
|
275
269
|
height: 24,
|
@@ -19,7 +19,7 @@ const Actions = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
19
19
|
return (
|
20
20
|
<Flexbox gap={16} horizontal={!mobile} justify={'center'} width={'100%'} wrap={'wrap'}>
|
21
21
|
{showMarket && (
|
22
|
-
<Link href={'/
|
22
|
+
<Link href={'/discover'}>
|
23
23
|
<Button block={mobile} size={'large'} style={{ minWidth: 160 }} type={'default'}>
|
24
24
|
{t('button.market')}
|
25
25
|
</Button>
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from '@/app/(main)/discover/(detail)/assistant/[slug]/page';
|
@@ -0,0 +1,29 @@
|
|
1
|
+
'use client';
|
2
|
+
|
3
|
+
import { useResponsive } from 'antd-style';
|
4
|
+
import { PropsWithChildren, memo } from 'react';
|
5
|
+
import { Flexbox } from 'react-layout-kit';
|
6
|
+
|
7
|
+
const Layout = memo<PropsWithChildren>(({ children }) => {
|
8
|
+
const { xl = true } = useResponsive();
|
9
|
+
|
10
|
+
return (
|
11
|
+
<Flexbox
|
12
|
+
flex={1}
|
13
|
+
gap={16}
|
14
|
+
horizontal={xl}
|
15
|
+
paddingInline={48}
|
16
|
+
style={{
|
17
|
+
overflow: xl ? 'hidden' : 'auto',
|
18
|
+
paddingBottom: xl ? 0 : 24,
|
19
|
+
paddingTop: 48,
|
20
|
+
position: 'relative',
|
21
|
+
}}
|
22
|
+
width={'100%'}
|
23
|
+
>
|
24
|
+
{children}
|
25
|
+
</Flexbox>
|
26
|
+
);
|
27
|
+
});
|
28
|
+
|
29
|
+
export default Layout;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from '@/app/(main)/discover/(detail)/model/[...slugs]/page';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from '@/app/(main)/discover/(detail)/plugin/[slug]/page';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from '@/app/(main)/discover/(detail)/provider/[slug]/page';
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { PropsWithChildren, createContext, memo } from 'react';
|
2
|
+
|
3
|
+
export const InterceptContext = createContext(false);
|
4
|
+
|
5
|
+
const InterceptingLayout = memo<PropsWithChildren>(({ children }) => {
|
6
|
+
return <InterceptContext.Provider value={true}>{children}</InterceptContext.Provider>;
|
7
|
+
});
|
8
|
+
|
9
|
+
export default InterceptingLayout;
|
@@ -2,33 +2,70 @@
|
|
2
2
|
|
3
3
|
import { Modal } from '@lobehub/ui';
|
4
4
|
import { useTheme } from 'antd-style';
|
5
|
-
import { useRouter } from 'next/navigation';
|
6
|
-
import { PropsWithChildren, memo, useState } from 'react';
|
5
|
+
import { usePathname, useRouter } from 'next/navigation';
|
6
|
+
import { PropsWithChildren, memo, useEffect, useState } from 'react';
|
7
7
|
|
8
|
-
|
8
|
+
import InterceptingLayout from './features/InterceptingContext';
|
9
|
+
|
10
|
+
const InterceptingModal = memo<PropsWithChildren>(({ children }) => {
|
9
11
|
const [open, setOpen] = useState(true);
|
10
12
|
const router = useRouter();
|
13
|
+
const pathname = usePathname();
|
14
|
+
const isDiscover = pathname.startsWith('/discover');
|
11
15
|
const theme = useTheme();
|
12
16
|
|
17
|
+
const inModal =
|
18
|
+
pathname.startsWith('/settings') ||
|
19
|
+
pathname.startsWith('/chat/settings') ||
|
20
|
+
pathname.startsWith('/discover/assistant/') ||
|
21
|
+
pathname.startsWith('/discover/model/') ||
|
22
|
+
pathname.startsWith('/discover/plugin/') ||
|
23
|
+
pathname.startsWith('/discover/provider/');
|
24
|
+
|
25
|
+
useEffect(() => {
|
26
|
+
if (!inModal) {
|
27
|
+
setOpen(false);
|
28
|
+
} else {
|
29
|
+
setOpen(true);
|
30
|
+
}
|
31
|
+
}, [inModal, router]);
|
32
|
+
|
33
|
+
if (!inModal) return null;
|
34
|
+
|
13
35
|
return (
|
14
|
-
<
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
36
|
+
<InterceptingLayout>
|
37
|
+
<Modal
|
38
|
+
afterClose={() => {
|
39
|
+
if (inModal) {
|
40
|
+
router.back();
|
41
|
+
} else {
|
42
|
+
router.refresh();
|
43
|
+
}
|
44
|
+
}}
|
45
|
+
enableResponsive={false}
|
46
|
+
footer={null}
|
47
|
+
onCancel={() => {
|
48
|
+
setOpen(false);
|
49
|
+
router.back();
|
50
|
+
}}
|
51
|
+
open={open}
|
52
|
+
styles={{
|
53
|
+
body: {
|
54
|
+
display: 'flex',
|
55
|
+
maxHeight: isDiscover ? '80vh' : undefined,
|
56
|
+
minHeight: 750,
|
57
|
+
overflow: 'hidden',
|
58
|
+
padding: 0,
|
59
|
+
},
|
60
|
+
content: { border: 'none', boxShadow: `0 0 0 1px ${theme.colorBorderSecondary}` },
|
61
|
+
}}
|
62
|
+
title={false}
|
63
|
+
width={isDiscover ? 'min(80vw, 1280px)' : 'min(80vw, 1024px)'}
|
64
|
+
>
|
65
|
+
{children}
|
66
|
+
</Modal>
|
67
|
+
</InterceptingLayout>
|
31
68
|
);
|
32
69
|
});
|
33
70
|
|
34
|
-
export default
|
71
|
+
export default InterceptingModal;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { DEFAULT_LANG } from '@/const/locale';
|
2
|
-
|
3
|
-
import { AgentMarket } from '../AgentMarket';
|
2
|
+
import { AssistantStore } from '@/server/modules/AssistantStore';
|
4
3
|
|
5
4
|
export const runtime = 'edge';
|
6
5
|
|
@@ -9,7 +8,7 @@ export const GET = async (req: Request, { params }: { params: { id: string } })
|
|
9
8
|
|
10
9
|
const locale = searchParams.get('locale');
|
11
10
|
|
12
|
-
const market = new
|
11
|
+
const market = new AssistantStore();
|
13
12
|
|
14
13
|
let res: Response;
|
15
14
|
|
@@ -1,15 +1,12 @@
|
|
1
1
|
import { DEFAULT_LANG } from '@/const/locale';
|
2
|
-
|
3
|
-
import { AgentMarket } from './AgentMarket';
|
2
|
+
import { AssistantStore } from '@/server/modules/AssistantStore';
|
4
3
|
|
5
4
|
export const runtime = 'edge';
|
6
5
|
|
7
|
-
export const revalidate = 3600; // revalidate at almost every hour
|
8
|
-
|
9
6
|
export const GET = async (req: Request) => {
|
10
7
|
const locale = new URL(req.url).searchParams.get('locale');
|
11
8
|
|
12
|
-
const market = new
|
9
|
+
const market = new AssistantStore();
|
13
10
|
|
14
11
|
let res: Response;
|
15
12
|
|
@@ -1,11 +1,8 @@
|
|
1
1
|
import { DEFAULT_LANG } from '@/const/locale';
|
2
|
-
|
3
|
-
import { PluginStore } from './Store';
|
2
|
+
import { PluginStore } from '@/server/modules/PluginStore';
|
4
3
|
|
5
4
|
export const runtime = 'edge';
|
6
5
|
|
7
|
-
export const revalidate = 43_200; // revalidate at almost every 12 hours
|
8
|
-
|
9
6
|
export const GET = async (req: Request) => {
|
10
7
|
const locale = new URL(req.url).searchParams.get('locale');
|
11
8
|
|
package/src/app/metadata.ts
CHANGED
@@ -14,6 +14,9 @@ export const generateMetadata = async (): Promise<Metadata> => {
|
|
14
14
|
const { t } = await translation('metadata');
|
15
15
|
|
16
16
|
return {
|
17
|
+
alternates: {
|
18
|
+
canonical: OFFICIAL_URL,
|
19
|
+
},
|
17
20
|
appleWebApp: {
|
18
21
|
statusBarStyle: 'black-translucent',
|
19
22
|
title: BRANDING_NAME,
|