Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "/dev: Fix missing Amazon Q feature dev auto build setting."
}
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,8 @@
}

private suspend fun handleDevCommandUserSetting(tabId: String, value: Boolean) {
CodeWhispererSettings.getInstance().toggleAutoBuildFeature(context.project.basePath, value)
val session = getSessionInfo(tabId)

Check warning on line 543 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/controller/FeatureDevController.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/controller/FeatureDevController.kt#L543

Added line #L543 was not covered by tests
CodeWhispererSettings.getInstance().toggleAutoBuildFeature(session.context.workspaceRoot.path, value)
messenger.sendAnswer(
tabId = tabId,
message = message("amazonqFeatureDev.chat_message.setting_updated"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ class CodeWhispererModelConfiguratorTest {

@Ignore
@Test
fun `profile switch should keep using existing customization if new list still contains that arn`() {
fun `should switch to default customization on profile changed`() {
val ssoConn = spy(LegacyManagedBearerSsoConnection(region = "us-east-1", startUrl = "url 1", scopes = Q_SCOPES))
ToolkitConnectionManager.getInstance(projectRule.project).switchConnection(ssoConn)
val oldCustomization = CodeWhispererCustomization("oldArn", "oldName", "oldDescription")
Expand All @@ -634,7 +634,7 @@ class CodeWhispererModelConfiguratorTest {
.syncPublisher(QRegionProfileSelectedListener.TOPIC)
.onProfileSelected(projectRule.project, null)

assertThat(sut.activeCustomization(projectRule.project)).isEqualTo(oldCustomization)
assertThat(sut.activeCustomization(projectRule.project)).isEqualTo(null)
}

@Ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ class DefaultCodeWhispererModelConfigurator : CodeWhispererModelConfigurator, Pe
QRegionProfileSelectedListener.TOPIC,
object : QRegionProfileSelectedListener {
override fun onProfileSelected(project: Project, profile: QRegionProfile?) {
pluginAwareExecuteOnPooledThread {
CodeWhispererModelConfigurator.getInstance().listCustomizations(project, passive = true)
}
switchCustomization(project, null)
}
}
)
Expand Down
Loading