Skip to content

Commit 58732d4

Browse files
Merge branch 'feature/q-lsp-chat' into samgst/inline-completion-e2e
2 parents 3c67a95 + 76edf06 commit 58732d4

File tree

41 files changed

+490
-146
lines changed

Some content is hidden

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

41 files changed

+490
-146
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/3.75.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"date" : "2025-06-11",
3+
"version" : "3.75",
4+
"entries" : [ {
5+
"type" : "feature",
6+
"description" : "Support for Amazon Q Builder ID paid tier"
7+
} ]
8+
}

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

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

CHANGELOG.md

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

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.76-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,25 @@ import com.intellij.openapi.actionSystem.AnActionEvent
99
import com.intellij.openapi.application.ApplicationManager
1010
import com.intellij.openapi.project.DumbAwareAction
1111
import com.intellij.util.messages.Topic
12+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.AmazonQLspService
13+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.flareChat.ChatCommunicationManager
14+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.CHAT_TAB_REMOVE
1215
import software.aws.toolkits.jetbrains.services.amazonq.toolwindow.AmazonQToolWindow
1316
import software.aws.toolkits.resources.AmazonQBundle
1417
import java.util.EventListener
1518

1619
class QRefreshPanelAction : DumbAwareAction(AmazonQBundle.message("amazonq.refresh.panel"), null, AllIcons.Actions.Refresh) {
1720
override fun actionPerformed(e: AnActionEvent) {
1821
val project = e.project ?: return
22+
23+
// Notify LSP server about all open tabs being removed
24+
val chatManager = ChatCommunicationManager.getInstance(project)
25+
chatManager.getAllTabIds().forEach { tabId ->
26+
AmazonQLspService.executeIfRunning(project) { server ->
27+
rawEndpoint.notify(CHAT_TAB_REMOVE, mapOf("tabId" to tabId))
28+
}
29+
}
30+
1931
// recreate chat browser
2032
AmazonQToolWindow.getInstance(project).disposeAndRecreate()
2133
// recreate signin browser

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.artifacts.ArtifactManager
3031
import software.aws.toolkits.jetbrains.services.amazonq.lsp.flareChat.AsyncChatUiListener
@@ -42,6 +43,7 @@ import software.aws.toolkits.jetbrains.services.amazonqCodeTest.auth.isCodeTestA
4243
import software.aws.toolkits.jetbrains.services.amazonqDoc.auth.isDocAvailable
4344
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.auth.isFeatureDevAvailable
4445
import software.aws.toolkits.jetbrains.services.codemodernizer.utils.isCodeTransformAvailable
46+
import software.aws.toolkits.resources.message
4547
import java.util.concurrent.CompletableFuture
4648
import javax.swing.JButton
4749

@@ -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: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.Encry
7272
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.EncryptedQuickActionChatParams
7373
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.GET_SERIALIZED_CHAT_REQUEST_METHOD
7474
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.GetSerializedChatResponse
75+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.LIST_MCP_SERVERS_REQUEST_METHOD
76+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.MCP_SERVER_CLICK_REQUEST_METHOD
7577
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.OPEN_SETTINGS
7678
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.OPEN_WORKSPACE_SETTINGS_KEY
7779
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.OpenSettingsNotification
@@ -224,7 +226,7 @@ class BrowserConnector(
224226
)
225227

226228
val serializedEnrichmentParams = serializer.objectMapper.valueToTree<ObjectNode>(enrichmentParams)
227-
val chatParams: ObjectNode = (node as ObjectNode)
229+
val chatParams: ObjectNode = (node.params as ObjectNode)
228230
.setAll(serializedEnrichmentParams)
229231

230232
val tabId = requestFromUi.params.tabId
@@ -235,7 +237,7 @@ class BrowserConnector(
235237
val result = AmazonQLspService.executeIfRunning(project) { server ->
236238
encryptionManager = this.encryptionManager
237239

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

@@ -307,14 +309,19 @@ class BrowserConnector(
307309
}
308310

309311
CHAT_TAB_ADD -> {
310-
handleChat(AmazonQChatServer.tabAdd, node)
312+
handleChat(AmazonQChatServer.tabAdd, node) { params, invoke ->
313+
// Track the tab ID when a tab is added
314+
chatCommunicationManager.addTabId(params.tabId)
315+
invoke()
316+
}
311317
}
312318

313319
CHAT_TAB_REMOVE -> {
314320
handleChat(AmazonQChatServer.tabRemove, node) { params, invoke ->
315321
chatCommunicationManager.removePartialChatMessage(params.tabId)
316322
cancelInflightRequests(params.tabId)
317-
323+
// Remove the tab ID from tracking when a tab is removed
324+
chatCommunicationManager.removeTabId(params.tabId)
318325
invoke()
319326
}
320327
}
@@ -456,6 +463,28 @@ class BrowserConnector(
456463
TELEMETRY_EVENT -> {
457464
handleChat(AmazonQChatServer.telemetryEvent, node)
458465
}
466+
LIST_MCP_SERVERS_REQUEST_METHOD -> {
467+
handleChat(AmazonQChatServer.listMcpServers, node)
468+
.whenComplete { response, _ ->
469+
browser.postChat(
470+
FlareUiMessage(
471+
command = LIST_MCP_SERVERS_REQUEST_METHOD,
472+
params = response
473+
)
474+
)
475+
}
476+
}
477+
MCP_SERVER_CLICK_REQUEST_METHOD -> {
478+
handleChat(AmazonQChatServer.mcpServerClick, node)
479+
.whenComplete { response, _ ->
480+
browser.postChat(
481+
FlareUiMessage(
482+
command = MCP_SERVER_CLICK_REQUEST_METHOD,
483+
params = response
484+
)
485+
)
486+
}
487+
}
459488
}
460489
}
461490

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
}

0 commit comments

Comments
 (0)