fix(lightspeed): disable model selector when chat session is active#3683
Closed
its-mitesh-kumar wants to merge 1 commit into
Conversation
Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-3313 Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Changed Packages
|
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3683 +/- ##
=======================================
Coverage 54.28% 54.28%
=======================================
Files 2347 2347
Lines 89650 89657 +7
Branches 25020 25027 +7
=======================================
+ Hits 48666 48671 +5
- Misses 39456 39457 +1
- Partials 1528 1529 +1
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Member
Author
|
Closing this as its Test PR by redhat-developer/rhdh-skill#54 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Disable the model selector in the Lightspeed chat footer when a chat session already has messages. Previously, switching models mid-conversation would open a new chat, fragmenting the user experience. Now the selector is disabled once a message has been sent, and a tooltip explains: "Each chat session supports only one model. To switch models, open a new chat."
Root cause
The
MessageBarModelSelectorcomponent in the message bar footer was only disabled during streaming (isSendButtonDisabled). ItsonSelecthandler calledonNewChat()unconditionally, creating a new conversation whenever the model was changed — even in an active chat session.Fixed
Checklist
Made with Cursor