Skip to content

Conversation

@samgst-amazon
Copy link
Contributor

Add q config section per: https://github.com/aws/language-servers/blob/780be3fdb92917e58524472ea5967f405f802db5/server/aws-lsp-codewhisperer/src/language-server/codeWhispererServer.ts#L629

Types of changes

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

Description

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.

@samgst-amazon samgst-amazon requested review from a team as code owners March 28, 2025 16:53
@samgst-amazon samgst-amazon changed the base branch from main to feature/q-lsp March 28, 2025 16:54
const val LSP_Q_CONFIGURATION_KEY = "aws.q"
const val LSP_OPT_OUT_TELEMETRY_CONFIGURATION_KEY = "optOutTelemetry"
const val LSP_ENABLE_TELEMETRY_EVENTS_CONFIGURATION_KEY = "enableTelemetryEventsToDestination"
const val LSP_CUSTOMIZATION_CONFIGURATION_KEY = "customization";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was not sure what value this was tracking -- on the server side I see
if (qConfig) { fallbackCodeWhispererService.customizationArn = textUtils.undefinedIfEmpty(qConfig.customization) codePercentageTracker.customizationArn = textUtils.undefinedIfEmpty(qConfig.customization)

Does this mean the customization value we are sending should just be this:

?

@SerializedName(AmazonQLspConstants.LSP_OPT_OUT_TELEMETRY_CONFIGURATION_KEY)
val optOutTelemetry: Boolean? = null,

@SerializedName(AmazonQLspConstants.LSP_ENABLE_TELEMETRY_EVENTS_CONFIGURATION_KEY)
Copy link
Contributor Author

@samgst-amazon samgst-amazon Mar 28, 2025

Choose a reason for hiding this comment

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

The flag enableTelemetryEventsToDestination is set to true temporarily. It's value will be determined through destination configuration post all events migration to STE. It'll be replaced by qConfig['enableTelemetryEventsToDestination'] === true

This is not currently being used but will be in future migrations. not exactly sure what it should be pointing to in current codebase

@github-actions
Copy link

github-actions bot commented Mar 28, 2025

Qodana Community for JVM

28 new problems were found

Inspection name Severity Problems
Usage of redundant or deprecated syntax or deprecated symbols 🔶 Warning 21
Extension class should be final and non-public 🔶 Warning 1
Serializable object must implement 'readResolve' 🔶 Warning 1
Boolean literal argument without parameter name ◽️ Notice 2
Const property naming convention ◽️ Notice 2
Variable declaration could be moved inside 'when' ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@samgst-amazon
Copy link
Contributor Author

/retryBuilds

@rli rli deleted the branch feature/q-lsp-chat April 18, 2025 19:44
@rli rli closed this Apr 18, 2025
@rli rli reopened this Apr 18, 2025
@rli rli changed the base branch from feature/q-lsp to main April 18, 2025 19:47
@rli rli changed the base branch from main to feature/q-lsp-chat April 22, 2025 17:57
 Conflicts:
	plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/credentials/CodeWhispererClientAdaptor.kt
	plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/customization/CodeWhispererCustomizationDialog.kt
	plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/customization/CodeWhispererModelConfigurator.kt
import software.amazon.awssdk.services.codewhispererruntime.model.CodeWhispererRuntimeException

object CustomizationConstants {
private const val noAccessToCustomizationMessage = "Your account is not authorized to use CodeWhisperer Enterprise."

Check notice

Code scanning / QDJVMC

Const property naming convention Note

Const property name noAccessToCustomizationMessage should not contain lowercase letters

object CustomizationConstants {
private const val noAccessToCustomizationMessage = "Your account is not authorized to use CodeWhisperer Enterprise."
private const val invalidCustomizationMessage = "You are not authorized to access"

Check notice

Code scanning / QDJVMC

Const property naming convention Note

Const property name invalidCustomizationMessage should not contain lowercase letters

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'message(String, vararg Any): String' is deprecated. Use extension-specific localization bundle instead
rowComment(
message(
"codewhisperer.custom.dialog.option.customization.description.no_customization",
"https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/customizations.html"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a const or do we expect this value to be updated?

Copy link
Contributor

Choose a reason for hiding this comment

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

honestly it should probably just be in the localization bundle

@rli rli merged commit 09b851f into feature/q-lsp-chat Apr 24, 2025
13 of 16 checks passed
@rli rli deleted the samgst/q-lsp-q-config-settings branch April 24, 2025 19:02
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