-
Notifications
You must be signed in to change notification settings - Fork 275
fix(amazonq): Change JB's behavior back to blocking auto trigger #5978
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a non-cancellable inline completion system with session persistence for Amazon Q CodeWhisperer. The changes ensure that completion suggestions are preserved across display sessions and delivered even if the original session is cancelled.
- Implements non-cancellable completion requests using
NonCancellablecontext - Adds session persistence through
activeTriggerSessionsmap to preserve suggestions across invalidated sessions - Modifies telemetry and event handling to work with cross-session suggestion display
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| CodeWhispererTelemetryService.kt | Updates telemetry logging to include trigger session ID and adds TODO for user input length |
| QInlineCompletionProvider.kt | Main implementation of non-cancellable completion with session persistence and cross-session variant handling |
| QManualCall.kt (src-243+) | Adds isIntelliSense() extension function for event type detection |
| QManualCall.kt (src-242) | Adds isIntelliSense() extension function for event type detection in older IDE version |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...rc/software/aws/toolkits/jetbrains/services/codewhisperer/popup/QInlineCompletionProvider.kt
Outdated
Show resolved
Hide resolved
...rc/software/aws/toolkits/jetbrains/services/codewhisperer/popup/QInlineCompletionProvider.kt
Show resolved
Hide resolved
...rc/software/aws/toolkits/jetbrains/services/codewhisperer/popup/QInlineCompletionProvider.kt
Show resolved
Hide resolved
...rc/software/aws/toolkits/jetbrains/services/codewhisperer/popup/QInlineCompletionProvider.kt
Outdated
Show resolved
Hide resolved
…/aws/toolkits/jetbrains/services/codewhisperer/popup/QInlineCompletionProvider.kt Co-authored-by: Copilot <[email protected]>
…/aws/toolkits/jetbrains/services/codewhisperer/popup/QInlineCompletionProvider.kt Co-authored-by: Copilot <[email protected]>
Non-Cancellable Inline Completion with Session Persistence
These two commits implemented a non-cancellable inline completion system that preserves suggestions across display sessions:
Key Changes:
Added NonCancellable context: Wrapped getSuggestion with NonCancellable to prevent completion requests from being cancelled mid-execution
Implemented session persistence: Maintained activeTriggerSessions map to preserve suggestions from previous trigger sessions that were disposed before completion
Cross-session suggestion display: When a display session is invalidated, suggestions from activeTriggerSessions are carried forward to the next available display session via getVariants()
Asynchronous pagination: Made pagination non-blocking while ensuring suggestions are still delivered to future display sessions
Result: Inline completion suggestions are now guaranteed to be displayed even if the original display session is cancelled or disposed, ensuring users see all generated suggestions in the next available display session.
Types of changes
Description
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.