Skip to content

Commit 91f7eb3

Browse files
committed
Merge remote-tracking branch 'origin/main' into HEAD
Conflicts: plugins/amazonq/build.gradle.kts plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/toolwindow/AmazonQPanel.kt
2 parents 7ac27ea + 7228af1 commit 91f7eb3

File tree

31 files changed

+554
-113
lines changed

31 files changed

+554
-113
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/build.gradle.kts

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

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
48
import software.aws.toolkits.gradle.changelog.tasks.GeneratePluginChangeLog
59

610
plugins {
711
id("toolkit-publishing-conventions")
812
id("toolkit-publish-root-conventions")
913
id("toolkit-jvm-conventions")
1014
id("toolkit-testing")
15+
id("de.undercouch.download")
16+
}
17+
18+
buildscript {
19+
dependencies {
20+
classpath(libs.bundles.jackson)
21+
}
1122
}
1223

1324
val changelog = tasks.register<GeneratePluginChangeLog>("pluginChangeLog") {
@@ -47,3 +58,81 @@ tasks.check {
4758
}
4859
}
4960
}
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 software.aws.toolkits.jetbrains.utils.isRunningOnRemoteBackend
4648
import java.util.concurrent.CompletableFuture
4749
import javax.swing.JButton
@@ -103,6 +105,9 @@ class AmazonQPanel(val project: Project, private val scope: CoroutineScope) : Di
103105
webviewContainer.add(JBTextArea("JCEF not supported"))
104106
}
105107
browser.complete(null)
108+
} else if (!isQSupportedInThisVersion()) {
109+
webviewContainer.add(JBTextArea("${message("q.unavailable")}\n ${message("q.unavailable.node")}"))
110+
browser.complete(null)
106111
} else {
107112
val loadingPanel = if (isRunningOnRemoteBackend()) {
108113
JBLoadingPanel(null) {

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

Lines changed: 9 additions & 4 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

@@ -307,14 +307,19 @@ class BrowserConnector(
307307
}
308308

309309
CHAT_TAB_ADD -> {
310-
handleChat(AmazonQChatServer.tabAdd, node)
310+
handleChat(AmazonQChatServer.tabAdd, node) { params, invoke ->
311+
// Track the tab ID when a tab is added
312+
chatCommunicationManager.addTabId(params.tabId)
313+
invoke()
314+
}
311315
}
312316

313317
CHAT_TAB_REMOVE -> {
314318
handleChat(AmazonQChatServer.tabRemove, node) { params, invoke ->
315319
chatCommunicationManager.removePartialChatMessage(params.tabId)
316320
cancelInflightRequests(params.tabId)
317-
321+
// Remove the tab ID from tracking when a tab is removed
322+
chatCommunicationManager.removeTabId(params.tabId)
318323
invoke()
319324
}
320325
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ data class AmazonQTheme(
1616
val defaultText: Color,
1717
val inactiveText: Color,
1818
val linkText: Color,
19+
val lightText: Color,
20+
val emptyText: Color,
1921

2022
val background: Color,
2123
val border: Color,
@@ -31,6 +33,8 @@ data class AmazonQTheme(
3133
val buttonBackground: Color,
3234
val secondaryButtonForeground: Color,
3335
val secondaryButtonBackground: Color,
36+
val inputBorderFocused: Color,
37+
val inputBorderUnfocused: Color,
3438

3539
val info: Color,
3640
val success: Color,

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ enum class CssVariable(
1616
TextColorAlt("--mynah-color-text-alternate"),
1717
TextColorStrong("--mynah-color-text-strong"),
1818
TextColorWeak("--mynah-color-text-weak"),
19+
TextColorLight("--mynah-color-light"),
1920
TextColorLink("--mynah-color-text-link"),
2021
TextColorInput("--mynah-color-text-input"),
2122
TextColorDisabled("--mynah-color-text-disabled"),
@@ -27,6 +28,8 @@ enum class CssVariable(
2728
ColorDeep("--mynah-color-deep"),
2829
ColorDeepReverse("--mynah-color-deep-reverse"),
2930
BorderDefault("--mynah-color-border-default"),
31+
BorderFocused("--mynah-color-text-input-border-focused"),
32+
BorderUnfocused("--mynah-color-text-input-border"),
3033
InputBackground("--mynah-input-bg"),
3134

3235
SyntaxBackground("--mynah-color-syntax-bg"),

0 commit comments

Comments
 (0)