@lobehub/chat 0.150.8 → 0.150.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/docs/self-hosting/advanced/upstream-sync.mdx +74 -0
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +71 -0
- package/docs/usage/providers/ollama.mdx +1 -1
- package/docs/usage/providers/ollama.zh-CN.mdx +1 -1
- package/package.json +1 -1
- package/src/app/chat/(desktop)/features/ChatHeader/HeaderAction.tsx +2 -2
- package/src/app/chat/(desktop)/features/ChatHeader/Tags.tsx +3 -3
- package/src/app/chat/(desktop)/features/ChatInput/Footer/DragUpload.tsx +3 -3
- package/src/app/chat/(desktop)/features/ChatInput/Footer/SendMore.tsx +3 -3
- package/src/app/chat/(desktop)/features/ChatInput/Footer/index.tsx +3 -3
- package/src/app/chat/(desktop)/features/ChatInput/TextArea.test.tsx +5 -5
- package/src/app/chat/(desktop)/features/ChatInput/TextArea.tsx +3 -3
- package/src/app/chat/(desktop)/features/SideBar/index.tsx +2 -2
- package/src/app/chat/(mobile)/features/SessionHeader.tsx +5 -5
- package/src/app/chat/(mobile)/mobile/ChatHeader/index.tsx +2 -2
- package/src/app/chat/_layout/Desktop/SessionHeader.tsx +2 -2
- package/src/app/chat/features/PluginTag/index.tsx +2 -2
- package/src/app/chat/features/SessionListContent/List/index.tsx +2 -2
- package/src/app/chat/features/ShareButton/ShareModal.tsx +3 -3
- package/src/app/chat/features/TelemetryNotification/index.tsx +6 -4
- package/src/app/chat/features/TopicListContent/Topic/index.tsx +2 -2
- package/src/app/chat/settings/features/SubmitAgentButton/SubmitAgentModal.tsx +3 -3
- package/src/app/settings/(mobile)/index.tsx +3 -3
- package/src/app/settings/about/Analytics.tsx +4 -4
- package/src/app/settings/about/page.tsx +3 -3
- package/src/app/settings/agent/Agent.tsx +4 -4
- package/src/app/settings/common/Common.tsx +4 -4
- package/src/app/settings/common/Theme.tsx +4 -4
- package/src/app/settings/features/SettingList/index.tsx +2 -2
- package/src/app/settings/features/ThemeSwatches/ThemeSwatchesNeutral.tsx +3 -3
- package/src/app/settings/features/ThemeSwatches/ThemeSwatchesPrimary.tsx +3 -3
- package/src/app/settings/hooks/useSyncSettings.ts +3 -3
- package/src/app/settings/llm/Azure/index.tsx +3 -3
- package/src/app/settings/llm/OpenAI/index.tsx +2 -2
- package/src/app/settings/llm/components/ProviderConfig/index.tsx +3 -3
- package/src/app/settings/llm/components/ProviderModelList/CustomModelOption.tsx +4 -4
- package/src/app/settings/llm/components/ProviderModelList/ModelConfigModal.tsx +4 -4
- package/src/app/settings/llm/components/ProviderModelList/ModelFetcher.tsx +6 -6
- package/src/app/settings/llm/components/ProviderModelList/Option.tsx +3 -3
- package/src/app/settings/llm/components/ProviderModelList/index.tsx +6 -6
- package/src/app/settings/sync/Alert.tsx +3 -3
- package/src/app/settings/sync/DeviceInfo/DeviceName.tsx +3 -3
- package/src/app/settings/sync/WebRTC/index.tsx +2 -2
- package/src/app/settings/tts/TTS/index.tsx +4 -4
- package/src/chains/__tests__/summaryAgentName.test.ts +2 -2
- package/src/chains/__tests__/summaryDescription.test.ts +2 -2
- package/src/chains/__tests__/summaryTags.test.ts +2 -2
- package/src/chains/__tests__/summaryTitle.test.ts +2 -2
- package/src/chains/summaryAgentName.ts +1 -1
- package/src/chains/summaryDescription.ts +1 -1
- package/src/chains/summaryTags.ts +1 -1
- package/src/chains/summaryTitle.ts +1 -1
- package/src/features/AgentSetting/AgentConfig/ModelSelect.tsx +3 -6
- package/src/features/AgentSetting/AgentMeta/index.tsx +3 -3
- package/src/features/AgentSetting/AgentPlugin/index.tsx +2 -2
- package/src/features/AgentSetting/AgentPrompt/TokenTag.tsx +4 -4
- package/src/features/AgentSetting/AgentTTS/index.tsx +3 -3
- package/src/features/AvatarWithUpload/index.tsx +3 -3
- package/src/features/ChatInput/ActionBar/FileUpload.tsx +3 -3
- package/src/features/ChatInput/ActionBar/Token/TokenTag.tsx +4 -4
- package/src/features/ChatInput/ActionBar/Token/index.tsx +3 -3
- package/src/features/ChatInput/ActionBar/Tools/index.tsx +5 -5
- package/src/features/ChatInput/STT/browser.tsx +4 -4
- package/src/features/ChatInput/STT/index.tsx +3 -3
- package/src/features/ChatInput/STT/openai.tsx +4 -4
- package/src/features/ChatInput/useChatInput.ts +3 -3
- package/src/features/Conversation/Error/APIKeyForm/Bedrock.tsx +3 -3
- package/src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx +3 -3
- package/src/features/Conversation/Error/AccessCodeForm.tsx +3 -3
- package/src/features/Conversation/Error/InvalidAccessCode.tsx +3 -3
- package/src/features/Conversation/Extras/TTS/index.tsx +3 -3
- package/src/features/Conversation/Plugins/Render/MarkdownType/index.tsx +3 -3
- package/src/features/Conversation/components/ChatItem/index.tsx +3 -3
- package/src/features/ModelSwitchPanel/index.tsx +3 -6
- package/src/features/PluginDevModal/LocalForm.tsx +3 -3
- package/src/features/SyncStatusInspector/DisableSync.tsx +3 -3
- package/src/features/SyncStatusInspector/EnableSync.tsx +4 -4
- package/src/features/SyncStatusInspector/index.tsx +2 -2
- package/src/hooks/_header.ts +4 -4
- package/src/hooks/useSyncData.ts +3 -3
- package/src/hooks/useTTS.ts +4 -4
- package/src/layout/DefaultLayout/Desktop/SideBar/BottomActions.tsx +2 -2
- package/src/layout/DefaultLayout/Desktop/SideBar/TopActions.tsx +2 -2
- package/src/layout/DefaultLayout/Mobile/index.tsx +1 -1
- package/src/layout/GlobalProvider/AppTheme.tsx +4 -4
- package/src/layout/GlobalProvider/StoreInitialization.tsx +6 -1
- package/src/layout/GlobalProvider/index.tsx +5 -3
- package/src/server/globalConfig/index.ts +119 -0
- package/src/server/routers/config/index.ts +3 -112
- package/src/services/__tests__/chat.test.ts +17 -20
- package/src/services/__tests__/tool.test.ts +2 -2
- package/src/services/_auth.test.ts +2 -2
- package/src/services/_auth.ts +7 -7
- package/src/services/_header.ts +4 -4
- package/src/services/chat.ts +13 -13
- package/src/services/config.ts +4 -4
- package/src/services/models.ts +3 -3
- package/src/services/ollama.ts +3 -3
- package/src/services/session/client.ts +2 -2
- package/src/services/tool.ts +1 -1
- package/src/services/trace.ts +3 -3
- package/src/store/agent/slices/chat/selectors.test.ts +2 -2
- package/src/store/chat/slices/message/selectors.test.ts +1 -1
- package/src/store/chat/slices/message/selectors.ts +3 -3
- package/src/store/global/{slices/preference/action.test.ts → action.test.ts} +65 -13
- package/src/store/global/{slices/preference/action.ts → action.ts} +30 -16
- package/src/store/global/initialState.ts +58 -8
- package/src/store/global/selectors.ts +9 -8
- package/src/store/global/store.ts +3 -7
- package/src/store/market/action.ts +1 -1
- package/src/store/serverConfig/Provider.tsx +22 -0
- package/src/store/serverConfig/index.ts +3 -0
- package/src/store/serverConfig/selectors.test.ts +72 -0
- package/src/store/serverConfig/selectors.ts +11 -0
- package/src/store/serverConfig/store.test.ts +53 -0
- package/src/store/serverConfig/store.ts +61 -0
- package/src/store/session/slices/session/action.ts +3 -3
- package/src/store/{global → user}/helpers.ts +2 -2
- package/src/store/user/index.ts +1 -0
- package/src/store/user/initialState.ts +11 -0
- package/src/store/user/selectors.ts +8 -0
- package/src/store/{global → user}/slices/common/action.test.ts +29 -81
- package/src/store/{global → user}/slices/common/action.ts +2 -20
- package/src/store/user/slices/common/initialState.ts +18 -0
- package/src/store/user/slices/common/selectors.ts +6 -0
- package/src/store/user/slices/preference/action.test.ts +41 -0
- package/src/store/user/slices/preference/action.ts +50 -0
- package/src/store/user/slices/preference/initialState.ts +33 -0
- package/src/store/user/slices/preference/selectors.ts +13 -0
- package/src/store/{global → user}/slices/settings/actions/general.test.ts +6 -6
- package/src/store/{global → user}/slices/settings/actions/general.ts +2 -2
- package/src/store/{global → user}/slices/settings/actions/index.ts +2 -2
- package/src/store/{global → user}/slices/settings/actions/llm.test.ts +11 -14
- package/src/store/{global → user}/slices/settings/actions/llm.ts +2 -2
- package/src/store/{global → user}/slices/settings/initialState.ts +2 -2
- package/src/store/{global → user}/slices/settings/selectors/modelConfig.test.ts +8 -8
- package/src/store/{global → user}/slices/settings/selectors/modelConfig.ts +12 -12
- package/src/store/{global → user}/slices/settings/selectors/modelProvider.test.ts +17 -17
- package/src/store/{global → user}/slices/settings/selectors/modelProvider.ts +19 -20
- package/src/store/{global → user}/slices/settings/selectors/selectors.test.ts +8 -8
- package/src/store/{global → user}/slices/settings/selectors/settings.ts +12 -12
- package/src/store/user/slices/settings/selectors/sync.ts +14 -0
- package/src/store/user/store.ts +33 -0
- package/src/tools/dalle/Render/ToolBar.tsx +3 -3
- package/src/utils/localStorage.ts +3 -1
- package/src/store/featureFlags/Provider.tsx +0 -18
- package/src/store/featureFlags/index.ts +0 -3
- package/src/store/featureFlags/selectors.ts +0 -5
- package/src/store/featureFlags/store.ts +0 -42
- package/src/store/global/slices/common/initialState.ts +0 -42
- package/src/store/global/slices/common/selectors.ts +0 -8
- package/src/store/global/slices/preference/initialState.ts +0 -51
- package/src/store/global/slices/preference/selectors.ts +0 -18
- package/src/store/global/slices/settings/selectors/sync.ts +0 -14
- /package/src/server/{routers/config → globalConfig}/parseDefaultAgent.test.ts +0 -0
- /package/src/server/{routers/config → globalConfig}/parseDefaultAgent.ts +0 -0
- /package/src/store/{global → user}/slices/settings/reducers/customModelCard.test.ts +0 -0
- /package/src/store/{global → user}/slices/settings/reducers/customModelCard.ts +0 -0
- /package/src/store/{global → user}/slices/settings/selectors/__snapshots__/selectors.test.ts.snap +0 -0
- /package/src/store/{global → user}/slices/settings/selectors/index.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.150.10](https://github.com/lobehub/lobe-chat/compare/v0.150.9...v0.150.10)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-04-28**</sup>
|
|
8
|
+
|
|
9
|
+
#### ♻ Code Refactoring
|
|
10
|
+
|
|
11
|
+
- **misc**: Rename globalStore to userStore.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Code refactoring
|
|
19
|
+
|
|
20
|
+
- **misc**: Rename globalStore to userStore, closes [#2264](https://github.com/lobehub/lobe-chat/issues/2264) ([a3cb538](https://github.com/lobehub/lobe-chat/commit/a3cb538))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.150.9](https://github.com/lobehub/lobe-chat/compare/v0.150.8...v0.150.9)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-04-28**</sup>
|
|
33
|
+
|
|
34
|
+
#### ♻ Code Refactoring
|
|
35
|
+
|
|
36
|
+
- **misc**: Refactor feature flags store to server config store.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### Code refactoring
|
|
44
|
+
|
|
45
|
+
- **misc**: Refactor feature flags store to server config store, closes [#2263](https://github.com/lobehub/lobe-chat/issues/2263) ([2e991d7](https://github.com/lobehub/lobe-chat/commit/2e991d7))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.150.8](https://github.com/lobehub/lobe-chat/compare/v0.150.7...v0.150.8)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-04-28**</sup>
|
|
@@ -85,3 +85,77 @@ Ensure that you have sufficient permissions to stop and remove the container bef
|
|
|
85
85
|
No need to worry, you won't. All of LobeChat's chat records are stored in your local browser. Therefore, when redeploying LobeChat using Docker, your chat records will not be lost.
|
|
86
86
|
|
|
87
87
|
</Callout>
|
|
88
|
+
|
|
89
|
+
If you wish to automate the above steps, you can follow the method below and use Crontab scheduling to complete it. The specific steps are as follows.
|
|
90
|
+
|
|
91
|
+
<Steps>
|
|
92
|
+
|
|
93
|
+
### Write automatic update scripts and configuration files
|
|
94
|
+
|
|
95
|
+
First, create a `lobe.env` configuration file with various environment variables, for example:
|
|
96
|
+
|
|
97
|
+
```env
|
|
98
|
+
OPENAI_API_KEY=sk-xxxx
|
|
99
|
+
OPENAI_PROXY_URL=https://api-proxy.com/v1
|
|
100
|
+
ACCESS_CODE=arthals2333
|
|
101
|
+
OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Then, you can use the following script to automate the update:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
#!/bin/bash
|
|
108
|
+
# auto-update-lobe-chat.sh
|
|
109
|
+
|
|
110
|
+
# Set up proxy (optional)
|
|
111
|
+
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
|
|
112
|
+
|
|
113
|
+
# Pull the latest image and store the output in a variable
|
|
114
|
+
output=$(docker pull lobehub/lobe-chat:latest 2>&1)
|
|
115
|
+
|
|
116
|
+
# Check if the pull command was executed successfully
|
|
117
|
+
if [ $? -ne 0 ]; then
|
|
118
|
+
exit 1
|
|
119
|
+
fi
|
|
120
|
+
|
|
121
|
+
# Check if the output contains a specific string
|
|
122
|
+
echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
|
|
123
|
+
|
|
124
|
+
# If the image is already up to date, do nothing
|
|
125
|
+
if [ $? -eq 0 ]; then
|
|
126
|
+
exit 0
|
|
127
|
+
fi
|
|
128
|
+
|
|
129
|
+
echo "Detected Lobe-Chat update"
|
|
130
|
+
|
|
131
|
+
# Remove the old container
|
|
132
|
+
echo "Removed: $(docker rm -f Lobe-Chat)"
|
|
133
|
+
|
|
134
|
+
# Run the new container
|
|
135
|
+
echo "Started: $(docker run -d --network=host --env-file /path/to/lobe.env --name=Lobe-Chat --restart=always lobehub/lobe-chat)"
|
|
136
|
+
|
|
137
|
+
# Print the update time and version
|
|
138
|
+
echo "Update time: $(date)"
|
|
139
|
+
echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
|
|
140
|
+
|
|
141
|
+
# Clean up unused images
|
|
142
|
+
docker images | grep 'lobehub/lobe-chat' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
|
|
143
|
+
echo "Removed old images."
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
<Callout type={'warning'}>
|
|
147
|
+
This script can be used in Crontab, but please ensure that your Crontab can find the correct
|
|
148
|
+
Docker command. It is recommended to use absolute paths.
|
|
149
|
+
</Callout>
|
|
150
|
+
|
|
151
|
+
Configure Crontab to execute the script every 5 minutes:
|
|
152
|
+
|
|
153
|
+
### Configure Crontab to automatically execute scripts
|
|
154
|
+
|
|
155
|
+
The following command configures Crontab to execute scripts every 5 minutes, or as often as you like:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
</Steps>
|
|
@@ -80,3 +80,74 @@ docker run -d -p 3210:3210 \
|
|
|
80
80
|
放心,不会的。LobeChat 的聊天记录全部都存储在你的本地浏览器中。因此使用 Docker 重新部署 LobeChat 时,你的聊天记录并不会丢失。
|
|
81
81
|
|
|
82
82
|
</Callout>
|
|
83
|
+
|
|
84
|
+
如果你希望自动化执行以上步骤,你可以参照下面的方法,利用 Crontab 定时来完成。具体步骤如下。
|
|
85
|
+
|
|
86
|
+
<Steps>
|
|
87
|
+
|
|
88
|
+
### 撰写自动更新脚本、配置文件
|
|
89
|
+
|
|
90
|
+
首先,新建一个 `lobe.env` 配置文件,内容为各种环境变量,例如:
|
|
91
|
+
|
|
92
|
+
```env
|
|
93
|
+
OPENAI_API_KEY=sk-xxxx
|
|
94
|
+
OPENAI_PROXY_URL=https://api-proxy.com/v1
|
|
95
|
+
ACCESS_CODE=arthals2333
|
|
96
|
+
OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
然后,你可以使用以下脚本来自动更新:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
#!/bin/bash
|
|
103
|
+
# auto-update-lobe-chat.sh
|
|
104
|
+
|
|
105
|
+
# 设置代理(可选)
|
|
106
|
+
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
|
|
107
|
+
|
|
108
|
+
# 拉取最新的镜像并将输出存储在变量中
|
|
109
|
+
output=$(docker pull lobehub/lobe-chat:latest 2>&1)
|
|
110
|
+
|
|
111
|
+
# 检查拉取命令是否成功执行
|
|
112
|
+
if [ $? -ne 0 ]; then
|
|
113
|
+
exit 1
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
# 检查输出中是否包含特定的字符串
|
|
117
|
+
echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
|
|
118
|
+
|
|
119
|
+
# 如果镜像已经是最新的,则不执行任何操作
|
|
120
|
+
if [ $? -eq 0 ]; then
|
|
121
|
+
exit 0
|
|
122
|
+
fi
|
|
123
|
+
|
|
124
|
+
echo "Detected Lobe-Chat update"
|
|
125
|
+
|
|
126
|
+
# 删除旧的容器
|
|
127
|
+
echo "Removed: $(docker rm -f Lobe-Chat)"
|
|
128
|
+
|
|
129
|
+
# 运行新的容器
|
|
130
|
+
echo "Started: $(docker run -d --network=host --env-file /path/to/lobe.env --name=Lobe-Chat --restart=always lobehub/lobe-chat)"
|
|
131
|
+
|
|
132
|
+
# 打印更新的时间和版本
|
|
133
|
+
echo "Update time: $(date)"
|
|
134
|
+
echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
|
|
135
|
+
|
|
136
|
+
# 清理不再使用的镜像
|
|
137
|
+
docker images | grep 'lobehub/lobe-chat' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
|
|
138
|
+
echo "Removed old images."
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
<Callout type={'warning'}>
|
|
142
|
+
此脚本可以在 Crontab 中使用,但请确认你的 Crontab 可以找到正确的 Docker 命令。建议使用绝对路径。
|
|
143
|
+
</Callout>
|
|
144
|
+
|
|
145
|
+
### 配置 Crontab 自动执行脚本
|
|
146
|
+
|
|
147
|
+
以下命令可以配置 Crontab 每 5 分钟执行一次脚本,你也可以根据需要调整执行频率:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
</Steps>
|
|
@@ -25,7 +25,7 @@ This document will guide you on how to use Ollama in LobeChat:
|
|
|
25
25
|
|
|
26
26
|
<Video
|
|
27
27
|
alt="demonstration of using Ollama in LobeChat"
|
|
28
|
-
height={
|
|
28
|
+
height={580}
|
|
29
29
|
src="https://github.com/lobehub/lobe-chat/assets/28616219/c32b56db-c6a1-4876-9bc3-acbd37ec0c0c"
|
|
30
30
|
/>
|
|
31
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.150.
|
|
3
|
+
"version": "0.150.10",
|
|
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",
|
|
@@ -4,8 +4,8 @@ import { memo } from 'react';
|
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
|
|
6
6
|
import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';
|
|
7
|
-
import { featureFlagsSelectors, useFeatureFlagStore } from '@/store/featureFlags';
|
|
8
7
|
import { useGlobalStore } from '@/store/global';
|
|
8
|
+
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
|
9
9
|
|
|
10
10
|
import SettingButton from '../../../features/SettingButton';
|
|
11
11
|
import ShareButton from '../../../features/ShareButton';
|
|
@@ -18,7 +18,7 @@ const HeaderAction = memo(() => {
|
|
|
18
18
|
s.toggleChatSideBar,
|
|
19
19
|
]);
|
|
20
20
|
|
|
21
|
-
const { isAgentEditable } =
|
|
21
|
+
const { isAgentEditable } = useServerConfigStore(featureFlagsSelectors);
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<>
|
|
@@ -5,8 +5,8 @@ import ModelTag from '@/components/ModelTag';
|
|
|
5
5
|
import ModelSwitchPanel from '@/features/ModelSwitchPanel';
|
|
6
6
|
import { useAgentStore } from '@/store/agent';
|
|
7
7
|
import { agentSelectors } from '@/store/agent/selectors';
|
|
8
|
-
import {
|
|
9
|
-
import { modelProviderSelectors } from '@/store/
|
|
8
|
+
import { useUserStore } from '@/store/user';
|
|
9
|
+
import { modelProviderSelectors } from '@/store/user/selectors';
|
|
10
10
|
|
|
11
11
|
import PluginTag from '../../../features/PluginTag';
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ const TitleTags = memo(() => {
|
|
|
16
16
|
agentSelectors.currentAgentPlugins(s),
|
|
17
17
|
]);
|
|
18
18
|
|
|
19
|
-
const showPlugin =
|
|
19
|
+
const showPlugin = useUserStore(modelProviderSelectors.isModelEnabledFunctionCall(model));
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
22
|
<Flexbox gap={8} horizontal>
|
|
@@ -9,8 +9,8 @@ import { Center, Flexbox } from 'react-layout-kit';
|
|
|
9
9
|
import { useAgentStore } from '@/store/agent';
|
|
10
10
|
import { agentSelectors } from '@/store/agent/selectors';
|
|
11
11
|
import { useFileStore } from '@/store/file';
|
|
12
|
-
import {
|
|
13
|
-
import { modelProviderSelectors } from '@/store/
|
|
12
|
+
import { useUserStore } from '@/store/user';
|
|
13
|
+
import { modelProviderSelectors } from '@/store/user/selectors';
|
|
14
14
|
|
|
15
15
|
const useStyles = createStyles(({ css, token, stylish }) => {
|
|
16
16
|
return {
|
|
@@ -77,7 +77,7 @@ const DragUpload = memo(() => {
|
|
|
77
77
|
|
|
78
78
|
const model = useAgentStore(agentSelectors.currentAgentModel);
|
|
79
79
|
|
|
80
|
-
const enabledFiles =
|
|
80
|
+
const enabledFiles = useUserStore(modelProviderSelectors.isModelEnabledFiles(model));
|
|
81
81
|
|
|
82
82
|
const uploadImages = async (fileList: FileList | undefined) => {
|
|
83
83
|
if (!fileList || fileList.length === 0) return;
|
|
@@ -11,8 +11,8 @@ import HotKeys from '@/components/HotKeys';
|
|
|
11
11
|
import { ALT_KEY } from '@/const/hotkeys';
|
|
12
12
|
import { useSendMessage } from '@/features/ChatInput/useSend';
|
|
13
13
|
import { useChatStore } from '@/store/chat';
|
|
14
|
-
import {
|
|
15
|
-
import { preferenceSelectors } from '@/store/
|
|
14
|
+
import { useUserStore } from '@/store/user';
|
|
15
|
+
import { preferenceSelectors } from '@/store/user/selectors';
|
|
16
16
|
import { isMacOS } from '@/utils/platform';
|
|
17
17
|
|
|
18
18
|
const useStyles = createStyles(({ css, prefixCls }) => {
|
|
@@ -32,7 +32,7 @@ const SendMore = memo(() => {
|
|
|
32
32
|
|
|
33
33
|
const { styles } = useStyles();
|
|
34
34
|
|
|
35
|
-
const [useCmdEnterToSend, updatePreference] =
|
|
35
|
+
const [useCmdEnterToSend, updatePreference] = useUserStore((s) => [
|
|
36
36
|
preferenceSelectors.useCmdEnterToSend(s),
|
|
37
37
|
s.updatePreference,
|
|
38
38
|
]);
|
|
@@ -13,8 +13,8 @@ import { useSendMessage } from '@/features/ChatInput/useSend';
|
|
|
13
13
|
import { useAgentStore } from '@/store/agent';
|
|
14
14
|
import { agentSelectors } from '@/store/agent/slices/chat';
|
|
15
15
|
import { useChatStore } from '@/store/chat';
|
|
16
|
-
import {
|
|
17
|
-
import { modelProviderSelectors, preferenceSelectors } from '@/store/
|
|
16
|
+
import { useUserStore } from '@/store/user';
|
|
17
|
+
import { modelProviderSelectors, preferenceSelectors } from '@/store/user/selectors';
|
|
18
18
|
import { isMacOS } from '@/utils/platform';
|
|
19
19
|
|
|
20
20
|
import DragUpload from './DragUpload';
|
|
@@ -66,7 +66,7 @@ const Footer = memo<FooterProps>(({ setExpand }) => {
|
|
|
66
66
|
|
|
67
67
|
const model = useAgentStore(agentSelectors.currentAgentModel);
|
|
68
68
|
|
|
69
|
-
const [useCmdEnterToSend, canUpload] =
|
|
69
|
+
const [useCmdEnterToSend, canUpload] = useUserStore((s) => [
|
|
70
70
|
preferenceSelectors.useCmdEnterToSend(s),
|
|
71
71
|
modelProviderSelectors.isModelEnabledUpload(model)(s),
|
|
72
72
|
]);
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
4
4
|
|
|
5
5
|
import { useChatStore } from '@/store/chat';
|
|
6
|
-
import {
|
|
6
|
+
import { useUserStore } from '@/store/user';
|
|
7
7
|
|
|
8
8
|
import InputArea from './TextArea';
|
|
9
9
|
|
|
@@ -232,7 +232,7 @@ describe('<InputArea />', () => {
|
|
|
232
232
|
inputMessage: '123',
|
|
233
233
|
sendMessage: sendMessageMock,
|
|
234
234
|
});
|
|
235
|
-
|
|
235
|
+
useUserStore.getState().updatePreference({ useCmdEnterToSend: true });
|
|
236
236
|
});
|
|
237
237
|
|
|
238
238
|
render(<InputArea setExpand={setExpandMock} />);
|
|
@@ -252,7 +252,7 @@ describe('<InputArea />', () => {
|
|
|
252
252
|
sendMessage: sendMessageMock,
|
|
253
253
|
updateInputMessage: updateInputMessageMock,
|
|
254
254
|
});
|
|
255
|
-
|
|
255
|
+
useUserStore.getState().updatePreference({ useCmdEnterToSend: false });
|
|
256
256
|
});
|
|
257
257
|
|
|
258
258
|
render(<InputArea setExpand={setExpandMock} />);
|
|
@@ -275,7 +275,7 @@ describe('<InputArea />', () => {
|
|
|
275
275
|
inputMessage: '123',
|
|
276
276
|
sendMessage: sendMessageMock,
|
|
277
277
|
});
|
|
278
|
-
|
|
278
|
+
useUserStore.getState().updatePreference({ useCmdEnterToSend: true });
|
|
279
279
|
});
|
|
280
280
|
|
|
281
281
|
render(<InputArea setExpand={setExpandMock} />);
|
|
@@ -300,7 +300,7 @@ describe('<InputArea />', () => {
|
|
|
300
300
|
sendMessage: sendMessageMock,
|
|
301
301
|
updateInputMessage: updateInputMessageMock,
|
|
302
302
|
});
|
|
303
|
-
|
|
303
|
+
useUserStore.getState().updatePreference({ useCmdEnterToSend: false });
|
|
304
304
|
});
|
|
305
305
|
|
|
306
306
|
render(<InputArea setExpand={setExpandMock} />);
|
|
@@ -6,8 +6,8 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
|
|
7
7
|
import { useSendMessage } from '@/features/ChatInput/useSend';
|
|
8
8
|
import { useChatStore } from '@/store/chat';
|
|
9
|
-
import {
|
|
10
|
-
import { preferenceSelectors } from '@/store/
|
|
9
|
+
import { useUserStore } from '@/store/user';
|
|
10
|
+
import { preferenceSelectors } from '@/store/user/selectors';
|
|
11
11
|
import { isCommandPressed } from '@/utils/keyboard';
|
|
12
12
|
|
|
13
13
|
import { useAutoFocus } from './useAutoFocus';
|
|
@@ -47,7 +47,7 @@ const InputArea = memo<InputAreaProps>(({ setExpand }) => {
|
|
|
47
47
|
s.updateInputMessage,
|
|
48
48
|
]);
|
|
49
49
|
|
|
50
|
-
const useCmdEnterToSend =
|
|
50
|
+
const useCmdEnterToSend = useUserStore(preferenceSelectors.useCmdEnterToSend);
|
|
51
51
|
|
|
52
52
|
const sendMessage = useSendMessage();
|
|
53
53
|
|
|
@@ -6,8 +6,8 @@ import { memo } from 'react';
|
|
|
6
6
|
import TopicListContent from '@/app/chat/features/TopicListContent';
|
|
7
7
|
import SafeSpacing from '@/components/SafeSpacing';
|
|
8
8
|
import { CHAT_SIDEBAR_WIDTH } from '@/const/layoutTokens';
|
|
9
|
-
import { featureFlagsSelectors, useFeatureFlagStore } from '@/store/featureFlags';
|
|
10
9
|
import { useGlobalStore } from '@/store/global';
|
|
10
|
+
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
|
11
11
|
import { useSessionStore } from '@/store/session';
|
|
12
12
|
import { sessionSelectors } from '@/store/session/selectors';
|
|
13
13
|
|
|
@@ -35,7 +35,7 @@ const Desktop = memo(() => {
|
|
|
35
35
|
s.toggleChatSideBar,
|
|
36
36
|
]);
|
|
37
37
|
|
|
38
|
-
const { isAgentEditable: showSystemRole } =
|
|
38
|
+
const { isAgentEditable: showSystemRole } = useServerConfigStore(featureFlagsSelectors);
|
|
39
39
|
const isInbox = useSessionStore(sessionSelectors.isInboxSession);
|
|
40
40
|
|
|
41
41
|
return (
|
|
@@ -7,10 +7,10 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
7
7
|
|
|
8
8
|
import { MOBILE_HEADER_ICON_SIZE } from '@/const/layoutTokens';
|
|
9
9
|
import SyncStatusInspector from '@/features/SyncStatusInspector';
|
|
10
|
-
import { featureFlagsSelectors,
|
|
11
|
-
import { useGlobalStore } from '@/store/global';
|
|
12
|
-
import { commonSelectors } from '@/store/global/selectors';
|
|
10
|
+
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
|
13
11
|
import { useSessionStore } from '@/store/session';
|
|
12
|
+
import { useUserStore } from '@/store/user';
|
|
13
|
+
import { commonSelectors } from '@/store/user/selectors';
|
|
14
14
|
import { mobileHeaderSticky } from '@/styles/mobileHeader';
|
|
15
15
|
|
|
16
16
|
export const useStyles = createStyles(({ css, token }) => ({
|
|
@@ -26,8 +26,8 @@ export const useStyles = createStyles(({ css, token }) => ({
|
|
|
26
26
|
const Header = memo(() => {
|
|
27
27
|
const [createSession] = useSessionStore((s) => [s.createSession]);
|
|
28
28
|
const router = useRouter();
|
|
29
|
-
const avatar =
|
|
30
|
-
const { showCreateSession } =
|
|
29
|
+
const avatar = useUserStore(commonSelectors.userAvatar);
|
|
30
|
+
const { showCreateSession } = useServerConfigStore(featureFlagsSelectors);
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<MobileNavBar
|
|
@@ -2,7 +2,7 @@ import { MobileNavBar } from '@lobehub/ui';
|
|
|
2
2
|
import { useRouter } from 'next/navigation';
|
|
3
3
|
import { memo, useState } from 'react';
|
|
4
4
|
|
|
5
|
-
import { featureFlagsSelectors,
|
|
5
|
+
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
|
6
6
|
|
|
7
7
|
import SettingButton from '../../../features/SettingButton';
|
|
8
8
|
import ShareButton from '../../../features/ShareButton';
|
|
@@ -12,7 +12,7 @@ const MobileHeader = memo(() => {
|
|
|
12
12
|
const router = useRouter();
|
|
13
13
|
const [open, setOpen] = useState(false);
|
|
14
14
|
|
|
15
|
-
const { isAgentEditable } =
|
|
15
|
+
const { isAgentEditable } = useServerConfigStore(featureFlagsSelectors);
|
|
16
16
|
|
|
17
17
|
// const items: MenuProps['items'] = [
|
|
18
18
|
// {
|
|
@@ -8,7 +8,7 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
8
8
|
import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';
|
|
9
9
|
import SyncStatusTag from '@/features/SyncStatusInspector';
|
|
10
10
|
import { useActionSWR } from '@/libs/swr';
|
|
11
|
-
import { featureFlagsSelectors,
|
|
11
|
+
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
|
12
12
|
import { useSessionStore } from '@/store/session';
|
|
13
13
|
|
|
14
14
|
import SessionSearchBar from '../../features/SessionSearchBar';
|
|
@@ -27,7 +27,7 @@ const Header = memo(() => {
|
|
|
27
27
|
const { styles } = useStyles();
|
|
28
28
|
const { t } = useTranslation('chat');
|
|
29
29
|
const [createSession] = useSessionStore((s) => [s.createSession]);
|
|
30
|
-
const { enableWebrtc, showCreateSession } =
|
|
30
|
+
const { enableWebrtc, showCreateSession } = useServerConfigStore(featureFlagsSelectors);
|
|
31
31
|
|
|
32
32
|
const { mutate, isValidating } = useActionSWR('session.createSession', () => createSession());
|
|
33
33
|
|
|
@@ -5,7 +5,7 @@ import isEqual from 'fast-deep-equal';
|
|
|
5
5
|
import { LucideToyBrick } from 'lucide-react';
|
|
6
6
|
import { memo } from 'react';
|
|
7
7
|
|
|
8
|
-
import { featureFlagsSelectors,
|
|
8
|
+
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
|
9
9
|
import { pluginHelpers, useToolStore } from '@/store/tool';
|
|
10
10
|
import { toolSelectors } from '@/store/tool/selectors';
|
|
11
11
|
|
|
@@ -16,7 +16,7 @@ export interface PluginTagProps {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const PluginTag = memo<PluginTagProps>(({ plugins }) => {
|
|
19
|
-
const { showDalle } =
|
|
19
|
+
const { showDalle } = useServerConfigStore(featureFlagsSelectors);
|
|
20
20
|
const list = useToolStore(toolSelectors.metaList(showDalle), isEqual);
|
|
21
21
|
const displayPlugin = useToolStore(toolSelectors.getMetaById(plugins[0]), isEqual);
|
|
22
22
|
|
|
@@ -7,7 +7,7 @@ import { Center } from 'react-layout-kit';
|
|
|
7
7
|
import LazyLoad from 'react-lazy-load';
|
|
8
8
|
|
|
9
9
|
import { SESSION_CHAT_URL } from '@/const/url';
|
|
10
|
-
import { featureFlagsSelectors,
|
|
10
|
+
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
|
11
11
|
import { useSessionStore } from '@/store/session';
|
|
12
12
|
import { sessionSelectors } from '@/store/session/selectors';
|
|
13
13
|
import { LobeAgentSession } from '@/types/session';
|
|
@@ -30,7 +30,7 @@ interface SessionListProps {
|
|
|
30
30
|
const SessionList = memo<SessionListProps>(({ dataSource, groupId, showAddButton = true }) => {
|
|
31
31
|
const { t } = useTranslation('chat');
|
|
32
32
|
const isInit = useSessionStore((s) => sessionSelectors.isSessionListInit(s));
|
|
33
|
-
const { showCreateSession } =
|
|
33
|
+
const { showCreateSession } = useServerConfigStore(featureFlagsSelectors);
|
|
34
34
|
const { styles } = useStyles();
|
|
35
35
|
|
|
36
36
|
const { mobile } = useResponsive();
|
|
@@ -6,8 +6,8 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
6
6
|
|
|
7
7
|
import { FORM_STYLE } from '@/const/layoutTokens';
|
|
8
8
|
import { useChatStore } from '@/store/chat';
|
|
9
|
-
import {
|
|
10
|
-
import { commonSelectors } from '@/store/
|
|
9
|
+
import { useUserStore } from '@/store/user';
|
|
10
|
+
import { commonSelectors } from '@/store/user/selectors';
|
|
11
11
|
|
|
12
12
|
import Preview from './Preview';
|
|
13
13
|
import { FieldType, ImageType } from './type';
|
|
@@ -49,7 +49,7 @@ const ShareModal = memo<ModalProps>(({ onCancel, open }) => {
|
|
|
49
49
|
const [fieldValue, setFieldValue] = useState<FieldType>(DEFAULT_FIELD_VALUE);
|
|
50
50
|
const [tab, setTab] = useState<Tab>(Tab.Screenshot);
|
|
51
51
|
const { t } = useTranslation('chat');
|
|
52
|
-
const avatar =
|
|
52
|
+
const avatar = useUserStore(commonSelectors.userAvatar);
|
|
53
53
|
const [shareLoading, shareToShareGPT] = useChatStore((s) => [s.shareLoading, s.shareToShareGPT]);
|
|
54
54
|
const { loading, onDownload, title } = useScreenshot(fieldValue.imageType);
|
|
55
55
|
|
|
@@ -9,8 +9,9 @@ import { useTranslation } from 'react-i18next';
|
|
|
9
9
|
import { Flexbox } from 'react-layout-kit';
|
|
10
10
|
|
|
11
11
|
import { PRIVACY_URL } from '@/const/url';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { useServerConfigStore } from '@/store/serverConfig';
|
|
13
|
+
import { serverConfigSelectors } from '@/store/serverConfig/selectors';
|
|
14
|
+
import { useUserStore } from '@/store/user';
|
|
14
15
|
|
|
15
16
|
const useStyles = createStyles(({ css, token, isDarkMode }) => ({
|
|
16
17
|
container: css`
|
|
@@ -55,8 +56,9 @@ const TelemetryNotification = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
|
55
56
|
const { styles, theme, cx } = useStyles();
|
|
56
57
|
|
|
57
58
|
const { t } = useTranslation('common');
|
|
58
|
-
const
|
|
59
|
-
|
|
59
|
+
const shouldCheck = useServerConfigStore(serverConfigSelectors.enabledTelemetryChat);
|
|
60
|
+
|
|
61
|
+
const [useCheckTrace, updatePreference] = useUserStore((s) => [
|
|
60
62
|
s.useCheckTrace,
|
|
61
63
|
s.updatePreference,
|
|
62
64
|
]);
|
|
@@ -9,7 +9,7 @@ import { Virtuoso, VirtuosoHandle } from 'react-virtuoso';
|
|
|
9
9
|
import { imageUrl } from '@/const/url';
|
|
10
10
|
import { useChatStore } from '@/store/chat';
|
|
11
11
|
import { topicSelectors } from '@/store/chat/selectors';
|
|
12
|
-
import {
|
|
12
|
+
import { useUserStore } from '@/store/user';
|
|
13
13
|
import { ChatTopic } from '@/types/topic';
|
|
14
14
|
|
|
15
15
|
import { Placeholder, SkeletonList } from './SkeletonList';
|
|
@@ -30,7 +30,7 @@ export const Topic = memo(() => {
|
|
|
30
30
|
s.activeTopicId,
|
|
31
31
|
topicSelectors.currentTopicLength(s),
|
|
32
32
|
]);
|
|
33
|
-
const [visible, updateGuideState] =
|
|
33
|
+
const [visible, updateGuideState] = useUserStore((s) => [
|
|
34
34
|
s.preference.guide?.topic,
|
|
35
35
|
s.updateGuideState,
|
|
36
36
|
]);
|
|
@@ -12,10 +12,10 @@ import { AGENTS_INDEX_GITHUB_ISSUE } from '@/const/url';
|
|
|
12
12
|
import AgentInfo from '@/features/AgentInfo';
|
|
13
13
|
import { useAgentStore } from '@/store/agent';
|
|
14
14
|
import { agentSelectors } from '@/store/agent/selectors';
|
|
15
|
-
import { useGlobalStore } from '@/store/global';
|
|
16
|
-
import { settingsSelectors } from '@/store/global/selectors';
|
|
17
15
|
import { useSessionStore } from '@/store/session';
|
|
18
16
|
import { sessionMetaSelectors } from '@/store/session/selectors';
|
|
17
|
+
import { useUserStore } from '@/store/user';
|
|
18
|
+
import { settingsSelectors } from '@/store/user/selectors';
|
|
19
19
|
|
|
20
20
|
const SubmitAgentModal = memo<ModalProps>(({ open, onCancel }) => {
|
|
21
21
|
const { t } = useTranslation('setting');
|
|
@@ -23,7 +23,7 @@ const SubmitAgentModal = memo<ModalProps>(({ open, onCancel }) => {
|
|
|
23
23
|
const systemRole = useAgentStore(agentSelectors.currentAgentSystemRole);
|
|
24
24
|
const theme = useTheme();
|
|
25
25
|
const meta = useSessionStore(sessionMetaSelectors.currentAgentMeta, isEqual);
|
|
26
|
-
const language =
|
|
26
|
+
const language = useUserStore((s) => settingsSelectors.currentSettings(s).language);
|
|
27
27
|
|
|
28
28
|
const isMetaPass = Boolean(
|
|
29
29
|
meta && meta.title && meta.description && (meta.tags as string[])?.length > 0 && meta.avatar,
|
|
@@ -7,8 +7,8 @@ import { Center, Flexbox } from 'react-layout-kit';
|
|
|
7
7
|
|
|
8
8
|
import { CURRENT_VERSION } from '@/const/version';
|
|
9
9
|
import AvatarWithUpload from '@/features/AvatarWithUpload';
|
|
10
|
-
import {
|
|
11
|
-
import { commonSelectors } from '@/store/
|
|
10
|
+
import { useUserStore } from '@/store/user';
|
|
11
|
+
import { commonSelectors } from '@/store/user/selectors';
|
|
12
12
|
|
|
13
13
|
import SettingList from '../features/SettingList';
|
|
14
14
|
import AvatarBanner from './features/AvatarBanner';
|
|
@@ -26,7 +26,7 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
|
26
26
|
}));
|
|
27
27
|
|
|
28
28
|
const Setting = memo(() => {
|
|
29
|
-
const avatar =
|
|
29
|
+
const avatar = useUserStore(commonSelectors.userAvatar);
|
|
30
30
|
const { styles } = useStyles();
|
|
31
31
|
|
|
32
32
|
return (
|