Skip to content

Commit 9960f81

Browse files
committed
Merge remote-tracking branch 'origin/main' into rli/243
2 parents 007a9c8 + b88f7d8 commit 9960f81

File tree

55 files changed

+420
-364
lines changed

Some content is hidden

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

55 files changed

+420
-364
lines changed

.changes/3.30.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"date" : "2024-09-27",
3+
"version" : "3.30",
4+
"entries" : [ {
5+
"type" : "bugfix",
6+
"description" : "Amazon Q Code Transformation: notify users when no JDK is set in Project Structure settings"
7+
}, {
8+
"type" : "bugfix",
9+
"description" : "Automatically terminate orphaned process for `@workspace` helper"
10+
} ]
11+
}

.changes/next-release/bugfix-79dc3ea8-07f6-4eff-ae0f-0ea0a02db7f7.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.30_ (2024-09-27)
2+
- **(Bug Fix)** Amazon Q Code Transformation: notify users when no JDK is set in Project Structure settings
3+
- **(Bug Fix)** Automatically terminate orphaned process for `@workspace` helper
4+
15
# _3.29_ (2024-09-19)
26
- **(Feature)** Support `@workspace` queries for specific files like "`@workspace` what does test.ts do?".
37
- **(Bug Fix)** Amazon Q Feature Dev: fix iteration count messaging during code insertion

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.30-SNAPSHOT
5+
toolkitVersion=3.31-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mockitoKotlin = "5.4.0"
2525
mockk = "1.13.10"
2626
nimbus-jose-jwt = "9.40"
2727
node-gradle = "7.0.2"
28-
telemetryGenerator = "1.0.259"
28+
telemetryGenerator = "1.0.262"
2929
testLogger = "4.0.0"
3030
testRetry = "1.5.10"
3131
# test-only; platform provides slf4j transitively at runtime

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ class QGettingStartedContent(val project: Project) : Disposable {
6262
AmazonQToolWindow.getStarted(project)
6363
}
6464
}
65-
null
65+
66+
JBCefJSQuery.Response(null)
6667
}
6768
receiveMessageQuery.addHandler(handler)
6869
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ import com.intellij.openapi.util.Disposer
88
import com.intellij.ui.jcef.JBCefJSQuery
99
import org.cef.CefApp
1010
import software.aws.toolkits.jetbrains.services.amazonq.util.createBrowser
11-
import java.util.function.Function
12-
13-
typealias MessageReceiver = Function<String, JBCefJSQuery.Response>
1411

1512
/*
1613
Displays the web view for the Amazon Q tool window

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class BrowserConnector(
7777
private fun addMessageHook(browser: Browser) = callbackFlow {
7878
val handler = Function<String, Response> {
7979
trySend(it)
80-
null
80+
Response(null)
8181
}
8282

8383
browser.receiveMessageQuery.addHandler(handler)

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/controller/chat/telemetry/TelemetryHelper.kt

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,18 @@ class TelemetryHelper(private val context: AmazonQAppInitContext, private val se
102102
cwsprChatUserIntent = data.userIntent?.let { getTelemetryUserIntent(it) },
103103
cwsprChatHasCodeSnippet = data.activeFileContext.focusAreaContext?.codeSelection?.isNotEmpty() ?: false,
104104
cwsprChatProgrammingLanguage = data.activeFileContext.fileContext?.fileLanguage,
105-
cwsprChatActiveEditorTotalCharacters = data.activeFileContext.focusAreaContext?.codeSelection?.length,
106-
cwsprChatActiveEditorImportCount = data.activeFileContext.focusAreaContext?.codeNames?.fullyQualifiedNames?.used?.size,
107-
cwsprChatResponseCodeSnippetCount = numberOfCodeBlocks,
108-
cwsprChatResponseCode = statusCode,
109-
cwsprChatSourceLinkCount = response.relatedSuggestions?.size,
105+
cwsprChatActiveEditorTotalCharacters = data.activeFileContext.focusAreaContext?.codeSelection?.length?.toLong(),
106+
cwsprChatActiveEditorImportCount = data.activeFileContext.focusAreaContext?.codeNames?.fullyQualifiedNames?.used?.size?.toLong(),
107+
cwsprChatResponseCodeSnippetCount = numberOfCodeBlocks.toLong(),
108+
cwsprChatResponseCode = statusCode.toLong(),
109+
cwsprChatSourceLinkCount = response.relatedSuggestions?.size?.toLong(),
110110
cwsprChatReferencesCount = 0, // TODO
111-
cwsprChatFollowUpCount = response.followUps?.size,
112-
cwsprChatTimeToFirstChunk = getResponseStreamTimeToFirstChunk(response.tabId).toInt(),
111+
cwsprChatFollowUpCount = response.followUps?.size?.toLong(),
112+
cwsprChatTimeToFirstChunk = getResponseStreamTimeToFirstChunk(response.tabId).toLong(),
113113
cwsprChatTimeBetweenChunks = "[${getResponseStreamTimeBetweenChunks(response.tabId).joinToString(",")}]",
114-
cwsprChatFullResponseLatency = responseStreamTotalTime[response.tabId] ?: 0,
115-
cwsprChatRequestLength = data.message.length,
116-
cwsprChatResponseLength = responseLength,
114+
cwsprChatFullResponseLatency = responseStreamTotalTime[response.tabId]?.toLong() ?: 0,
115+
cwsprChatRequestLength = data.message.length.toLong(),
116+
cwsprChatResponseLength = responseLength.toLong(),
117117
cwsprChatConversationType = CwsprChatConversationType.Chat,
118118
credentialStartUrl = getStartUrl(context.project),
119119
codewhispererCustomizationArn = data.customization?.arn,
@@ -152,10 +152,10 @@ class TelemetryHelper(private val context: AmazonQAppInitContext, private val se
152152
cwsprChatUserIntent = data.userIntent?.let { getTelemetryUserIntent(it) },
153153
cwsprChatHasCodeSnippet = data.activeFileContext.focusAreaContext?.codeSelection?.isNotEmpty() ?: false,
154154
cwsprChatProgrammingLanguage = data.activeFileContext.fileContext?.fileLanguage,
155-
cwsprChatActiveEditorTotalCharacters = data.activeFileContext.focusAreaContext?.codeSelection?.length,
156-
cwsprChatActiveEditorImportCount = data.activeFileContext.focusAreaContext?.codeNames?.fullyQualifiedNames?.used?.size,
157-
cwsprChatResponseCode = responseCode,
158-
cwsprChatRequestLength = data.message.length,
155+
cwsprChatActiveEditorTotalCharacters = data.activeFileContext.focusAreaContext?.codeSelection?.length?.toLong(),
156+
cwsprChatActiveEditorImportCount = data.activeFileContext.focusAreaContext?.codeNames?.fullyQualifiedNames?.used?.size?.toLong(),
157+
cwsprChatResponseCode = responseCode.toLong(),
158+
cwsprChatRequestLength = data.message.length.toLong(),
159159
cwsprChatConversationType = CwsprChatConversationType.Chat,
160160
credentialStartUrl = getStartUrl(context.project)
161161
)
@@ -210,13 +210,14 @@ class TelemetryHelper(private val context: AmazonQAppInitContext, private val se
210210
AmazonqTelemetry.interactWithMessage(
211211
cwsprChatConversationId = getConversationId(message.tabId).orEmpty(),
212212
cwsprChatMessageId = message.messageId,
213+
cwsprChatUserIntent = message.userIntent?.let { getTelemetryUserIntent(it) },
213214
cwsprChatInteractionType = CwsprChatInteractionType.CopySnippet,
214-
cwsprChatAcceptedCharactersLength = message.code.length,
215+
cwsprChatAcceptedCharactersLength = message.code.length.toLong(),
215216
cwsprChatInteractionTarget = message.insertionTargetType,
216217
cwsprChatHasReference = null,
217218
credentialStartUrl = getStartUrl(context.project),
218-
cwsprChatCodeBlockIndex = message.codeBlockIndex,
219-
cwsprChatTotalCodeBlocks = message.totalCodeBlocks,
219+
cwsprChatCodeBlockIndex = message.codeBlockIndex?.toLong(),
220+
cwsprChatTotalCodeBlocks = message.totalCodeBlocks?.toLong(),
220221
cwsprChatHasProjectContext = getMessageHasProjectContext(message.messageId)
221222
)
222223
ChatInteractWithMessageEvent.builder().apply {
@@ -233,14 +234,15 @@ class TelemetryHelper(private val context: AmazonQAppInitContext, private val se
233234
AmazonqTelemetry.interactWithMessage(
234235
cwsprChatConversationId = getConversationId(message.tabId).orEmpty(),
235236
cwsprChatMessageId = message.messageId,
237+
cwsprChatUserIntent = message.userIntent?.let { getTelemetryUserIntent(it) },
236238
cwsprChatInteractionType = CwsprChatInteractionType.InsertAtCursor,
237-
cwsprChatAcceptedCharactersLength = message.code.length,
238-
cwsprChatAcceptedNumberOfLines = message.code.lines().size,
239+
cwsprChatAcceptedCharactersLength = message.code.length.toLong(),
240+
cwsprChatAcceptedNumberOfLines = message.code.lines().size.toLong(),
239241
cwsprChatInteractionTarget = message.insertionTargetType,
240242
cwsprChatHasReference = null,
241243
credentialStartUrl = getStartUrl(context.project),
242-
cwsprChatCodeBlockIndex = message.codeBlockIndex,
243-
cwsprChatTotalCodeBlocks = message.totalCodeBlocks,
244+
cwsprChatCodeBlockIndex = message.codeBlockIndex?.toLong(),
245+
cwsprChatTotalCodeBlocks = message.totalCodeBlocks?.toLong(),
244246
cwsprChatHasProjectContext = getMessageHasProjectContext(message.messageId)
245247
)
246248
ChatInteractWithMessageEvent.builder().apply {
@@ -422,11 +424,11 @@ class TelemetryHelper(private val context: AmazonQAppInitContext, private val se
422424
AmazonqTelemetry.indexWorkspace(
423425
project = null,
424426
duration = duration,
425-
amazonqIndexFileCount = fileCount,
426-
amazonqIndexFileSizeInMB = fileSize,
427+
amazonqIndexFileCount = fileCount.toLong(),
428+
amazonqIndexFileSizeInMB = fileSize.toLong(),
427429
success = isSuccess,
428-
amazonqIndexMemoryUsageInMB = memoryUsage,
429-
amazonqIndexCpuUsagePercentage = cpuUsage,
430+
amazonqIndexMemoryUsageInMB = memoryUsage?.toLong(),
431+
amazonqIndexCpuUsagePercentage = cpuUsage?.toLong(),
430432
credentialStartUrl = startUrl
431433
)
432434
}

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/editor/context/project/manifest/ManifestManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import software.aws.toolkits.jetbrains.core.getTextFromUrl
1515

1616
class ManifestManager {
1717
private val cloudFrontUrl = "https://aws-toolkit-language-servers.amazonaws.com/q-context/manifest.json"
18-
val currentVersion = "0.1.9"
18+
val currentVersion = "0.1.10"
1919
val currentOs = getOs()
2020
private val arch = CpuArch.CURRENT
2121
private val mapper = jacksonObjectMapper()

0 commit comments

Comments
 (0)