-
Notifications
You must be signed in to change notification settings - Fork 436
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
fix(amazonq): Add code reference opt-in config to non-SSO requests #5551
base: master
Are you sure you want to change the base?
Conversation
This pull request modifies files in src/ but no tests were added/updated. Confirm whether tests should be added or ensure the PR description explains why tests are not required. |
This pull request modifies a feature or fixes a bug, but it does not include a changelog entry. All pull requests that introduce new features or bug fixes must have a corresponding changelog item describing the changes. |
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.
Approving with a nitpick.
export async function buildGenerateRecommendationRequest(editor: vscode.TextEditor): Promise<{ | ||
export async function buildGenerateRecommendationRequest( | ||
editor: vscode.TextEditor, | ||
allowCodeWithReference: boolean |
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.
nit - align it with the API definition - allowRecommendationsWithReferences
?
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.
I based it off of the same parameter in buildListRecommendationRequest
here
Problem
Without an SSO connection, code suggestions may still have references even if they have opted out in their settings.
Solution
When generating a recommendation request, always provide the
isSuggestionsWithCodeReferencesEnabled
flag from configuration. This will default tofalse
if the config is not found.License: I confirm that my contribution is made under the terms of the Apache 2.0 license.