Skip to content

Commit 890089d

Browse files
committed
Merge remote-tracking branch 'origin/main' into rli/add-otel
Conflicts: plugins/core/jetbrains-community/build.gradle.kts plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/services/telemetry/otel/OtelBase.kt plugins/core/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/telemetry/otel/OtelBaseTest.kt
2 parents 07018b2 + 06181dd commit 890089d

File tree

19 files changed

+168
-86
lines changed

19 files changed

+168
-86
lines changed

.changes/3.36.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"date" : "2024-10-30",
3+
"version" : "3.36",
4+
"entries" : [ {
5+
"type" : "bugfix",
6+
"description" : "Fix inline chat default key binding not working on windows and linux"
7+
} ]
8+
}

.changes/3.37.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"date" : "2024-10-31",
3+
"version" : "3.37",
4+
"entries" : [ {
5+
"type" : "bugfix",
6+
"description" : "Amazon Q /dev: Fix the issue resulting in the first request per conversation to /dev failing"
7+
}, {
8+
"type" : "bugfix",
9+
"description" : "Fix inline chat shortcut hint breaking text selection on remote editors"
10+
} ]
11+
}

.github/workflows/prerelease.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
- uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
23-
- name: remove unwanted dependencies
24-
run: |
25-
sudo rm -rf /usr/share/dotnet
26-
sudo rm -rf /opt/ghc
27-
sudo rm -rf "/usr/local/share/boost"
28-
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
23+
- name: Maximize Build Space
24+
if: runner.os == 'Linux'
25+
uses: jlumbroso/free-disk-space@main
26+
with:
27+
tool-cache: false
28+
large-packages: false
2929
- uses: actions/setup-java@v4
3030
with:
3131
distribution: 'corretto'

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# _3.37_ (2024-10-31)
2+
- **(Bug Fix)** Amazon Q /dev: Fix the issue resulting in the first request per conversation to /dev failing
3+
- **(Bug Fix)** Fix inline chat shortcut hint breaking text selection on remote editors
4+
5+
# _3.36_ (2024-10-30)
6+
- **(Bug Fix)** Fix inline chat default key binding not working on windows and linux
7+
18
# _3.35_ (2024-10-29)
29
- **(Feature)** Remove read-only mode on before diff of code changes generated by agent
310
- **(Feature)** Provide more frequent updates about code changes made by agent

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.36-SNAPSHOT
5+
toolkitVersion=3.38-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[versions]
22
apache-commons-collections = "4.4"
33
apache-commons-io = "2.16.0"
4+
apache-commons-text = "1.12.0"
45
assertJ = "3.26.3"
56
# match with <root>/settings.gradle.kts
67
awsSdk = "2.26.25"
@@ -70,6 +71,7 @@ aws-sts = { module = "software.amazon.awssdk:sts", version.ref = "awsSdk" }
7071
commonmark = { module = "org.commonmark:commonmark", version.ref = "commonmark" }
7172
commons-collections = { module = "org.apache.commons:commons-collections4", version.ref = "apache-commons-collections" }
7273
commons-io = { module = "commons-io:commons-io", version.ref = "apache-commons-io" }
74+
commons-text = {module = "org.apache.commons:commons-text", version.ref = "apache-commons-text"}
7375
detekt-api = { module = "io.gitlab.arturbosch.detekt:detekt-api", version.ref = "detekt" }
7476
detekt-formattingRules = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
7577
diff-util = { module = "io.github.java-diff-utils:java-diff-utils", version.ref = "diff-util" }

plugins/amazonq/chat/jetbrains-community/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dependencies {
2020
// everything references codewhisperer, which is not ideal
2121
implementation(project(":plugin-amazonq:codewhisperer:jetbrains-community"))
2222
implementation(libs.diff.util)
23+
implementation(libs.commons.text)
2324

2425
compileOnly(project(":plugin-core:jetbrains-community"))
2526

plugins/amazonq/chat/jetbrains-community/resources/META-INF/plugin-chat.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
factoryClass="software.aws.toolkits.jetbrains.services.amazonq.toolwindow.AmazonQToolWindowFactory" icon="AwsIcons.Logos.AWS_Q" />
2121

2222
<postStartupActivity implementation="software.aws.toolkits.jetbrains.services.amazonq.startup.AmazonQStartupActivity"/>
23+
<actionPromoter order="last" implementation="software.aws.toolkits.jetbrains.services.cwc.inline.InlineChatActionPromoter"/>
2324
</extensions>
2425

2526
<extensions defaultExtensionNs="amazon.q">

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/controller/FeatureDevControllerExtensions.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ suspend fun FeatureDevController.onCodeGeneration(
5050
message = message("amazonqFeatureDev.chat_message.requesting_changes"),
5151
messageType = FeatureDevMessageType.AnswerStream,
5252
)
53-
val state = session.sessionState
53+
var state = session.sessionState
5454

5555
var remainingIterations: Int? = state.codeGenerationRemainingIterationCount
5656
var totalIterations: Int? = state.codeGenerationTotalIterationCount
@@ -64,6 +64,8 @@ suspend fun FeatureDevController.onCodeGeneration(
6464

6565
session.send(message) // Trigger code generation
6666

67+
state = session.sessionState
68+
6769
var filePaths: List<NewFileZipInfo> = emptyList()
6870
var deletedFiles: List<DeletedFileInfo> = emptyList()
6971
var references: List<CodeReferenceGenerated> = emptyList()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.cwc.inline
5+
6+
import com.intellij.openapi.actionSystem.ActionPromoter
7+
import com.intellij.openapi.actionSystem.AnAction
8+
import com.intellij.openapi.actionSystem.CommonDataKeys
9+
import com.intellij.openapi.actionSystem.DataContext
10+
import com.intellij.openapi.keymap.KeymapUtil
11+
import com.intellij.openapi.util.SystemInfo
12+
13+
class InlineChatActionPromoter : ActionPromoter {
14+
// temporary until we find a better key binding
15+
override fun promote(actions: MutableList<out AnAction>, context: DataContext): MutableList<AnAction> {
16+
val results = actions.toMutableList()
17+
if (context.getData(CommonDataKeys.EDITOR) == null ||
18+
context.getData(CommonDataKeys.PROJECT) == null
19+
) {
20+
return results
21+
}
22+
val shortCut = KeymapUtil.getShortcutText("aws.toolkit.jetbrains.core.services.cwc.inline.openChat")
23+
// only promote for the default key bindings
24+
if (SystemInfo.isMac && shortCut != "⌘I") return results
25+
if (!SystemInfo.isMac && shortCut != "Ctrl+I") return results
26+
27+
results.sortWith { a, b ->
28+
when {
29+
isOpenChatInputAction(a) -> -1
30+
isOpenChatInputAction(b) -> 1
31+
else -> 0
32+
}
33+
}
34+
return results
35+
}
36+
37+
private fun isOpenChatInputAction(action: AnAction): Boolean =
38+
action is OpenChatInputAction
39+
}

0 commit comments

Comments
 (0)