Skip to content

Commit 60bf703

Browse files
authored
fix(amazonq): fix deserialization failure from workspace context chunks (#5539)
`@JsonIgnoreProperties` should be a class-level annotation
1 parent ab902a3 commit 60bf703

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Fix issue where Amazon Q cannot process chunks from local `@workspace` context"
4+
}

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/project/ProjectContextProvider.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
7474
)
7575

7676
// TODO: move to LspMessage.kt
77+
@JsonIgnoreProperties(ignoreUnknown = true)
7778
data class Usage(
78-
@JsonIgnoreProperties(ignoreUnknown = true)
7979
@JsonProperty("memoryUsage")
8080
val memoryUsage: Int? = null,
8181
@JsonProperty("cpuUsage")
8282
val cpuUsage: Int? = null,
8383
)
8484

8585
// TODO: move to LspMessage.kt
86+
@JsonIgnoreProperties(ignoreUnknown = true)
8687
data class Chunk(
87-
@JsonIgnoreProperties(ignoreUnknown = true)
8888
@JsonProperty("filePath")
8989
val filePath: String? = null,
9090
@JsonProperty("content")

0 commit comments

Comments
 (0)