Skip to content

Commit 33d4e08

Browse files
committed
test fix
1 parent d994940 commit 33d4e08

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererInvocationStatusNew.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class CodeWhispererInvocationStatusNew {
5656
}
5757

5858
fun hasEnoughDelayToShowCodeWhisperer(): Boolean {
59-
val timeCanShowCodeWhisperer = timeAtLastDocumentChanged.plusMillis(CodeWhispererConstants.POPUP_DELAY)
59+
val timeCanShowCodeWhisperer = timeAtLastDocumentChanged.plusMillis(50)
6060
return timeCanShowCodeWhisperer.isBefore(Instant.now())
6161
}
6262

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/CodeWhispererConstants.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import software.amazon.awssdk.regions.Region
1010
import software.amazon.awssdk.services.codewhispererruntime.model.AccessDeniedException
1111
import software.amazon.awssdk.services.codewhispererruntime.model.CodeWhispererRuntimeException
1212
import software.aws.toolkits.jetbrains.services.codewhisperer.language.languages.CodeWhispererJava
13-
import software.aws.toolkits.jetbrains.services.codewhisperer.service.CodeWhispererFeatureConfigService
1413
import software.aws.toolkits.telemetry.CodewhispererGettingStartedTask
1514
import java.awt.Font
1615
import java.text.SimpleDateFormat
@@ -28,12 +27,7 @@ object CodeWhispererConstants {
2827
const val LEFT_CONTEXT_ON_CURRENT_LINE = 50
2928
const val POPUP_INFO_TEXT_SIZE = 11f
3029
const val POPUP_BUTTON_TEXT_SIZE = 12f
31-
val POPUP_DELAY: Long =
32-
if (CodeWhispererFeatureConfigService.getInstance().getNewAutoTriggerUX()) {
33-
50
34-
} else {
35-
250
36-
}
30+
val POPUP_DELAY: Long = 250
3731
const val POPUP_DELAY_CHECK_INTERVAL: Long = 25
3832
const val IDLE_TIME_CHECK_INTERVAL: Long = 25
3933
const val SUPPLEMENTAL_CONTEXT_TIMEOUT = 50L

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class CodeWhispererRecommendationManagerTest {
7575
val userInput = ""
7676
sut.stub {
7777
onGeneric { findRightContextOverlap(any<RequestContext>(), any<Completion>()) } doReturn "}"
78-
onGeneric { reformatReference(any(), any()) } doReturn aCompletion("def")
78+
onGeneric { reformatReference(any<RequestContext>(), any()) } doReturn aCompletion("def")
7979
}
8080
val detail = sut.buildDetailContext(
8181
aRequestContext(project),

0 commit comments

Comments
 (0)