Skip to content

Commit 8cb5ea2

Browse files
authored
Merge pull request #5791 from aws/autoMerge/feature/bid-paid
Merge main into feature/bid-paid
2 parents 1f0be54 + c2fc89f commit 8cb5ea2

File tree

18 files changed

+221
-82
lines changed

18 files changed

+221
-82
lines changed

.changes/3.74.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"date" : "2025-06-05",
3+
"version" : "3.74",
4+
"entries" : [ {
5+
"type" : "feature",
6+
"description" : "Agentic coding experience: Amazon Q can now write code and run shell commands on your behalf"
7+
}, {
8+
"type" : "bugfix",
9+
"description" : "Support full Unicode range in inline chat panel on Windows"
10+
} ]
11+
}

.changes/next-release/bugfix-061149bd-c6ef-4c86-9f12-98e38fe3b576.json

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

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# _3.74_ (2025-06-05)
2+
- **(Feature)** Agentic coding experience: Amazon Q can now write code and run shell commands on your behalf
3+
- **(Bug Fix)** Support full Unicode range in inline chat panel on Windows
4+
15
# _3.73_ (2025-05-29)
26
- **(Bug Fix)** /transform: handle InvalidGrantException properly when polling job status
37

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.74-SNAPSHOT
5+
toolkitVersion=3.75-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import software.aws.toolkits.jetbrains.isDeveloperMode
2525
import software.aws.toolkits.jetbrains.services.amazonq.apps.AmazonQAppInitContext
2626
import software.aws.toolkits.jetbrains.services.amazonq.apps.AppConnection
2727
import software.aws.toolkits.jetbrains.services.amazonq.commands.MessageTypeRegistry
28+
import software.aws.toolkits.jetbrains.services.amazonq.isQSupportedInThisVersion
2829
import software.aws.toolkits.jetbrains.services.amazonq.lsp.AmazonQLspService
2930
import software.aws.toolkits.jetbrains.services.amazonq.lsp.flareChat.AsyncChatUiListener
3031
import software.aws.toolkits.jetbrains.services.amazonq.lsp.flareChat.FlareUiMessage
@@ -41,6 +42,7 @@ import software.aws.toolkits.jetbrains.services.amazonqCodeTest.auth.isCodeTestA
4142
import software.aws.toolkits.jetbrains.services.amazonqDoc.auth.isDocAvailable
4243
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.auth.isFeatureDevAvailable
4344
import software.aws.toolkits.jetbrains.services.codemodernizer.utils.isCodeTransformAvailable
45+
import software.aws.toolkits.resources.message
4446
import java.nio.file.Paths
4547
import java.util.concurrent.CompletableFuture
4648
import javax.swing.JButton
@@ -102,6 +104,9 @@ class AmazonQPanel(val project: Project, private val scope: CoroutineScope) : Di
102104
webviewContainer.add(JBTextArea("JCEF not supported"))
103105
}
104106
browser.complete(null)
107+
} else if (!isQSupportedInThisVersion()) {
108+
webviewContainer.add(JBTextArea("${message("q.unavailable")}\n ${message("q.unavailable.node")}"))
109+
browser.complete(null)
105110
} else {
106111
val loadingPanel = JBLoadingPanel(null, this)
107112
val wrapper = Wrapper()

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/BrowserConnector.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class BrowserConnector(
224224
)
225225

226226
val serializedEnrichmentParams = serializer.objectMapper.valueToTree<ObjectNode>(enrichmentParams)
227-
val chatParams: ObjectNode = (node as ObjectNode)
227+
val chatParams: ObjectNode = (node.params as ObjectNode)
228228
.setAll(serializedEnrichmentParams)
229229

230230
val tabId = requestFromUi.params.tabId
@@ -235,7 +235,7 @@ class BrowserConnector(
235235
val result = AmazonQLspService.executeIfRunning(project) { server ->
236236
encryptionManager = this.encryptionManager
237237

238-
val encryptedParams = EncryptedChatParams(this.encryptionManager.encrypt(chatParams.params), partialResultToken)
238+
val encryptedParams = EncryptedChatParams(this.encryptionManager.encrypt(chatParams), partialResultToken)
239239
rawEndpoint.request(SEND_CHAT_COMMAND_PROMPT, encryptedParams) as CompletableFuture<String>
240240
} ?: (CompletableFuture.failedFuture(IllegalStateException("LSP Server not running")))
241241

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/commands/ActionRegistrar.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ActionRegistrar {
2929

3030
fun reportMessageClick(command: EditorContextCommand, project: Project) {
3131
if (command == EditorContextCommand.GenerateUnitTests) {
32-
AsyncChatUiListener.notifyPartialMessageUpdate(Gson().toJson(TestCommandMessage()))
32+
AsyncChatUiListener.notifyPartialMessageUpdate(project, Gson().toJson(TestCommandMessage()))
3333
} else {
3434
// new agentic chat route
3535
ApplicationManager.getApplication().executeOnPooledThread {
@@ -45,7 +45,7 @@ class ActionRegistrar {
4545
val params = SendToPromptParams(selection = codeSelection, triggerType = TriggerType.CONTEXT_MENU)
4646
uiMessage = FlareUiMessage(command = SEND_TO_PROMPT, params = params)
4747
}
48-
AsyncChatUiListener.notifyPartialMessageUpdate(uiMessage)
48+
AsyncChatUiListener.notifyPartialMessageUpdate(project, uiMessage)
4949
}
5050
}
5151
}

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/commands/codescan/actions/ExplainCodeIssueAction.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package software.aws.toolkits.jetbrains.services.cwc.commands.codescan.actions
55

66
import com.intellij.openapi.actionSystem.ActionManager
7+
import com.intellij.openapi.actionSystem.ActionUpdateThread
78
import com.intellij.openapi.actionSystem.AnAction
89
import com.intellij.openapi.actionSystem.AnActionEvent
910
import com.intellij.openapi.actionSystem.DataKey
@@ -18,7 +19,14 @@ import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.SendT
1819
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.TriggerType
1920

2021
class ExplainCodeIssueAction : AnAction(), DumbAware {
22+
override fun getActionUpdateThread() = ActionUpdateThread.BGT
23+
24+
override fun update(e: AnActionEvent) {
25+
e.presentation.isEnabledAndVisible = e.project != null
26+
}
27+
2128
override fun actionPerformed(e: AnActionEvent) {
29+
val project = e.project ?: return
2230
val issueDataKey = DataKey.create<MutableMap<String, String>>("amazonq.codescan.explainissue")
2331
val issueContext = e.getData(issueDataKey) ?: return
2432

@@ -50,7 +58,7 @@ class ExplainCodeIssueAction : AnAction(), DumbAware {
5058
)
5159

5260
val uiMessage = FlareUiMessage(SEND_TO_PROMPT, params)
53-
AsyncChatUiListener.notifyPartialMessageUpdate(uiMessage)
61+
AsyncChatUiListener.notifyPartialMessageUpdate(project, uiMessage)
5462
}
5563
}
5664
}

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/QUtils.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
package software.aws.toolkits.jetbrains.services.amazonq
55

6+
import com.intellij.openapi.application.ApplicationInfo
67
import com.intellij.openapi.project.Project
8+
import com.intellij.openapi.util.BuildNumber
79
import com.intellij.openapi.util.SystemInfo
810
import software.amazon.awssdk.services.codewhispererruntime.model.IdeCategory
911
import software.amazon.awssdk.services.codewhispererruntime.model.OperatingSystem
@@ -52,3 +54,12 @@ fun codeWhispererUserContext(): UserContext = ClientMetadata.getDefault().let {
5254
.ideVersion(it.awsVersion)
5355
.build()
5456
}
57+
58+
fun isQSupportedInThisVersion(): Boolean {
59+
val currentBuild = ApplicationInfo.getInstance().build.withoutProductCode()
60+
61+
return !(
62+
currentBuild.baselineVersion == 242 &&
63+
BuildNumber.fromString("242.22855.74")?.let { currentBuild < it } == true
64+
)
65+
}

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImpl.kt

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,21 @@ class AmazonQLanguageClientImpl(private val project: Project) : AmazonQLanguageC
158158
// The filepath sent by the server contains unicode characters which need to be
159159
// decoded for JB file handling APIs to be handle to handle file operations
160160
val fileToOpen = URLDecoder.decode(params.uri, StandardCharsets.UTF_8.name())
161-
ApplicationManager.getApplication().invokeLater {
162-
try {
163-
val virtualFile = VirtualFileManager.getInstance().findFileByUrl(fileToOpen)
164-
?: throw IllegalArgumentException("Cannot find file: $fileToOpen")
165-
166-
FileEditorManager.getInstance(project).openFile(virtualFile, true)
167-
} catch (e: Exception) {
168-
LOG.warn { "Failed to show document: $fileToOpen" }
169-
}
170-
}
161+
return CompletableFuture.supplyAsync(
162+
{
163+
try {
164+
val virtualFile = VirtualFileManager.getInstance().refreshAndFindFileByUrl(fileToOpen)
165+
?: throw IllegalArgumentException("Cannot find file: $fileToOpen")
171166

172-
return CompletableFuture.completedFuture(ShowDocumentResult(true))
167+
FileEditorManager.getInstance(project).openFile(virtualFile, true)
168+
ShowDocumentResult(true)
169+
} catch (e: Exception) {
170+
LOG.warn { "Failed to show document: $fileToOpen" }
171+
ShowDocumentResult(false)
172+
}
173+
},
174+
ApplicationManager.getApplication()::invokeLater
175+
)
173176
} catch (e: Exception) {
174177
LOG.warn { "Error showing document" }
175178
return CompletableFuture.completedFuture(ShowDocumentResult(false))
@@ -312,6 +315,7 @@ class AmazonQLanguageClientImpl(private val project: Project) : AmazonQLanguageC
312315

313316
override fun sendChatUpdate(params: LSPAny): CompletableFuture<Unit> {
314317
AsyncChatUiListener.notifyPartialMessageUpdate(
318+
project,
315319
FlareUiMessage(
316320
command = CHAT_SEND_UPDATE,
317321
params = params,

0 commit comments

Comments
 (0)