-
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
๐ style: +
in the welcome message can be clicked to create an assistant
#7984
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
base: main
Are you sure you want to change the base?
๐ style: +
in the welcome message can be clicked to create an assistant
#7984
Conversation
@kingsword09 is attempting to deploy a commit to the LobeHub Team on Vercel. A member of the Team first needs to authorize it. |
๐ @kingsword09 Thank you for raising your pull request and contributing to our Community |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR adds functionality to the '+' button in the welcome message, allowing users to create new assistant sessions. The implementation includes:
- Added new
AddButton
component in/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AddButton.tsx
with loading state and session creation handling - Modified
InboxWelcome
component to integrate the clickable '+' button usingTrans
component for i18n support - Updated welcome message localization to use
<plus />
component tag instead of static text - Fixes issue ็นๅปchatๆฐไผ่ฏๆฌข่ฟ่ฏไธญ็+ๆ้ฎ๏ผๆ ๆณๅๅปบๅฉๆย #7946 where clicking '+' in welcome message was non-functional
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
{t(showCreateSession ? 'guide.defaultMessage' : 'guide.defaultMessageWithoutCreate', { | ||
appName: BRANDING_NAME, | ||
})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Conditional rendering based on showCreateSession but the plus button is always rendered if <plus /> tag exists in translation. This could lead to inconsistent behavior.
Codecov ReportAll modified and coverable lines are covered by tests โ
Additional details and impacted files@@ Coverage Diff @@
## main #7984 +/- ##
==========================================
+ Coverage 88.45% 95.67% +7.21%
==========================================
Files 822 14 -808
Lines 60394 2519 -57875
Branches 4008 444 -3564
==========================================
- Hits 53424 2410 -51014
+ Misses 6970 109 -6861
Flags with carried forward coverage won't be shown. Click here to find out more. โ View full report in Codecov by Sentry. ๐ New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
่ฟไธชๆ่ทฏๆ็นๅฆ ๐ค๐ค ไธ่ฟ้่ฆ่ทไธ i18n ๏ผๆน้ๆดๆฐไธ locales
ๅธฎๆ่ทไธไธ๐ ๆฒกๆ้ ็ฝฎGPT็API |
Help me run ๐ There is no API with GPT configured |
531692c
to
3f04c02
Compare
@arvinxx ๅ ไธบไธๆถๅ็ฟป่ฏ็ธๅ
ณ๏ผๆไปฅๆ็ดๆฅไฝฟ็จ |
@arvinxx Because it does not involve translation related, I directly used |
Review SummarySkipped posting 1 drafted comments based on your review threshold. Feel free to update them here. Draft Commentssrc/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AddButton.tsx:8-8
Scores:
Reason for filtering: This comment is about a minor indentation style issue that has no functional impact on the code. The total score is below the threshold of 13. Analysis: The comment addresses a purely cosmetic indentation issue with no impact on functionality or production. While the fix is very specific and easy to implement, the issue has minimal urgency and zero production impact. With a total score of 7, this falls well below the required threshold of 13. |
WalkthroughThis PR standardizes the formatting of the 'defaultMessage' in all welcome localization files by replacing newline characters and literal plus signs with HTML line breaks and a custom component. It introduces a new AddButton React component and updates the InboxWelcome component to support dynamic rendering of the plus button within localized messages using the Trans and Markdown components. These changes improve UI consistency, enable component-based rendering in translations, and enhance modularity and extensibility for future localization needs. Changes
Sequence DiagramThis diagram shows the interactions between components: sequenceDiagram
title AddButton Component Interaction Flow
actor User
participant AddButton as "AddButton Component"
participant SWR as "useActionSWR Hook"
participant SessionStore as "Session Store"
Note over AddButton: Component initialization
AddButton->>SessionStore: useSessionStore(s => s.createSession)
SessionStore-->>AddButton: Return createSession function
AddButton->>SWR: useActionSWR(['session.createSession', undefined], callback)
SWR-->>AddButton: Return { mutate, isValidating }
Note over AddButton: Render Button with isValidating state
User->>AddButton: Click "+" button
activate AddButton
AddButton->>SWR: mutate()
activate SWR
SWR->>SessionStore: createSession({ group: undefined })
activate SessionStore
SessionStore-->>SWR: Return new session
deactivate SessionStore
SWR-->>AddButton: Update isValidating state
SWR-->>AddButton: Return result
deactivate SWR
AddButton->>AddButton: Re-render with updated state
deactivate AddButton
Note for WindsurfPlease change the default marketplace provider to the following in the windsurf settings:Marketplace Extension Gallery Service URL: https://marketplace.visualstudio.com/_apis/public/gallery Marketplace Gallery Item URL: https://marketplace.visualstudio.com/items Entelligence.ai can learn from your feedback. Simply add ๐ / ๐ emojis to teach it your preferences. More shortcuts belowEmoji Descriptions:
Interact with the Bot:
Also you can trigger various commands with the bot by doing The current supported commands are
More commands to be added soon. |
๐ป ๅๆด็ฑปๅ | Change Type
๐ ๅๆด่ฏดๆ | Description of Change
closes: #7946
๐ ่กฅๅ ไฟกๆฏ | Additional Information