Skip to content

Commit 4b188c7

Browse files
authored
Merge branch 'main' into id2
2 parents 3b8fc30 + 6947870 commit 4b188c7

File tree

159 files changed

+5380
-711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+5380
-711
lines changed

.changes/3.61.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"date" : "2025-03-27",
3+
"version" : "3.61",
4+
"entries" : [ {
5+
"type" : "feature",
6+
"description" : "Amazon Q: Moved \"Include suggestions with code references\" setting to General"
7+
}, {
8+
"type" : "feature",
9+
"description" : "Add support for 2025.1"
10+
}, {
11+
"type" : "bugfix",
12+
"description" : "Amazon Q: Attempt to reduce thread pool contention locking IDE caused by `@workspace` making a large number of requests"
13+
}, {
14+
"type" : "deprecation",
15+
"description" : "An upcoming release will remove support for JetBrains Gateway version 2024.3 and for IDEs based on the 2024.1 platform"
16+
} ]
17+
}

.changes/3.62.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"date" : "2025-04-03",
3+
"version" : "3.62",
4+
"entries" : [ {
5+
"type" : "feature",
6+
"description" : "/review: automatically generate fix without clicking Generate Fix button"
7+
}, {
8+
"type" : "bugfix",
9+
"description" : "/transform: prompt user to re-authenticate if credentials expire during transformation"
10+
}, {
11+
"type" : "bugfix",
12+
"description" : "Gracefully handle additional fields in Amazon Q /dev code generation result without throwing errors"
13+
}, {
14+
"type" : "bugfix",
15+
"description" : "/review: set programmingLanguage to Plaintext if language is unknown"
16+
}, {
17+
"type" : "bugfix",
18+
"description" : "/review: Respect user option to allow code suggestions with references"
19+
} ]
20+
}

.changes/3.63.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"date" : "2025-04-08",
3+
"version" : "3.63",
4+
"entries" : [ {
5+
"type" : "feature",
6+
"description" : "Enterprise users can choose their preferred Amazon Q profile to improve personalization and workflow across different business regions"
7+
}, {
8+
"type" : "bugfix",
9+
"description" : "Amazon Q /doc: close diff tab and open README file in preview mode after user accept changes"
10+
} ]
11+
}

.changes/3.64.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"date" : "2025-04-10",
3+
"version" : "3.64",
4+
"entries" : [ {
5+
"type" : "bugfix",
6+
"description" : "Fix issue where IDE freezes when logging into Amazon Q"
7+
} ]
8+
}

.changes/3.65.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"date" : "2025-04-10",
3+
"version" : "3.65",
4+
"entries" : [ {
5+
"type" : "bugfix",
6+
"description" : "Fix issue where Amazon Q cannot process chunks from local `@workspace` context"
7+
} ]
8+
}

.changes/3.66.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"date" : "2025-04-11",
3+
"version" : "3.66",
4+
"entries" : [ {
5+
"type" : "feature",
6+
"description" : "The logs emitted by the Agent during user command execution will be accepted and written to `.amazonq/dev/run_command.log` file in the user's local repository."
7+
}, {
8+
"type" : "bugfix",
9+
"description" : "Unit test generation now completes successfully when using the `/test` command "
10+
} ]
11+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Amazon Q: Customization now resets with a warning if unavailable in the selected profile."
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Q panel will get stuck while signin if users have multiple windows"
4+
}

.changes/next-release/bugfix-e06391bd-f5ae-4c2a-a102-580d30f3be8d.json

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Fix infinite loop when workspace indexing server fails to initialize"
4+
}

.changes/next-release/deprecation-90102050-86a4-4c19-9ecc-70c6e033b949.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.changes/next-release/feature-45f6e6a7-fc5b-4b14-89e2-0d9a2b138c65.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.changes/next-release/feature-c88b1af5-2318-4ca3-903c-a289e5494b1d.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
# _3.66_ (2025-04-11)
2+
- **(Feature)** The logs emitted by the Agent during user command execution will be accepted and written to `.amazonq/dev/run_command.log` file in the user's local repository.
3+
- **(Bug Fix)** Unit test generation now completes successfully when using the `/test` command
4+
5+
# _3.64_ (2025-04-10)
6+
- **(Bug Fix)** Fix issue where IDE freezes when logging into Amazon Q
7+
8+
# _3.65_ (2025-04-10)
9+
- **(Bug Fix)** Fix issue where Amazon Q cannot process chunks from local `@workspace` context
10+
11+
# _3.63_ (2025-04-08)
12+
- **(Feature)** Enterprise users can choose their preferred Amazon Q profile to improve personalization and workflow across different business regions
13+
- **(Bug Fix)** Amazon Q /doc: close diff tab and open README file in preview mode after user accept changes
14+
15+
# _3.62_ (2025-04-03)
16+
- **(Feature)** /review: automatically generate fix without clicking Generate Fix button
17+
- **(Bug Fix)** /transform: prompt user to re-authenticate if credentials expire during transformation
18+
- **(Bug Fix)** Gracefully handle additional fields in Amazon Q /dev code generation result without throwing errors
19+
- **(Bug Fix)** /review: set programmingLanguage to Plaintext if language is unknown
20+
- **(Bug Fix)** /review: Respect user option to allow code suggestions with references
21+
22+
# _3.61_ (2025-03-27)
23+
- **(Feature)** Amazon Q: Moved "Include suggestions with code references" setting to General
24+
- **(Feature)** Add support for 2025.1
25+
- **(Bug Fix)** Amazon Q: Attempt to reduce thread pool contention locking IDE caused by `@workspace` making a large number of requests
26+
- **(Deprecation)** An upcoming release will remove support for JetBrains Gateway version 2024.3 and for IDEs based on the 2024.1 platform
27+
128
# _3.60_ (2025-03-20)
229
- **(Feature)** AmazonQ /test now displays a concise test plan summary to users.
330
- **(Bug Fix)** Fix inline completion failure due to context length exceeding the threshold

buildspec/windowsTestsForToolkit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ phases:
3636
}
3737
3838
# Rider is very expensive (spikes our CI jobs to 50% CPU, so let it do the prep work in parallel, but run tests later
39-
./gradlew -PideProfileName="$Env:ALTERNATIVE_IDE_PROFILE_NAME" :plugin-toolkit:intellij-standalone:check :plugin-toolkit:jetbrains-rider:compileTestKotlin --info --console plain --continue
39+
./gradlew -PideProfileName="$Env:ALTERNATIVE_IDE_PROFILE_NAME" :plugin-toolkit:intellij-standalone:check :plugin-toolkit:jetbrains-rider:compileTestKotlin -x :plugin-toolkit:jetbrains-rider:check --info --console plain --continue
4040
if ($LastExitCode -ne 0) {
4141
Write-Host "Command failed with exit code $LastExitCode"
4242
exit -1

detekt-rules/src/software/aws/toolkits/gradle/detekt/rules/BannedImportsRule.kt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class BannedImportsRule : Rule() {
1717
override fun visitImportList(importList: KtImportList) {
1818
super.visitImportList(importList)
1919
importList.imports.forEach { element ->
20-
val importedFqName = element.importedFqName?.asString()
20+
val importedFqName = element.importedFqName?.asString() ?: return
2121
if (importedFqName == "org.assertj.core.api.Assertions") {
2222
report(
2323
CodeSmell(
@@ -28,7 +28,7 @@ class BannedImportsRule : Rule() {
2828
)
2929
}
3030

31-
if (importedFqName?.startsWith("org.hamcrest") == true) {
31+
if (importedFqName.startsWith("org.hamcrest")) {
3232
report(
3333
CodeSmell(
3434
issue,
@@ -38,9 +38,7 @@ class BannedImportsRule : Rule() {
3838
)
3939
}
4040

41-
if (importedFqName?.startsWith("kotlin.test.assert") == true &&
42-
importedFqName.startsWith("kotlin.test.assertNotNull") == false
43-
) {
41+
if (importedFqName.startsWith("kotlin.test.assert") && !importedFqName.startsWith("kotlin.test.assertNotNull")) {
4442
report(
4543
CodeSmell(
4644
issue,
@@ -50,7 +48,17 @@ class BannedImportsRule : Rule() {
5048
)
5149
}
5250

53-
if (importedFqName?.startsWith("org.gradle.internal.impldep") == true) {
51+
if (importedFqName.startsWith("org.junit.jupiter.api.Assertions") || importedFqName.startsWith("org.junit.Assert")) {
52+
report(
53+
CodeSmell(
54+
issue,
55+
Entity.from(element),
56+
message = "Use AssertJ instead of JUnit assertions"
57+
)
58+
)
59+
}
60+
61+
if (importedFqName.startsWith("org.gradle.internal.impldep")) {
5462
report(
5563
CodeSmell(
5664
issue,
@@ -60,7 +68,7 @@ class BannedImportsRule : Rule() {
6068
)
6169
}
6270

63-
if (importedFqName?.contains("kotlinx.coroutines.Dispatchers") == true) {
71+
if (importedFqName.contains("kotlinx.coroutines.Dispatchers")) {
6472
report(
6573
CodeSmell(
6674
issue,

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# Toolkit Version
5-
toolkitVersion=3.61-SNAPSHOT
5+
toolkitVersion=3.67-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/common/clients/AmazonQCodeGenerateClient.kt

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import software.amazon.awssdk.services.codewhispererruntime.model.ContentChecksu
1313
import software.amazon.awssdk.services.codewhispererruntime.model.CreateTaskAssistConversationRequest
1414
import software.amazon.awssdk.services.codewhispererruntime.model.CreateTaskAssistConversationResponse
1515
import software.amazon.awssdk.services.codewhispererruntime.model.CreateUploadUrlResponse
16+
import software.amazon.awssdk.services.codewhispererruntime.model.Dimension
1617
import software.amazon.awssdk.services.codewhispererruntime.model.DocV2AcceptanceEvent
1718
import software.amazon.awssdk.services.codewhispererruntime.model.DocV2GenerationEvent
1819
import software.amazon.awssdk.services.codewhispererruntime.model.GetTaskAssistCodeGenerationResponse
@@ -30,10 +31,10 @@ import software.aws.toolkits.core.utils.error
3031
import software.aws.toolkits.core.utils.getLogger
3132
import software.aws.toolkits.core.utils.info
3233
import software.aws.toolkits.jetbrains.common.session.Intent
33-
import software.aws.toolkits.jetbrains.core.awsClient
3434
import software.aws.toolkits.jetbrains.core.credentials.ToolkitConnectionManager
3535
import software.aws.toolkits.jetbrains.core.credentials.pinning.QConnection
3636
import software.aws.toolkits.jetbrains.services.amazonq.clients.AmazonQStreamingClient
37+
import software.aws.toolkits.jetbrains.services.amazonq.profile.QRegionProfileManager
3738
import software.aws.toolkits.jetbrains.services.amazonqDoc.FEATURE_EVALUATION_PRODUCT_NAME
3839
import software.aws.toolkits.jetbrains.services.codemodernizer.utils.calculateTotalLatency
3940
import software.aws.toolkits.jetbrains.services.telemetry.ClientMetadata
@@ -71,7 +72,7 @@ class AmazonQCodeGenerateClient(private val project: Project) {
7172
fun connection() = ToolkitConnectionManager.getInstance(project).activeConnectionForFeature(QConnection.getInstance())
7273
?: error("Attempted to use connection while one does not exist")
7374

74-
fun bearerClient() = connection().getConnectionSettings().awsClient<CodeWhispererRuntimeClient>()
75+
fun bearerClient() = QRegionProfileManager.getInstance().getQClient<CodeWhispererRuntimeClient>(project)
7576

7677
private val amazonQStreamingClient
7778
get() = AmazonQStreamingClient.getInstance(project)
@@ -87,10 +88,40 @@ class AmazonQCodeGenerateClient(private val project: Project) {
8788
}
8889
requestBuilder.optOutPreference(getTelemetryOptOutPreference())
8990
requestBuilder.userContext(docUserContext)
91+
requestBuilder.profileArn(QRegionProfileManager.getInstance().activeProfile(project)?.arn)
92+
}
93+
94+
fun sendDocMetricData(operationName: String, result: String): SendTelemetryEventResponse =
95+
bearerClient().sendTelemetryEvent { requestBuilder ->
96+
requestBuilder.telemetryEvent { telemetryEventBuilder ->
97+
telemetryEventBuilder.metricData {
98+
it
99+
.metricName("Operation")
100+
.metricValue(1.0)
101+
.timestamp(Instant.now())
102+
.product("DocGeneration")
103+
.dimensions(
104+
listOf(
105+
Dimension.builder()
106+
.name("operationName")
107+
.value(operationName)
108+
.build(),
109+
Dimension.builder()
110+
.name("result")
111+
.value(result)
112+
.build()
113+
)
114+
)
115+
}
116+
}
117+
requestBuilder.optOutPreference(getTelemetryOptOutPreference())
118+
requestBuilder.userContext(docUserContext)
90119
}
91120

92121
fun createTaskAssistConversation(): CreateTaskAssistConversationResponse = bearerClient().createTaskAssistConversation(
93-
CreateTaskAssistConversationRequest.builder().build()
122+
CreateTaskAssistConversationRequest.builder()
123+
.profileArn(QRegionProfileManager.getInstance().activeProfile(project)?.arn)
124+
.build()
94125
)
95126

96127
fun createTaskAssistUploadUrl(conversationId: String, contentChecksumSha256: String, contentLength: Long): CreateUploadUrlResponse =
@@ -109,6 +140,7 @@ class AmazonQCodeGenerateClient(private val project: Project) {
109140
)
110141
.build()
111142
)
143+
.profileArn(QRegionProfileManager.getInstance().activeProfile(project)?.arn)
112144
}
113145

114146
fun startTaskAssistCodeGeneration(conversationId: String, uploadId: String, userMessage: String, intent: Intent): StartTaskAssistCodeGenerationResponse =
@@ -127,6 +159,7 @@ class AmazonQCodeGenerateClient(private val project: Project) {
127159
.uploadId(uploadId)
128160
}
129161
.intent(intent.name)
162+
.profileArn(QRegionProfileManager.getInstance().activeProfile(project)?.arn)
130163
}
131164

132165
fun getTaskAssistCodeGeneration(conversationId: String, codeGenerationId: String): GetTaskAssistCodeGenerationResponse = bearerClient()

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/common/util/AmazonQCodeGenService.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import software.aws.toolkits.core.utils.getLogger
2020
import software.aws.toolkits.core.utils.warn
2121
import software.aws.toolkits.jetbrains.common.clients.AmazonQCodeGenerateClient
2222
import software.aws.toolkits.jetbrains.common.session.Intent
23-
import software.aws.toolkits.jetbrains.services.amazonqDoc.docServiceError
2423
import software.aws.toolkits.jetbrains.services.amazonqDoc.session.DocGenerationStreamResult
2524
import software.aws.toolkits.jetbrains.services.amazonqDoc.session.ExportDocTaskAssistResultArchiveStreamResult
2625
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.ApiException
@@ -34,9 +33,9 @@ import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.MonthlyConvers
3433
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.ServiceException
3534
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.ZipFileCorruptedException
3635
import software.aws.toolkits.jetbrains.services.cwc.controller.chat.telemetry.getStartUrl
37-
import software.aws.toolkits.resources.message
3836
import software.aws.toolkits.telemetry.AmazonqTelemetry
3937
import software.aws.toolkits.telemetry.MetricResult
38+
import software.aws.toolkits.jetbrains.services.amazonqDoc.ContentLengthException as DocContentLengthException
4039

4140
class AmazonQCodeGenService(val proxyClient: AmazonQCodeGenerateClient, val project: Project) {
4241
fun createConversation(): String {
@@ -115,7 +114,7 @@ class AmazonQCodeGenService(val proxyClient: AmazonQCodeGenerateClient, val proj
115114

116115
if (e is ValidationException && e.message?.contains("Invalid contentLength") == true) {
117116
if (featureName?.equals("docGeneration") == true) {
118-
throw docServiceError(message("amazonqDoc.exception.content_length_error"))
117+
throw DocContentLengthException(operation = FeatureDevOperation.CreateUploadUrl.toString(), desc = null, cause = e.cause)
119118
}
120119
throw ContentLengthException(operation = FeatureDevOperation.CreateUploadUrl.toString(), desc = null, cause = e.cause)
121120
}
@@ -162,6 +161,9 @@ class AmazonQCodeGenService(val proxyClient: AmazonQCodeGenerateClient, val proj
162161
) {
163162
throw CodeIterationLimitException(operation = FeatureDevOperation.StartTaskAssistCodeGeneration.toString(), desc = null, e.cause)
164163
} else if (e is ValidationException && e.message?.contains("repo size is exceeding the limits") == true) {
164+
if (intent == Intent.DOC) {
165+
throw DocContentLengthException(operation = FeatureDevOperation.CreateUploadUrl.toString(), desc = null, cause = e.cause)
166+
}
165167
throw ContentLengthException(operation = FeatureDevOperation.StartTaskAssistCodeGeneration.toString(), desc = null, cause = e.cause)
166168
} else if (e is ValidationException && e.message?.contains("zipped file is corrupted") == true) {
167169
throw ZipFileCorruptedException(operation = FeatureDevOperation.StartTaskAssistCodeGeneration.toString(), desc = null, e.cause)

0 commit comments

Comments
 (0)