Skip to content
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

♻️ refactor: rename globalStore to userStore #2264

Merged
merged 6 commits into from
Apr 28, 2024
Merged

Conversation

arvinxx
Copy link
Contributor

@arvinxx arvinxx commented Apr 28, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • ⚡️ perf
  • 📝 docs

🔀 变更说明 | Description of Change

由于 GlobalStore 中之前存储了 很多类型的东西,比如 settings、全局 preference 、用户 preference ,而在 #2022 中,我们需要支持用户颗粒度的拆分。因此需要将原本 global 中的一些实现迁移到 user 中。

📝 补充信息 | Additional Information

refs: #2022

Copy link

vercel bot commented Apr 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-community ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2024 3:18pm

@lobehubbot
Copy link
Member

👍 @arvinxx

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

Copy link

codecov bot commented Apr 28, 2024

Codecov Report

Attention: Patch coverage is 95.54974% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 92.54%. Comparing base (2e991d7) to head (2556d5b).
Report is 1 commits behind head on main.

Files Patch % Lines
src/store/user/slices/preference/action.ts 78.00% 11 Missing ⚠️
src/services/_header.ts 50.00% 2 Missing ⚠️
src/services/chat.ts 92.30% 1 Missing ⚠️
src/services/trace.ts 66.66% 1 Missing ⚠️
src/store/global/action.ts 96.66% 1 Missing ⚠️
...tore/user/slices/settings/selectors/modelConfig.ts 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2264      +/-   ##
==========================================
- Coverage   92.57%   92.54%   -0.03%     
==========================================
  Files         282      286       +4     
  Lines       16061    16152      +91     
  Branches     1157     1869     +712     
==========================================
+ Hits        14868    14948      +80     
- Misses       1193     1204      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arvinxx arvinxx merged commit a3cb538 into main Apr 28, 2024
10 checks passed
@arvinxx arvinxx deleted the refactor/global-to-user branch April 28, 2024 15:28
@lobehubbot
Copy link
Member

❤️ 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.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

github-actions bot pushed a commit that referenced this pull request Apr 28, 2024
### [Version 0.150.10](v0.150.9...v0.150.10)
<sup>Released on **2024-04-28**</sup>

#### ♻ Code Refactoring

- **misc**: Rename globalStore to userStore.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Rename globalStore to userStore, closes [#2264](#2264) ([a3cb538](a3cb538))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

🎉 This PR is included in version 0.150.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Apr 28, 2024
### [Version&nbsp;1.30.6](v1.30.5...v1.30.6)
<sup>Released on **2024-04-28**</sup>

#### ♻ Code Refactoring

- **misc**: Rename globalStore to userStore.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Rename globalStore to userStore, closes [lobehub#2264](https://github.com/bentwnghk/lobe-chat/issues/2264) ([a3cb538](a3cb538))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@arvinxx arvinxx mentioned this pull request Apr 29, 2024
7 tasks
TheNameIsNigel pushed a commit to TheNameIsNigel/lobe-chat that referenced this pull request May 15, 2024
* ♻️ refactor: rename globalStore to userStore

* ♻️ refactor: refactor the globalStore usage

* ♻️ refactor: clean the user preference

* 🐛 fix: fix preference init

* ♻️ refactor: refactor the global Store

* 🎨 chore: improve code
TheNameIsNigel pushed a commit to TheNameIsNigel/lobe-chat that referenced this pull request May 15, 2024
### [Version&nbsp;0.150.10](lobehub/lobe-chat@v0.150.9...v0.150.10)
<sup>Released on **2024-04-28**</sup>

#### ♻ Code Refactoring

- **misc**: Rename globalStore to userStore.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Rename globalStore to userStore, closes [lobehub#2264](lobehub#2264) ([a3cb538](lobehub@a3cb538))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
ipoly pushed a commit to ipoly/lobe-chat that referenced this pull request Jul 29, 2024
* ♻️ refactor: rename globalStore to userStore

* ♻️ refactor: refactor the globalStore usage

* ♻️ refactor: clean the user preference

* 🐛 fix: fix preference init

* ♻️ refactor: refactor the global Store

* 🎨 chore: improve code
ipoly pushed a commit to ipoly/lobe-chat that referenced this pull request Jul 29, 2024
### [Version&nbsp;0.150.10](lobehub/lobe-chat@v0.150.9...v0.150.10)
<sup>Released on **2024-04-28**</sup>

#### ♻ Code Refactoring

- **misc**: Rename globalStore to userStore.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Rename globalStore to userStore, closes [lobehub#2264](lobehub#2264) ([a3cb538](lobehub@a3cb538))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants