Skip to content

Conversation

@manodnyab
Copy link
Contributor

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

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions
Copy link

github-actions bot commented May 16, 2025

Qodana Community for JVM

It 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
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@manodnyab manodnyab marked this pull request as ready for review May 16, 2025 22:44
@manodnyab manodnyab requested review from a team as code owners May 16, 2025 22:44
get() = chatPanel.component

fun disposeAndRecreate() {
Disposer.dispose(chatPanel)
Copy link
Contributor

@Will-ShaoHua Will-ShaoHua May 16, 2025

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..)

Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe not, just tested

Copy link
Contributor

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

Copy link
Contributor Author

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

@Will-ShaoHua
Copy link
Contributor

also #5729

@manodnyab manodnyab enabled auto-merge (squash) May 20, 2025 15:19
@manodnyab manodnyab merged commit dc82572 into feature/q-lsp-chat May 20, 2025
14 of 16 checks passed
@manodnyab manodnyab deleted the manodnyb/fixSupportedAuthError branch May 20, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants