Skip to content

Commit 343be58

Browse files
juusticeTGJuusticeTmanodnyab
authored
feat(Amazonq): Remove forced read-only view from before diff on agent code changes + Increase polling rate for Q agent code summary (#5015)
* feat(amazonq) Increase polling rate for Q agent code summary * Adjusted CodeGenerationStateTest to be aligned with new polling rate * Removed forced Read-Only view for before diff on Q code changes * Reverting remove read-only view change * fix(amazonq): Fixed syntax error in CodeGenerationStateTest * feat(Amazonq): Remove forced read-only view from before diff on agent code changess --------- Co-authored-by: JuusticeT <[email protected]> Co-authored-by: manodnyab <[email protected]>
1 parent f8d7360 commit 343be58

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "feature",
3+
"description" : "Remove read-only mode on before diff of code changes generated by agent"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "feature",
3+
"description" : "Provide more frequent updates about code changes made by agent"
4+
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import com.intellij.diff.DiffContentFactory
88
import com.intellij.diff.DiffManager
99
import com.intellij.diff.contents.EmptyContent
1010
import com.intellij.diff.requests.SimpleDiffRequest
11-
import com.intellij.diff.util.DiffUserDataKeys
1211
import com.intellij.ide.BrowserUtil
1312
import com.intellij.openapi.application.runInEdt
1413
import com.intellij.openapi.command.WriteCommandAction
@@ -225,7 +224,6 @@ class FeatureDevController(
225224
}
226225

227226
val request = SimpleDiffRequest(message.filePath, leftDiffContent, rightDiffContent, null, null)
228-
request.putUserData(DiffUserDataKeys.FORCE_READ_ONLY, true)
229227

230228
DiffManager.getInstance().showDiff(project, request)
231229
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ private suspend fun CodeGenerationState.generateCode(
140140
messenger: MessagePublisher,
141141
token: CancellationTokenSource?,
142142
): CodeGenerationResult {
143-
val pollCount = 180
144-
val requestDelay = 10000L
143+
val pollCount = 360
144+
val requestDelay = 5000L
145145

146146
repeat(pollCount) {
147147
if (token?.token?.isCancellationRequested() == true) {

plugins/amazonq/chat/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/session/CodeGenerationStateTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class CodeGenerationStateTest : FeatureDevTestBase() {
163163
assertThat(actual.interaction.content).isEqualTo("")
164164
}
165165

166-
verify(exactly = 180) { featureDevService.getTaskAssistCodeGeneration(testConversationId, codeGenerationId) }
166+
verify(exactly = 360) { featureDevService.getTaskAssistCodeGeneration(testConversationId, codeGenerationId) }
167167
coVerify(exactly = 0) { featureDevService.exportTaskAssistArchiveResult(testConversationId) }
168168
}
169169
}

0 commit comments

Comments
 (0)