@lobehub/chat 0.152.0 → 0.152.2

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.
Files changed (255) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +8 -8
  3. package/README.zh-CN.md +8 -8
  4. package/locales/ar/common.json +14 -0
  5. package/locales/ar/setting.json +4 -1
  6. package/locales/bg-BG/common.json +14 -0
  7. package/locales/bg-BG/setting.json +4 -1
  8. package/locales/de-DE/common.json +14 -0
  9. package/locales/de-DE/setting.json +4 -1
  10. package/locales/en-US/common.json +14 -0
  11. package/locales/en-US/setting.json +4 -1
  12. package/locales/es-ES/common.json +14 -0
  13. package/locales/es-ES/setting.json +4 -1
  14. package/locales/fr-FR/common.json +14 -0
  15. package/locales/fr-FR/setting.json +4 -1
  16. package/locales/it-IT/common.json +14 -0
  17. package/locales/it-IT/setting.json +4 -1
  18. package/locales/ja-JP/common.json +14 -0
  19. package/locales/ja-JP/setting.json +4 -1
  20. package/locales/ko-KR/common.json +14 -0
  21. package/locales/ko-KR/setting.json +4 -1
  22. package/locales/nl-NL/common.json +14 -0
  23. package/locales/nl-NL/setting.json +4 -1
  24. package/locales/pl-PL/common.json +14 -0
  25. package/locales/pl-PL/setting.json +4 -1
  26. package/locales/pt-BR/common.json +14 -0
  27. package/locales/pt-BR/setting.json +4 -1
  28. package/locales/ru-RU/common.json +14 -0
  29. package/locales/ru-RU/setting.json +4 -1
  30. package/locales/tr-TR/common.json +14 -0
  31. package/locales/tr-TR/setting.json +4 -1
  32. package/locales/vi-VN/common.json +14 -0
  33. package/locales/vi-VN/setting.json +4 -1
  34. package/locales/zh-CN/common.json +14 -0
  35. package/locales/zh-CN/setting.json +4 -1
  36. package/locales/zh-TW/common.json +14 -0
  37. package/locales/zh-TW/setting.json +4 -1
  38. package/package.json +1 -1
  39. package/src/app/(main)/(mobile)/me/features/AvatarBanner.tsx +52 -0
  40. package/src/app/(main)/(mobile)/me/features/Cate.tsx +34 -0
  41. package/src/app/(main)/(mobile)/me/features/ExtraCate.tsx +26 -0
  42. package/src/app/(main)/(mobile)/me/features/useExtraCate.tsx +68 -0
  43. package/src/app/(main)/(mobile)/me/layout.tsx +11 -0
  44. package/src/app/(main)/(mobile)/me/loading.tsx +17 -0
  45. package/src/app/(main)/(mobile)/me/page.tsx +31 -0
  46. package/src/app/(main)/@nav/_layout/Desktop/BottomActions.tsx +7 -120
  47. package/src/app/(main)/@nav/_layout/Desktop/index.tsx +7 -2
  48. package/src/app/(main)/@nav/_layout/Mobile.tsx +3 -3
  49. package/src/app/(main)/@nav/features/UserAvatar.tsx +24 -0
  50. package/src/app/(main)/@nav/features/UserPanel/LangButton.tsx +55 -0
  51. package/src/app/(main)/@nav/features/UserPanel/Popover.tsx +34 -0
  52. package/src/app/(main)/@nav/features/UserPanel/ThemeButton.tsx +70 -0
  53. package/src/app/(main)/@nav/features/UserPanel/UserInfo.tsx +35 -0
  54. package/src/app/(main)/@nav/features/UserPanel/index.tsx +69 -0
  55. package/src/app/(main)/@nav/features/UserPanel/useMenu.tsx +144 -0
  56. package/src/app/(main)/@nav/features/UserPanel/useNewVersion.tsx +12 -0
  57. package/src/app/(main)/chat/(mobile)/features/SessionHeader.tsx +1 -1
  58. package/src/app/(main)/chat/_layout/Desktop/index.tsx +6 -8
  59. package/src/app/(main)/chat/_layout/Mobile/index.tsx +5 -3
  60. package/src/app/(main)/chat/_layout/type.ts +5 -0
  61. package/src/app/(main)/chat/features/SettingButton.tsx +5 -2
  62. package/src/app/(main)/chat/layout.ts +5 -2
  63. package/src/app/(main)/chat/settings/{(desktop) → _layout/Desktop}/Header.tsx +2 -0
  64. package/src/app/(main)/chat/settings/_layout/Desktop/index.tsx +32 -0
  65. package/src/app/(main)/chat/settings/{(mobile) → _layout/Mobile}/Header.tsx +3 -2
  66. package/src/app/(main)/chat/settings/_layout/Mobile/index.tsx +15 -0
  67. package/src/app/(main)/chat/settings/error.tsx +5 -0
  68. package/src/app/(main)/chat/settings/features/HeaderContent.tsx +15 -9
  69. package/src/app/(main)/chat/settings/features/SubmitAgentButton/SubmitAgentModal.tsx +2 -0
  70. package/src/app/(main)/chat/settings/features/SubmitAgentButton/index.tsx +16 -8
  71. package/src/app/(main)/chat/settings/layout.tsx +9 -2
  72. package/src/app/(main)/chat/settings/loading.tsx +3 -0
  73. package/src/app/(main)/chat/settings/not-found.tsx +3 -0
  74. package/src/app/(main)/chat/settings/page.tsx +2 -9
  75. package/src/app/(main)/market/@detail/default.tsx +12 -0
  76. package/src/app/(main)/market/{features/AgentDetailContent/AgentInfo → @detail/features/AgentDetailContent}/Header.tsx +30 -21
  77. package/src/app/(main)/market/{features/AgentDetailContent/AgentInfo → @detail/features/AgentDetailContent}/index.tsx +10 -4
  78. package/src/app/(main)/market/{features/AgentDetailContent/AgentInfo → @detail/features/AgentDetailContent}/style.ts +7 -11
  79. package/src/app/(main)/market/@detail/loading.tsx +1 -0
  80. package/src/app/(main)/market/_layout/Desktop/{AgentDetail.tsx → DetailSidebar.tsx} +17 -12
  81. package/src/app/(main)/market/_layout/Desktop/Header.tsx +3 -6
  82. package/src/app/(main)/market/_layout/Desktop/Hero.tsx +39 -0
  83. package/src/app/(main)/market/_layout/Desktop/index.tsx +24 -44
  84. package/src/app/(main)/market/{(mobile)/features/AgentDetail.tsx → _layout/Mobile/DetailModal.tsx} +9 -7
  85. package/src/app/(main)/market/_layout/Mobile/Header.tsx +2 -2
  86. package/src/app/(main)/market/_layout/Mobile/index.tsx +17 -9
  87. package/src/app/(main)/market/_layout/type.ts +6 -0
  88. package/src/app/(main)/market/features/AgentCard/AgentCardBanner.tsx +10 -9
  89. package/src/app/(main)/market/features/AgentCard/index.tsx +133 -58
  90. package/src/app/(main)/market/features/AgentList.tsx +94 -0
  91. package/src/app/(main)/market/features/AgentSearchBar.tsx +42 -0
  92. package/src/app/(main)/market/features/ShareAgentButton/Inner.tsx +9 -7
  93. package/src/app/(main)/market/features/ShareAgentButton/index.tsx +22 -15
  94. package/src/app/(main)/market/features/TagList.tsx +65 -0
  95. package/src/app/(main)/market/layout.tsx +11 -0
  96. package/src/app/(main)/market/loading.tsx +2 -2
  97. package/src/app/(main)/market/page.tsx +22 -12
  98. package/src/app/(main)/settings/@category/default.tsx +16 -0
  99. package/src/app/(main)/settings/@category/features/CategoryContent.tsx +35 -0
  100. package/src/app/(main)/settings/@category/features/UpgradeAlert.tsx +38 -0
  101. package/src/app/(main)/settings/_layout/Desktop/Header.tsx +78 -23
  102. package/src/app/(main)/settings/_layout/Desktop/SideBar.tsx +39 -27
  103. package/src/app/(main)/settings/_layout/Desktop/index.tsx +41 -17
  104. package/src/app/(main)/settings/_layout/Mobile/{SubSettingHeader.tsx → Header.tsx} +3 -1
  105. package/src/app/(main)/settings/_layout/Mobile/index.tsx +7 -18
  106. package/src/app/(main)/settings/_layout/type.ts +6 -0
  107. package/src/app/(main)/settings/about/features/AboutList.tsx +122 -0
  108. package/src/app/(main)/settings/about/features/Analytics.tsx +42 -0
  109. package/src/app/(main)/settings/about/layout.tsx +26 -0
  110. package/src/app/(main)/settings/about/loading.tsx +5 -0
  111. package/src/app/(main)/settings/about/page.tsx +20 -25
  112. package/src/app/(main)/settings/agent/layout.tsx +35 -0
  113. package/src/app/(main)/settings/agent/loading.tsx +4 -2
  114. package/src/app/(main)/settings/agent/page.tsx +25 -12
  115. package/src/app/(main)/settings/common/{Common.tsx → features/Common.tsx} +7 -5
  116. package/src/app/(main)/settings/common/{Theme.tsx → features/Theme/index.tsx} +8 -6
  117. package/src/app/(main)/settings/common/page.tsx +21 -4
  118. package/src/app/(main)/settings/error.tsx +5 -0
  119. package/src/app/(main)/settings/features/Footer.tsx +2 -0
  120. package/src/app/(main)/settings/features/UpgradeAlert.tsx +21 -13
  121. package/src/app/(main)/settings/hooks/useCategory.tsx +54 -0
  122. package/src/app/(main)/settings/hooks/useSyncSettings.ts +2 -2
  123. package/src/app/(main)/settings/layout.ts +4 -1
  124. package/src/app/(main)/settings/llm/Anthropic/index.tsx +4 -10
  125. package/src/app/(main)/settings/llm/Azure/index.tsx +3 -1
  126. package/src/app/(main)/settings/llm/Bedrock/index.tsx +3 -1
  127. package/src/app/(main)/settings/llm/Google/index.tsx +4 -2
  128. package/src/app/(main)/settings/llm/Groq/index.tsx +3 -1
  129. package/src/app/(main)/settings/llm/Minimax/index.tsx +3 -9
  130. package/src/app/(main)/settings/llm/Mistral/index.tsx +3 -9
  131. package/src/app/(main)/settings/llm/Moonshot/index.tsx +3 -1
  132. package/src/app/(main)/settings/llm/Ollama/index.tsx +3 -1
  133. package/src/app/(main)/settings/llm/OpenAI/index.tsx +2 -0
  134. package/src/app/(main)/settings/llm/OpenRouter/index.tsx +3 -9
  135. package/src/app/(main)/settings/llm/Perplexity/index.tsx +3 -9
  136. package/src/app/(main)/settings/llm/TogetherAI/index.tsx +3 -9
  137. package/src/app/(main)/settings/llm/ZeroOne/index.tsx +3 -9
  138. package/src/app/(main)/settings/llm/Zhipu/index.tsx +3 -10
  139. package/src/app/(main)/settings/llm/components/Checker.tsx +2 -0
  140. package/src/app/(main)/settings/llm/components/Footer.tsx +26 -0
  141. package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +16 -1
  142. package/src/app/(main)/settings/llm/page.tsx +57 -3
  143. package/src/app/(main)/settings/loading.tsx +9 -0
  144. package/src/app/(main)/settings/not-found.tsx +3 -0
  145. package/src/app/(main)/settings/page.tsx +2 -14
  146. package/src/app/(main)/settings/sync/{DeviceInfo → features/DeviceInfo}/Card.tsx +6 -5
  147. package/src/app/(main)/settings/sync/features/DeviceInfo/DeviceName.tsx +63 -0
  148. package/src/app/(main)/settings/sync/{components → features/DeviceInfo}/SystemIcon.tsx +6 -14
  149. package/src/app/(main)/settings/sync/{DeviceInfo → features/DeviceInfo}/index.tsx +22 -36
  150. package/src/app/(main)/settings/sync/{WebRTC → features/WebRTC}/ChannelNameInput.tsx +3 -3
  151. package/src/app/(main)/settings/sync/{WebRTC → features/WebRTC}/index.tsx +10 -9
  152. package/src/app/(main)/settings/sync/page.tsx +19 -11
  153. package/src/app/(main)/settings/tts/features/OpenAI.tsx +54 -0
  154. package/src/app/(main)/settings/tts/{TTS/index.tsx → features/STT.tsx} +11 -27
  155. package/src/app/(main)/settings/tts/page.tsx +17 -11
  156. package/src/app/@modal/(.)settings/about/layout.tsx +1 -0
  157. package/src/app/@modal/(.)settings/about/page.tsx +1 -0
  158. package/src/app/@modal/(.)settings/agent/layout.tsx +1 -0
  159. package/src/app/@modal/(.)settings/agent/page.tsx +1 -0
  160. package/src/app/@modal/(.)settings/common/page.tsx +1 -0
  161. package/src/app/@modal/(.)settings/layout.tsx +28 -0
  162. package/src/app/@modal/(.)settings/llm/page.tsx +1 -0
  163. package/src/app/@modal/(.)settings/loading.tsx +5 -0
  164. package/src/app/@modal/(.)settings/sync/page.tsx +1 -0
  165. package/src/app/@modal/(.)settings/tts/page.tsx +1 -0
  166. package/src/app/@modal/_layout/SettingModalLayout.tsx +59 -0
  167. package/src/app/@modal/chat/(.)settings/features/CategoryContent.tsx +36 -0
  168. package/src/app/@modal/chat/(.)settings/features/useCategory.tsx +62 -0
  169. package/src/app/@modal/chat/(.)settings/layout.tsx +55 -0
  170. package/src/app/@modal/chat/(.)settings/loading.tsx +5 -0
  171. package/src/app/@modal/chat/(.)settings/page.tsx +40 -0
  172. package/src/app/@modal/default.tsx +1 -0
  173. package/src/app/@modal/layout.tsx +30 -0
  174. package/src/app/@modal/loading.tsx +5 -0
  175. package/src/app/layout.tsx +11 -3
  176. package/src/components/BrandWatermark/index.tsx +39 -0
  177. package/src/components/Cell/Divider.tsx +19 -0
  178. package/src/components/Cell/index.tsx +38 -0
  179. package/src/components/Menu/index.tsx +97 -0
  180. package/src/components/SkeletonLoading/index.tsx +21 -0
  181. package/src/const/url.ts +1 -0
  182. package/src/features/AgentSetting/AgentChat/index.tsx +135 -0
  183. package/src/features/AgentSetting/AgentMeta/index.tsx +4 -3
  184. package/src/features/AgentSetting/AgentModal/index.tsx +95 -0
  185. package/src/features/AgentSetting/AgentPlugin/index.tsx +65 -66
  186. package/src/features/AgentSetting/AgentPrompt/index.tsx +101 -47
  187. package/src/features/AgentSetting/AgentTTS/index.tsx +4 -0
  188. package/src/features/AgentSetting/StoreUpdater.tsx +2 -0
  189. package/src/features/AgentSetting/index.tsx +6 -6
  190. package/src/features/AgentSetting/store/index.ts +2 -0
  191. package/src/features/AvatarWithUpload/index.tsx +2 -0
  192. package/src/features/ChatInput/STT/browser.tsx +1 -1
  193. package/src/features/ChatInput/STT/openai.tsx +1 -1
  194. package/src/features/Conversation/components/InboxWelcome/AgentsSuggest.tsx +2 -2
  195. package/src/hooks/useQuery.ts +7 -0
  196. package/src/hooks/useQueryRoute.ts +16 -0
  197. package/src/locales/default/common.ts +14 -0
  198. package/src/locales/default/setting.ts +3 -0
  199. package/src/locales/resources.ts +1 -0
  200. package/src/server/redirectHard.ts +9 -0
  201. package/src/server/translation.ts +20 -0
  202. package/src/services/__tests__/chat.test.ts +1 -1
  203. package/src/store/global/initialState.ts +1 -0
  204. package/src/store/market/action.ts +1 -1
  205. package/src/store/session/slices/session/action.ts +1 -1
  206. package/src/utils/difference.ts +2 -1
  207. package/src/app/(main)/@nav/_layout/Desktop/Avatar.tsx +0 -11
  208. package/src/app/(main)/chat/settings/(desktop)/index.tsx +0 -23
  209. package/src/app/(main)/chat/settings/(mobile)/index.tsx +0 -16
  210. package/src/app/(main)/market/(desktop)/index.tsx +0 -20
  211. package/src/app/(main)/market/(mobile)/features/AgentCard.tsx +0 -31
  212. package/src/app/(main)/market/(mobile)/index.tsx +0 -25
  213. package/src/app/(main)/market/components/Loading.tsx +0 -13
  214. package/src/app/(main)/market/features/AgentCard/AgentCardItem.tsx +0 -54
  215. package/src/app/(main)/market/features/AgentCard/style.ts +0 -33
  216. package/src/app/(main)/market/features/AgentDetailContent/index.tsx +0 -12
  217. package/src/app/(main)/market/features/AgentSearchBar/index.tsx +0 -40
  218. package/src/app/(main)/market/features/PageTitle/index.tsx +0 -13
  219. package/src/app/(main)/market/features/TagList/Inner.tsx +0 -28
  220. package/src/app/(main)/market/features/TagList/index.tsx +0 -23
  221. package/src/app/(main)/market/layout.ts +0 -8
  222. package/src/app/(main)/settings/(desktop)/index.tsx +0 -23
  223. package/src/app/(main)/settings/(mobile)/features/AvatarBanner.tsx +0 -68
  224. package/src/app/(main)/settings/(mobile)/features/ExtraList.tsx +0 -65
  225. package/src/app/(main)/settings/(mobile)/index.tsx +0 -53
  226. package/src/app/(main)/settings/about/AboutList.tsx +0 -53
  227. package/src/app/(main)/settings/about/Analytics.tsx +0 -40
  228. package/src/app/(main)/settings/about/style.ts +0 -22
  229. package/src/app/(main)/settings/agent/Agent.tsx +0 -29
  230. package/src/app/(main)/settings/common/index.tsx +0 -24
  231. package/src/app/(main)/settings/common/loading.tsx +0 -3
  232. package/src/app/(main)/settings/features/SettingList/index.tsx +0 -47
  233. package/src/app/(main)/settings/llm/index.tsx +0 -59
  234. package/src/app/(main)/settings/llm/layout.tsx +0 -11
  235. package/src/app/(main)/settings/llm/loading.tsx +0 -3
  236. package/src/app/(main)/settings/sync/DeviceInfo/DeviceName.tsx +0 -66
  237. package/src/app/(main)/settings/sync/PageTitle.tsx +0 -11
  238. package/src/app/(main)/settings/sync/layout.tsx +0 -12
  239. package/src/app/(main)/settings/sync/loading.tsx +0 -3
  240. package/src/app/(main)/settings/tts/loading.tsx +0 -3
  241. package/src/features/AgentSetting/AgentConfig/index.tsx +0 -202
  242. package/src/features/AgentSetting/AgentConfig/useSyncConfig.ts +0 -23
  243. /package/src/app/(main)/market/{features/AgentDetailContent/AgentInfo → @detail/features/AgentDetailContent}/Comment.tsx +0 -0
  244. /package/src/app/(main)/market/{features/AgentDetailContent/AgentInfo → @detail/features/AgentDetailContent}/Loading.tsx +0 -0
  245. /package/src/app/(main)/market/{features/AgentDetailContent/AgentInfo → @detail/features/AgentDetailContent}/TokenTag.tsx +0 -0
  246. /package/src/app/(main)/settings/{features/SettingList → about/features}/Item.tsx +0 -0
  247. /package/src/app/(main)/settings/{features → common/features/Theme}/ThemeSwatches/ThemeSwatchesNeutral.tsx +0 -0
  248. /package/src/app/(main)/settings/{features → common/features/Theme}/ThemeSwatches/ThemeSwatchesPrimary.tsx +0 -0
  249. /package/src/app/(main)/settings/{features → common/features/Theme}/ThemeSwatches/index.ts +0 -0
  250. /package/src/app/(main)/settings/sync/{Alert.tsx → features/Alert.tsx} +0 -0
  251. /package/src/app/(main)/settings/sync/{components → features/WebRTC}/SyncSwitch/index.css +0 -0
  252. /package/src/app/(main)/settings/sync/{components → features/WebRTC}/SyncSwitch/index.tsx +0 -0
  253. /package/src/app/(main)/settings/sync/{util.ts → features/WebRTC/generateRandomRoomName.ts} +0 -0
  254. /package/src/app/(main)/settings/tts/{TTS/options.ts → features/const.ts} +0 -0
  255. /package/src/features/AgentSetting/{AgentConfig → AgentModal}/ModelSelect.tsx +0 -0
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Чат",
142
142
  "market": "Обзор",
143
+ "me": "我",
143
144
  "setting": "Настройки"
144
145
  },
145
146
  "telemetry": {
@@ -156,5 +157,18 @@
156
157
  "action": "обновить",
157
158
  "hasNew": "Доступно обновление",
158
159
  "newVersion": "Доступна новая версия: {{version}}"
160
+ },
161
+ "userPanel": {
162
+ "billing": "Управление счетами",
163
+ "discord": "Поддержка сообщества",
164
+ "docs": "Документация",
165
+ "email": "Поддержка по электронной почте",
166
+ "feedback": "Обратная связь и предложения",
167
+ "help": "Центр помощи",
168
+ "plans": "Планы подписки",
169
+ "profile": "Управление аккаунтом",
170
+ "setting": "Настройки приложения",
171
+ "usages": "Статистика использования",
172
+ "warn": "Этот раздел скоро будет закрыт, пожалуйста, воспользуйтесь этим меню, вызвав его из левого верхнего угла"
159
173
  }
160
174
  }
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Настройки предпочтений и моделей.",
30
31
  "global": "Глобальные настройки",
31
32
  "session": "Настройки сеанса",
32
- "sessionWithName": "Настройки сеанса · {{name}}"
33
+ "sessionDesc": "Настройки персонажа и предпочтения сессии.",
34
+ "sessionWithName": "Настройки сеанса · {{name}}",
35
+ "title": "Настройки"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Chat",
142
142
  "market": "Keşfet",
143
+ "me": "我",
143
144
  "setting": "Ayarlar"
144
145
  },
145
146
  "telemetry": {
@@ -156,5 +157,18 @@
156
157
  "action": "Güncelle",
157
158
  "hasNew": "Yeni güncelleme mevcut",
158
159
  "newVersion": "Yeni sürüm mevcut: {{version}}"
160
+ },
161
+ "userPanel": {
162
+ "billing": "Fatura Yönetimi",
163
+ "discord": "Topluluk Destek",
164
+ "docs": "Belgeler",
165
+ "email": "E-posta Destek",
166
+ "feedback": "Geribildirim ve Öneriler",
167
+ "help": "Yardım Merkezi",
168
+ "plans": "Abonelik Planları",
169
+ "profile": "Hesap Yönetimi",
170
+ "setting": "Uygulama Ayarları",
171
+ "usages": "Kullanım İstatistikleri",
172
+ "warn": "Bu giriş yakında kaldırılacak, ileride bu menüyü sol üst köşedeki profil resminizden açabilirsiniz"
159
173
  }
160
174
  }
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Tercihler ve model ayarları.",
30
31
  "global": "Genel Ayarlar",
31
32
  "session": "Oturum Ayarları",
32
- "sessionWithName": "Oturum Ayarları · {{name}}"
33
+ "sessionDesc": "Karakter ayarları ve oturum tercihleri.",
34
+ "sessionWithName": "Oturum Ayarları · {{name}}",
35
+ "title": "Ayarlar"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Trò chuyện",
142
142
  "market": "Thị trường",
143
+ "me": "我",
143
144
  "setting": "Cài đặt"
144
145
  },
145
146
  "telemetry": {
@@ -156,5 +157,18 @@
156
157
  "action": "Nâng cấp",
157
158
  "hasNew": "Có bản cập nhật mới",
158
159
  "newVersion": "Có phiên bản mới: {{version}}"
160
+ },
161
+ "userPanel": {
162
+ "billing": "Quản lý thanh toán",
163
+ "discord": "Hỗ trợ cộng đồng",
164
+ "docs": "Tài liệu sử dụng",
165
+ "email": "Hỗ trợ qua email",
166
+ "feedback": "Phản hồi và đề xuất",
167
+ "help": "Trung tâm trợ giúp",
168
+ "plans": "Kế hoạch đăng ký",
169
+ "profile": "Quản lý tài khoản",
170
+ "setting": "Cài đặt ứng dụng",
171
+ "usages": "Thống kê sử dụng",
172
+ "warn": "Mục này sẽ sớm bị loại bỏ, vui lòng mở menu từ biểu tượng ở góc trên bên trái"
159
173
  }
160
174
  }
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Thiết lập Ưu tiên và Mô hình.",
30
31
  "global": "Cài đặt toàn cầu",
31
32
  "session": "Cài đặt cuộc trò chuyện",
32
- "sessionWithName": "Cài đặt cuộc trò chuyện · {{name}}"
33
+ "sessionDesc": "Thiết lập nhân vật ưu tiên phiên hội thoại.",
34
+ "sessionWithName": "Cài đặt cuộc trò chuyện · {{name}}",
35
+ "title": "Cài đặt"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "会话",
142
142
  "market": "发现",
143
+ "me": "我",
143
144
  "setting": "设置"
144
145
  },
145
146
  "telemetry": {
@@ -156,5 +157,18 @@
156
157
  "action": "升级",
157
158
  "hasNew": "有可用更新",
158
159
  "newVersion": "有新版本可用:{{version}}"
160
+ },
161
+ "userPanel": {
162
+ "billing": "账单管理",
163
+ "discord": "社区支持",
164
+ "docs": "使用文档",
165
+ "email": "邮件支持",
166
+ "feedback": "反馈与建议",
167
+ "help": "帮助中心",
168
+ "plans": "订阅方案",
169
+ "profile": "账户管理",
170
+ "setting": "应用设置",
171
+ "usages": "用量统计",
172
+ "warn": "此入口即将下线,后续请从左上角头像唤起本菜单"
159
173
  }
160
174
  }
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "偏好与模型设置。",
30
31
  "global": "全局设置",
31
32
  "session": "会话设置",
32
- "sessionWithName": "会话设置 · {{name}}"
33
+ "sessionDesc": "角色设定与会话偏好。",
34
+ "sessionWithName": "会话设置 · {{name}}",
35
+ "title": "设置"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "對話",
142
142
  "market": "發現",
143
+ "me": "我",
143
144
  "setting": "設定"
144
145
  },
145
146
  "telemetry": {
@@ -156,5 +157,18 @@
156
157
  "action": "升級",
157
158
  "hasNew": "有可用更新",
158
159
  "newVersion": "有新版本可用:{{version}}"
160
+ },
161
+ "userPanel": {
162
+ "billing": "帳單管理",
163
+ "discord": "社群支援",
164
+ "docs": "使用文件",
165
+ "email": "郵件支援",
166
+ "feedback": "意見回饋",
167
+ "help": "幫助中心",
168
+ "plans": "訂閱方案",
169
+ "profile": "帳戶管理",
170
+ "setting": "應用設定",
171
+ "usages": "用量統計",
172
+ "warn": "此入口即將下線,後續請從左上角頭像喚起本選單"
159
173
  }
160
174
  }
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "偏好與模型設定。",
30
31
  "global": "全域設定",
31
32
  "session": "對話設定",
32
- "sessionWithName": "對話設定 · {{name}}"
33
+ "sessionDesc": "角色設定與會話偏好。",
34
+ "sessionWithName": "對話設定 · {{name}}",
35
+ "title": "設定"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.152.0",
3
+ "version": "0.152.2",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -0,0 +1,52 @@
1
+ 'use client';
2
+
3
+ import { createStyles } from 'antd-style';
4
+ import { PropsWithChildren, memo } from 'react';
5
+ import { Center, Flexbox } from 'react-layout-kit';
6
+
7
+ export const useStyles = createStyles(({ css, token }) => ({
8
+ avatar: css`
9
+ position: absolute;
10
+ z-index: 10;
11
+
12
+ flex: none;
13
+
14
+ background: ${token.colorBgContainer};
15
+ border: 6px solid ${token.colorBgContainer};
16
+ border-radius: 50%;
17
+ `,
18
+ banner: css`
19
+ position: relative;
20
+ flex: none;
21
+ `,
22
+ bannerBox: css`
23
+ position: relative;
24
+
25
+ overflow: hidden;
26
+
27
+ width: 100%;
28
+ height: 180px;
29
+
30
+ background: ${token.colorBgLayout};
31
+ `,
32
+ bannerImg: css`
33
+ position: absolute;
34
+ scale: 5;
35
+ filter: blur(24px) saturate(2);
36
+ `,
37
+ }));
38
+
39
+ const AvatarBanner = memo<PropsWithChildren>(({ children }) => {
40
+ const { styles } = useStyles();
41
+
42
+ return (
43
+ <Flexbox align={'center'} className={styles.banner} justify={'center'} width={'100%'}>
44
+ <Flexbox align={'center'} className={styles.bannerBox} justify={'center'}>
45
+ <div className={styles.bannerImg}>{children}</div>
46
+ </Flexbox>
47
+ <Center className={styles.avatar}>{children}</Center>
48
+ </Flexbox>
49
+ );
50
+ });
51
+
52
+ export default AvatarBanner;
@@ -0,0 +1,34 @@
1
+ 'use client';
2
+
3
+ import { useTheme } from 'antd-style';
4
+ import { memo } from 'react';
5
+ import { Flexbox } from 'react-layout-kit';
6
+ import urlJoin from 'url-join';
7
+
8
+ import { useCategory } from '@/app/(main)/settings//hooks/useCategory';
9
+ import Cell from '@/components/Cell';
10
+ import Divider from '@/components/Cell/Divider';
11
+ import redirectHard from '@/server/redirectHard';
12
+
13
+ const SettingCate = memo(() => {
14
+ const theme = useTheme();
15
+ const settingItems = useCategory({ mobile: true });
16
+
17
+ return (
18
+ <Flexbox style={{ background: theme.colorBgContainer }} width={'100%'}>
19
+ {settingItems?.map(({ key, icon, label, type }: any, index) => {
20
+ if (type === 'divider') return <Divider key={index} />;
21
+ return (
22
+ <Cell
23
+ icon={icon}
24
+ key={key}
25
+ label={label}
26
+ onClick={() => redirectHard(urlJoin('/settings', key))}
27
+ />
28
+ );
29
+ })}
30
+ </Flexbox>
31
+ );
32
+ });
33
+
34
+ export default SettingCate;
@@ -0,0 +1,26 @@
1
+ 'use client';
2
+
3
+ import { useTheme } from 'antd-style';
4
+ import { memo } from 'react';
5
+ import { Flexbox } from 'react-layout-kit';
6
+
7
+ import Cell from '@/components/Cell';
8
+ import Divider from '@/components/Cell/Divider';
9
+
10
+ import { useExtraCate } from './useExtraCate';
11
+
12
+ const ExtraCate = memo(() => {
13
+ const theme = useTheme();
14
+ const mainItems = useExtraCate();
15
+
16
+ return (
17
+ <Flexbox style={{ background: theme.colorBgContainer }} width={'100%'}>
18
+ {mainItems?.map(({ key, icon, label, type, onClick }: any, index) => {
19
+ if (type === 'divider') return <Divider key={index} />;
20
+ return <Cell icon={icon} key={key} label={label} onClick={onClick} />;
21
+ })}
22
+ </Flexbox>
23
+ );
24
+ });
25
+
26
+ export default ExtraCate;
@@ -0,0 +1,68 @@
1
+ import { DiscordIcon, Icon } from '@lobehub/ui';
2
+ import { Book, Feather, HardDriveDownload, HardDriveUpload, Mail } from 'lucide-react';
3
+ import { useTranslation } from 'react-i18next';
4
+
5
+ import { type MenuProps } from '@/components/Menu';
6
+ import { AGENTS_INDEX_GITHUB_ISSUE, DISCORD, DOCUMENTS, EMAIL_SUPPORT } from '@/const/url';
7
+ import DataImporter from '@/features/DataImporter';
8
+ import { configService } from '@/services/config';
9
+
10
+ export const useExtraCate = () => {
11
+ const { t } = useTranslation(['common', 'setting']);
12
+
13
+ const iconSize = { fontSize: 20 };
14
+
15
+ const exports: MenuProps['items'] = [
16
+ {
17
+ icon: <Icon icon={HardDriveUpload} size={iconSize} />,
18
+ key: 'import',
19
+ label: <DataImporter>{t('import')}</DataImporter>,
20
+ },
21
+ {
22
+ icon: <Icon icon={HardDriveDownload} size={iconSize} />,
23
+ key: 'export',
24
+ label: t('export'),
25
+ onClick: configService.exportAll,
26
+ },
27
+ {
28
+ type: 'divider',
29
+ },
30
+ ];
31
+
32
+ const helps: MenuProps['items'] = [
33
+ {
34
+ icon: <Icon icon={Book} size={iconSize} />,
35
+ key: 'docs',
36
+ label: t('userPanel.docs'),
37
+ onClick: () => window.open(DOCUMENTS, '__blank'),
38
+ },
39
+ {
40
+ icon: <Icon icon={Feather} size={iconSize} />,
41
+ key: 'feedback',
42
+ label: t('userPanel.feedback'),
43
+ onClick: () => window.open(AGENTS_INDEX_GITHUB_ISSUE, '__blank'),
44
+ },
45
+ {
46
+ icon: <Icon icon={DiscordIcon} size={iconSize} />,
47
+ key: 'discord',
48
+ label: t('userPanel.discord'),
49
+ onClick: () => window.open(DISCORD, '__blank'),
50
+ },
51
+ {
52
+ icon: <Icon icon={Mail} size={iconSize} />,
53
+ key: 'email',
54
+ label: t('userPanel.email'),
55
+ onClick: () => window.open(`mailto:${EMAIL_SUPPORT}`, '__blank'),
56
+ },
57
+ ];
58
+
59
+ const mainItems = [
60
+ {
61
+ type: 'divider',
62
+ },
63
+ ...exports,
64
+ ...helps,
65
+ ].filter(Boolean) as MenuProps['items'];
66
+
67
+ return mainItems;
68
+ };
@@ -0,0 +1,11 @@
1
+ import { PropsWithChildren } from 'react';
2
+
3
+ import MobileContentLayout from '@/components/server/MobileNavLayout';
4
+
5
+ const Layout = ({ children }: PropsWithChildren) => {
6
+ return <MobileContentLayout withNav>{children}</MobileContentLayout>;
7
+ };
8
+
9
+ Layout.displayName = 'MeLayout';
10
+
11
+ export default Layout;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+
3
+ import { Skeleton } from 'antd';
4
+ import { Center } from 'react-layout-kit';
5
+
6
+ import SkeletonLoading from '@/components/SkeletonLoading';
7
+
8
+ export default () => {
9
+ return (
10
+ <>
11
+ <Center height={180}>
12
+ <Skeleton.Avatar shape={'circle'} size={88} />
13
+ </Center>
14
+ <SkeletonLoading paragraph={{ rows: 8 }} title={false} />
15
+ </>
16
+ );
17
+ };
@@ -0,0 +1,31 @@
1
+ import { redirect } from 'next/navigation';
2
+ import { Center } from 'react-layout-kit';
3
+
4
+ import Avatar from '@/app/(main)/@nav/features/UserAvatar';
5
+ import BrandWatermark from '@/components/BrandWatermark';
6
+ import { isMobileDevice } from '@/utils/responsive';
7
+
8
+ import AvatarBanner from './features/AvatarBanner';
9
+ import Cate from './features/Cate';
10
+ import ExtraCate from './features/ExtraCate';
11
+
12
+ const Page = () => {
13
+ const mobile = isMobileDevice();
14
+
15
+ if (!mobile) return redirect('/chat');
16
+
17
+ return (
18
+ <>
19
+ <AvatarBanner>
20
+ <Avatar size={88} />
21
+ </AvatarBanner>
22
+ <Cate />
23
+ <ExtraCate />
24
+ <Center padding={16}>
25
+ <BrandWatermark />
26
+ </Center>
27
+ </>
28
+ );
29
+ };
30
+
31
+ export default Page;
@@ -1,26 +1,11 @@
1
- import { ActionIcon, DiscordIcon, Icon } from '@lobehub/ui';
2
- import { Badge, ConfigProvider, Dropdown, MenuProps } from 'antd';
3
- import {
4
- Book,
5
- Feather,
6
- FileClock,
7
- Github,
8
- HardDriveDownload,
9
- HardDriveUpload,
10
- Heart,
11
- Settings,
12
- Settings2,
13
- } from 'lucide-react';
1
+ import { ActionIcon } from '@lobehub/ui';
2
+ import { Book, Github, Settings2 } from 'lucide-react';
14
3
  import Link from 'next/link';
15
- import { useRouter } from 'next/navigation';
16
4
  import { memo } from 'react';
17
5
  import { useTranslation } from 'react-i18next';
18
- import { Flexbox } from 'react-layout-kit';
19
6
 
20
- import { ABOUT, CHANGELOG, DISCORD, DOCUMENTS, FEEDBACK, GITHUB } from '@/const/url';
21
- import DataImporter from '@/features/DataImporter';
22
- import { configService } from '@/services/config';
23
- import { useGlobalStore } from '@/store/global';
7
+ import UserPanel from '@/app/(main)/@nav/features/UserPanel';
8
+ import { DOCUMENTS, GITHUB } from '@/const/url';
24
9
  import { SidebarTabKey } from '@/store/global/initialState';
25
10
 
26
11
  export interface BottomActionProps {
@@ -28,96 +13,8 @@ export interface BottomActionProps {
28
13
  }
29
14
 
30
15
  const BottomActions = memo<BottomActionProps>(({ tab }) => {
31
- const router = useRouter();
32
16
  const { t } = useTranslation('common');
33
17
 
34
- const [hasNewVersion, useCheckLatestVersion] = useGlobalStore((s) => [
35
- s.hasNewVersion,
36
- s.useCheckLatestVersion,
37
- ]);
38
-
39
- useCheckLatestVersion();
40
-
41
- const items: MenuProps['items'] = [
42
- {
43
- icon: <Icon icon={HardDriveUpload} />,
44
- key: 'import',
45
- label: <DataImporter>{t('import')}</DataImporter>,
46
- },
47
- {
48
- children: [
49
- {
50
- key: 'allAgent',
51
- label: <div>{t('exportType.allAgent')}</div>,
52
- onClick: configService.exportAgents,
53
- },
54
- {
55
- key: 'allAgentWithMessage',
56
- label: <div>{t('exportType.allAgentWithMessage')}</div>,
57
- onClick: configService.exportSessions,
58
- },
59
- {
60
- key: 'globalSetting',
61
- label: <div>{t('exportType.globalSetting')}</div>,
62
- onClick: configService.exportSettings,
63
- },
64
- {
65
- type: 'divider',
66
- },
67
- {
68
- key: 'all',
69
- label: <div>{t('exportType.all')}</div>,
70
- onClick: configService.exportAll,
71
- },
72
- ],
73
- icon: <Icon icon={HardDriveDownload} />,
74
- key: 'export',
75
- label: t('export'),
76
- },
77
- {
78
- type: 'divider',
79
- },
80
- {
81
- icon: <Icon icon={Feather} />,
82
- key: 'feedback',
83
- label: t('feedback'),
84
- onClick: () => window.open(FEEDBACK, '__blank'),
85
- },
86
- {
87
- icon: <Icon icon={FileClock} />,
88
- key: 'changelog',
89
- label: t('changelog'),
90
- onClick: () => window.open(CHANGELOG, '__blank'),
91
- },
92
- {
93
- icon: <Icon icon={DiscordIcon} />,
94
- key: 'wiki',
95
- label: 'Discord',
96
- onClick: () => window.open(DISCORD, '__blank'),
97
- },
98
- {
99
- icon: <Icon icon={Heart} />,
100
- key: 'about',
101
- label: t('about'),
102
- onClick: () => window.open(ABOUT, '__blank'),
103
- },
104
- {
105
- type: 'divider',
106
- },
107
- {
108
- icon: <Icon icon={Settings} />,
109
- key: 'setting',
110
- label: (
111
- <Flexbox align={'center'} distribution={'space-between'} gap={8} horizontal>
112
- {t('setting')} {hasNewVersion && <Badge count={t('upgradeVersion.hasNew')} />}
113
- </Flexbox>
114
- ),
115
- onClick: () => {
116
- router.push('/settings/common');
117
- },
118
- },
119
- ];
120
-
121
18
  return (
122
19
  <>
123
20
  <Link aria-label={'GitHub'} href={GITHUB} target={'_blank'}>
@@ -126,19 +23,9 @@ const BottomActions = memo<BottomActionProps>(({ tab }) => {
126
23
  <Link aria-label={t('document')} href={DOCUMENTS} target={'_blank'}>
127
24
  <ActionIcon icon={Book} placement={'right'} title={t('document')} />
128
25
  </Link>
129
- <Dropdown arrow={false} menu={{ items }} trigger={['click']}>
130
- {hasNewVersion ? (
131
- <Flexbox>
132
- <ConfigProvider theme={{ components: { Badge: { dotSize: 8 } } }}>
133
- <Badge dot offset={[-4, 4]}>
134
- <ActionIcon active={tab === SidebarTabKey.Setting} icon={Settings2} />
135
- </Badge>
136
- </ConfigProvider>
137
- </Flexbox>
138
- ) : (
139
- <ActionIcon active={tab === SidebarTabKey.Setting} icon={Settings2} />
140
- )}
141
- </Dropdown>
26
+ <UserPanel bottom>
27
+ <ActionIcon active={tab === SidebarTabKey.Setting} icon={Settings2} />
28
+ </UserPanel>
142
29
  </>
143
30
  );
144
31
  });
@@ -3,9 +3,10 @@
3
3
  import { SideNav } from '@lobehub/ui';
4
4
  import { memo } from 'react';
5
5
 
6
+ import UserPanel from '@/app/(main)/@nav/features/UserPanel';
6
7
  import { useActiveTabKey } from '@/hooks/useActiveTabKey';
7
8
 
8
- import Avatar from './Avatar';
9
+ import Avatar from '../../features/UserAvatar';
9
10
  import BottomActions from './BottomActions';
10
11
  import TopActions from './TopActions';
11
12
 
@@ -13,7 +14,11 @@ const Nav = memo(() => {
13
14
  const sidebarKey = useActiveTabKey();
14
15
  return (
15
16
  <SideNav
16
- avatar={<Avatar />}
17
+ avatar={
18
+ <UserPanel>
19
+ <Avatar />
20
+ </UserPanel>
21
+ }
17
22
  bottomActions={<BottomActions tab={sidebarKey} />}
18
23
  style={{ height: '100%' }}
19
24
  topActions={<TopActions tab={sidebarKey} />}
@@ -53,11 +53,11 @@ const Nav = memo(() => {
53
53
  },
54
54
  {
55
55
  icon: (active) => <Icon className={active ? styles.active : undefined} icon={User} />,
56
- key: SidebarTabKey.Setting,
56
+ key: SidebarTabKey.Me,
57
57
  onClick: () => {
58
- router.push('/settings');
58
+ router.push('/me');
59
59
  },
60
- title: t('tab.setting'),
60
+ title: t('tab.me'),
61
61
  },
62
62
  ],
63
63
  [t],