Skip to content

Commit f39ee10

Browse files
authored
Merge branch 'main' into q-inline-jb-api
2 parents 80a8b01 + a6f98ce commit f39ee10

File tree

35 files changed

+618
-394
lines changed

35 files changed

+618
-394
lines changed

.changes/3.79.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"date" : "2025-06-25",
3+
"version" : "3.79",
4+
"entries" : [ {
5+
"type" : "feature",
6+
"description" : "/transform: run all builds client-side"
7+
}, {
8+
"type" : "feature",
9+
"description" : "Amazon Q Chat: Pin context items in chat and manage workspace rules"
10+
} ]
11+
}

.changes/next-release/feature-065d979a-e921-4252-a9a7-f0c2079015f3.json

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

.changes/next-release/feature-7e2ed4ba-b795-4c82-a99a-da610a0432c8.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.79_ (2025-06-25)
2+
- **(Feature)** /transform: run all builds client-side
3+
- **(Feature)** Amazon Q Chat: Pin context items in chat and manage workspace rules
4+
15
# _3.78_ (2025-06-18)
26
- **(Feature)** Add model selection feature
37

buildSrc/settings.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,11 @@ dependencyResolutionManagement {
4343
includeGroupByRegex("org\\.jetbrains\\.intellij\\.platform.*")
4444
}
4545
}
46+
maven {
47+
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
48+
content {
49+
includeGroupByRegex("org\\.mockito\\.kotlin")
50+
}
51+
}
4652
}
4753
}

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.79-SNAPSHOT
5+
toolkitVersion=3.80-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ detekt = "1.23.7"
1010
diff-util = "4.12"
1111
intellijExt = "1.1.8"
1212
# match with <root>/settings.gradle.kts
13-
intellijGradle = "2.3.0"
13+
intellijGradle = "2.6.0"
1414
intellijRemoteRobot = "0.11.22"
1515
jackson = "2.17.2"
1616
jacoco = "0.8.12"
@@ -24,7 +24,7 @@ kotlin = "2.1.20"
2424
kotlinCoroutines = "1.8.0"
2525
lsp4j = "0.24.0"
2626
mockito = "5.12.0"
27-
mockitoKotlin = "5.4.0"
27+
mockitoKotlin = "5.4.1-SNAPSHOT"
2828
mockk = "1.13.17"
2929
nimbus-jose-jwt = "9.40"
3030
node-gradle = "7.0.2"

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ import com.intellij.icons.AllIcons
77
import com.intellij.openapi.actionSystem.ActionUpdateThread
88
import com.intellij.openapi.actionSystem.AnActionEvent
99
import com.intellij.openapi.application.ApplicationManager
10+
import com.intellij.openapi.progress.currentThreadCoroutineScope
1011
import com.intellij.openapi.project.DumbAwareAction
1112
import com.intellij.util.messages.Topic
13+
import kotlinx.coroutines.launch
1214
import software.aws.toolkits.jetbrains.services.amazonq.lsp.AmazonQLspService
1315
import software.aws.toolkits.jetbrains.services.amazonq.lsp.flareChat.ChatCommunicationManager
1416
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.CHAT_TAB_REMOVE
@@ -22,9 +24,11 @@ class QRefreshPanelAction : DumbAwareAction(AmazonQBundle.message("amazonq.refre
2224

2325
// Notify LSP server about all open tabs being removed
2426
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))
27+
currentThreadCoroutineScope().launch {
28+
chatManager.getAllTabIds().forEach { tabId ->
29+
AmazonQLspService.executeAsyncIfRunning(project) {
30+
rawEndpoint.notify(CHAT_TAB_REMOVE, mapOf("tabId" to tabId))
31+
}
2832
}
2933
}
3034

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class BrowserConnector(
116116
private val themeBrowserAdapter: ThemeBrowserAdapter = ThemeBrowserAdapter(),
117117
private val project: Project,
118118
) {
119-
var uiReady = CompletableDeferred<Boolean>()
119+
val uiReady = CompletableDeferred<Boolean>()
120120
private val chatCommunicationManager = ChatCommunicationManager.getInstance(project)
121121
private val chatAsyncResultManager = ChatAsyncResultManager.getInstance(project)
122122

@@ -216,7 +216,7 @@ class BrowserConnector(
216216
}
217217
}
218218

219-
private fun handleFlareChatMessages(browser: Browser, node: JsonNode) {
219+
private suspend fun handleFlareChatMessages(browser: Browser, node: JsonNode) {
220220
when (node.command) {
221221
SEND_CHAT_COMMAND_PROMPT -> {
222222
val requestFromUi = serializer.deserializeChatMessages<SendChatPromptRequest>(node)
@@ -238,7 +238,7 @@ class BrowserConnector(
238238
chatCommunicationManager.registerPartialResultToken(partialResultToken)
239239

240240
var encryptionManager: JwtEncryptionManager? = null
241-
val result = AmazonQLspService.executeIfRunning(project) { server ->
241+
val result = AmazonQLspService.executeAsyncIfRunning(project) { server ->
242242
encryptionManager = this.encryptionManager
243243

244244
val encryptedParams = EncryptedChatParams(this.encryptionManager.encrypt(chatParams), partialResultToken)
@@ -258,7 +258,7 @@ class BrowserConnector(
258258
val partialResultToken = chatCommunicationManager.addPartialChatMessage(tabId)
259259
chatCommunicationManager.registerPartialResultToken(partialResultToken)
260260
var encryptionManager: JwtEncryptionManager? = null
261-
val result = AmazonQLspService.executeIfRunning(project) { server ->
261+
val result = AmazonQLspService.executeAsyncIfRunning(project) { server ->
262262
encryptionManager = this.encryptionManager
263263

264264
val encryptedParams = EncryptedQuickActionChatParams(this.encryptionManager.encrypt(quickActionParams), partialResultToken)
@@ -613,7 +613,7 @@ class BrowserConnector(
613613
}
614614
}
615615

616-
private inline fun <reified Request, Response> handleChat(
616+
private suspend inline fun <reified Request, Response> handleChat(
617617
lspMethod: JsonRpcMethod<Request, Response>,
618618
node: JsonNode,
619619
crossinline serverAction: (params: Request, invokeService: () -> CompletableFuture<Response>) -> CompletableFuture<Response>,
@@ -624,7 +624,7 @@ class BrowserConnector(
624624
serializer.deserializeChatMessages<Request>(node.params, lspMethod.params)
625625
}
626626

627-
return AmazonQLspService.executeIfRunning(project) { _ ->
627+
return AmazonQLspService.executeAsyncIfRunning(project) { _ ->
628628
val invokeService = when (lspMethod) {
629629
is JsonRpcNotification<Request> -> {
630630
// notify is Unit
@@ -646,7 +646,7 @@ class BrowserConnector(
646646
} ?: CompletableFuture.failedFuture<Response>(IllegalStateException("LSP Server not running"))
647647
}
648648

649-
private inline fun <reified Request, Response> handleChat(
649+
private suspend inline fun <reified Request, Response> handleChat(
650650
lspMethod: JsonRpcMethod<Request, Response>,
651651
node: JsonNode,
652652
): CompletableFuture<Response> = handleChat(

plugins/amazonq/chat/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/controller/FeatureDevControllerTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class FeatureDevControllerTest : FeatureDevTestBase() {
170170
whenever(featureDevClient.createTaskAssistConversation()).thenReturn(exampleCreateTaskAssistConversationResponse)
171171
whenever(featureDevClient.sendFeatureDevTelemetryEvent(any())).thenReturn(exampleSendTelemetryEventResponse)
172172
whenever(chatSessionStorage.getSession(any(), any())).thenReturn(spySession)
173-
doNothing().`when`(chatSessionStorage).deleteSession(any())
173+
doNothing().whenever(chatSessionStorage).deleteSession(any())
174174

175175
mockkObject(AmazonqTelemetry)
176176
every { AmazonqTelemetry.endChat(amazonqConversationId = any(), amazonqEndOfTheConversationLatency = any()) } just runs

0 commit comments

Comments
 (0)