@lobehub/chat 0.84.0-beta.2 → 0.84.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.
Files changed (171) hide show
  1. package/.github/workflows/lighthouse-badger-advanced.yml +92 -0
  2. package/.github/workflows/release.yml +0 -3
  3. package/.github/workflows/sync.yml +9 -2
  4. package/.releaserc.js +1 -14
  5. package/CHANGELOG.md +23 -11
  6. package/README.md +21 -0
  7. package/README.zh-CN.md +21 -0
  8. package/docs/Home.md +1 -0
  9. package/docs/Lighthouse.md +65 -0
  10. package/docs/Lighthouse.zh-CN.md +65 -0
  11. package/docs/_Sidebar.md +1 -0
  12. package/locales/en_US/common.json +5 -0
  13. package/locales/ru_RU/common.json +5 -0
  14. package/locales/zh_CN/common.json +5 -0
  15. package/locales/zh_TW/common.json +5 -0
  16. package/next.config.mjs +0 -3
  17. package/package.json +4 -4
  18. package/src/app/chat/(desktop)/features/{ChatHeader/Desktop.tsx → ChatHeader.tsx} +2 -2
  19. package/src/app/chat/(desktop)/features/{ChatInput/Desktop.tsx → ChatInput.tsx} +5 -7
  20. package/src/app/chat/(desktop)/features/{SessionHeader/Desktop.tsx → SessionHeader.tsx} +1 -1
  21. package/src/app/chat/(desktop)/features/{SessionList/Desktop.tsx → SessionList.tsx} +5 -4
  22. package/src/app/chat/(desktop)/features/{SideBar/Desktop.tsx → SideBar.tsx} +5 -4
  23. package/src/app/chat/(desktop)/index.tsx +14 -8
  24. package/src/app/chat/(desktop)/{layout/Desktop.tsx → layout.desktop.tsx} +7 -8
  25. package/src/app/chat/(desktop)/layout.responsive.tsx +12 -0
  26. package/src/app/chat/(mobile)/features/ChatHeader.tsx +54 -1
  27. package/src/app/chat/(mobile)/features/ChatInput.tsx +28 -8
  28. package/src/app/chat/(mobile)/features/SessionList.tsx +13 -8
  29. package/src/app/chat/{components/Inspector/Mobile.tsx → (mobile)/features/TopicList.tsx} +6 -4
  30. package/src/app/chat/(mobile)/index.tsx +3 -5
  31. package/src/app/chat/(mobile)/layout.mobile.tsx +17 -0
  32. package/src/app/chat/(mobile)/mobile/index.tsx +19 -0
  33. package/src/app/chat/(mobile)/mobile/layout.mobile.tsx +11 -0
  34. package/src/app/chat/(mobile)/mobile/page.tsx +2 -20
  35. package/src/app/chat/{components → features}/ChatHeader/ShareButton/Preview.tsx +25 -9
  36. package/src/app/chat/{components → features}/ChatHeader/ShareButton/style.ts +7 -7
  37. package/src/app/chat/{components/ChatInput → features/ChatInputContent}/index.tsx +3 -1
  38. package/src/app/chat/{components/SessionList → features/SessionListContent}/Inbox/index.tsx +7 -5
  39. package/src/app/chat/{components/SessionList → features/SessionListContent}/index.tsx +3 -1
  40. package/src/app/chat/{components/Inspector → features/TopicListContent}/index.tsx +3 -1
  41. package/src/app/chat/page.tsx +3 -1
  42. package/src/app/chat/settings/(desktop)/index.tsx +14 -0
  43. package/src/app/chat/settings/(desktop)/layout.desktop.tsx +10 -15
  44. package/src/app/chat/settings/(desktop)/layout.responsive.tsx +12 -0
  45. package/src/app/chat/settings/(mobile)/index.tsx +14 -0
  46. package/src/app/chat/settings/(mobile)/layout.mobile.tsx +4 -8
  47. package/src/app/chat/settings/features/EditPage.tsx +38 -0
  48. package/src/app/chat/settings/page.tsx +9 -33
  49. package/src/app/market/(desktop)/{AgentDetail/Desktop.tsx → features/AgentDetail.tsx} +5 -3
  50. package/src/app/market/(desktop)/index.tsx +12 -0
  51. package/src/app/market/(desktop)/{layout/Desktop.tsx → layout.desktop.tsx} +5 -5
  52. package/src/app/market/(desktop)/layout.responsive.tsx +16 -0
  53. package/src/app/market/{components/AgentDetail/Mobile.tsx → (mobile)/features/AgentDetail.tsx} +6 -4
  54. package/src/app/market/(mobile)/index.tsx +12 -0
  55. package/src/app/market/(mobile)/layout.mobile.tsx +5 -5
  56. package/src/app/market/{components/AgentDetail → features/AgentDetailContent}/AgentInfo/Header.tsx +1 -0
  57. package/src/app/market/{components/AgentDetail → features/AgentDetailContent}/index.tsx +3 -1
  58. package/src/app/market/features/TagList/index.tsx +2 -1
  59. package/src/app/market/page.tsx +8 -5
  60. package/src/app/settings/{features/Header/Desktop.tsx → (desktop)/features/Header.tsx} +2 -2
  61. package/src/app/settings/(desktop)/index.tsx +17 -0
  62. package/src/app/settings/{layout.desktop/Desktop.tsx → (desktop)/layout.desktop.tsx} +10 -9
  63. package/src/app/settings/(desktop)/layout.responsive.tsx +14 -0
  64. package/src/app/settings/{mobile → (mobile)/features}/ExtraList.tsx +1 -1
  65. package/src/app/settings/(mobile)/features/Header/Home.tsx +8 -0
  66. package/src/app/settings/{features/Header/Mobile.tsx → (mobile)/features/Header/index.tsx} +1 -0
  67. package/src/app/settings/(mobile)/index.tsx +3 -0
  68. package/src/app/settings/(mobile)/layout.mobile.tsx +19 -0
  69. package/src/app/settings/{mobile → (mobile)/mobile}/index.tsx +9 -9
  70. package/src/app/settings/(mobile)/mobile/layout.mobile.tsx +14 -0
  71. package/src/app/settings/agent/Agent.tsx +30 -0
  72. package/src/app/settings/agent/index.tsx +23 -0
  73. package/src/app/settings/agent/layout.tsx +1 -0
  74. package/src/app/settings/agent/page.tsx +2 -31
  75. package/src/app/settings/common/index.tsx +23 -0
  76. package/src/app/settings/common/layout.tsx +1 -0
  77. package/src/app/settings/common/page.tsx +2 -14
  78. package/src/app/settings/features/SideBar/index.tsx +2 -0
  79. package/src/app/settings/features/UpgradeAlert.tsx +32 -0
  80. package/src/app/settings/layout.server.tsx +12 -0
  81. package/src/app/settings/llm/index.tsx +23 -0
  82. package/src/app/settings/llm/layout.tsx +1 -0
  83. package/src/app/settings/llm/page.tsx +2 -14
  84. package/src/app/settings/page.tsx +14 -1
  85. package/src/app/welcome/(desktop)/features/Showcase.tsx +23 -0
  86. package/src/app/welcome/(desktop)/index.tsx +19 -0
  87. package/src/app/welcome/{DesktopLayout/Desktop.tsx → (desktop)/layout.desktop.tsx} +4 -4
  88. package/src/app/welcome/(desktop)/layout.responsive.tsx +14 -0
  89. package/src/app/welcome/(mobile)/features/Header.tsx +6 -0
  90. package/src/app/welcome/(mobile)/features/Showcase.tsx +16 -0
  91. package/src/app/welcome/(mobile)/index.tsx +10 -0
  92. package/src/app/welcome/(mobile)/layout.mobile.tsx +20 -0
  93. package/src/app/welcome/features/Banner/Hero.tsx +2 -3
  94. package/src/app/welcome/features/Banner/index.tsx +34 -31
  95. package/src/app/welcome/features/Banner/style.ts +10 -1
  96. package/src/app/welcome/page.tsx +9 -7
  97. package/src/components/ResponsiveIndex.tsx +17 -0
  98. package/src/const/version.ts +6 -0
  99. package/src/features/MobileTabBar/index.tsx +1 -1
  100. package/src/features/SideBar/BottomActions.tsx +98 -79
  101. package/src/layout/{AppLayout.tsx → AppLayout.desktop.tsx} +2 -2
  102. package/src/layout/{AppMobileLayout.tsx → AppLayout.mobile.tsx} +2 -2
  103. package/src/layout/GlobalLayout/StoreHydration.tsx +15 -1
  104. package/src/layout/ResponsiveLayout.client.tsx +18 -0
  105. package/src/{components/ResponsiveLayout.tsx → layout/ResponsiveLayout.server.tsx} +4 -3
  106. package/src/locales/default/common.ts +5 -0
  107. package/src/services/latestVersion.ts +11 -1
  108. package/src/store/global/initialState.ts +11 -9
  109. package/src/store/global/slices/common.ts +12 -0
  110. package/src/store/session/slices/session/initialState.ts +2 -2
  111. package/.dockerignore +0 -10
  112. package/Dockerfile +0 -47
  113. package/src/app/chat/(desktop)/features/ChatHeader/index.tsx +0 -14
  114. package/src/app/chat/(desktop)/features/ChatInput/index.tsx +0 -22
  115. package/src/app/chat/(desktop)/features/SessionHeader/index.tsx +0 -14
  116. package/src/app/chat/(desktop)/features/SessionList/index.tsx +0 -20
  117. package/src/app/chat/(desktop)/features/SideBar/index.tsx +0 -20
  118. package/src/app/chat/(desktop)/layout/index.tsx +0 -25
  119. package/src/app/chat/(mobile)/features/Topics.tsx +0 -12
  120. package/src/app/chat/(mobile)/layout.tsx +0 -15
  121. package/src/app/chat/components/ChatHeader/Mobile.tsx +0 -54
  122. package/src/app/chat/components/ChatInput/Mobile.tsx +0 -35
  123. package/src/app/chat/components/SessionList/Mobile.tsx +0 -16
  124. package/src/app/chat/layout.tsx +0 -15
  125. package/src/app/chat/settings/layout.tsx +0 -14
  126. package/src/app/market/(desktop)/AgentDetail/index.tsx +0 -16
  127. package/src/app/market/(desktop)/Header/index.tsx +0 -13
  128. package/src/app/market/(desktop)/layout/index.tsx +0 -17
  129. package/src/app/market/(mobile)/AgentDetail.tsx +0 -12
  130. package/src/app/market/layout.tsx +0 -13
  131. package/src/app/settings/features/Header/index.tsx +0 -14
  132. package/src/app/settings/layout.desktop/index.tsx +0 -32
  133. package/src/app/settings/layout.mobile.tsx +0 -16
  134. package/src/app/settings/layout.tsx +0 -15
  135. package/src/app/settings/mobile/page.tsx +0 -7
  136. package/src/app/welcome/DesktopLayout/index.tsx +0 -15
  137. package/src/app/welcome/MobileLayout.tsx +0 -23
  138. package/src/app/welcome/layout.tsx +0 -22
  139. /package/src/app/chat/{components → features}/ChatHeader/PluginTag/PluginStatus.tsx +0 -0
  140. /package/src/app/chat/{components → features}/ChatHeader/PluginTag/index.tsx +0 -0
  141. /package/src/app/chat/{components → features}/ChatHeader/ShareButton/Inner.tsx +0 -0
  142. /package/src/app/chat/{components → features}/ChatHeader/ShareButton/index.tsx +0 -0
  143. /package/src/app/chat/{components/ChatInput → features/ChatInputContent}/ActionBar/ActionLeft.tsx +0 -0
  144. /package/src/app/chat/{components/ChatInput → features/ChatInputContent}/ActionBar/ActionRight.tsx +0 -0
  145. /package/src/app/chat/{components/ChatInput → features/ChatInputContent}/ActionBar/Token.tsx +0 -0
  146. /package/src/app/chat/{components/ChatInput → features/ChatInputContent}/Footer/SaveTopic.tsx +0 -0
  147. /package/src/app/chat/{components/ChatInput → features/ChatInputContent}/Footer/index.tsx +0 -0
  148. /package/src/app/chat/features/{PageTitle.tsx → PageTitle/index.tsx} +0 -0
  149. /package/src/app/chat/{components/SessionList → features/SessionListContent}/CollapseGroup/index.tsx +0 -0
  150. /package/src/app/chat/{components/SessionList → features/SessionListContent}/List/AddButton.tsx +0 -0
  151. /package/src/app/chat/{components/SessionList → features/SessionListContent}/List/Item/Actions.tsx +0 -0
  152. /package/src/app/chat/{components/SessionList → features/SessionListContent}/List/Item/index.tsx +0 -0
  153. /package/src/app/chat/{components/SessionList → features/SessionListContent}/List/SkeletonList.tsx +0 -0
  154. /package/src/app/chat/{components/SessionList → features/SessionListContent}/List/index.tsx +0 -0
  155. /package/src/app/chat/{components/Inspector → features/TopicListContent}/SystemRole/Header.tsx +0 -0
  156. /package/src/app/chat/{components/Inspector → features/TopicListContent}/SystemRole/index.tsx +0 -0
  157. /package/src/app/chat/{components/Inspector → features/TopicListContent}/SystemRole/style.ts +0 -0
  158. /package/src/app/chat/{components/Inspector → features/TopicListContent}/Topic/DefaultContent.tsx +0 -0
  159. /package/src/app/chat/{components/Inspector → features/TopicListContent}/Topic/SkeletonList.tsx +0 -0
  160. /package/src/app/chat/{components/Inspector → features/TopicListContent}/Topic/TopicContent.tsx +0 -0
  161. /package/src/app/chat/{components/Inspector → features/TopicListContent}/Topic/TopicItem.tsx +0 -0
  162. /package/src/app/chat/{components/Inspector → features/TopicListContent}/Topic/index.tsx +0 -0
  163. /package/src/app/chat/{components/Inspector → features/TopicListContent}/TopicSearchBar/index.tsx +0 -0
  164. /package/src/app/market/(desktop)/{Header/Desktop.tsx → features/Header.tsx} +0 -0
  165. /package/src/app/market/(mobile)/{Header.tsx → features/Header.tsx} +0 -0
  166. /package/src/app/market/{components/AgentDetail → features/AgentDetailContent}/AgentInfo/Comment.tsx +0 -0
  167. /package/src/app/market/{components/AgentDetail → features/AgentDetailContent}/AgentInfo/Loading.tsx +0 -0
  168. /package/src/app/market/{components/AgentDetail → features/AgentDetailContent}/AgentInfo/TokenTag.tsx +0 -0
  169. /package/src/app/market/{components/AgentDetail → features/AgentDetailContent}/AgentInfo/index.tsx +0 -0
  170. /package/src/app/market/{components/AgentDetail → features/AgentDetailContent}/AgentInfo/style.ts +0 -0
  171. /package/src/app/welcome/{features/Footer/index.tsx → (desktop)/features/Footer.tsx} +0 -0
@@ -0,0 +1,92 @@
1
+ # Lighthouse-Badger-Advanced | GitHub Action Workflow
2
+ #
3
+ # Description: Generates, adds & updates manually/automatically Lighthouse badges & reports from one/multiple input URL-group(s) to one/multiple target repo(s)/branch(es) in parallel
4
+ # Author: Sitdisch
5
+ # Source: https://github.com/myactionway/lighthouse-badger-workflows
6
+ # License: MIT
7
+ # Copyright (c) 2021 Sitdisch
8
+
9
+ name: 'Lighthouse-Badger-Advanced'
10
+
11
+ ########################################################################
12
+ # DEFINE YOUR DEFAULTS (INPUTS & TRIGGERS) IN THE FOLLOWING
13
+ ########################################################################
14
+
15
+ # INPUTS as environmental variables (env)
16
+ env:
17
+ TOKEN_NAME: 'GH_TOKEN' # target token name; insert only the name never the real value e.g. 'LIGHTHOUSE_BADGER_TOKEN'
18
+ # To change predefined values, just override them
19
+ REPO_BRANCH: 'lobehub/lobe-chat lighthouse' # target repository & branch (predefined: repo with this file and master branch)
20
+ USER_NAME: 'lobehubbot' # user who should commit
21
+ USER_EMAIL: 'i@lobehub.com'
22
+ AUDIT_TYPE: 'both' # 'mobile', 'desktop', 'both' or 'both_p'
23
+ MOBILE_LIGHTHOUSE_PARAMS: '--throttling.cpuSlowdownMultiplier=2' # Lighthouse parameters mobile audit
24
+ DESKTOP_LIGHTHOUSE_PARAMS: '--preset=desktop --throttling.cpuSlowdownMultiplier=1' # Lighthouse parameters desktop audit
25
+ COMMIT_MESSAGE: '🤖 chore: Lighthouse Results Refreshed'
26
+
27
+ # TRIGGERS
28
+ on:
29
+ workflow_dispatch:
30
+
31
+ ########################################################################
32
+ # YOU CAN JUMP TO THE FIRST URL-GROUP DEFINITION BELOW
33
+ ########################################################################
34
+
35
+ # Jobs
36
+ jobs:
37
+ lighthouse-badger-advanced:
38
+ name: ${{ matrix.NAME }}
39
+ runs-on: ubuntu-22.04
40
+ timeout-minutes: 8
41
+ strategy:
42
+ fail-fast: false
43
+ matrix:
44
+ include:
45
+ - NAME: 'LobeChat | Welcome'
46
+ URLS: 'https://chat-preview.lobehub.com/welcome'
47
+ BADGES_ARGS: '-b pagespeed -o lighthouse/welcome -r'
48
+ COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Welcome'
49
+ - NAME: 'LobeChat | Chat'
50
+ URLS: 'https://chat-preview.lobehub.com/chat'
51
+ BADGES_ARGS: '-b pagespeed -o lighthouse/chat -r'
52
+ COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Chat'
53
+ - NAME: 'LobeChat | Market'
54
+ URLS: 'https://chat-preview.lobehub.com/market'
55
+ BADGES_ARGS: '-b pagespeed -o lighthouse/market -r'
56
+ COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Market'
57
+ - NAME: 'LobeChat | Settings'
58
+ URLS: 'https://chat-preview.lobehub.com/settings'
59
+ BADGES_ARGS: '-b pagespeed -o lighthouse/settings -r'
60
+ COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Settings'
61
+ ####################################################################
62
+ # THAT'S IT; YOU DON'T HAVE TO DEFINE ANYTHING IN THE FOLLOWING
63
+ ####################################################################
64
+ steps:
65
+ - name: Preparatory Tasks
66
+ run: |
67
+ REPOSITORY=`expr "${{ env.REPO_BRANCH }}" : "\([^ ]*\)"`
68
+ BRANCH=`expr "${{ env.REPO_BRANCH }}" : ".* \([^ ]*\)"`
69
+ echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV
70
+ echo "BRANCH=$BRANCH" >> $GITHUB_ENV
71
+ env:
72
+ REPO_BRANCH: ${{ matrix.REPO_BRANCH || env.REPO_BRANCH }}
73
+ - uses: actions/checkout@v3
74
+ with:
75
+ repository: ${{ env.REPOSITORY }}
76
+ token: ${{ secrets[matrix.TOKEN_NAME] || secrets[env.TOKEN_NAME] }}
77
+ ref: ${{ env.BRANCH }}
78
+ - uses: actions/checkout@v3
79
+ with:
80
+ repository: 'myactionway/lighthouse-badges'
81
+ path: temp_lighthouse_badges_nested
82
+ - uses: myactionway/lighthouse-badger-action@v2.2
83
+ with:
84
+ urls: ${{ matrix.URLS }}
85
+ badges_args: ${{ matrix.BADGES_ARGS }}
86
+ audit_type: ${{ matrix.AUDIT_TYPE || env.AUDIT_TYPE }}
87
+ mobile_lighthouse_params: ${{ matrix.MOBILE_LIGHTHOUSE_PARAMS || env.MOBILE_LIGHTHOUSE_PARAMS }}
88
+ desktop_lighthouse_params: ${{ matrix.DESKTOP_LIGHTHOUSE_PARAMS || env.DESKTOP_LIGHTHOUSE_PARAMS }}
89
+ user_name: ${{ matrix.USER_NAME || env.USER_NAME }}
90
+ user_email: ${{ matrix.USER_EMAIL || env.USER_EMAIL }}
91
+ commit_message: ${{ matrix.COMMIT_MESSAGE || env.COMMIT_MESSAGE }}
92
+ max_push_attempts: 5
@@ -3,7 +3,6 @@ on:
3
3
  push:
4
4
  branches:
5
5
  - main
6
- - beta
7
6
 
8
7
  jobs:
9
8
  release:
@@ -29,5 +28,3 @@ jobs:
29
28
  env:
30
29
  GH_TOKEN: ${{ secrets.GH_TOKEN }}
31
30
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
32
- DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
33
- DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
@@ -38,6 +38,13 @@ jobs:
38
38
  uses: actions-cool/issues-helper@v3
39
39
  with:
40
40
  actions: 'create-issue'
41
- token: ${{ secrets.GITHUB_TOKEN }}
42
41
  title: '🚨 同步失败 | Sync Fail'
43
- body: '由于 [LobeChat][lobechat] 上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次,请查看[详细教程][tutorial-zh-CN]\n---\nDue to a change in the workflow file of the [LobeChat][lobechat] upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork. Please refer to the detailed [Tutorial][tutorial-en-US] for instructions.\n\n[lobechat]: https://github.com/lobehub/lobe-chat\n[tutorial-zh-CN]: https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN\n[tutorial-en-US]: https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN'
42
+ labels: '🚨 Sync Fail'
43
+ body: |
44
+ Due to a change in the workflow file of the [LobeChat][lobechat] upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork. Please refer to the detailed [Tutorial][tutorial-en-US] for instructions.
45
+
46
+ 由于 [LobeChat][lobechat] 上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次,请查看 [详细教程][tutorial-zh-CN]
47
+
48
+ [lobechat]: https://github.com/lobehub/lobe-chat
49
+ [tutorial-zh-CN]: https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN
50
+ [tutorial-en-US]: https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN
package/.releaserc.js CHANGED
@@ -1,14 +1 @@
1
- const release = require('@lobehub/lint').semanticRelease;
2
-
3
- module.exports = {
4
- ...release,
5
- plugins: [
6
- ...release.plugins,
7
- [
8
- '@codedependant/semantic-release-docker',
9
- {
10
- dockerImage: 'lobe-chat',
11
- },
12
- ],
13
- ],
14
- };
1
+ module.exports = require('@lobehub/lint').semanticRelease;
package/CHANGELOG.md CHANGED
@@ -2,22 +2,22 @@
2
2
 
3
3
  # Changelog
4
4
 
5
- ## [Version 0.84.0-beta.2](https://github.com/lobehub/lobe-chat/compare/v0.84.0-beta.1...v0.84.0-beta.2)
5
+ ## [Version 0.84.0](https://github.com/lobehub/lobe-chat/compare/v0.83.10...v0.84.0)
6
6
 
7
- <sup>Released on **2023-10-09**</sup>
7
+ <sup>Released on **2023-10-10**</sup>
8
8
 
9
- #### 🐛 Bug Fixes
9
+ #### ✨ Features
10
10
 
11
- - **misc**: Use bun to improve speed.
11
+ - **misc**: Support detect new version and upgrade action.
12
12
 
13
13
  <br/>
14
14
 
15
15
  <details>
16
16
  <summary><kbd>Improvements and Fixes</kbd></summary>
17
17
 
18
- #### What's fixed
18
+ #### What's improved
19
19
 
20
- - **misc**: Use bun to improve speed ([8db2a3c](https://github.com/lobehub/lobe-chat/commit/8db2a3c))
20
+ - **misc**: Support detect new version and upgrade action, closes [#282](https://github.com/lobehub/lobe-chat/issues/282) ([5da19b2](https://github.com/lobehub/lobe-chat/commit/5da19b2))
21
21
 
22
22
  </details>
23
23
 
@@ -27,22 +27,34 @@
27
27
 
28
28
  </div>
29
29
 
30
- ## [Version 0.84.0-beta.1](https://github.com/lobehub/lobe-chat/compare/v0.83.9...v0.84.0-beta.1)
30
+ ### [Version 0.83.10](https://github.com/lobehub/lobe-chat/compare/v0.83.9...v0.83.10)
31
31
 
32
32
  <sup>Released on **2023-10-09**</sup>
33
33
 
34
- #### ✨ Features
34
+ #### ♻ Code Refactoring
35
35
 
36
- - **misc**: Dockerize lobe-chat.
36
+ - **layout**: Refactor layout, Refactor settings layout, Refactor ssc layout.
37
+ - **share**: Use modern-screenshot.
38
+
39
+ #### 🐛 Bug Fixes
40
+
41
+ - **misc**: Fix rsc layout.
37
42
 
38
43
  <br/>
39
44
 
40
45
  <details>
41
46
  <summary><kbd>Improvements and Fixes</kbd></summary>
42
47
 
43
- #### What's improved
48
+ #### Code refactoring
49
+
50
+ - **layout**: Refactor layout ([ace21f4](https://github.com/lobehub/lobe-chat/commit/ace21f4))
51
+ - **layout**: Refactor settings layout ([bd48121](https://github.com/lobehub/lobe-chat/commit/bd48121))
52
+ - **layout**: Refactor ssc layout ([26e1c41](https://github.com/lobehub/lobe-chat/commit/26e1c41))
53
+ - **share**: Use modern-screenshot, closes [#256](https://github.com/lobehub/lobe-chat/issues/256) ([b3d7108](https://github.com/lobehub/lobe-chat/commit/b3d7108))
54
+
55
+ #### What's fixed
44
56
 
45
- - **misc**: Dockerize lobe-chat ([1b750f8](https://github.com/lobehub/lobe-chat/commit/1b750f8))
57
+ - **misc**: Fix rsc layout ([d73f13f](https://github.com/lobehub/lobe-chat/commit/d73f13f))
46
58
 
47
59
  </details>
48
60
 
package/README.md CHANGED
@@ -46,6 +46,7 @@ LobeChat is a open-source, extensible ([Function Calling][fc-link]), high-perfor
46
46
  - [👋🏻 Getting Started & Join Our Community](#-getting-started--join-our-community)
47
47
  - [✨ Features](#-features)
48
48
  - [📸 Snapshot](#-snapshot)
49
+ - [⚡️ Performance](#️-performance)
49
50
  - [🛳 Self Hosting](#-self-hosting)
50
51
  - [Keep Updated](#keep-updated)
51
52
  - [📦 Ecosystem](#-ecosystem)
@@ -154,6 +155,22 @@ We have carried out a series of optimization designs for mobile devices to enhan
154
155
 
155
156
  </div>
156
157
 
158
+ ## ⚡️ Performance
159
+
160
+ > **Note**\
161
+ > The complete list of reports can be found in the [📘 Lighthouse Reports](https://github.com/lobehub/lobe-chat/wiki/Lighthouse)
162
+
163
+ | Desktop | Mobile |
164
+ | :-----------------------------------------: | :----------------------------------------: |
165
+ | ![][chat-desktop] | ![][chat-mobile] |
166
+ | [📑 Lighthouse Report][chat-desktop-report] | [📑 Lighthouse Report][chat-mobile-report] |
167
+
168
+ <div align="right">
169
+
170
+ [![][back-to-top]](#readme-top)
171
+
172
+ </div>
173
+
157
174
  ## 🛳 Self Hosting
158
175
 
159
176
  LobeChat provides a [self-hosted version][deploy-link] with Vercel. This allows you to build your own chatbot within a few minutes, without any prior knowledge. If you want to deploy this service yourself, you can follow these steps:
@@ -297,6 +314,10 @@ This project is [MIT](./LICENSE) licensed.
297
314
  [back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
298
315
  [bun-link]: https://bun.sh
299
316
  [bun-shield]: https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge
317
+ [chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
318
+ [chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
319
+ [chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
320
+ [chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
300
321
  [chat-plugin-realtime-weather]: https://github.com/lobehub/chat-plugin-realtime-weather
301
322
  [chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk
302
323
  [chat-plugin-search-engine]: https://github.com/lobehub/chat-plugin-search-engine
package/README.zh-CN.md CHANGED
@@ -46,6 +46,7 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-link])高
46
46
  - [👋🏻 开始使用 & 交流](#-开始使用--交流)
47
47
  - [✨ 功能特性](#-功能特性)
48
48
  - [📸 快照预览](#-快照预览)
49
+ - [⚡️ 性能测试](#️-性能测试)
49
50
  - [🛳 开箱即用](#-开箱即用)
50
51
  - [保持更新](#保持更新)
51
52
  - [📦 生态系统](#-生态系统)
@@ -156,6 +157,22 @@ LobeChat 提供了两种独特的主题模式 - 明亮模式和暗黑模式,
156
157
 
157
158
  </div>
158
159
 
160
+ ## ⚡️ 性能测试
161
+
162
+ > **Note**\
163
+ > 完整测试报告可见 [📘 Lighthouse 性能测试](https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN)
164
+
165
+ | Desktop | Mobile |
166
+ | :-------------------------------------------: | :------------------------------------------: |
167
+ | ![][chat-desktop] | ![][chat-mobile] |
168
+ | [📑 Lighthouse 测试报告][chat-desktop-report] | [📑 Lighthouse 测试报告][chat-mobile-report] |
169
+
170
+ <div align="right">
171
+
172
+ [![][back-to-top]](#readme-top)
173
+
174
+ </div>
175
+
159
176
  ## 🛳 开箱即用
160
177
 
161
178
  LobeChat 提供了 Vercel 的 [自托管版本][deploy-link]。这使你可以在几分钟内构建自己的聊天机器人,无需任何基础知识。如果想自己部署该服务,可以按照以下步骤进行操作:
@@ -299,6 +316,10 @@ This project is [MIT](./LICENSE) licensed.
299
316
  [back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
300
317
  [bun-link]: https://bun.sh
301
318
  [bun-shield]: https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge
319
+ [chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
320
+ [chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_lobehub_com_chat.html
321
+ [chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
322
+ [chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_lobehub_com_chat.html
302
323
  [chat-plugin-realtime-weather]: https://github.com/lobehub/chat-plugin-realtime-weather
303
324
  [chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk
304
325
  [chat-plugin-search-engine]: https://github.com/lobehub/chat-plugin-search-engine
package/docs/Home.md CHANGED
@@ -17,6 +17,7 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform
17
17
  - [Environment Variables](Environment-Variable) | [环境变量](Environment-Variable.zh-CN)
18
18
  - [Maintaining Updates with LobeChat Self-Deployment](Upstream-Sync) | [自部署保持更新](Upstream-Sync.zh-CN)
19
19
  - [Deploying with Azure OpenAI](Deploy-with-Azure-OpenAI) | [使用 Azure OpenAI 部署](Deploy-with-Azure-OpenAI.zh-CN)
20
+ - [Lighthouse Report](Lighthouse) | [性能测试](Lighthouse.zh-CN)
20
21
 
21
22
  ---
22
23
 
@@ -0,0 +1,65 @@
1
+ # Lighthouse Reports
2
+
3
+ #### TOC
4
+
5
+ - [Welcome Page](#welcome-page)
6
+ - [Chat Page](#chat-page)
7
+ - [Market Page](#market-page)
8
+ - [Settings Page](#settings-page)
9
+
10
+ ## Welcome Page
11
+
12
+ > **Info**\
13
+ > <https://chat-preview.lobehub.com/welcome>
14
+
15
+ | Desktop | Mobile |
16
+ | :---------------------------------------------: | :--------------------------------------------: |
17
+ | ![][welcome-desktop] | ![][welcome-mobile] |
18
+ | [⚡️ Lighthouse Report][welcome-desktop-report] | [⚡️ Lighthouse Report][welcome-mobile-report] |
19
+
20
+ ## Chat Page
21
+
22
+ > **Info**\
23
+ > <https://chat-preview.lobehub.com/chat>
24
+
25
+ | Desktop | Mobile |
26
+ | :------------------------------------------: | :-----------------------------------------: |
27
+ | ![][chat-desktop] | ![][chat-mobile] |
28
+ | [⚡️ Lighthouse Report][chat-desktop-report] | [⚡️ Lighthouse Report][chat-mobile-report] |
29
+
30
+ ## Market Page
31
+
32
+ > **Info**\
33
+ > <https://chat-preview.lobehub.com/market>
34
+
35
+ | Desktop | Mobile |
36
+ | :--------------------------------------------: | :-------------------------------------------: |
37
+ | ![][market-desktop] | ![][market-mobile] |
38
+ | [⚡️ Lighthouse Report][market-desktop-report] | [⚡️ Lighthouse Report][market-mobile-report] |
39
+
40
+ ## Settings Page
41
+
42
+ > **Info**\
43
+ > <https://chat-preview.lobehub.com/settings>
44
+
45
+ | Desktop | Mobile |
46
+ | :----------------------------------------------: | :---------------------------------------------: |
47
+ | ![][settings-desktop] | ![][settings-mobile] |
48
+ | [⚡️ Lighthouse Report][settings-desktop-report] | [⚡️ Lighthouse Report][settings-mobile-report] |
49
+
50
+ [chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
51
+ [chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_lobehub_com_chat.html
52
+ [chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
53
+ [chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_lobehub_com_chat.html
54
+ [market-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/desktop/pagespeed.svg
55
+ [market-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/desktop/chat_lobehub_com_market.html
56
+ [market-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/mobile/pagespeed.svg
57
+ [market-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/mobile/chat_lobehub_com_market.html
58
+ [settings-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/desktop/pagespeed.svg
59
+ [settings-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/desktop/chat_lobehub_com_settings.html
60
+ [settings-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/mobile/pagespeed.svg
61
+ [settings-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/mobile/chat_lobehub_com_settings.html
62
+ [welcome-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/desktop/pagespeed.svg
63
+ [welcome-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/desktop/chat_lobehub_com_welcome.html
64
+ [welcome-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/mobile/pagespeed.svg
65
+ [welcome-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/mobile/chat_lobehub_com_welcome.html
@@ -0,0 +1,65 @@
1
+ # Lighthouse 测试报告
2
+
3
+ #### TOC
4
+
5
+ - [Welcome 欢迎页面](#welcome-欢迎页面)
6
+ - [Chat 聊天页面](#chat-聊天页面)
7
+ - [Market 市场页面](#market-市场页面)
8
+ - [Settings 设置页面](#settings-设置页面)
9
+
10
+ ## Welcome 欢迎页面
11
+
12
+ > **Info**\
13
+ > <https://chat-preview.lobehub.com/welcome>
14
+
15
+ | Desktop | Mobile |
16
+ | :---------------------------------------------: | :--------------------------------------------: |
17
+ | ![][welcome-desktop] | ![][welcome-mobile] |
18
+ | [⚡️ Lighthouse Report][welcome-desktop-report] | [⚡️ Lighthouse Report][welcome-mobile-report] |
19
+
20
+ ## Chat 聊天页面
21
+
22
+ > **Info**\
23
+ > <https://chat-preview.lobehub.com/chat>
24
+
25
+ | Desktop | Mobile |
26
+ | :------------------------------------------: | :-----------------------------------------: |
27
+ | ![][chat-desktop] | ![][chat-mobile] |
28
+ | [⚡️ Lighthouse Report][chat-desktop-report] | [⚡️ Lighthouse Report][chat-mobile-report] |
29
+
30
+ ## Market 市场页面
31
+
32
+ > **Info**\
33
+ > <https://chat-preview.lobehub.com/market>
34
+
35
+ | Desktop | Mobile |
36
+ | :--------------------------------------------: | :-------------------------------------------: |
37
+ | ![][market-desktop] | ![][market-mobile] |
38
+ | [⚡️ Lighthouse Report][market-desktop-report] | [⚡️ Lighthouse Report][market-mobile-report] |
39
+
40
+ ## Settings 设置页面
41
+
42
+ > **Info**\
43
+ > <https://chat-preview.lobehub.com/settings>
44
+
45
+ | Desktop | Mobile |
46
+ | :----------------------------------------------: | :---------------------------------------------: |
47
+ | ![][settings-desktop] | ![][settings-mobile] |
48
+ | [⚡️ Lighthouse Report][settings-desktop-report] | [⚡️ Lighthouse Report][settings-mobile-report] |
49
+
50
+ [chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
51
+ [chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_lobehub_com_chat.html
52
+ [chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
53
+ [chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_lobehub_com_chat.html
54
+ [market-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/desktop/pagespeed.svg
55
+ [market-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/desktop/chat_lobehub_com_market.html
56
+ [market-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/mobile/pagespeed.svg
57
+ [market-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/mobile/chat_lobehub_com_market.html
58
+ [settings-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/desktop/pagespeed.svg
59
+ [settings-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/desktop/chat_lobehub_com_settings.html
60
+ [settings-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/mobile/pagespeed.svg
61
+ [settings-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/mobile/chat_lobehub_com_settings.html
62
+ [welcome-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/desktop/pagespeed.svg
63
+ [welcome-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/desktop/chat_lobehub_com_welcome.html
64
+ [welcome-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/mobile/pagespeed.svg
65
+ [welcome-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/mobile/chat_lobehub_com_welcome.html
package/docs/_Sidebar.md CHANGED
@@ -9,6 +9,7 @@
9
9
  - [Environment Variables](Environment-Variable) | [中文](Environment-Variable.zh-CN)
10
10
  - [Upstream Sync](Upstream-Sync) | [中文](Upstream-Sync.zh-CN)
11
11
  - [Deploying with Azure OpenAI](Deploy-with-Azure-OpenAI) | [中文](Deploy-with-Azure-OpenAI.zh-CN)
12
+ - [Lighthouse Report](Lighthouse) | [中文](Lighthouse.zh-CN)
12
13
 
13
14
  #### 🤖 Agents
14
15
 
@@ -94,5 +94,10 @@
94
94
  },
95
95
  "updateAgent": "Update Agent Information",
96
96
  "updatePrompt": "Update Prompts",
97
+ "upgradeVersion": {
98
+ "action": "Upgrade Now",
99
+ "hasNew": "New Update Available",
100
+ "newVersion": "New version available: {{version}}"
101
+ },
97
102
  "warp": "Line break"
98
103
  }
@@ -94,5 +94,10 @@
94
94
  },
95
95
  "updateAgent": "Обновление информации о помощнике",
96
96
  "updatePrompt": "Обновление подсказок",
97
+ "upgradeVersion": {
98
+ "action": "Обновить сейчас",
99
+ "hasNew": "Доступно обновление",
100
+ "newVersion": "Доступна новая версия: {{version}}"
101
+ },
97
102
  "warp": "Разрыв строки"
98
103
  }
@@ -94,5 +94,10 @@
94
94
  },
95
95
  "updateAgent": "更新助理信息",
96
96
  "updatePrompt": "更新提示词",
97
+ "upgradeVersion": {
98
+ "action": "立即升级",
99
+ "hasNew": "有可用更新",
100
+ "newVersion": "有新版本可用:{{version}}"
101
+ },
97
102
  "warp": "换行"
98
103
  }
@@ -94,5 +94,10 @@
94
94
  },
95
95
  "updateAgent": "更新助理資訊",
96
96
  "updatePrompt": "更新提示",
97
+ "upgradeVersion": {
98
+ "action": "立即升級",
99
+ "hasNew": "有可用更新",
100
+ "newVersion": "有新版本可用:{{version}}"
101
+ },
97
102
  "warp": "換行"
98
103
  }
package/next.config.mjs CHANGED
@@ -2,7 +2,6 @@ import analyzer from '@next/bundle-analyzer';
2
2
  import nextPWA from 'next-pwa';
3
3
 
4
4
  const isProd = process.env.NODE_ENV === 'production';
5
- const buildWithDocker = process.env.DOCKER === 'true';
6
5
 
7
6
  const withBundleAnalyzer = analyzer({
8
7
  enabled: process.env.ANALYZE === 'true',
@@ -33,8 +32,6 @@ const nextConfig = {
33
32
  AGENTS_INDEX_URL: process.env.AGENTS_INDEX_URL,
34
33
  PLUGINS_INDEX_URL: process.env.PLUGINS_INDEX_URL,
35
34
  },
36
-
37
- output: buildWithDocker ? 'standalone' : undefined,
38
35
  };
39
36
 
40
37
  export default isProd ? withBundleAnalyzer(withPWA(nextConfig)) : nextConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.84.0-beta.2",
3
+ "version": "0.84.0",
4
4
  "description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -25,7 +25,6 @@
25
25
  "scripts": {
26
26
  "build": "next build",
27
27
  "build:analyze": "ANALYZE=true next build",
28
- "build:docker": "DOCKER=true next build",
29
28
  "dev": "next dev -p 3010",
30
29
  "i18n": "npm run i18n:workflow && lobe-i18n",
31
30
  "i18n:workflow": "ts-node --project ./tsconfig.json scripts/i18nWorkflow/index.ts",
@@ -84,7 +83,6 @@
84
83
  "emoji-mart": "^5",
85
84
  "fast-deep-equal": "^3",
86
85
  "gpt-tokenizer": "^2",
87
- "html-to-image": "^1",
88
86
  "i18next": "^23",
89
87
  "i18next-browser-languagedetector": "^7",
90
88
  "i18next-resources-for-ts": "^1",
@@ -94,6 +92,7 @@
94
92
  "lodash-es": "^4",
95
93
  "lucide-react": "latest",
96
94
  "mixpanel-browser": "^2",
95
+ "modern-screenshot": "^4",
97
96
  "nanoid": "^5",
98
97
  "next": "^13.5.3",
99
98
  "openai": "^4.10.0",
@@ -108,6 +107,7 @@
108
107
  "remark": "^14",
109
108
  "remark-gfm": "^3",
110
109
  "remark-html": "^15",
110
+ "semver": "^7",
111
111
  "swr": "^2",
112
112
  "systemjs": "^6",
113
113
  "ts-md5": "^1",
@@ -120,7 +120,6 @@
120
120
  "zustand-utils": "^1"
121
121
  },
122
122
  "devDependencies": {
123
- "@codedependant/semantic-release-docker": "^4",
124
123
  "@commitlint/cli": "^17",
125
124
  "@lobehub/i18n-cli": "latest",
126
125
  "@lobehub/lint": "latest",
@@ -134,6 +133,7 @@
134
133
  "@types/node": "^20",
135
134
  "@types/react": "^18",
136
135
  "@types/react-dom": "^18",
136
+ "@types/semver": "^7",
137
137
  "@types/systemjs": "^6",
138
138
  "@types/ua-parser-js": "^0.7",
139
139
  "@types/uuid": "^9",
@@ -12,8 +12,8 @@ import { useSessionChatInit, useSessionStore } from '@/store/session';
12
12
  import { agentSelectors, sessionSelectors } from '@/store/session/selectors';
13
13
  import { pathString } from '@/utils/url';
14
14
 
15
- import PluginTag from '../../../components/ChatHeader/PluginTag';
16
- import ShareButton from '../../../components/ChatHeader/ShareButton';
15
+ import PluginTag from '../../features/ChatHeader/PluginTag';
16
+ import ShareButton from '../../features/ChatHeader/ShareButton';
17
17
 
18
18
  const Header = memo(() => {
19
19
  const init = useSessionChatInit();
@@ -1,15 +1,13 @@
1
1
  import { DraggablePanel } from '@lobehub/ui';
2
- import { ReactNode, memo } from 'react';
2
+ import { memo, useState } from 'react';
3
3
 
4
4
  import { CHAT_TEXTAREA_HEIGHT, HEADER_HEIGHT } from '@/const/layoutTokens';
5
5
  import { useGlobalStore } from '@/store/global';
6
6
 
7
- interface ChatInputDesktopLayoutProps {
8
- children: ReactNode;
9
- expand?: boolean;
10
- }
7
+ import ChatInputContent from '../../features/ChatInputContent';
11
8
 
12
- const ChatInputDesktopLayout = memo<ChatInputDesktopLayoutProps>(({ children, expand }) => {
9
+ const ChatInputDesktopLayout = memo(() => {
10
+ const [expand, setExpand] = useState<boolean>(false);
13
11
  const [inputHeight, updatePreference] = useGlobalStore((s) => [
14
12
  s.preference.inputHeight,
15
13
  s.updatePreference,
@@ -32,7 +30,7 @@ const ChatInputDesktopLayout = memo<ChatInputDesktopLayoutProps>(({ children, ex
32
30
  size={{ height: inputHeight, width: '100%' }}
33
31
  style={{ zIndex: 10 }}
34
32
  >
35
- {children}
33
+ <ChatInputContent expand={expand} onExpandChange={setExpand} />
36
34
  </DraggablePanel>
37
35
  );
38
36
  });
@@ -7,7 +7,7 @@ import { Flexbox } from 'react-layout-kit';
7
7
 
8
8
  import { useSessionStore } from '@/store/session';
9
9
 
10
- import SessionSearchBar from '../../../features/SessionSearchBar';
10
+ import SessionSearchBar from '../../features/SessionSearchBar';
11
11
 
12
12
  export const useStyles = createStyles(({ css, token }) => ({
13
13
  logo: css`
@@ -1,21 +1,22 @@
1
1
  import { DraggablePanelBody } from '@lobehub/ui';
2
2
  import { createStyles } from 'antd-style';
3
- import { ReactNode, memo } from 'react';
3
+ import { memo } from 'react';
4
4
 
5
5
  import FolderPanel from '@/features/FolderPanel';
6
6
 
7
- import Header from '../SessionHeader';
7
+ import SessionListContent from '../../features/SessionListContent';
8
+ import Header from './SessionHeader';
8
9
 
9
10
  const useStyles = createStyles(({ stylish }) => stylish.noScrollbar);
10
11
 
11
- const Sessions = memo<{ children: ReactNode }>(({ children }) => {
12
+ const Sessions = memo(() => {
12
13
  const { styles } = useStyles();
13
14
 
14
15
  return (
15
16
  <FolderPanel>
16
17
  <Header />
17
18
  <DraggablePanelBody className={styles} style={{ padding: 0 }}>
18
- {children}
19
+ <SessionListContent />
19
20
  </DraggablePanelBody>
20
21
  </FolderPanel>
21
22
  );