-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 fix: fix avatar missing on client DB mode #2645
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
👍 @arvinxx Thank you for raising your pull request and contributing to our Community |
Warning Rate Limit Exceeded@arvinxx has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 56 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe recent changes in the codebase focus on enhancing the user state management by incorporating avatar data. Specifically, the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2645 +/- ##
==========================================
- Coverage 93.68% 93.67% -0.01%
==========================================
Files 349 349
Lines 20408 20407 -1
Branches 2443 2452 +9
==========================================
- Hits 19119 19117 -2
- Misses 1289 1290 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/store/user/slices/common/action.ts (3 hunks)
Additional Context Used
Biome (4)
src/store/user/slices/common/action.ts (4)
73-73: Avoid redundant double-negation.
1-1: Some named imports are only used as types.
1-2: All these imports are only used as types.
10-11: All these imports are only used as types.
Additional comments not posted (1)
src/store/user/slices/common/action.ts (1)
Line range hint
91-107
: The conditional logic for updating the avatar in the user object looks correct and aligns with the PR's objective to fix avatar display issues.
@@ -8,7 +8,7 @@ | |||
import type { UserStore } from '@/store/user'; | |||
import type { GlobalServerConfig } from '@/types/serverConfig'; | |||
import type { GlobalSettings } from '@/types/settings'; | |||
import { UserInitializationState } from '@/types/user'; | |||
import { LobeUser, UserInitializationState } from '@/types/user'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using import type
for imports that are only used as types to clarify their usage and potentially optimize bundling.
- import { LobeUser, UserInitializationState } from '@/types/user';
+ import type { LobeUser, UserInitializationState } from '@/types/user';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import { LobeUser, UserInitializationState } from '@/types/user'; | |
import type { LobeUser, UserInitializationState } from '@/types/user'; |
❤️ Great PR @arvinxx ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
### [Version 0.161.15](v0.161.14...v0.161.15) <sup>Released on **2024-05-24**</sup> #### 🐛 Bug Fixes - **misc**: Fix avatar missing on client DB mode. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Fix avatar missing on client DB mode, closes [#2645](#2645) ([12726c2](12726c2)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
🎉 This PR is included in version 0.161.15 🎉 The release is available on: Your semantic-release bot 📦🚀 |
### [Version 1.41.8](v1.41.7...v1.41.8) <sup>Released on **2024-05-24**</sup> #### 🐛 Bug Fixes - **misc**: Fix avatar missing on client DB mode. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Fix avatar missing on client DB mode, closes [lobehub#2645](https://github.com/bentwnghk/lobe-chat/issues/2645) ([12726c2](12726c2)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
* 🐛 fix: fix avatar missing * 🐛 fix: fix user avatar * ♻️ refactor: refactor to remove deprecated userId and avatar field * ✅ test: improve test
### [Version 0.161.15](lobehub/lobe-chat@v0.161.14...v0.161.15) <sup>Released on **2024-05-24**</sup> #### 🐛 Bug Fixes - **misc**: Fix avatar missing on client DB mode. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Fix avatar missing on client DB mode, closes [lobehub#2645](lobehub#2645) ([12726c2](lobehub@12726c2)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
修正 Client DB 模式下 avatar 没法正常显示的问题
📝 补充信息 | Additional Information
Summary by CodeRabbit