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 the main chat #4773

Merged
merged 2 commits into from
Nov 24, 2024
Merged

Conversation

arvinxx
Copy link
Contributor

@arvinxx arvinxx commented Nov 24, 2024

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

  • 重构 Main Chat 的数据流实现,将 welcome 部分从 chat 数据流中摘除,直接在展示上做判断;
  • 重构 Conversation 组件实现,将数据处理逻辑摘到页面级别,这样可以在不同对话场景做上层配置

📝 补充信息 | Additional Information

Copy link

vercel bot commented Nov 24, 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 Nov 24, 2024 10:26am
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 24, 2024 10:26am

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Nov 24, 2024
@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 Nov 24, 2024

Codecov Report

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

Project coverage is 92.30%. Comparing base (3f8d3db) to head (307055c).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/store/chat/slices/message/selectors.ts 89.09% 6 Missing ⚠️
...store/chat/slices/aiChat/actions/generateAIChat.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4773      +/-   ##
==========================================
- Coverage   92.32%   92.30%   -0.02%     
==========================================
  Files         528      528              
  Lines       37020    37002      -18     
  Branches     3690     2362    -1328     
==========================================
- Hits        34179    34155      -24     
- Misses       2841     2847       +6     
Flag Coverage Δ
app 92.30% <89.39%> (-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:

import React, { memo, useMemo } from 'react';

import { ChatItem } from '@/features/Conversation';
import ActionsBar from '@/features/Conversation/components/ChatItem/ActionsBar';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ActionsBar 也需要一个重构,将其变成在页面维度配置的实现

@arvinxx arvinxx merged commit 6973f4e into main Nov 24, 2024
10 of 11 checks passed
@arvinxx arvinxx deleted the refactor/main-chat-data branch November 24, 2024 10:29
@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 Nov 24, 2024
### [Version&nbsp;1.32.5](v1.32.4...v1.32.5)
<sup>Released on **2024-11-24**</sup>

#### ♻ Code Refactoring

- **misc**: Refactor the main chat.

<br/>

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

#### Code refactoring

* **misc**: Refactor the main chat, closes [#4773](#4773) ([6973f4e](6973f4e))

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

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.3](v1.74.2...v1.74.3)
<sup>Released on **2024-11-24**</sup>

#### ♻ Code Refactoring

- **misc**: Refactor the main chat.

<br/>

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

#### Code refactoring

* **misc**: Refactor the main chat, closes [lobehub#4773](https://github.com/bentwnghk/lobe-chat/issues/4773) ([6973f4e](6973f4e))

</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:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants