Skip to content
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

refactor(inline): Remove Dummy Popup Creation in Prefetch Flow and Ensure Session Validation #5323

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

evanliu048
Copy link
Contributor

@evanliu048 evanliu048 commented Feb 4, 2025

Description

This change removes the unnecessary creation of a dummy popup (JBPopup) in the CodeWhisperer prefetch flow. Instead, the popup field in InvocationContext is now nullable (JBPopup? = null). This ensures that prefetch logic does not create unused UI elements while maintaining compatibility with existing workflows.
reference: #5290

Additionally, it introduces session ID validation before prefetching recommendations, ensuring that only relevant recommendations are fetched.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

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

@evanliu048 evanliu048 requested a review from a team as a code owner February 4, 2025 23:22
@evanliu048 evanliu048 changed the title refactor(inline): Remove Dummy Popup Creation in Prefetch Flow refactor(inline): Remove Dummy Popup Creation in Prefetch Flow and Ensure Session Validation Feb 10, 2025
@evanliu048 evanliu048 requested a review from a team as a code owner February 10, 2025 23:43
Copy link
Contributor

@andrewyuq andrewyuq left a comment

Choose a reason for hiding this comment

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

I feel like it's ok to just create the another popup at nextInvocaationContext creation time and don't use it until when promoteNextInvocationIfAvailable is called

@evanliu048 evanliu048 marked this pull request as draft February 12, 2025 18:55
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.

2 participants