-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various improvements to CodeWhisperer codebase (#3823)
1. Refactor some duplicated code 2. Refactor some condition checking logic to improve readiability 3. Moved some of the states from RecommendationHandler to CodeWhisperer session since they are session scope(continued work), as well as removed some others that are not needed. 4. Fixed an issue where CodeWhisperer would try to get editor context (left/right context) for every request within a trigger session. These info only need to be retrieved once in the beginning of the session. 5. Fixed an issue where CodeWhisperer would try to use the language type of the current editor for sending telemetry; There could be cases when the current editor is no longer the original editor where invocation happens, leading to the telemetry to have the incorrect language type. 6. Fixed an issue where CodeWhisperer would keep stale suggestions as global states after the pagination has been requested to cancel. Add a check right after the service response and return immediately if the current pagination session is cancelled. 7. Right before showing the inline suggestions, do a check for the current window focus state. If it's not focused, mark all suggestions as discarded and exit this session. 8. Created a CodeWhispererApplication class to managed some CW specific application-wide listeners/variables.
- Loading branch information
Showing
18 changed files
with
296 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.