Skip to content

Commit 6b5abe1

Browse files
committed
Merge conflicts resolved
2 parents a751f56 + 903de94 commit 6b5abe1

File tree

30 files changed

+347
-256
lines changed

30 files changed

+347
-256
lines changed

.changes/3.67.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"date" : "2025-04-18",
3+
"version" : "3.67",
4+
"entries" : [ {
5+
"type" : "bugfix",
6+
"description" : "Amazon Q: Customization now resets with a warning if unavailable in the selected profile."
7+
}, {
8+
"type" : "bugfix",
9+
"description" : "Q panel will get stuck while signin if users have multiple windows"
10+
}, {
11+
"type" : "bugfix",
12+
"description" : "Fix integer overflow when local context index input is larger than 2GB"
13+
}, {
14+
"type" : "bugfix",
15+
"description" : "Fix workspace index process quits when hitting a race condition"
16+
}, {
17+
"type" : "bugfix",
18+
"description" : "Fix infinite loop when workspace indexing server fails to initialize"
19+
} ]
20+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "/review: disabled highlighter for ignored issues"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "feature",
3+
"description" : "Amazon Q /test: Remove unsupported message for non-java python languages"
4+
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# _3.67_ (2025-04-18)
2+
- **(Bug Fix)** Amazon Q: Customization now resets with a warning if unavailable in the selected profile.
3+
- **(Bug Fix)** Q panel will get stuck while signin if users have multiple windows
4+
- **(Bug Fix)** Fix integer overflow when local context index input is larger than 2GB
5+
- **(Bug Fix)** Fix workspace index process quits when hitting a race condition
6+
- **(Bug Fix)** Fix infinite loop when workspace indexing server fails to initialize
7+
18
# _3.66_ (2025-04-11)
29
- **(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.
310
- **(Bug Fix)** Unit test generation now completes successfully when using the `/test` command

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.67-SNAPSHOT
5+
toolkitVersion=3.68-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ class AmazonQToolWindowFactory : ToolWindowFactory, DumbAware {
9595
project.messageBus.connect(toolWindow.disposable).subscribe(
9696
QRegionProfileSelectedListener.TOPIC,
9797
object : QRegionProfileSelectedListener {
98-
override fun onProfileSelected(project: Project, profile: QRegionProfile?) {
98+
// note we name myProject intentionally ow it will shadow the "project" provided by the IDE
99+
override fun onProfileSelected(myProject: Project, profile: QRegionProfile?) {
99100
if (project.isDisposed) return
100101
AmazonQToolWindow.getInstance(project).disposeAndRecreate()
101102
qPanel.setContent(AmazonQToolWindow.getInstance(project).component)

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -244,26 +244,22 @@ class CodeTestChatController(
244244
})
245245
}
246246
.build()
247+
if (!fileInfo.fileInWorkspace) {
248+
val messageContent =
249+
"<span style=\"color: #EE9D28;\">&#9888;<b> I can't generate tests for ${fileInfo.fileName}" +
250+
" because it's outside the project directory.</b><br></span> " +
251+
"I can still provide examples, instructions and code suggestions."
247252

248-
val messageContent = if (fileInfo.fileInWorkspace) {
249-
"<span style=\"color: #EE9D28;\">&#9888;<b> ${fileInfo.fileLanguage.languageId} is not a " +
250-
"language I support specialized unit test generation for at the moment.</b><br></span>The languages " +
251-
"I support now are Python and Java. I can still provide examples, instructions and code suggestions."
252-
} else {
253-
"<span style=\"color: #EE9D28;\">&#9888;<b> I can't generate tests for ${fileInfo.fileName}" +
254-
" because it's outside the project directory.</b><br></span> " +
255-
"I can still provide examples, instructions and code suggestions."
253+
codeTestChatHelper.addNewMessage(
254+
CodeTestChatMessageContent(
255+
message = messageContent,
256+
type = ChatMessageType.Answer,
257+
canBeVoted = false
258+
),
259+
message.tabId,
260+
false
261+
)
256262
}
257-
258-
codeTestChatHelper.addNewMessage(
259-
CodeTestChatMessageContent(
260-
message = messageContent,
261-
type = ChatMessageType.Answer,
262-
canBeVoted = false
263-
),
264-
message.tabId,
265-
false
266-
)
267263
testResponseMessageId = codeTestChatHelper.addAnswer(
268264
CodeTestChatMessageContent(
269265
message = "",

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/CodeWhispererCodeScanSession.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ class CodeWhispererCodeScanSession(val sessionContext: CodeScanSessionContext) {
361361
} else {
362362
null
363363
}
364+
}.filter {
365+
it.isVisible
364366
}.onEach { issue ->
365367
// Add range highlighters for all the issues found.
366368
runInEdt {

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/customization/CodeWhispererModelConfigurator.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import software.aws.toolkits.core.utils.debug
2222
import software.aws.toolkits.core.utils.getLogger
2323
import software.aws.toolkits.jetbrains.services.amazonq.CodeWhispererFeatureConfigService
2424
import software.aws.toolkits.jetbrains.services.amazonq.calculateIfIamIdentityCenterConnection
25+
import software.aws.toolkits.jetbrains.services.amazonq.profile.QRegionProfile
26+
import software.aws.toolkits.jetbrains.services.amazonq.profile.QRegionProfileSelectedListener
2527
import software.aws.toolkits.jetbrains.services.codewhisperer.credentials.CodeWhispererClientAdaptor
2628
import software.aws.toolkits.jetbrains.services.codewhisperer.util.CodeWhispererConstants
2729
import software.aws.toolkits.jetbrains.utils.notifyInfo
@@ -48,6 +50,7 @@ private fun notifyInvalidSelectedCustomization(project: Project) {
4850
}
4951

5052
private fun notifyNewCustomization(project: Project) {
53+
if (ApplicationManager.getApplication().isUnitTestMode) return
5154
notifyInfo(
5255
title = message("codewhisperer.custom.dialog.title"),
5356
content = message("codewhisperer.notification.custom.new_customization"),
@@ -81,6 +84,18 @@ class DefaultCodeWhispererModelConfigurator : CodeWhispererModelConfigurator, Pe
8184

8285
private var customizationArnOverrideV2: String? = null
8386

87+
init {
88+
ApplicationManager.getApplication().messageBus.connect(this).subscribe(
89+
QRegionProfileSelectedListener.TOPIC,
90+
object : QRegionProfileSelectedListener {
91+
override fun onProfileSelected(project: Project, profile: QRegionProfile?) {
92+
pluginAwareExecuteOnPooledThread {
93+
CodeWhispererModelConfigurator.getInstance().listCustomizations(project, passive = true)
94+
}
95+
}
96+
}
97+
)
98+
}
8499
override fun showConfigDialog(project: Project) {
85100
runInEdt {
86101
calculateIfIamIdentityCenterConnection(project) {

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/settings/CodeWhispererConfigurable.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class CodeWhispererConfigurable(private val project: Project) :
169169

170170
row(message("aws.settings.codewhisperer.project_context_index_thread")) {
171171
intTextField(
172-
range = IntRange(0, 50)
172+
range = CodeWhispererSettings.CONTEXT_INDEX_THREADS
173173
).bindIntText(codeWhispererSettings::getProjectContextIndexThreadCount, codeWhispererSettings::setProjectContextIndexThreadCount)
174174
.apply {
175175
connect.subscribe(
@@ -186,7 +186,7 @@ class CodeWhispererConfigurable(private val project: Project) :
186186

187187
row(message("aws.settings.codewhisperer.project_context_index_max_size")) {
188188
intTextField(
189-
range = IntRange(1, 4096)
189+
range = CodeWhispererSettings.CONTEXT_INDEX_SIZE
190190
).bindIntText(codeWhispererSettings::getProjectContextIndexMaxSize, codeWhispererSettings::setProjectContextIndexMaxSize)
191191
.apply {
192192
connect.subscribe(

0 commit comments

Comments
 (0)