Skip to content

feat(amazonq): Prefetch next inline recommendation #5290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 155 commits into from
Feb 4, 2025

Conversation

evanliu048
Copy link
Contributor

Types of changes

  • New feature (non-breaking change which adds functionality)

Description

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:

  1. Automatic Prefetching: Introduced a function that calls the CodeWhisperer API to fetch the next recommendation while the current one is being reviewed.
  2. Session Promotion Added functionality to display the next recommendation instantly upon accepting the current recommendation (if there is one)
  3. 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.

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@evanliu048 evanliu048 requested a review from manodnyab February 3, 2025 20:34
}
val nextRecommendationContext = RecommendationContext(detailContexts, "", "", newVisualPosition)
val newPopup = withContext(EDT) {
JBPopupFactory.getInstance().createMessage("Dummy popup")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we just handle the case where there is no prior popup there?

@evanliu048 evanliu048 requested a review from rli February 4, 2025 19:04
@rli rli merged commit 805cb39 into aws:main Feb 4, 2025
2 of 8 checks passed
KevinDing1 pushed a commit to KevinDing1/aws-toolkit-jetbrains that referenced this pull request Feb 6, 2025
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.
evanliu048 added a commit to evanliu048/aws-toolkit-jetbrains that referenced this pull request Feb 12, 2025
rli pushed a commit that referenced this pull request Feb 13, 2025
Will-ShaoHua added a commit that referenced this pull request Feb 14, 2025
… client from AwsClientManager (#5331)

* No need to store a client as a state within this class, AwsClientManager already handle the connection change

resolving comments #5290 (comment)
gandhi-21 pushed a commit to gandhi-21/aws-toolkit-jetbrains that referenced this pull request Feb 26, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants