You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(amazonq): Prefetch next inline recommendation (#5290)
This PR introduces the ability for users to see the next recommendation immediately after accepting the current one, provided there is a subsequent recommendation available. The key enhancements include:
Automatic Prefetching: Introduced a function that calls the CodeWhisperer API to fetch the next recommendation while the current one is being reviewed.
Session Promotion Added functionality to display the next recommendation instantly upon accepting the current recommendation (if there is one)
Helper Utilities: Implemented helper functions to calculate the necessary file information for the next request and to send telemetry events related to the subsequent recommendation.
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/credentials/CodeWhispererClientAdaptor.kt
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/popup/CodeWhispererPopupListener.kt
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/popup/CodeWhispererPopupManager.kt
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryService.kt
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -459,6 +459,7 @@ class CodeWhispererTelemetryService {
459
459
sessionContext:SessionContext,
460
460
hasUserAccepted:Boolean,
461
461
popupShownTime:Duration? = null,
462
+
nextInvocationContext:InvocationContext? = null,
462
463
) {
463
464
val detailContexts = recommendationContext.details
464
465
val decisions = mutableListOf<CodewhispererSuggestionState>()
@@ -506,6 +507,19 @@ class CodeWhispererTelemetryService {
506
507
previousUserTriggerDecisions.add(this)
507
508
// we need this as well because AutotriggerService will reset the queue periodically
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererSettingsTest.kt
0 commit comments