@lobehub/chat 1.17.6 → 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.

Files changed (339) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/locales/ar/common.json +1 -1
  3. package/locales/ar/discover.json +204 -0
  4. package/locales/ar/metadata.json +20 -3
  5. package/locales/ar/models.json +845 -0
  6. package/locales/ar/providers.json +80 -0
  7. package/locales/bg-BG/common.json +1 -1
  8. package/locales/bg-BG/discover.json +204 -0
  9. package/locales/bg-BG/metadata.json +20 -3
  10. package/locales/bg-BG/models.json +845 -0
  11. package/locales/bg-BG/providers.json +80 -0
  12. package/locales/de-DE/common.json +1 -1
  13. package/locales/de-DE/discover.json +204 -0
  14. package/locales/de-DE/metadata.json +20 -3
  15. package/locales/de-DE/models.json +845 -0
  16. package/locales/de-DE/providers.json +80 -0
  17. package/locales/en-US/common.json +1 -1
  18. package/locales/en-US/discover.json +204 -0
  19. package/locales/en-US/metadata.json +20 -3
  20. package/locales/en-US/models.json +845 -0
  21. package/locales/en-US/providers.json +80 -0
  22. package/locales/es-ES/common.json +1 -1
  23. package/locales/es-ES/discover.json +204 -0
  24. package/locales/es-ES/metadata.json +20 -3
  25. package/locales/es-ES/models.json +845 -0
  26. package/locales/es-ES/providers.json +80 -0
  27. package/locales/fr-FR/common.json +1 -1
  28. package/locales/fr-FR/discover.json +204 -0
  29. package/locales/fr-FR/metadata.json +20 -3
  30. package/locales/fr-FR/models.json +845 -0
  31. package/locales/fr-FR/providers.json +80 -0
  32. package/locales/it-IT/common.json +1 -1
  33. package/locales/it-IT/discover.json +204 -0
  34. package/locales/it-IT/metadata.json +20 -3
  35. package/locales/it-IT/models.json +845 -0
  36. package/locales/it-IT/providers.json +80 -0
  37. package/locales/ja-JP/common.json +1 -1
  38. package/locales/ja-JP/discover.json +204 -0
  39. package/locales/ja-JP/metadata.json +20 -3
  40. package/locales/ja-JP/models.json +845 -0
  41. package/locales/ja-JP/providers.json +80 -0
  42. package/locales/ko-KR/common.json +1 -1
  43. package/locales/ko-KR/discover.json +204 -0
  44. package/locales/ko-KR/metadata.json +20 -3
  45. package/locales/ko-KR/models.json +845 -0
  46. package/locales/ko-KR/providers.json +80 -0
  47. package/locales/nl-NL/common.json +1 -1
  48. package/locales/nl-NL/discover.json +204 -0
  49. package/locales/nl-NL/metadata.json +20 -3
  50. package/locales/nl-NL/models.json +845 -0
  51. package/locales/nl-NL/providers.json +80 -0
  52. package/locales/pl-PL/common.json +1 -1
  53. package/locales/pl-PL/discover.json +204 -0
  54. package/locales/pl-PL/metadata.json +20 -3
  55. package/locales/pl-PL/models.json +845 -0
  56. package/locales/pl-PL/providers.json +80 -0
  57. package/locales/pt-BR/common.json +1 -1
  58. package/locales/pt-BR/discover.json +204 -0
  59. package/locales/pt-BR/metadata.json +20 -3
  60. package/locales/pt-BR/models.json +845 -0
  61. package/locales/pt-BR/providers.json +80 -0
  62. package/locales/ru-RU/common.json +1 -1
  63. package/locales/ru-RU/discover.json +204 -0
  64. package/locales/ru-RU/metadata.json +20 -3
  65. package/locales/ru-RU/models.json +845 -0
  66. package/locales/ru-RU/providers.json +80 -0
  67. package/locales/tr-TR/common.json +1 -1
  68. package/locales/tr-TR/discover.json +204 -0
  69. package/locales/tr-TR/metadata.json +20 -3
  70. package/locales/tr-TR/models.json +845 -0
  71. package/locales/tr-TR/providers.json +80 -0
  72. package/locales/vi-VN/common.json +1 -1
  73. package/locales/vi-VN/discover.json +204 -0
  74. package/locales/vi-VN/metadata.json +20 -3
  75. package/locales/vi-VN/models.json +845 -0
  76. package/locales/vi-VN/providers.json +80 -0
  77. package/locales/zh-CN/common.json +1 -1
  78. package/locales/zh-CN/discover.json +204 -0
  79. package/locales/zh-CN/metadata.json +20 -3
  80. package/locales/zh-CN/models.json +845 -0
  81. package/locales/zh-CN/providers.json +80 -0
  82. package/locales/zh-CN/welcome.json +1 -1
  83. package/locales/zh-TW/common.json +1 -1
  84. package/locales/zh-TW/discover.json +204 -0
  85. package/locales/zh-TW/metadata.json +20 -3
  86. package/locales/zh-TW/models.json +845 -0
  87. package/locales/zh-TW/providers.json +80 -0
  88. package/package.json +3 -2
  89. package/src/app/(main)/@nav/_layout/Desktop/TopActions.test.tsx +3 -3
  90. package/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx +3 -3
  91. package/src/app/(main)/@nav/_layout/Mobile.tsx +3 -3
  92. package/src/app/(main)/_layout/Mobile.tsx +9 -1
  93. package/src/app/(main)/discover/(detail)/_layout/Desktop.tsx +24 -0
  94. package/src/app/(main)/discover/(detail)/_layout/Mobile/Header.tsx +25 -0
  95. package/src/app/(main)/discover/(detail)/_layout/Mobile/index.tsx +17 -0
  96. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/Actions.tsx +35 -0
  97. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/AddAgent.tsx +86 -0
  98. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/ConversationExample/TopicList.tsx +74 -0
  99. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/ConversationExample/index.tsx +100 -0
  100. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/Header.tsx +118 -0
  101. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/InfoSidebar/SuggestionItem.tsx +62 -0
  102. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/InfoSidebar/ToolItem.tsx +19 -0
  103. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/InfoSidebar/index.tsx +64 -0
  104. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/SystemRole.tsx +35 -0
  105. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/Temp.tsx +44 -0
  106. package/src/app/(main)/discover/(detail)/assistant/[slug]/page.tsx +121 -0
  107. package/src/app/(main)/discover/(detail)/error.tsx +5 -0
  108. package/src/app/(main)/discover/(detail)/features/Back.tsx +42 -0
  109. package/src/app/(main)/discover/(detail)/features/Block.tsx +50 -0
  110. package/src/app/(main)/discover/(detail)/features/DetailLayout.tsx +91 -0
  111. package/src/app/(main)/discover/(detail)/features/HighlightBlock.tsx +82 -0
  112. package/src/app/(main)/discover/(detail)/features/ShareButton.tsx +160 -0
  113. package/src/app/(main)/discover/(detail)/features/SidebarContainer.tsx +19 -0
  114. package/src/app/(main)/discover/(detail)/layout.tsx +12 -0
  115. package/src/app/(main)/discover/(detail)/loading.tsx +38 -0
  116. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Actions.tsx +46 -0
  117. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ChatWithModel.tsx +93 -0
  118. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Header.tsx +85 -0
  119. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/InfoSidebar/SuggestionItem.tsx +75 -0
  120. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/InfoSidebar/index.tsx +49 -0
  121. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ParameterList/ParameterItem.tsx +71 -0
  122. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ParameterList/index.tsx +110 -0
  123. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ProviderList/ProviderItem.tsx +152 -0
  124. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ProviderList/index.tsx +45 -0
  125. package/src/app/(main)/discover/(detail)/model/[...slugs]/page.tsx +114 -0
  126. package/src/app/(main)/discover/(detail)/not-found.tsx +3 -0
  127. package/src/app/(main)/discover/(detail)/plugin/[slug]/features/Actions.tsx +35 -0
  128. package/src/app/(main)/discover/(detail)/plugin/[slug]/features/Header.tsx +114 -0
  129. package/src/app/(main)/discover/(detail)/plugin/[slug]/features/InfoSidebar/SuggestionItem.tsx +62 -0
  130. package/src/app/(main)/discover/(detail)/plugin/[slug]/features/InfoSidebar/index.tsx +49 -0
  131. package/src/app/(main)/discover/(detail)/plugin/[slug]/features/InstallPlugin.tsx +87 -0
  132. package/src/app/(main)/discover/(detail)/plugin/[slug]/features/ParameterList.tsx +95 -0
  133. package/src/app/(main)/discover/(detail)/plugin/[slug]/features/Schema.tsx +23 -0
  134. package/src/app/(main)/discover/(detail)/plugin/[slug]/page.tsx +103 -0
  135. package/src/app/(main)/discover/(detail)/provider/[slug]/features/Actions.tsx +49 -0
  136. package/src/app/(main)/discover/(detail)/provider/[slug]/features/Header.tsx +73 -0
  137. package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/SuggestionItem.tsx +75 -0
  138. package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/index.tsx +49 -0
  139. package/src/app/(main)/discover/(detail)/provider/[slug]/features/ModelList/ModelItem.tsx +148 -0
  140. package/src/app/(main)/discover/(detail)/provider/[slug]/features/ModelList/index.tsx +60 -0
  141. package/src/app/(main)/discover/(detail)/provider/[slug]/features/ProviderConfig.tsx +80 -0
  142. package/src/app/(main)/discover/(detail)/provider/[slug]/page.tsx +116 -0
  143. package/src/app/(main)/discover/(list)/(home)/Client.tsx +42 -0
  144. package/src/app/(main)/discover/(list)/(home)/features/AssistantList.tsx +33 -0
  145. package/src/app/(main)/discover/(list)/(home)/features/ModelList.tsx +22 -0
  146. package/src/app/(main)/discover/(list)/(home)/features/PluginList.tsx +25 -0
  147. package/src/app/(main)/discover/(list)/(home)/loading.tsx +1 -0
  148. package/src/app/(main)/discover/(list)/(home)/page.tsx +54 -0
  149. package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +118 -0
  150. package/src/app/(main)/discover/(list)/_layout/Desktop/index.tsx +37 -0
  151. package/src/app/(main)/discover/(list)/_layout/Desktop/useScroll.ts +33 -0
  152. package/src/app/(main)/discover/(list)/_layout/Mobile/Header.tsx +62 -0
  153. package/src/app/(main)/discover/(list)/_layout/Mobile/Nav.tsx +94 -0
  154. package/src/app/(main)/discover/(list)/_layout/Mobile/index.tsx +27 -0
  155. package/src/app/(main)/discover/(list)/assistants/[slug]/page.tsx +64 -0
  156. package/src/app/(main)/discover/(list)/assistants/_layout/Desktop.tsx +22 -0
  157. package/src/app/(main)/discover/(list)/assistants/_layout/Mobile.tsx +9 -0
  158. package/src/app/(main)/discover/(list)/assistants/features/Card.tsx +176 -0
  159. package/src/app/(main)/discover/(list)/assistants/features/Category.tsx +48 -0
  160. package/src/app/(main)/discover/(list)/assistants/features/List.tsx +97 -0
  161. package/src/app/(main)/discover/(list)/assistants/features/useCategory.tsx +116 -0
  162. package/src/app/(main)/discover/(list)/assistants/layout.tsx +12 -0
  163. package/src/app/(main)/discover/(list)/assistants/loading.tsx +1 -0
  164. package/src/app/(main)/discover/(list)/assistants/page.tsx +51 -0
  165. package/src/app/(main)/discover/(list)/error.tsx +5 -0
  166. package/src/app/(main)/{market → discover/(list)}/layout.tsx +4 -3
  167. package/src/app/(main)/discover/(list)/loading.tsx +39 -0
  168. package/src/app/(main)/discover/(list)/models/[slug]/page.tsx +70 -0
  169. package/src/app/(main)/discover/(list)/models/_layout/Desktop.tsx +28 -0
  170. package/src/app/(main)/discover/(list)/models/_layout/Mobile.tsx +9 -0
  171. package/src/app/(main)/discover/(list)/models/features/Card.tsx +116 -0
  172. package/src/app/(main)/discover/(list)/models/features/Category.tsx +67 -0
  173. package/src/app/(main)/discover/(list)/models/features/List.tsx +72 -0
  174. package/src/app/(main)/discover/(list)/models/features/const.ts +9 -0
  175. package/src/app/(main)/discover/(list)/models/layout.tsx +12 -0
  176. package/src/app/(main)/discover/(list)/models/loading.tsx +1 -0
  177. package/src/app/(main)/discover/(list)/models/page.tsx +61 -0
  178. package/src/app/(main)/discover/(list)/not-found.tsx +3 -0
  179. package/src/app/(main)/discover/(list)/plugins/[slug]/page.tsx +64 -0
  180. package/src/app/(main)/discover/(list)/plugins/_layout/Desktop.tsx +22 -0
  181. package/src/app/(main)/discover/(list)/plugins/_layout/Mobile.tsx +9 -0
  182. package/src/app/(main)/discover/(list)/plugins/features/Card.tsx +154 -0
  183. package/src/app/(main)/discover/(list)/plugins/features/Category.tsx +45 -0
  184. package/src/app/(main)/discover/(list)/plugins/features/List.tsx +96 -0
  185. package/src/app/(main)/discover/(list)/plugins/features/useCategory.tsx +80 -0
  186. package/src/app/(main)/discover/(list)/plugins/layout.tsx +12 -0
  187. package/src/app/(main)/discover/(list)/plugins/loading.tsx +1 -0
  188. package/src/app/(main)/discover/(list)/plugins/page.tsx +52 -0
  189. package/src/app/(main)/discover/(list)/providers/features/Card.tsx +117 -0
  190. package/src/app/(main)/discover/(list)/providers/features/List.tsx +71 -0
  191. package/src/app/(main)/discover/(list)/providers/loading.tsx +1 -0
  192. package/src/app/(main)/discover/(list)/providers/page.tsx +52 -0
  193. package/src/app/(main)/discover/_layout/Desktop/Header.tsx +36 -0
  194. package/src/app/(main)/discover/_layout/Desktop/index.tsx +21 -0
  195. package/src/app/(main)/discover/_layout/Mobile/index.tsx +9 -0
  196. package/src/app/(main)/{market/features/AgentCard/AgentCardBanner.tsx → discover/components/CardBanner.tsx} +5 -5
  197. package/src/app/(main)/discover/components/CategoryContainer.tsx +18 -0
  198. package/src/app/(main)/discover/components/CategoryMenu.tsx +39 -0
  199. package/src/app/(main)/discover/components/GitHubAvatar.tsx +19 -0
  200. package/src/app/(main)/discover/components/GridLoadingCard.tsx +69 -0
  201. package/src/app/(main)/discover/components/ListLoading.tsx +66 -0
  202. package/src/app/(main)/discover/components/Loading.tsx +17 -0
  203. package/src/app/(main)/discover/components/SearchResultCount.tsx +37 -0
  204. package/src/app/(main)/discover/components/Statistic.tsx +92 -0
  205. package/src/app/(main)/discover/components/Title.tsx +76 -0
  206. package/src/app/(main)/discover/components/VirtuosoGridList/index.tsx +52 -0
  207. package/src/app/(main)/discover/components/VirtuosoGridList/useScrollParent.ts +19 -0
  208. package/src/app/(main)/discover/error.tsx +5 -0
  209. package/src/app/(main)/{market/features/ShareAgentButton → discover/features/CreateButton}/Inner.tsx +9 -10
  210. package/src/app/(main)/{market/features/ShareAgentButton → discover/features/CreateButton}/index.tsx +9 -9
  211. package/src/app/(main)/discover/features/LikeButton.tsx +73 -0
  212. package/src/app/(main)/discover/features/ModelFeatureTags.tsx +77 -0
  213. package/src/app/(main)/discover/features/StoreSearchBar.tsx +84 -0
  214. package/src/app/(main)/discover/features/const.ts +2 -0
  215. package/src/app/(main)/discover/features/useNav.tsx +71 -0
  216. package/src/app/(main)/discover/layout.tsx +12 -0
  217. package/src/app/(main)/discover/loading.tsx +9 -0
  218. package/src/app/(main)/discover/not-found.tsx +3 -0
  219. package/src/app/(main)/discover/search/_layout/Desktop.tsx +42 -0
  220. package/src/app/(main)/discover/search/_layout/Mobile/Header.tsx +31 -0
  221. package/src/app/(main)/discover/search/_layout/Mobile/Nav.tsx +56 -0
  222. package/src/app/(main)/discover/search/_layout/Mobile/index.tsx +32 -0
  223. package/src/app/(main)/discover/search/features/AssistantsResult.tsx +27 -0
  224. package/src/app/(main)/discover/search/features/Category.tsx +41 -0
  225. package/src/app/(main)/discover/search/features/ModelsResult.tsx +27 -0
  226. package/src/app/(main)/discover/search/features/PluginsResult.tsx +27 -0
  227. package/src/app/(main)/discover/search/features/ProvidersResult.tsx +26 -0
  228. package/src/app/(main)/discover/search/layout.tsx +12 -0
  229. package/src/app/(main)/discover/search/loading.tsx +1 -0
  230. package/src/app/(main)/discover/search/page.tsx +78 -0
  231. package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +0 -6
  232. package/src/app/(main)/welcome/features/Actions.tsx +1 -1
  233. package/src/app/@modal/(.)discover/assistant/[slug]/page.tsx +1 -0
  234. package/src/app/@modal/(.)discover/layout.tsx +29 -0
  235. package/src/app/@modal/(.)discover/loading.tsx +3 -0
  236. package/src/app/@modal/(.)discover/model/[...slugs]/page.tsx +1 -0
  237. package/src/app/@modal/(.)discover/plugin/[slug]/page.tsx +1 -0
  238. package/src/app/@modal/(.)discover/provider/[slug]/page.tsx +1 -0
  239. package/src/app/@modal/features/InterceptingContext.tsx +9 -0
  240. package/src/app/@modal/layout.tsx +58 -21
  241. package/src/app/api/{market → assistant}/[id]/route.ts +2 -3
  242. package/src/app/api/{market → assistant/store}/route.ts +2 -5
  243. package/src/app/api/plugin/store/route.ts +1 -4
  244. package/src/app/metadata.ts +3 -0
  245. package/src/app/redirect/page.tsx +15 -0
  246. package/src/components/FetchErrorNotification/Description.tsx +2 -0
  247. package/src/components/InterceptingLink/index.tsx +27 -0
  248. package/src/components/mdx/CodeBlock.tsx +46 -0
  249. package/src/components/mdx/Link.tsx +21 -0
  250. package/src/components/mdx/index.tsx +51 -0
  251. package/src/config/modelProviders/ollama.ts +0 -8
  252. package/src/const/discover.ts +63 -1
  253. package/src/features/Conversation/Error/PluginSettings.tsx +1 -1
  254. package/src/features/Conversation/Messages/Tool/Inspector/Settings.tsx +1 -1
  255. package/src/features/Conversation/components/InboxWelcome/AgentsSuggest.tsx +41 -24
  256. package/src/features/MobileTabBar/index.tsx +3 -3
  257. package/src/features/PluginDetailModal/APIs.tsx +1 -1
  258. package/src/features/PluginDevModal/UrlManifestForm.tsx +1 -1
  259. package/src/features/PluginStore/PluginItem/Action.tsx +1 -1
  260. package/src/features/PluginsUI/Render/DefaultType/index.tsx +1 -1
  261. package/src/features/PluginsUI/Render/StandaloneType/index.tsx +1 -1
  262. package/src/hooks/useInterceptingRoutes.ts +21 -1
  263. package/src/hooks/useShare.tsx +191 -0
  264. package/src/libs/agent-runtime/utils/streams/openai.test.ts +43 -0
  265. package/src/libs/agent-runtime/utils/streams/openai.ts +1 -1
  266. package/src/locales/create.ts +1 -1
  267. package/src/locales/default/common.ts +1 -1
  268. package/src/locales/default/discover.ts +205 -0
  269. package/src/locales/default/index.ts +6 -2
  270. package/src/locales/default/metadata.ts +23 -3
  271. package/src/locales/default/models.ts +15 -0
  272. package/src/locales/default/providers.ts +15 -0
  273. package/src/locales/default/welcome.ts +1 -1
  274. package/src/locales/resources.ts +2 -0
  275. package/src/server/ld.ts +85 -11
  276. package/src/server/metadata.ts +41 -3
  277. package/src/{app/api/market/AgentMarket.test.ts → server/modules/AssistantStore/index.test.ts} +15 -15
  278. package/src/{app/api/market/AgentMarket.ts → server/modules/AssistantStore/index.ts} +7 -3
  279. package/src/{app/api/plugin/store/Store.test.ts → server/modules/PluginStore/index.test.ts} +1 -1
  280. package/src/server/services/discover/index.ts +352 -0
  281. package/src/server/services/doc/index.tsx +40 -0
  282. package/src/server/translation.ts +11 -5
  283. package/src/services/__tests__/__snapshots__/tool.test.ts.snap +1 -1
  284. package/src/services/{_auth.test.ts → __tests__/_auth.test.ts} +1 -1
  285. package/src/services/__tests__/assistant.test.ts +82 -0
  286. package/src/services/__tests__/tool.test.ts +13 -13
  287. package/src/services/_url.ts +2 -2
  288. package/src/services/assistant.ts +30 -0
  289. package/src/services/chat.ts +1 -1
  290. package/src/services/tool.ts +7 -129
  291. package/src/store/chat/slices/plugin/action.test.ts +112 -0
  292. package/src/store/chat/slices/plugin/action.ts +1 -3
  293. package/src/store/global/initialState.ts +1 -1
  294. package/src/store/tool/selectors/tool.test.ts +1 -1
  295. package/src/store/tool/slices/customPlugin/action.test.ts +1 -1
  296. package/src/store/tool/slices/customPlugin/action.ts +1 -1
  297. package/src/store/tool/slices/plugin/action.ts +1 -1
  298. package/src/store/tool/slices/plugin/selectors.test.ts +3 -3
  299. package/src/store/tool/slices/plugin/selectors.ts +3 -3
  300. package/src/store/tool/slices/store/action.test.ts +16 -22
  301. package/src/store/tool/slices/store/action.ts +8 -8
  302. package/src/types/discover.ts +152 -0
  303. package/src/types/llm.ts +4 -2
  304. package/src/types/meta.ts +1 -0
  305. package/src/utils/format.test.ts +191 -112
  306. package/src/utils/format.ts +36 -0
  307. package/src/utils/toolManifest.ts +124 -0
  308. package/src/app/(main)/market/@detail/default.tsx +0 -12
  309. package/src/app/(main)/market/@detail/features/AgentDetailContent.tsx +0 -73
  310. package/src/app/(main)/market/@detail/features/Banner.tsx +0 -46
  311. package/src/app/(main)/market/@detail/features/Comment.tsx +0 -16
  312. package/src/app/(main)/market/@detail/features/Header.tsx +0 -81
  313. package/src/app/(main)/market/@detail/features/Loading.tsx +0 -63
  314. package/src/app/(main)/market/@detail/features/TokenTag.tsx +0 -27
  315. package/src/app/(main)/market/@detail/features/style.ts +0 -32
  316. package/src/app/(main)/market/_layout/Desktop/DetailSidebar.tsx +0 -84
  317. package/src/app/(main)/market/_layout/Desktop/Header.tsx +0 -29
  318. package/src/app/(main)/market/_layout/Desktop/Hero.tsx +0 -40
  319. package/src/app/(main)/market/_layout/Desktop/index.tsx +0 -46
  320. package/src/app/(main)/market/_layout/Mobile/DetailModal.tsx +0 -32
  321. package/src/app/(main)/market/_layout/Mobile/Header.tsx +0 -20
  322. package/src/app/(main)/market/_layout/Mobile/index.tsx +0 -25
  323. package/src/app/(main)/market/_layout/type.ts +0 -6
  324. package/src/app/(main)/market/features/AgentCard/index.tsx +0 -139
  325. package/src/app/(main)/market/features/AgentList.tsx +0 -103
  326. package/src/app/(main)/market/features/AgentSearchBar.tsx +0 -42
  327. package/src/app/(main)/market/features/TagList.tsx +0 -69
  328. package/src/app/(main)/market/loading.tsx +0 -15
  329. package/src/app/(main)/market/page.tsx +0 -44
  330. package/src/const/market.ts +0 -15
  331. package/src/locales/default/market.ts +0 -32
  332. package/src/services/market.ts +0 -22
  333. package/src/store/market/action.ts +0 -82
  334. package/src/store/market/index.ts +0 -3
  335. package/src/store/market/initialState.ts +0 -19
  336. package/src/store/market/selectors.ts +0 -38
  337. package/src/store/market/store.ts +0 -48
  338. package/src/types/market.ts +0 -20
  339. /package/src/{app/api/plugin/store/Store.ts → server/modules/PluginStore/index.ts} +0 -0
@@ -0,0 +1,72 @@
1
+ 'use client';
2
+
3
+ import { Empty } from 'antd';
4
+ import { memo } from 'react';
5
+ import { useTranslation } from 'react-i18next';
6
+ import urlJoin from 'url-join';
7
+
8
+ import InterceptingLink from '@/components/InterceptingLink';
9
+ import { DiscoverModelItem } from '@/types/discover';
10
+
11
+ import SearchResultCount from '../../../components/SearchResultCount';
12
+ import Title from '../../../components/Title';
13
+ import VirtuosoGridList from '../../../components/VirtuosoGridList';
14
+ import Card from './Card';
15
+
16
+ export interface ListProps {
17
+ category?: string;
18
+ items?: DiscoverModelItem[];
19
+ mobile?: boolean;
20
+ searchKeywords?: string;
21
+ }
22
+
23
+ const List = memo<ListProps>(({ category, searchKeywords, items = [] }) => {
24
+ const { t } = useTranslation('discover');
25
+
26
+ if (searchKeywords) {
27
+ if (!items || items?.length === 0) return <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />;
28
+ return (
29
+ <>
30
+ <SearchResultCount count={items.length} keyword={searchKeywords} />
31
+ <VirtuosoGridList
32
+ data={items}
33
+ initialItemCount={24}
34
+ itemContent={(_, item) => (
35
+ <InterceptingLink
36
+ href={urlJoin('/discover/model/', item.identifier)}
37
+ key={item.identifier}
38
+ >
39
+ <Card showCategory {...item} />
40
+ </InterceptingLink>
41
+ )}
42
+ style={{
43
+ minHeight: '75vh',
44
+ }}
45
+ />
46
+ </>
47
+ );
48
+ }
49
+
50
+ return (
51
+ <>
52
+ <Title tag={items.length}>{t('models.list')}</Title>
53
+ <VirtuosoGridList
54
+ data={items}
55
+ initialItemCount={24}
56
+ itemContent={(_, item) => (
57
+ <InterceptingLink
58
+ href={urlJoin('/discover/model/', item.identifier)}
59
+ key={item.identifier}
60
+ >
61
+ <Card showCategory={!category} {...item} />
62
+ </InterceptingLink>
63
+ )}
64
+ style={{
65
+ minHeight: '75vh',
66
+ }}
67
+ />
68
+ </>
69
+ );
70
+ });
71
+
72
+ export default List;
@@ -0,0 +1,9 @@
1
+ import { DEFAULT_MODEL_PROVIDER_LIST } from '@/config/modelProviders';
2
+
3
+ const providerMap: { [key: string]: string } = {};
4
+
5
+ DEFAULT_MODEL_PROVIDER_LIST.filter((item) => item.chatModels.length > 0).forEach((item) => {
6
+ providerMap[item.id] = item.name;
7
+ });
8
+
9
+ export { providerMap };
@@ -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 = 'DiscoverModelsLayout';
11
+
12
+ export default MainLayout;
@@ -0,0 +1 @@
1
+ export { ListLoadingWithoutBanner as default } from '../../components/ListLoading';
@@ -0,0 +1,61 @@
1
+ import StructuredData from '@/components/StructuredData';
2
+ import { DEFAULT_LANG } from '@/const/locale';
3
+ import { Locales } from '@/locales/resources';
4
+ import { ldModule } from '@/server/ld';
5
+ import { metadataModule } from '@/server/metadata';
6
+ import { DiscoverService } from '@/server/services/discover';
7
+ import { translation } from '@/server/translation';
8
+ import { isMobileDevice } from '@/utils/responsive';
9
+
10
+ import List from './features/List';
11
+
12
+ type Props = { searchParams: { hl?: Locales } };
13
+
14
+ export const generateMetadata = async ({ searchParams }: Props) => {
15
+ const { t, locale } = await translation('metadata', searchParams?.hl);
16
+
17
+ return metadataModule.generate({
18
+ alternate: true,
19
+ description: t('discover.models.description'),
20
+ locale,
21
+ title: t('discover.models.title'),
22
+ url: '/discover/models',
23
+ });
24
+ };
25
+
26
+ const Page = async ({ searchParams }: Props) => {
27
+ const { t, locale } = await translation('metadata', searchParams?.hl);
28
+ const mobile = isMobileDevice();
29
+
30
+ const discoverService = new DiscoverService();
31
+ const items = await discoverService.getModelList(locale);
32
+
33
+ const ld = ldModule.generate({
34
+ description: t('discover.models.description'),
35
+ title: t('discover.models.title'),
36
+ url: '/discover/models',
37
+ webpage: {
38
+ enable: true,
39
+ search: '/discover/search',
40
+ },
41
+ });
42
+
43
+ return (
44
+ <>
45
+ <StructuredData ld={ld} />
46
+ <List items={items} mobile={mobile} />
47
+ </>
48
+ );
49
+ };
50
+
51
+ export const generateStaticParams = async () => {
52
+ const discoverService = new DiscoverService();
53
+ const cates = await discoverService.getProviderList(DEFAULT_LANG);
54
+ return cates.map((cate) => ({
55
+ slug: cate,
56
+ }));
57
+ };
58
+
59
+ Page.DisplayName = 'DiscoverModels';
60
+
61
+ export default Page;
@@ -0,0 +1,3 @@
1
+ import dynamic from 'next/dynamic';
2
+
3
+ export default dynamic(() => import('@/components/404'));
@@ -0,0 +1,64 @@
1
+ import urlJoin from 'url-join';
2
+
3
+ import StructuredData from '@/components/StructuredData';
4
+ import { Locales } from '@/locales/resources';
5
+ import { ldModule } from '@/server/ld';
6
+ import { metadataModule } from '@/server/metadata';
7
+ import { DiscoverService } from '@/server/services/discover';
8
+ import { translation } from '@/server/translation';
9
+ import { PluginCategory } from '@/types/discover';
10
+ import { isMobileDevice } from '@/utils/responsive';
11
+
12
+ import List from '../features/List';
13
+
14
+ type Props = { params: { slug: PluginCategory }; searchParams: { hl?: Locales } };
15
+
16
+ export const generateMetadata = async ({ params, searchParams }: Props) => {
17
+ const { t, locale } = await translation('metadata', searchParams?.hl);
18
+ const { t: td } = await translation('discover', searchParams?.hl);
19
+
20
+ return metadataModule.generate({
21
+ alternate: true,
22
+ description: t('discover.plugins.description'),
23
+ locale,
24
+ title: [td(`category.plugin.${params.slug}`), t('discover.plugins.title')].join(' · '),
25
+ url: urlJoin('/discover/plugins', params.slug),
26
+ });
27
+ };
28
+
29
+ const Page = async ({ params, searchParams }: Props) => {
30
+ const { t, locale } = await translation('metadata', searchParams?.hl);
31
+ const { t: td } = await translation('discover', searchParams?.hl);
32
+ const mobile = isMobileDevice();
33
+
34
+ const discoverService = new DiscoverService();
35
+ const items = await discoverService.getPluginCategory(locale, params.slug);
36
+
37
+ const ld = ldModule.generate({
38
+ description: t('discover.plugins.description'),
39
+ title: [td(`category.plugin.${params.slug}`), t('discover.plugins.title')].join(' · '),
40
+ url: urlJoin('/discover/plugins', params.slug),
41
+ webpage: {
42
+ enable: true,
43
+ search: '/discover/search',
44
+ },
45
+ });
46
+
47
+ return (
48
+ <>
49
+ <StructuredData ld={ld} />
50
+ <List category={params.slug} items={items} mobile={mobile} />
51
+ </>
52
+ );
53
+ };
54
+
55
+ export const generateStaticParams = async () => {
56
+ const cates = Object.values(PluginCategory);
57
+ return cates.map((cate) => ({
58
+ slug: cate,
59
+ }));
60
+ };
61
+
62
+ Page.DisplayName = 'DiscoverToolsCategory';
63
+
64
+ export default Page;
@@ -0,0 +1,22 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { Flexbox } from 'react-layout-kit';
3
+
4
+ import CategoryContainer from '../../../components/CategoryContainer';
5
+ import Category from '../features/Category';
6
+
7
+ const Layout = ({ children }: PropsWithChildren) => {
8
+ return (
9
+ <Flexbox gap={24} horizontal style={{ position: 'relative' }} width={'100%'}>
10
+ <CategoryContainer>
11
+ <Category />
12
+ </CategoryContainer>
13
+ <Flexbox flex={1} gap={16}>
14
+ {children}
15
+ </Flexbox>
16
+ </Flexbox>
17
+ );
18
+ };
19
+
20
+ Layout.displayName = 'DesktopDiscoverToolsLayout';
21
+
22
+ export default Layout;
@@ -0,0 +1,9 @@
1
+ import { PropsWithChildren } from 'react';
2
+
3
+ const Layout = ({ children }: PropsWithChildren) => {
4
+ return children;
5
+ };
6
+
7
+ Layout.displayName = 'MobileDiscoverToolsLayout';
8
+
9
+ export default Layout;
@@ -0,0 +1,154 @@
1
+ import { Avatar, Tag } from '@lobehub/ui';
2
+ import { Skeleton, Typography } from 'antd';
3
+ import { createStyles } from 'antd-style';
4
+ import { startCase } from 'lodash-es';
5
+ import dynamic from 'next/dynamic';
6
+ import qs from 'query-string';
7
+ import { memo } from 'react';
8
+ import { Center, Flexbox, FlexboxProps } from 'react-layout-kit';
9
+ import urlJoin from 'url-join';
10
+
11
+ import { DiscoverPlugintem } from '@/types/discover';
12
+
13
+ import CardBanner from '../../../components/CardBanner';
14
+ import { useCategoryItem } from './useCategory';
15
+
16
+ const Link = dynamic(() => import('next/link'), {
17
+ loading: () => <Skeleton.Button size={'small'} style={{ height: 22 }} />,
18
+ ssr: false,
19
+ });
20
+
21
+ const { Paragraph, Title } = Typography;
22
+
23
+ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
24
+ banner: css`
25
+ opacity: ${isDarkMode ? 0.9 : 0.4};
26
+ `,
27
+ container: css`
28
+ cursor: pointer;
29
+
30
+ position: relative;
31
+
32
+ overflow: hidden;
33
+
34
+ height: 100%;
35
+ min-height: 162px;
36
+
37
+ background: ${token.colorBgContainer};
38
+ border-radius: ${token.borderRadiusLG}px;
39
+ box-shadow: 0 0 1px 1px ${isDarkMode ? token.colorFillQuaternary : token.colorFillSecondary}
40
+ inset;
41
+
42
+ transition: box-shadow 0.2s ${token.motionEaseInOut};
43
+
44
+ &:hover {
45
+ box-shadow: 0 0 1px 1px ${isDarkMode ? token.colorFillSecondary : token.colorFill} inset;
46
+ }
47
+ `,
48
+ desc: css`
49
+ min-height: 44px;
50
+ margin-block-end: 0 !important;
51
+ color: ${token.colorTextDescription};
52
+ `,
53
+ inner: css`
54
+ padding: 16px;
55
+ `,
56
+ time: css`
57
+ color: ${token.colorTextDescription};
58
+ `,
59
+ title: css`
60
+ margin-block-end: 0 !important;
61
+ font-size: 18px !important;
62
+ font-weight: bold;
63
+ `,
64
+ }));
65
+
66
+ interface PluginCardProps
67
+ extends Omit<DiscoverPlugintem, 'manifest' | 'suggestions' | 'socialData'>,
68
+ Omit<FlexboxProps, 'children'> {
69
+ showCategory?: boolean;
70
+ variant?: 'default' | 'compact';
71
+ }
72
+
73
+ const PluginCard = memo<PluginCardProps>(
74
+ ({ className, showCategory, meta, createdAt, author, variant, ...rest }) => {
75
+ const { avatar, title, description, tags = [], category } = meta;
76
+ const categoryItem = useCategoryItem(category, 12);
77
+ const { cx, styles, theme } = useStyles();
78
+ const isCompact = variant === 'compact';
79
+
80
+ return (
81
+ <Flexbox className={cx(styles.container, className)} gap={24} {...rest}>
82
+ {!isCompact && <CardBanner avatar={avatar} />}
83
+ <Flexbox className={styles.inner} gap={12}>
84
+ <Flexbox align={'flex-end'} gap={16} horizontal justify={'space-between'} width={'100%'}>
85
+ <Title className={styles.title} ellipsis={{ rows: 1, tooltip: title }} level={3}>
86
+ {title}
87
+ </Title>
88
+ {isCompact ? (
89
+ <Avatar avatar={avatar} size={40} style={{ display: 'block' }} title={title} />
90
+ ) : (
91
+ <Center
92
+ flex={'none'}
93
+ height={64}
94
+ style={{
95
+ background: theme.colorBgContainer,
96
+ borderRadius: '50%',
97
+ marginTop: -6,
98
+ overflow: 'hidden',
99
+ zIndex: 2,
100
+ }}
101
+ width={64}
102
+ >
103
+ <Avatar
104
+ alt={title}
105
+ avatar={avatar}
106
+ size={56}
107
+ style={{ display: 'block' }}
108
+ title={title}
109
+ />
110
+ </Center>
111
+ )}
112
+ </Flexbox>
113
+ <Flexbox gap={8} horizontal style={{ fontSize: 12 }}>
114
+ <div style={{ color: theme.colorTextSecondary }}>@{author}</div>
115
+ {!isCompact && (
116
+ <time className={styles.time} dateTime={new Date(createdAt).toISOString()}>
117
+ {createdAt}
118
+ </time>
119
+ )}
120
+ </Flexbox>
121
+ <Paragraph className={styles.desc} ellipsis={{ rows: 2 }}>
122
+ {description}
123
+ </Paragraph>
124
+ <Flexbox gap={6} horizontal style={{ flexWrap: 'wrap' }}>
125
+ {showCategory && categoryItem ? (
126
+ <Link href={urlJoin('/discover/plugins', categoryItem.key)}>
127
+ <Tag icon={categoryItem.icon} style={{ margin: 0 }}>
128
+ {categoryItem.label}
129
+ </Tag>
130
+ </Link>
131
+ ) : (
132
+ tags
133
+ .slice(0, 4)
134
+ .filter(Boolean)
135
+ .map((tag: string, index) => {
136
+ const url = qs.stringifyUrl({
137
+ query: { q: tag, type: 'plugins' },
138
+ url: '/discover/search',
139
+ });
140
+ return (
141
+ <Link href={url} key={index}>
142
+ <Tag style={{ margin: 0 }}>{startCase(tag).trim()}</Tag>
143
+ </Link>
144
+ );
145
+ })
146
+ )}
147
+ </Flexbox>
148
+ </Flexbox>
149
+ </Flexbox>
150
+ );
151
+ },
152
+ );
153
+
154
+ export default PluginCard;
@@ -0,0 +1,45 @@
1
+ 'use client';
2
+
3
+ import Link from 'next/link';
4
+ import { usePathname } from 'next/navigation';
5
+ import { memo, useMemo } from 'react';
6
+ import urlJoin from 'url-join';
7
+
8
+ import { useQueryRoute } from '@/hooks/useQueryRoute';
9
+ import { PluginCategory } from '@/types/discover';
10
+
11
+ import CategoryMenu from '../../../components/CategoryMenu';
12
+ import { useCategory } from './useCategory';
13
+
14
+ const Category = memo(() => {
15
+ const items = useCategory();
16
+ const pathname = usePathname();
17
+ const selectedKey = useMemo(() => {
18
+ if (pathname.includes('/discover/plugins/')) {
19
+ return pathname.split('/')[3]?.split('?')[0];
20
+ }
21
+ return 'all';
22
+ }, [pathname]);
23
+ const router = useQueryRoute();
24
+
25
+ return (
26
+ <CategoryMenu
27
+ items={items.map((item: any) => ({
28
+ ...item,
29
+ label: (
30
+ <Link
31
+ href={urlJoin('/discover/plugins', item.key === PluginCategory.All ? '' : item.key)}
32
+ >
33
+ {item.label}
34
+ </Link>
35
+ ),
36
+ }))}
37
+ onSelect={({ key }) =>
38
+ router.push(urlJoin('/discover/plugins', key === PluginCategory.All ? '' : key))
39
+ }
40
+ selectedKeys={[selectedKey || 'all']}
41
+ />
42
+ );
43
+ });
44
+
45
+ export default Category;
@@ -0,0 +1,96 @@
1
+ 'use client';
2
+
3
+ import { Grid } from '@lobehub/ui';
4
+ import { Empty } from 'antd';
5
+ import { memo, useMemo } from 'react';
6
+ import { useTranslation } from 'react-i18next';
7
+ import urlJoin from 'url-join';
8
+
9
+ import InterceptingLink from '@/components/InterceptingLink';
10
+ import { DiscoverPlugintem } from '@/types/discover';
11
+
12
+ import SearchResultCount from '../../../components/SearchResultCount';
13
+ import Title from '../../../components/Title';
14
+ import VirtuosoGridList from '../../../components/VirtuosoGridList';
15
+ import Card from './Card';
16
+
17
+ export interface ListProps {
18
+ category?: string;
19
+ items: DiscoverPlugintem[];
20
+ mobile?: boolean;
21
+ searchKeywords?: string;
22
+ }
23
+
24
+ const List = memo<ListProps>(({ category, mobile, searchKeywords, items = [] }) => {
25
+ const { t } = useTranslation('discover');
26
+ const recentLength = mobile ? 4 : 8;
27
+ const { all, recent, last } = useMemo(() => {
28
+ return {
29
+ all: items,
30
+ last: items.slice(recentLength),
31
+ recent: items.slice(0, recentLength),
32
+ };
33
+ }, [items, mobile]);
34
+
35
+ if (searchKeywords) {
36
+ if (!items || items?.length === 0) return <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />;
37
+ return (
38
+ <>
39
+ <SearchResultCount count={all.length} keyword={searchKeywords} />
40
+ <VirtuosoGridList
41
+ data={all}
42
+ initialItemCount={24}
43
+ itemContent={(_, item) => (
44
+ <InterceptingLink
45
+ href={urlJoin('/discover/plugin/', item.identifier)}
46
+ key={item.identifier}
47
+ >
48
+ <Card showCategory variant={'compact'} {...item} />
49
+ </InterceptingLink>
50
+ )}
51
+ style={{
52
+ minHeight: '75vh',
53
+ }}
54
+ />
55
+ </>
56
+ );
57
+ }
58
+
59
+ return (
60
+ <>
61
+ <Title>{t('plugins.recentSubmits')}</Title>
62
+ <Grid maxItemWidth={280} rows={4}>
63
+ {recent.map((item) => (
64
+ <InterceptingLink
65
+ href={urlJoin('/discover/plugin/', item.identifier)}
66
+ key={item.identifier}
67
+ >
68
+ <Card showCategory={!category} {...item} />
69
+ </InterceptingLink>
70
+ ))}
71
+ </Grid>
72
+ {last && last?.length > 0 && (
73
+ <>
74
+ <Title tag={last.length}>{t('plugins.list')}</Title>
75
+ <VirtuosoGridList
76
+ data={last}
77
+ initialItemCount={12}
78
+ itemContent={(_, item) => (
79
+ <InterceptingLink
80
+ href={urlJoin('/discover/plugin/', item.identifier)}
81
+ key={item.identifier}
82
+ >
83
+ <Card showCategory={!category} variant={'compact'} {...item} />
84
+ </InterceptingLink>
85
+ )}
86
+ style={{
87
+ minHeight: '75vh',
88
+ }}
89
+ />
90
+ </>
91
+ )}
92
+ </>
93
+ );
94
+ });
95
+
96
+ export default List;
@@ -0,0 +1,80 @@
1
+ import { Icon } from '@lobehub/ui';
2
+ import { useTheme } from 'antd-style';
3
+ import {
4
+ Gamepad2,
5
+ ImagePlay,
6
+ LayoutPanelTop,
7
+ MicroscopeIcon,
8
+ PocketKnife,
9
+ Receipt,
10
+ ScanSearch,
11
+ TwitterIcon,
12
+ Umbrella,
13
+ } from 'lucide-react';
14
+ import { useTranslation } from 'react-i18next';
15
+
16
+ import { PluginCategory } from '@/types/discover';
17
+
18
+ import { ICON_SIZE } from '../../../components/CategoryMenu';
19
+
20
+ export const useCategory = (fontsize?: number) => {
21
+ const theme = useTheme();
22
+
23
+ const { t } = useTranslation('discover');
24
+
25
+ const size = fontsize ? { fontSize: fontsize } : ICON_SIZE;
26
+
27
+ return [
28
+ {
29
+ icon: <Icon color={theme.colorTextSecondary} icon={LayoutPanelTop} size={size} />,
30
+ key: PluginCategory.All,
31
+ label: t('category.plugin.all'),
32
+ },
33
+ {
34
+ icon: <Icon color={theme.colorTextSecondary} icon={ImagePlay} size={size} />,
35
+ key: PluginCategory.MediaGenerate,
36
+ label: t('category.plugin.media-generate'),
37
+ },
38
+ {
39
+ icon: <Icon color={theme.colorTextSecondary} icon={ScanSearch} size={size} />,
40
+ key: PluginCategory.WebSearch,
41
+ label: t('category.plugin.web-search'),
42
+ },
43
+ {
44
+ icon: <Icon color={theme.colorTextSecondary} icon={Receipt} size={size} />,
45
+ key: PluginCategory.StocksFinance,
46
+ label: t('category.plugin.stocks-finance'),
47
+ },
48
+ {
49
+ icon: <Icon color={theme.colorTextSecondary} icon={PocketKnife} size={size} />,
50
+ key: PluginCategory.Tools,
51
+ label: t('category.plugin.tools'),
52
+ },
53
+ {
54
+ icon: <Icon color={theme.colorTextSecondary} icon={Umbrella} size={size} />,
55
+ key: PluginCategory.LifeStyle,
56
+ label: t('category.plugin.life-style'),
57
+ },
58
+ {
59
+ icon: <Icon color={theme.colorTextSecondary} icon={MicroscopeIcon} size={size} />,
60
+ key: PluginCategory.ScienceEducation,
61
+ label: t('category.plugin.science-education'),
62
+ },
63
+ {
64
+ icon: <Icon color={theme.colorTextSecondary} icon={TwitterIcon} size={size} />,
65
+ key: PluginCategory.Social,
66
+ label: t('category.plugin.social'),
67
+ },
68
+ {
69
+ icon: <Icon color={theme.colorTextSecondary} icon={Gamepad2} size={size} />,
70
+ key: PluginCategory.GamingEntertainment,
71
+ label: t('category.plugin.gaming-entertainment'),
72
+ },
73
+ ];
74
+ };
75
+
76
+ export const useCategoryItem = (key?: PluginCategory, fontsize?: number) => {
77
+ const items = useCategory(fontsize);
78
+ if (!key) return;
79
+ return items.find((item) => item.key === key);
80
+ };
@@ -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 = 'DiscoverToolsLayout';
11
+
12
+ export default MainLayout;
@@ -0,0 +1 @@
1
+ export { default } from '../../components/ListLoading';