Skip to content

Commit 5ac379e

Browse files
authored
Merge branch 'main' into rli/remote-chat-wip
2 parents 6257981 + 325d1d7 commit 5ac379e

File tree

47 files changed

+911
-123
lines changed

Some content is hidden

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

47 files changed

+911
-123
lines changed

.changes/3.49.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"date" : "2025-01-17",
3+
"version" : "3.49",
4+
"entries" : [ {
5+
"type" : "bugfix",
6+
"description" : "/review: Improved success rate of code reviews for certain workspace configurations"
7+
} ]
8+
}

.changes/3.50.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"date" : "2025-01-23",
3+
"version" : "3.50",
4+
"entries" : [ {
5+
"type" : "feature",
6+
"description" : "Amazon Q: Updated `/help` command to include re:invent 2024 features"
7+
}, {
8+
"type" : "feature",
9+
"description" : "Amazon Q: UI improvements through more accurate code syntax highlighting"
10+
}, {
11+
"type" : "bugfix",
12+
"description" : "Fixed an issue where Amazon Q settings did not persist across IDE restarts"
13+
}, {
14+
"type" : "bugfix",
15+
"description" : "Amazon Q: Fix context menu displaying when typing `@`, even though input is disallowed"
16+
}, {
17+
"type" : "bugfix",
18+
"description" : "Amazon Q: Fix up/down history navigation only triggering on first/last line of prompt input"
19+
}, {
20+
"type" : "bugfix",
21+
"description" : "Amazon Q /doc: Ask for user prompt if error occurs while updating documentation"
22+
}, {
23+
"type" : "bugfix",
24+
"description" : "Amazon Q: cursor no longer jumps after navigating prompt history"
25+
}, {
26+
"type" : "bugfix",
27+
"description" : "Improve text description of workspace index settings"
28+
}, {
29+
"type" : "bugfix",
30+
"description" : "Amazon Q /doc: fix for user prompt to change folder in chat"
31+
}, {
32+
"type" : "bugfix",
33+
"description" : "Amazon Q Doc README diff will re-open when the README file is clicked after it has been closed"
34+
}, {
35+
"type" : "bugfix",
36+
"description" : "Amazon Q /test: Fix for test generation payload creation to not filter out target file."
37+
}, {
38+
"type" : "bugfix",
39+
"description" : "Amazon Q: word duplication when pressing tab on context selector fixed"
40+
} ]
41+
}

.changes/next-release/bugfix-02a84512-83ae-4fbe-a527-292ba072e3e0.json

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

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# _3.50_ (2025-01-23)
2+
- **(Feature)** Amazon Q: Updated `/help` command to include re:invent 2024 features
3+
- **(Feature)** Amazon Q: UI improvements through more accurate code syntax highlighting
4+
- **(Bug Fix)** Fixed an issue where Amazon Q settings did not persist across IDE restarts
5+
- **(Bug Fix)** Amazon Q: Fix context menu displaying when typing `@`, even though input is disallowed
6+
- **(Bug Fix)** Amazon Q: Fix up/down history navigation only triggering on first/last line of prompt input
7+
- **(Bug Fix)** Amazon Q /doc: Ask for user prompt if error occurs while updating documentation
8+
- **(Bug Fix)** Amazon Q: cursor no longer jumps after navigating prompt history
9+
- **(Bug Fix)** Improve text description of workspace index settings
10+
- **(Bug Fix)** Amazon Q /doc: fix for user prompt to change folder in chat
11+
- **(Bug Fix)** Amazon Q Doc README diff will re-open when the README file is clicked after it has been closed
12+
- **(Bug Fix)** Amazon Q /test: Fix for test generation payload creation to not filter out target file.
13+
- **(Bug Fix)** Amazon Q: word duplication when pressing tab on context selector fixed
14+
15+
# _3.49_ (2025-01-17)
16+
- **(Bug Fix)** /review: Improved success rate of code reviews for certain workspace configurations
17+
118
# _3.48_ (2025-01-16)
219
- **(Feature)** Enhance Q inline completion context fetching for better suggestion quality
320
- **(Feature)** /doc: Add error message if updated README is too large

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.49-SNAPSHOT
5+
toolkitVersion=3.51-SNAPSHOT
66

77
# Publish Settings
88
publishToken=

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class AmazonQToolWindowFactory : ToolWindowFactory, DumbAware {
5858
}
5959
val contentManager = toolWindow.contentManager
6060

61-
project.messageBus.connect().subscribe(
61+
project.messageBus.connect(toolWindow.disposable).subscribe(
6262
ToolkitConnectionManagerListener.TOPIC,
6363
object : ToolkitConnectionManagerListener {
6464
override fun activeConnectionChanged(newConnection: ToolkitConnection?) {
@@ -67,7 +67,7 @@ class AmazonQToolWindowFactory : ToolWindowFactory, DumbAware {
6767
}
6868
)
6969

70-
project.messageBus.connect().subscribe(
70+
project.messageBus.connect(toolWindow.disposable).subscribe(
7171
RefreshQChatPanelButtonPressedListener.TOPIC,
7272
object : RefreshQChatPanelButtonPressedListener {
7373
override fun onRefresh() {
@@ -78,7 +78,7 @@ class AmazonQToolWindowFactory : ToolWindowFactory, DumbAware {
7878
}
7979
)
8080

81-
project.messageBus.connect().subscribe(
81+
project.messageBus.connect(toolWindow.disposable).subscribe(
8282
BearerTokenProviderListener.TOPIC,
8383
object : BearerTokenProviderListener {
8484
override fun onChange(providerId: String, newScopes: List<String>?) {

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeScan/controller/CodeScanChatHelper.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import software.aws.toolkits.jetbrains.services.amazonqCodeScan.messages.CodeSca
1111
import software.aws.toolkits.jetbrains.services.amazonqCodeScan.messages.CodeScanChatMessageContent
1212
import software.aws.toolkits.jetbrains.services.amazonqCodeScan.messages.UpdatePlaceholderMessage
1313
import software.aws.toolkits.jetbrains.services.amazonqCodeScan.storage.ChatSessionStorage
14+
import software.aws.toolkits.jetbrains.services.codewhisperer.telemetry.QFeatureEvent
15+
import software.aws.toolkits.jetbrains.services.codewhisperer.telemetry.broadcastQEvent
1416
import software.aws.toolkits.jetbrains.services.cwc.messages.ChatMessageType
1517
import java.util.UUID
1618

@@ -34,7 +36,7 @@ class CodeScanChatHelper(
3436
clearPreviousItemButtons: Boolean? = false,
3537
) {
3638
if (isInValidSession()) return
37-
39+
broadcastQEvent(QFeatureEvent.INVOCATION)
3840
messagePublisher.publish(
3941
CodeScanChatMessage(
4042
tabId = activeCodeScanTabId as String,

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/controller/CodeTestChatController.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.messages.sendA
7171
import software.aws.toolkits.jetbrains.services.codewhisperer.credentials.CodeWhispererClientAdaptor
7272
import software.aws.toolkits.jetbrains.services.codewhisperer.language.CodeWhispererProgrammingLanguage
7373
import software.aws.toolkits.jetbrains.services.codewhisperer.language.programmingLanguage
74+
import software.aws.toolkits.jetbrains.services.codewhisperer.telemetry.QFeatureEvent
75+
import software.aws.toolkits.jetbrains.services.codewhisperer.telemetry.broadcastQEvent
7476
import software.aws.toolkits.jetbrains.services.codewhisperer.toolwindow.CodeWhispererCodeReferenceManager
77+
import software.aws.toolkits.jetbrains.services.codewhisperer.util.isWithin
7578
import software.aws.toolkits.jetbrains.services.cwc.ChatConstants
7679
import software.aws.toolkits.jetbrains.services.cwc.clients.chat.model.ChatRequestData
7780
import software.aws.toolkits.jetbrains.services.cwc.clients.chat.model.TriggerType
@@ -277,7 +280,7 @@ class CodeTestChatController(
277280

278281
val requestData = ChatRequestData(
279282
tabId = session.tabId,
280-
message = "Generate unit tests for the following part of my code: ${message.prompt}",
283+
message = "Generate unit tests for the following part of my code: ${message.prompt.ifBlank { fileInfo.fileName }}",
281284
activeFileContext = activeFileContext,
282285
userIntent = UserIntent.GENERATE_UNIT_TESTS,
283286
triggerType = TriggerType.ContextMenu,
@@ -1176,7 +1179,7 @@ class CodeTestChatController(
11761179
filePath = activeFile.path,
11771180
fileName = activeFile.name,
11781181
fileLanguage = programmingLanguage,
1179-
fileInWorkspace = activeFile.path.startsWith(projectRoot.path)
1182+
fileInWorkspace = activeFile.isWithin(projectRoot)
11801183
)
11811184
} catch (e: Exception) {
11821185
LOG.debug { "Error checking active file: $e" }
@@ -1204,6 +1207,7 @@ class CodeTestChatController(
12041207
"Processing message: $message " +
12051208
"tabId: $tabId"
12061209
}
1210+
broadcastQEvent(QFeatureEvent.INVOCATION)
12071211
when (session.conversationState) {
12081212
ConversationState.WAITING_FOR_BUILD_COMMAND_INPUT -> handleBuildCommandInput(session, message)
12091213
ConversationState.WAITING_FOR_REGENERATE_INPUT -> handleRegenerateInput(session, message)

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33

44
package software.aws.toolkits.jetbrains.services.amazonqDoc
55

6+
import software.aws.toolkits.jetbrains.services.amazonqDoc.messages.FollowUp
7+
import software.aws.toolkits.jetbrains.services.amazonqDoc.messages.FollowUpStatusType
8+
import software.aws.toolkits.jetbrains.services.amazonqDoc.messages.FollowUpTypes
9+
import software.aws.toolkits.resources.message
10+
611
const val FEATURE_EVALUATION_PRODUCT_NAME = "DocGeneration"
712

813
const val FEATURE_NAME = "Amazon Q Documentation Generation"
@@ -25,3 +30,16 @@ enum class ModifySourceFolderErrorReason(
2530

2631
override fun toString(): String = reasonText
2732
}
33+
34+
val NEW_SESSION_FOLLOWUPS: List<FollowUp> = listOf(
35+
FollowUp(
36+
pillText = message("amazonqDoc.prompt.reject.new_task"),
37+
type = FollowUpTypes.NEW_TASK,
38+
status = FollowUpStatusType.Info
39+
),
40+
FollowUp(
41+
pillText = message("amazonqDoc.prompt.reject.close_session"),
42+
type = FollowUpTypes.CLOSE_SESSION,
43+
status = FollowUpStatusType.Info
44+
)
45+
)

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ package software.aws.toolkits.jetbrains.services.amazonqDoc
55

66
import software.aws.toolkits.resources.message
77

8-
open class DocException(override val message: String?, override val cause: Throwable? = null) : RuntimeException()
8+
open class DocException(
9+
override val message: String?,
10+
override val cause: Throwable? = null,
11+
val remainingIterations: Int? = null,
12+
) : RuntimeException()
913

1014
class ZipFileError(override val message: String, override val cause: Throwable?) : RuntimeException()
1115

1216
class CodeIterationLimitError(override val message: String, override val cause: Throwable?) : RuntimeException()
1317

14-
internal fun docServiceError(message: String?): Nothing =
15-
throw DocException(message)
16-
17-
internal fun codeGenerationFailedError(): Nothing =
18-
throw DocException(message("amazonqFeatureDev.code_generation.failed_generation"))
18+
internal fun docServiceError(message: String?, cause: Throwable? = null, remainingIterations: Int? = null): Nothing =
19+
throw DocException(message, cause, remainingIterations)
1920

2021
internal fun conversationIdNotFound(): Nothing =
2122
throw DocException(message("amazonqFeatureDev.exception.conversation_not_found"))

0 commit comments

Comments
 (0)