-
Notifications
You must be signed in to change notification settings - Fork 275
fix(amazonq): Switch profiles if not selected in Q chat #5724
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
fix(amazonq): Switch profiles if not selected in Q chat #5724
Conversation
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at [email protected]
|
…into manodnyb/fixSupportedAuthError
| get() = chatPanel.component | ||
|
|
||
| fun disposeAndRecreate() { | ||
| Disposer.dispose(chatPanel) |
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.
not sure what will happen if we keep creating new panel and they are never disposed, will it cause memory leak (but idk how to test it..)
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.
yes we would need to dispose if we are creating new panels
| fun disposeAndRecreate() { | ||
| Disposer.dispose(chatPanel) | ||
| fun recreatePanel() { | ||
| chatPanel = AmazonQPanel(project, scope) |
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.
@manodnyab will it help if we assign the new panel first then dispose the stale one?
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.
maybe not, just tested
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.
#5729 would fix the crash issue
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.
Removing this part, if 5729 fixes the crash
|
also #5729 |
Description
If a user gets Select Q Developer Profile card in chat, check if an active profile already exists and update Flare with the information. If an active profile doesn't, the dialog to change profiles is shown to the user.
Ideally the user should never land in this state since profiles are chosen before the chat window is shown.
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.