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

config(amazonq): default optin project context for internal users #5019

Merged
merged 12 commits into from
Nov 13, 2024

Conversation

Will-ShaoHua
Copy link
Contributor

@Will-ShaoHua Will-ShaoHua commented Oct 26, 2024

Description

aws/aws-toolkit-vscode#5856

Enable implicit @ workspace context for Amzn users

implicit workspace context denotes chat invocation without @workspace prefix
explicit workspace context denotes chat invocation with @workspace prefix

License

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

@Will-ShaoHua Will-ShaoHua requested review from a team as code owners October 26, 2024 17:10
@Will-ShaoHua Will-ShaoHua marked this pull request as draft October 26, 2024 17:13
@Will-ShaoHua Will-ShaoHua changed the title default optin project context for internal users config(amazonq): default optin project context for internal users Oct 28, 2024
@Will-ShaoHua Will-ShaoHua marked this pull request as ready for review November 11, 2024 20:42
@Will-ShaoHua Will-ShaoHua requested a review from leigaol November 12, 2024 23:23
@@ -30,6 +35,12 @@ class AmazonQStartupActivity : ProjectActivity {
override suspend fun execute(project: Project) {
if (ApplicationManager.getApplication().isUnitTestMode) return

ToolkitConnectionManager.getInstance(project).activeConnectionForFeature(QConnection.getInstance())?.let {
if (it is AwsBearerTokenConnection && isInternalUser(it.startUrl)) {
CodeWhispererSettings.getInstance().toggleProjectContextEnabled(true, passive = true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure this toggle only happens once

Copy link
Contributor

@leigaol leigaol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please manually test it E2E

@Will-ShaoHua Will-ShaoHua merged commit 6a1739d into aws:main Nov 13, 2024
12 of 13 checks passed
@Will-ShaoHua Will-ShaoHua deleted the enable-workspace-default branch November 13, 2024 21:07
dhasani23 pushed a commit to ntarakad-aws/aws-toolkit-jetbrains that referenced this pull request Nov 18, 2024
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.

4 participants