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

refactor(inline): move codewhispererConfigurable to shared module #5304

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Will-ShaoHua
Copy link
Contributor

@Will-ShaoHua Will-ShaoHua commented Jan 28, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Both CodeWhispererConfigurable and CodeWhispererSettings are supposed to live in shared module as they the amazon q settings panel which are shared accross different features like chat, inline or other features like code scan.
(CodeWhispererSettings has been already moved to share, thus this PR targets CodeWhispererConfigurable)

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

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

@Will-ShaoHua Will-ShaoHua requested a review from a team as a code owner January 28, 2025 07:40
import software.aws.toolkits.resources.message
import software.aws.toolkits.telemetry.AwsTelemetry

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

Remove deprecated symbol import
import software.aws.toolkits.resources.message
import software.aws.toolkits.telemetry.AwsTelemetry

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'AwsTelemetry' is deprecated. Use type-safe metric builders
@@ -16,6 +18,11 @@
override fun actionPerformed(e: AnActionEvent) {
val project = e.project ?: return

CodeWhispererExplorerActionManager.getInstance().setAutoSuggestion(project, false)
CodeWhispererExplorerActionManager.getInstance().setAutoSuggestion(false)
AwsTelemetry.modifySetting(

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'AwsTelemetry' is deprecated. Use type-safe metric builders
import software.aws.toolkits.resources.message
import software.aws.toolkits.telemetry.AwsTelemetry

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

Remove deprecated symbol import
import software.aws.toolkits.resources.message
import software.aws.toolkits.telemetry.AwsTelemetry

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'AwsTelemetry' is deprecated. Use type-safe metric builders
import software.aws.toolkits.resources.message
import software.aws.toolkits.telemetry.AwsTelemetry

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'AwsTelemetry' is deprecated. Use type-safe metric builders
@@ -16,6 +18,11 @@
override fun actionPerformed(e: AnActionEvent) {
val project = e.project ?: return

CodeWhispererExplorerActionManager.getInstance().setAutoSuggestion(project, true)
CodeWhispererExplorerActionManager.getInstance().setAutoSuggestion(true)
AwsTelemetry.modifySetting(

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'AwsTelemetry' is deprecated. Use type-safe metric builders
@@ -11,6 +11,7 @@
import software.aws.toolkits.jetbrains.services.codewhisperer.explorer.isUserBuilderId
import software.aws.toolkits.jetbrains.services.codewhisperer.util.CodeWhispererConstants
import software.aws.toolkits.resources.message
import software.aws.toolkits.telemetry.AwsTelemetry

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

Remove deprecated symbol import
@@ -11,6 +11,7 @@
import software.aws.toolkits.jetbrains.services.codewhisperer.explorer.isUserBuilderId
import software.aws.toolkits.jetbrains.services.codewhisperer.util.CodeWhispererConstants
import software.aws.toolkits.resources.message
import software.aws.toolkits.telemetry.AwsTelemetry

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'AwsTelemetry' is deprecated. Use type-safe metric builders
@@ -20,7 +21,12 @@
val project = e.project ?: return

val actionManager = CodeWhispererExplorerActionManager.getInstance()
actionManager.setAutoCodeScan(project, true)
actionManager.setAutoCodeScan(true)
AwsTelemetry.modifySetting(

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'AwsTelemetry' is deprecated. Use type-safe metric builders
@Will-ShaoHua Will-ShaoHua changed the title Cleanup 1 refactor(inline): CwsprExplorerActionManager Jan 28, 2025
@Will-ShaoHua Will-ShaoHua requested review from a team as code owners January 28, 2025 09:03
@Will-ShaoHua Will-ShaoHua changed the title refactor(inline): CwsprExplorerActionManager refactor(inline): move codewhispererConfigurable to shared module Jan 28, 2025
@Will-ShaoHua
Copy link
Contributor Author

todo: should rename to QConfigurable

@Will-ShaoHua Will-ShaoHua marked this pull request as draft January 28, 2025 10:18
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.

1 participant