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

💄 style: support to reset fetched models #4260

Merged
merged 4 commits into from
Nov 24, 2024

Conversation

vual
Copy link
Contributor

@vual vual commented Oct 5, 2024

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

增加【清除获取的模型】的功能,主要是用于在获取模型列表后,不想要了,需要恢复系统自带的模型。
image

📝 补充信息 | Additional Information

Copy link

vercel bot commented Oct 5, 2024

@vual is attempting to deploy a commit to the LobeChat Community Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. 🌠 Feature Request New feature or request | 特性与建议 labels Oct 5, 2024
@lobehubbot
Copy link
Member

👍 @vual

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 Oct 5, 2024

Codecov Report

Attention: Patch coverage is 56.25000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 92.30%. Comparing base (7c9e88e) to head (7c0ec6a).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/store/user/slices/modelList/action.ts 56.25% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4260      +/-   ##
==========================================
- Coverage   92.31%   92.30%   -0.02%     
==========================================
  Files         528      528              
  Lines       36998    37013      +15     
  Branches     2363     2518     +155     
==========================================
+ Hits        34155    34164       +9     
- Misses       2843     2849       +6     
Flag Coverage Δ
app 92.30% <56.25%> (-0.02%) ⬇️
server 96.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🚨 Try these New Features:

@arvinxx
Copy link
Contributor

arvinxx commented Oct 28, 2024

image

建议放在我画圈的位置,用 ActionIcon 组件 (默认不展示文本只放图标,hover 才显示 title)。放你现在那个位置很容易出现多点一次重置模型的情况,即 CLS 会有问题。详见:https://web.dev/articles/cls?hl=zh-cn

@arvinxx arvinxx changed the title 增加【清除获取的模型】的功能,主要是用于在获取模型列表后,不想要了,需要恢复系统自带的模型。 💄 style: support to reset fetched models Oct 28, 2024
@vual
Copy link
Contributor Author

vual commented Oct 28, 2024

image 建议放在我画圈的位置,用 ActionIcon 组件 (默认不展示文本只放图标,hover 才显示 title)。放你现在那个位置很容易出现多点一次重置模型的情况,即 CLS 会有问题。详见:https://web.dev/articles/cls?hl=zh-cn

image
已更新。

Copy link

vercel bot commented Oct 31, 2024

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

Name Status Preview Comments Updated (UTC)
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 24, 2024 6:25pm

Copy link
Contributor

@arvinxx arvinxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

功能没问题了,把这个细节实现再修一下~

另外可以跑下 npm run i18n 自动生成 locale

@vual
Copy link
Contributor Author

vual commented Nov 1, 2024

npm run i18n

image
执行npm run i18n的时候env.local里配的openaikey和proxyurl不会生效吗?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


npm run i18n

image
Will the openaikey and proxyurl configured in env.local not take effect when executing npm run i18n?

@arvinxx
Copy link
Contributor

arvinxx commented Nov 1, 2024

@vual 配到 .env 里

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@vual allocated to .env

@vual
Copy link
Contributor Author

vual commented Nov 1, 2024

@vual 配到 .env 里

可以了。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@vual allocated to .env

That's it.

@arvinxx
Copy link
Contributor

arvinxx commented Nov 4, 2024

rebase 下 main

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


rebase under main

@vual
Copy link
Contributor Author

vual commented Nov 5, 2024

rebase 下 main

可以了。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


rebase under main

That's it.

@arvinxx
Copy link
Contributor

arvinxx commented Nov 5, 2024

有问题哈,locale 这边不应该有回车的,你需要跑一下 git commit 前的 lint 自动格式化掉。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


There is a problem. There should not be a carriage return in the locale. You need to run lint before git commit to automatically format it.

@vual
Copy link
Contributor Author

vual commented Nov 6, 2024

有问题哈,locale 这边不应该有回车的,你需要跑一下 git commit 前的 lint 自动格式化掉。

重新pnpm run i18n了,应该可以了。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


There is a problem. There should not be a carriage return in the locale. You need to run lint before git commit to automatically format it.

Re-pnpm run i18n, it should be OK.

@arvinxx
Copy link
Contributor

arvinxx commented Nov 12, 2024

rebase 下main? 另外 locale 的更新不应该每个都加回车的,你是不是提交前没跑下 lint 和 format?

功能代码上没问题了, locale 的部分处理下

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Rebase under main? In addition, every locale update should not include a carriage return. Did you not run lint and format before submitting? There is no problem with the function code

@vual
Copy link
Contributor Author

vual commented Nov 12, 2024

rebase 下main? 另外 locale 的更新不应该每个都加回车的,你是不是提交前没跑下 lint 和 format?

功能代码上没问题了, locale 的部分处理下

很奇怪,我并没有加回车,我只是重跑了npm run i18n

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Rebase under main? In addition, every locale update should not include a carriage return. Did you not run lint and format before submitting?

There is no problem with the function code. Let’s deal with the locale part.

It's strange, I didn't add the carriage return, I just reran npm run i18n

@arvinxx
Copy link
Contributor

arvinxx commented Nov 12, 2024

很奇怪,我并没有加回车,我只是重跑了npm run i18n

重跑以后正常提交会做一次格式化,会自动把回车去掉的,你是不是跳过 commit 时候的hook了?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It's strange, I didn't add the carriage return, I just reran npm run i18n

After re-running, normal submission will be formatted and the carriage return will be automatically removed. Did you skip the hook during commit?

@vual
Copy link
Contributor Author

vual commented Nov 12, 2024

很奇怪,我并没有加回车,我只是重跑了npm run i18n

重跑以后正常提交会做一次格式化,会自动把回车去掉的,你是不是跳过 commit 时候的hook了?

有可能,我重新弄下

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It's strange, I didn't add the carriage return, I just reran npm run i18n

After re-running, normal submission will be formatted and the carriage return will be automatically removed. Did you skip the hook during commit?

It's possible, I'll do it again

@vual
Copy link
Contributor Author

vual commented Nov 12, 2024

很奇怪,我并没有加回车,我只是重跑了npm run i18n

重跑以后正常提交会做一次格式化,会自动把回车去掉的,你是不是跳过 commit 时候的hook了?

弄好了,你再检查看看

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It's strange, I didn't add the carriage return, I just reran npm run i18n

After re-running, normal submission will be formatted and the carriage return will be automatically removed. Did you skip the hook during commit?

It's done, check again

@arvinxx arvinxx force-pushed the reset_default_models branch from 171293a to 7eb7063 Compare November 24, 2024 18:09
@arvinxx arvinxx merged commit 22480a9 into lobehub:main Nov 24, 2024
6 of 8 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @vual ❤️

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 Nov 24, 2024
### [Version&nbsp;1.32.9](v1.32.8...v1.32.9)
<sup>Released on **2024-11-24**</sup>

#### 💄 Styles

- **misc**: Support to reset fetched models.

<br/>

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

#### Styles

* **misc**: Support to reset fetched models, closes [#4260](#4260) ([22480a9](22480a9))

</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 1.32.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Nov 24, 2024
### [Version&nbsp;1.74.5](v1.74.4...v1.74.5)
<sup>Released on **2024-11-24**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix `XAI_PROXY_URL` env missing.

#### 💄 Styles

- **misc**: Support to reset fetched models.

<br/>

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

#### What's fixed

* **misc**: Fix `XAI_PROXY_URL` env missing, closes [lobehub#4747](https://github.com/bentwnghk/lobe-chat/issues/4747) ([7c9e88e](7c9e88e))

#### Styles

* **misc**: Support to reset fetched models, closes [lobehub#4260](https://github.com/bentwnghk/lobe-chat/issues/4260) ([22480a9](22480a9))

</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
🌠 Feature Request New feature or request | 特性与建议 released size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants