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(chat): auto send message from URL #6497

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

samanhappy
Copy link

@samanhappy samanhappy commented Feb 25, 2025

๐Ÿ’ป ๅ˜ๆ›ด็ฑปๅž‹ | Change Type

  • โœจ feat
  • ๐Ÿ› fix
  • โ™ป๏ธ refactor
  • ๐Ÿ’„ style
  • ๐Ÿ‘ท build
  • โšก๏ธ perf
  • ๐Ÿ“ docs
  • ๐Ÿ”จ chore

๐Ÿ”€ ๅ˜ๆ›ด่ฏดๆ˜Ž | Description of Change

This change enables the application to pre-fill the input field with a message from the URL and automatically send it when the page is loaded. This feature is particularly useful when using Chrome's Site Search shortcuts, as it allows users to quickly send predefined messages by including them in the URL.

๐Ÿ“ ่กฅๅ……ไฟกๆฏ | Additional Information

Copy link

vercel bot commented Feb 25, 2025

@samanhappy 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 size:S This PR changes 10-29 lines, ignoring generated files. ๐ŸŒ  Feature Request New feature or request | ็‰นๆ€งไธŽๅปบ่ฎฎ labels Feb 25, 2025
@lobehubbot
Copy link
Member

๐Ÿ‘ @samanhappy

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
Contributor

Choose a reason for hiding this comment

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

Please move this feature in to a new component. useSearchParams is not compatiable with pre-render. It should be wrapped with Suspense

Copy link
Author

Choose a reason for hiding this comment

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

Hi, Iโ€™m new to LobeChat, so if Iโ€™ve done anything incorrectly, please donโ€™t hesitate to let me know

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Feb 25, 2025
@samanhappy samanhappy requested a review from arvinxx February 26, 2025 07:33
@arvinxx arvinxx changed the title โœจ feat(chat): auto send message from URL ๐Ÿ’„ style(chat): auto send message from URL Feb 27, 2025
Copy link

vercel bot commented Feb 27, 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 Feb 27, 2025 5:02pm

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 91.62%. Comparing base (9669a02) to head (17b77e6).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6497   +/-   ##
=======================================
  Coverage   91.62%   91.62%           
=======================================
  Files         699      699           
  Lines       65834    65834           
  Branches     4461     4461           
=======================================
  Hits        60321    60321           
  Misses       5513     5513           
Flag Coverage ฮ”
app 91.62% <รธ> (รธ)
server 97.57% <รธ> (รธ)

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.

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 | ็‰นๆ€งไธŽๅปบ่ฎฎ size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants