Skip to content

Commit ec60955

Browse files
authored
Merge pull request #5606 from aws/autoMerge/feature/q-lsp-chat
Merge main into feature/q-lsp-chat
2 parents 6f4907c + 28be190 commit ec60955

File tree

15 files changed

+172
-87
lines changed

15 files changed

+172
-87
lines changed

.changes/3.67.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"date" : "2025-04-18",
3+
"version" : "3.67",
4+
"entries" : [ {
5+
"type" : "bugfix",
6+
"description" : "Amazon Q: Customization now resets with a warning if unavailable in the selected profile."
7+
}, {
8+
"type" : "bugfix",
9+
"description" : "Q panel will get stuck while signin if users have multiple windows"
10+
}, {
11+
"type" : "bugfix",
12+
"description" : "Fix integer overflow when local context index input is larger than 2GB"
13+
}, {
14+
"type" : "bugfix",
15+
"description" : "Fix workspace index process quits when hitting a race condition"
16+
}, {
17+
"type" : "bugfix",
18+
"description" : "Fix infinite loop when workspace indexing server fails to initialize"
19+
} ]
20+
}

.changes/next-release/bugfix-a70cb565-5de8-4302-9f1e-71925f78061b.json

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

.changes/next-release/bugfix-afb46d2b-24c7-48be-94b1-02a7f56cbde0.json

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

.changes/next-release/bugfix-f31946b6-3709-44a5-b23f-9fa202bd5cb5.json

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

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# _3.67_ (2025-04-18)
2+
- **(Bug Fix)** Amazon Q: Customization now resets with a warning if unavailable in the selected profile.
3+
- **(Bug Fix)** Q panel will get stuck while signin if users have multiple windows
4+
- **(Bug Fix)** Fix integer overflow when local context index input is larger than 2GB
5+
- **(Bug Fix)** Fix workspace index process quits when hitting a race condition
6+
- **(Bug Fix)** Fix infinite loop when workspace indexing server fails to initialize
7+
18
# _3.66_ (2025-04-11)
29
- **(Feature)** 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.
310
- **(Bug Fix)** Unit test generation now completes successfully when using the `/test` command

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.67-SNAPSHOT
5+
toolkitVersion=3.68-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/settings/CodeWhispererConfigurable.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class CodeWhispererConfigurable(private val project: Project) :
169169

170170
row(message("aws.settings.codewhisperer.project_context_index_thread")) {
171171
intTextField(
172-
range = IntRange(0, 50)
172+
range = CodeWhispererSettings.CONTEXT_INDEX_THREADS
173173
).bindIntText(codeWhispererSettings::getProjectContextIndexThreadCount, codeWhispererSettings::setProjectContextIndexThreadCount)
174174
.apply {
175175
connect.subscribe(
@@ -186,7 +186,7 @@ class CodeWhispererConfigurable(private val project: Project) :
186186

187187
row(message("aws.settings.codewhisperer.project_context_index_max_size")) {
188188
intTextField(
189-
range = IntRange(1, 4096)
189+
range = CodeWhispererSettings.CONTEXT_INDEX_SIZE
190190
).bindIntText(codeWhispererSettings::getProjectContextIndexMaxSize, codeWhispererSettings::setProjectContextIndexMaxSize)
191191
.apply {
192192
connect.subscribe(

plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererSettingsTest.kt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,41 @@ class CodeWhispererSettingsTest : CodeWhispererTestBase() {
220220
assertThat(actual.autoBuildSetting["project1"]).isTrue()
221221
}
222222

223+
@Test
224+
fun `context thread count is returned in range`() {
225+
val sut = CodeWhispererSettings.getInstance()
226+
227+
mapOf(
228+
1 to 1,
229+
0 to 0,
230+
-1 to 0,
231+
123 to 50,
232+
50 to 50,
233+
51 to 50,
234+
).forEach { s, expected ->
235+
sut.setProjectContextIndexThreadCount(s)
236+
assertThat(sut.getProjectContextIndexThreadCount()).isEqualTo(expected)
237+
}
238+
}
239+
240+
@Test
241+
fun `context index size is returned in range`() {
242+
val sut = CodeWhispererSettings.getInstance()
243+
244+
mapOf(
245+
1 to 1,
246+
0 to 1,
247+
-1 to 1,
248+
123 to 123,
249+
2047 to 2047,
250+
4096 to 4096,
251+
4097 to 4096,
252+
).forEach { s, expected ->
253+
sut.setProjectContextIndexMaxSize(s)
254+
assertThat(sut.getProjectContextIndexMaxSize()).isEqualTo(expected)
255+
}
256+
}
257+
223258
@Test
224259
fun `toggleMetricOptIn should trigger LSP didChangeConfiguration`() {
225260
mockkObject(AmazonQLspService)

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,5 @@ dependencies {
2222
implementation(libs.commons.collections)
2323
implementation(libs.nimbus.jose.jwt)
2424

25-
// FIX_WHEN_MIN_IS_242
26-
if (providers.gradleProperty("ideProfileName").get() == "2024.1") {
27-
implementation("org.eclipse.lsp4j:org.eclipse.lsp4j:0.24.0")
28-
}
29-
3025
testFixturesApi(testFixtures(project(":plugin-core:jetbrains-community")))
3126
}

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageServer.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import org.eclipse.lsp4j.jsonrpc.services.JsonRequest
99
import org.eclipse.lsp4j.services.LanguageServer
1010
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.GetConfigurationFromServerParams
1111
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.LspServerConfigurations
12+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.UpdateConfigurationParams
1213
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.EncryptedChatParams
1314
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.credentials.UpdateCredentialsPayload
1415
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.dependencies.DidChangeDependencyPathsParams
@@ -31,6 +32,9 @@ interface AmazonQLanguageServer : LanguageServer {
3132
@JsonRequest("aws/getConfigurationFromServer")
3233
fun getConfigurationFromServer(params: GetConfigurationFromServerParams): CompletableFuture<LspServerConfigurations>
3334

35+
@JsonRequest("aws/updateConfiguration")
36+
fun updateConfiguration(params: UpdateConfigurationParams): CompletableFuture<LspServerConfigurations>
37+
3438
@JsonRequest("aws/chat/sendChatPrompt")
3539
fun sendChatPrompt(params: EncryptedChatParams): CompletableFuture<String>
3640
}

0 commit comments

Comments
 (0)