Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erikayao93
Copy link

@erikayao93 erikayao93 commented Sep 5, 2024

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 to false if the config is not found.


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@erikayao93 erikayao93 requested a review from a team as a code owner September 5, 2024 16:46
Copy link

github-actions bot commented Sep 5, 2024

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.

@erikayao93 erikayao93 changed the title Add code reference opt-in config to non-SSO requests fix(amazonq): Add code reference opt-in config to non-SSO requests Sep 5, 2024
Copy link

github-actions bot commented Sep 5, 2024

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.

Copy link

@mr-lee mr-lee left a 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
Copy link

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?

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants