Skip to content

Commit a8e566d

Browse files
committed
patch
1 parent e0f567e commit a8e566d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/toolwindow/AmazonQToolWindowFactory.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@ class AmazonQToolWindowFactory : ToolWindowFactory, DumbAware {
9191
}
9292
)
9393

94+
project.messageBus.connect(toolWindow.disposable).subscribe(
95+
QRegionProfileSelectedListener.TOPIC,
96+
object : QRegionProfileSelectedListener {
97+
// note we name myProject intentionally ow it will shadow the "project" provided by the IDE
98+
override fun onProfileSelected(myProject: Project, profile: QRegionProfile?) {
99+
if (project.isDisposed) return
100+
prepareChatContent(project, qPanel)
101+
}
102+
}
103+
)
104+
94105
prepareChatContent(project, qPanel)
95106

96107
val content = contentManager.factory.createContent(mainPanel, null, false).also {

0 commit comments

Comments
 (0)