-
Notifications
You must be signed in to change notification settings - Fork 748
fix(amazonq): inline suggestion scrolling now uses built-in VSC commands. #7323
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
Hweinstock
merged 7 commits into
aws:feature/flare-inline
from
Hweinstock:fix/suggestions
May 16, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b63185c
fix: avoid relying on session state
Hweinstock 7f5f9b7
cleanup: remove unused session logic
Hweinstock 4554067
test: delete outdated tests
Hweinstock 8c93836
refactor: remove noisy logs
Hweinstock 0165fc8
fix: don't apply codelense to each item
Hweinstock 2fdbb84
test: remove inline refrence codelense from tests
Hweinstock d2072d2
refactor: simplify cases
Hweinstock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
cc @zixlin7 was this stuff added to support inline completions that come after the initial request? or is it no longer needed? As far as I can see from the demo we still have pagination
Uh oh!
There was an error while loading. Please reload this page.
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.
My understanding of the old implementation is that we fetch all the suggestions, add them to the session, and then request them from the session one at a time (by triggering the
provideInlineCompletionvia overwriting the scroll commands). This is where the state tracking comes in to manage what the "active" suggestion is. We also add 'placeholder' items so that VSC knows we can scroll.Since we're fetching all the suggestions anyway, we can return those directly and avoid 'placeholder' items, and additional triggers of
provideInlineCompletion.However, I don't have all the context on the original reason for this decision.
When testing this, I also noticed a slight bug on current prod where it always shows were on suggestion 1, even when we scroll.
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.
Checked with Zoe and sounds like this is a hack to handle the codelenses for references and imports.