Skip to content

Commit 9d5c373

Browse files
authored
Merge branch 'feature/q-lsp-chat' into model-selection
2 parents 1e89687 + 9d2ca9b commit 9d5c373

File tree

57 files changed

+849
-198
lines changed

Some content is hidden

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

57 files changed

+849
-198
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/3.76.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"date" : "2025-06-12",
3+
"version" : "3.76",
4+
"entries" : [ {
5+
"type" : "feature",
6+
"description" : "Add MCP support for Amazon Q chat"
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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# _3.76_ (2025-06-12)
2+
- **(Feature)** Add MCP support for Amazon Q chat
3+
4+
# _3.75_ (2025-06-11)
5+
- **(Feature)** Support for Amazon Q Builder ID paid tier
6+
7+
# _3.74_ (2025-06-05)
8+
- **(Feature)** Agentic coding experience: Amazon Q can now write code and run shell commands on your behalf
9+
- **(Bug Fix)** Support full Unicode range in inline chat panel on Windows
10+
111
# _3.73_ (2025-05-29)
212
- **(Bug Fix)** /transform: handle InvalidGrantException properly when polling job status
313

buildspec/linuxTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ phases:
4040
fi
4141
4242
- chmod +x gradlew
43-
- su codebuild-user -c "./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME check coverageReport --info --console plain --continue"
43+
- su codebuild-user -c "./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME check coverageReport --info --stacktrace --console plain --continue"
4444
- su codebuild-user -c "./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME buildPlugin"
4545
- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
4646
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g') # Encode `#` in the URL because otherwise the url is clipped in the Codecov.io site

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

77
# Publish Settings
88
publishToken=

plugins/amazonq/build.gradle.kts

Lines changed: 89 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
4+
import com.fasterxml.jackson.databind.DeserializationFeature
5+
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
6+
import de.undercouch.gradle.tasks.download.Download
7+
import org.jetbrains.intellij.platform.gradle.tasks.PrepareSandboxTask
58
import software.aws.toolkits.gradle.changelog.tasks.GeneratePluginChangeLog
6-
import software.aws.toolkits.gradle.intellij.IdeFlavor
7-
import software.aws.toolkits.gradle.intellij.IdeVersions
8-
import software.aws.toolkits.gradle.intellij.toolkitIntelliJ
99

1010
plugins {
1111
id("toolkit-publishing-conventions")
1212
id("toolkit-publish-root-conventions")
1313
id("toolkit-jvm-conventions")
1414
id("toolkit-testing")
15+
id("de.undercouch.download")
16+
}
17+
18+
buildscript {
19+
dependencies {
20+
classpath(libs.bundles.jackson)
21+
}
1522
}
1623

1724
val changelog = tasks.register<GeneratePluginChangeLog>("pluginChangeLog") {
@@ -51,3 +58,81 @@ tasks.check {
5158
}
5259
}
5360
}
61+
62+
val downloadFlareManifest by tasks.registering(Download::class) {
63+
src("https://aws-toolkit-language-servers.amazonaws.com/qAgenticChatServer/0/manifest.json")
64+
dest(layout.buildDirectory.file("flare/manifest.json"))
65+
onlyIfModified(true)
66+
useETag(true)
67+
}
68+
69+
data class FlareManifest(
70+
val versions: List<FlareVersion>,
71+
)
72+
73+
data class FlareVersion(
74+
val serverVersion: String,
75+
val thirdPartyLicenses: String,
76+
val targets: List<FlareTarget>,
77+
)
78+
79+
data class FlareTarget(
80+
val platform: String,
81+
val arch: String,
82+
val contents: List<FlareContent>
83+
)
84+
85+
data class FlareContent(
86+
val url: String,
87+
)
88+
89+
val downloadFlareArtifacts by tasks.registering(Download::class) {
90+
dependsOn(downloadFlareManifest)
91+
inputs.files(downloadFlareManifest)
92+
93+
val manifestFile = downloadFlareManifest.map { it.outputFiles.first() }
94+
val manifest = manifestFile.map { jacksonObjectMapper().disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES).readValue(it.readText(), FlareManifest::class.java) }
95+
96+
// use darwin-aarch64 because its the smallest and we're going to throw away everything platform specific
97+
val latest = manifest.map { it.versions.first() }
98+
val latestVersion = latest.map { it.serverVersion }
99+
val licensesUrl = latest.map { it.thirdPartyLicenses }
100+
val darwin = latest.map { it.targets.first { target -> target.platform == "darwin" && target.arch == "arm64" } }
101+
val contentUrls = darwin.map { it.contents.map { content -> content.url } }
102+
103+
val destination = layout.buildDirectory.dir(latestVersion.map { "flare/$it" })
104+
outputs.dir(destination)
105+
106+
src(contentUrls.zip(licensesUrl) { left, right -> left + right})
107+
dest(destination)
108+
onlyIfModified(true)
109+
useETag(true)
110+
}
111+
112+
val prepareBundledFlare by tasks.registering(Copy::class) {
113+
dependsOn(downloadFlareArtifacts)
114+
inputs.files(downloadFlareArtifacts)
115+
116+
val dest = layout.buildDirectory.dir("tmp/extractFlare")
117+
into(dest)
118+
from(downloadFlareArtifacts.map { it.outputFiles.filterNot { file -> file.name.endsWith(".zip") } })
119+
120+
doLast {
121+
copy {
122+
into(dest)
123+
includeEmptyDirs = false
124+
downloadFlareArtifacts.get().outputFiles.filter { it.name.endsWith(".zip") }.forEach {
125+
dest.get().file(it.parentFile.name).asFile.createNewFile()
126+
from(zipTree(it)) {
127+
include("*.js")
128+
include("*.txt")
129+
}
130+
}
131+
}
132+
}
133+
}
134+
135+
tasks.withType<PrepareSandboxTask>().configureEach {
136+
intoChild(intellijPlatform.projectName.map { "$it/flare" })
137+
.from(prepareBundledFlare)
138+
}

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()

0 commit comments

Comments
 (0)