-
Notifications
You must be signed in to change notification settings - Fork 746
feat(amazonq): passing partialResultToken for the next trigger if user accepts an EDITS suggestion #7611
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
|
993e88c to
4b3da66
Compare
|
/retryBuilds |
|
/retryBuilds |
| languageClient.warn(`Error when getting suggestions: ${error}`) | ||
| } else { | ||
| // save editsStreakPartialResultToken for the next EDITS suggestion trigger if user accepts | ||
| this.sessionManager.updateActiveEditsStreakToken(result.partialResultToken) |
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.
This assumes the first result is an edit, but the check on line 120 is just for at one edit anywhere in the results. Is there some undocumented assumption here about how the results are returned? Even if there is, there should be checks in code that the assumptions hold.
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.
We can only return either EDITS or COMPLETIONS so if one item is EDITS, we should follow the EDITS flow.
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.
…r accepts EDITS suggestion
Problem
If it is an EDITS suggestion, only fetching for more suggestions when the user start to accept a suggestion. We need to pass partialResultToken to
provideInlineCompletionItemsmethod to fetch result from cache.Solution
passing partialResultToken for the next trigger if user accepts an EDITS suggestion
feature/xbranches will not be squash-merged at release time.