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: refactor file Url query in message model #5019

Merged
merged 3 commits into from
Dec 14, 2024

Conversation

arvinxx
Copy link
Contributor

@arvinxx arvinxx commented Dec 14, 2024

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

调整 message model 的实现,将 getFileUrl 从 model 层拿出,通过一个 postProcessUrl 来做后处理。这个方法后续在 client 端应该也可以用(将 local-s3 协议转成 Blob 或者 base64)。

📝 补充信息 | Additional Information

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 14, 2024
Copy link

vercel bot commented Dec 14, 2024

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

Name Status Preview Comments Updated (UTC)
lobe-chat-database ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 4:00pm
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 4:00pm

@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 Dec 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.96%. Comparing base (247f8dc) to head (0df395a).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main    #5019     +/-   ##
=========================================
  Coverage   91.96%   91.96%             
=========================================
  Files         547      548      +1     
  Lines       41321    41325      +4     
  Branches     3705     2514   -1191     
=========================================
+ Hits        38001    38005      +4     
  Misses       3320     3320             
Flag Coverage Δ
app 91.96% <100.00%> (+<0.01%) ⬆️
server 98.12% <100.00%> (-0.01%) ⬇️

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.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 14, 2024
@arvinxx arvinxx changed the title ♻️ refactor: refactor the file Url query method ♻️ refactor: refactor file Url query in message model Dec 14, 2024
@arvinxx arvinxx merged commit edf78f4 into main Dec 14, 2024
11 checks passed
@arvinxx arvinxx deleted the refactor/file-url-query branch December 14, 2024 16:01
@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 Dec 14, 2024
### [Version&nbsp;1.36.24](v1.36.23...v1.36.24)
<sup>Released on **2024-12-14**</sup>

#### ♻ Code Refactoring

- **misc**: Refactor  file Url query in message model.

<br/>

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

#### Code refactoring

* **misc**: Refactor  file Url query in message model, closes [#5019](#5019) ([edf78f4](edf78f4))

</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.36.24 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Dec 15, 2024
### [Version&nbsp;1.78.11](v1.78.10...v1.78.11)
<sup>Released on **2024-12-15**</sup>

#### ♻ Code Refactoring

- **misc**: Refactor  file Url query in message model.

#### 💄 Styles

- **misc**: Add new grok models.

<br/>

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

#### Code refactoring

* **misc**: Refactor  file Url query in message model, closes [lobehub#5019](https://github.com/bentwnghk/lobe-chat/issues/5019) ([edf78f4](edf78f4))

#### Styles

* **misc**: Add new grok models, closes [lobehub#5013](https://github.com/bentwnghk/lobe-chat/issues/5013) ([8df3212](8df3212))

</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
released size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants