Skip to content

✨ feat: add reasoning content selector and update AutoScroll component#7056

Merged
arvinxx merged 2 commits intolobehub:mainfrom
samurai00:fix-autoscroll-for-reasoning
Mar 26, 2025
Merged

✨ feat: add reasoning content selector and update AutoScroll component#7056
arvinxx merged 2 commits intolobehub:mainfrom
samurai00:fix-autoscroll-for-reasoning

Conversation

@samurai00
Copy link
Contributor

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

This PR addresses an issue where the chat window doesn't automatically scroll to the bottom during AI's deep reasoning process, even when the reasoning block is expanded. The changes ensure that updates in reasoning content will now trigger automatic scrolling.

  • Introduced mainAILatestMessageReasoningContent selector to retrieve the reasoning content of the latest message.
  • Updated AutoScroll component to include the new reasoning content in its effect dependencies.
  • Added unit tests for the new selector to ensure correct functionality.

📝 补充信息 | Additional Information

- Introduced `mainAILatestMessageReasoningContent` selector to retrieve the reasoning content of the latest message.
- Updated `AutoScroll` component to include the new reasoning content in its effect dependencies.
- Added unit tests for the new selector to ensure correct functionality.
@vercel
Copy link

vercel bot commented Mar 20, 2025

@samurai00 is attempting to deploy a commit to the LobeChat Desktop Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 20, 2025
@lobehubbot
Copy link
Member

👍 @samurai00

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.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@gru-agent
Copy link
Contributor

gru-agent bot commented Mar 20, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 5050df2 🚫 Skipped

Files

File Pull Request
src/store/chat/slices/message/selectors.ts 🚫 Skipped (There's no need to update the test code)

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@vercel
Copy link

vercel bot commented Mar 25, 2025

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 Mar 25, 2025 4:26pm

@arvinxx arvinxx merged commit 800d675 into lobehub:main Mar 26, 2025
4 of 6 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @samurai00 ❤️

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 Mar 26, 2025
## [Version 1.75.0](v1.74.11...v1.75.0)
<sup>Released on **2025-03-26**</sup>

#### ✨ Features

- **misc**: Add reasoning content selector and update AutoScroll component, add Xinference provider support.

#### 💄 Styles

- **misc**: Add Gemini 2.5 Pro Experimental model, improve editing scroll experience.

<br/>

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

#### What's improved

* **misc**: Add reasoning content selector and update AutoScroll component, closes [#7056](#7056) ([800d675](800d675))
* **misc**: Add Xinference provider support, closes [#7081](#7081) ([e32c8e7](e32c8e7))

#### Styles

* **misc**: Add Gemini 2.5 Pro Experimental model, closes [#7153](#7153) ([4213d20](4213d20))
* **misc**: Improve editing scroll experience, closes [#7149](#7149) ([816331f](816331f))

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

The release is available on:

Your semantic-release bot 📦🚀

@samurai00 samurai00 deleted the fix-autoscroll-for-reasoning branch March 26, 2025 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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