Skip to content

Commit b6f5cd2

Browse files
committed
Merge branch 'main' into regionExpansion_fixlaunch
# Conflicts: # plugins/core/sdk-codegen/codegen-resources/codewhispererstreaming/service-2.json
2 parents 1673db3 + 5f35e4d commit b6f5cd2

File tree

15 files changed

+75
-10
lines changed

15 files changed

+75
-10
lines changed

.changes/3.65.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"date" : "2025-04-10",
3+
"version" : "3.65",
4+
"entries" : [ {
5+
"type" : "bugfix",
6+
"description" : "Fix issue where Amazon Q cannot process chunks from local `@workspace` context"
7+
} ]
8+
}

.changes/next-release/bugfix-00947041-108c-4ef1-bec6-eb749dae7c2f.json

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "feature",
3+
"description" : "The logs emitted by the Agent during user command execution will be accepted and written to `.amazonq/dev/run_command.log` file in the user's local repository."
4+
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# _3.64_ (2025-04-10)
22
- **(Bug Fix)** Fix issue where IDE freezes when logging into Amazon Q
33

4+
# _3.65_ (2025-04-10)
5+
- **(Bug Fix)** Fix issue where Amazon Q cannot process chunks from local `@workspace` context
6+
47
# _3.63_ (2025-04-08)
58
- **(Feature)** Enterprise users can choose their preferred Amazon Q profile to improve personalization and workflow across different business regions
69
- **(Bug Fix)** Amazon Q /doc: close diff tab and open README file in preview mode after user accept changes

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.65-SNAPSHOT
5+
toolkitVersion=3.66-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class QWebviewBrowser(val project: Project, private val parentDisposable: Dispos
227227
}
228228

229229
is BrowserMessage.PublishWebviewTelemetry -> {
230-
publishTelemetry(message)
230+
// publishTelemetry(message)
231231
}
232232

233233
is BrowserMessage.OpenUrl -> {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class AmazonQToolWindowFactory : ToolWindowFactory, DumbAware {
8686
override fun onChange(providerId: String, newScopes: List<String>?) {
8787
if (ToolkitConnectionManager.getInstance(project).connectionStateForFeature(QConnection.getInstance()) == BearerTokenAuthState.AUTHORIZED) {
8888
AmazonQToolWindow.getInstance(project).disposeAndRecreate()
89-
qPanel.setContent(AmazonQToolWindow.getInstance(project).component)
89+
prepareChatContent(project, qPanel)
9090
}
9191
}
9292
}

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/session/CodeGenerationState.kt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import software.aws.toolkits.telemetry.MetricResult
3030
import java.util.UUID
3131

3232
private val logger = getLogger<CodeGenerationState>()
33+
private const val RUN_COMMAND_LOG_PATH = ".amazonq/dev/run_command.log"
3334

3435
class CodeGenerationState(
3536
override val tabID: String,
@@ -211,9 +212,23 @@ private suspend fun CodeGenerationState.generateCode(
211212
conversationId = config.conversationId,
212213
)
213214

214-
val newFileInfo = registerNewFiles(newFileContents = codeGenerationStreamResult.new_file_contents)
215-
val deletedFileInfo = registerDeletedFiles(deletedFiles = codeGenerationStreamResult.deleted_files)
215+
val fileContents = codeGenerationStreamResult.new_file_contents.filterKeys { file ->
216+
if (file.endsWith(RUN_COMMAND_LOG_PATH)) {
217+
val contents: String = codeGenerationStreamResult.new_file_contents[file].orEmpty()
218+
val truncatedContents = if (contents.length > 10000000) {
219+
contents.substring(0, 10000000)
220+
} else {
221+
contents
222+
}
223+
logger.info(truncatedContents) { "Run command log: $truncatedContents" }
224+
false
225+
} else {
226+
true
227+
}
228+
}
216229

230+
val newFileInfo = registerNewFiles(newFileContents = fileContents)
231+
val deletedFileInfo = registerDeletedFiles(deletedFiles = codeGenerationStreamResult.deleted_files)
217232
return CodeGenerationResult(
218233
newFiles = newFileInfo,
219234
deletedFiles = deletedFileInfo,

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/clients/chat/v1/ChatSessionV1.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ class ChatSessionV1(
294294
UserIntent.EXPLAIN_CODE_SELECTION -> FollowUpType.ExplainInDetail
295295
UserIntent.UNKNOWN_TO_SDK_VERSION -> FollowUpType.Generated
296296
UserIntent.GENERATE_UNIT_TESTS -> FollowUpType.Generated
297+
UserIntent.GENERATE_CLOUDFORMATION_TEMPLATE -> FollowUpType.Generated
298+
UserIntent.CODE_GENERATION -> FollowUpType.Generated
297299
null -> FollowUpType.Generated
298300
}
299301

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class TelemetryHelper(private val project: Project, private val sessionStorage:
6464
UserIntent.EXPLAIN_CODE_SELECTION -> CwsprChatUserIntent.ExplainCodeSelection
6565
UserIntent.GENERATE_UNIT_TESTS -> CwsprChatUserIntent.GenerateUnitTests
6666
UserIntent.UNKNOWN_TO_SDK_VERSION -> CwsprChatUserIntent.Unknown
67+
UserIntent.GENERATE_CLOUDFORMATION_TEMPLATE -> CwsprChatUserIntent.Unknown
68+
UserIntent.CODE_GENERATION -> CwsprChatUserIntent.Unknown
6769
}
6870

6971
private fun getTelemetryTriggerType(triggerType: TriggerType): CwsprChatTriggerInteraction = when (triggerType) {

0 commit comments

Comments
 (0)