fix(lightspeed): disable model selector during active chat session#3682
Closed
its-mitesh-kumar wants to merge 1 commit into
Conversation
Once a chat session has started (messages exist), the model selector is now disabled to prevent unintended new conversation creation. A tooltip explains the restriction in all supported locales. 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
|
|
Member
Author
|
This is the test PR by bug-fix skill . |
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
Disables the model selector once a chat session is active (has messages) to prevent the user from inadvertently creating a new conversation by switching models mid-session. When disabled, hovering the selector shows a localized tooltip explaining: "Each chat session supports only one model. To switch models, open a new chat."
Root cause: The
MessageBarModelSelector'sdisabledprop was only set toisSendButtonDisabled(true only during streaming). Once streaming completed, the selector became clickable again. TheonSelecthandler always calledonNewChat(), which created a new conversation instead of keeping the user in the current session.Fixed
Checklist
Made with Cursor