-
Notifications
You must be signed in to change notification settings - Fork 262
feat(amazonQ): LSP -- Implement Initialize message #5367
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1733ef8
add InitializeParams
samgst-amazon 139af94
workspace folders
samgst-amazon 1670212
lint
samgst-amazon add8d41
add timeout to initialize()
samgst-amazon ee0b589
data class for ExtendedClientMetadata instead of freeform map
samgst-amazon 0819535
comment
samgst-amazon 0d0494e
comment
samgst-amazon 2e3ad80
break out metadata into model
samgst-amazon 30d7c9c
detekt
samgst-amazon ec614b8
detekt
rli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
.../src/software/aws/toolkits/jetbrains/services/amazonq/lsp/model/ExtendedClientMetadata.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package software.aws.toolkits.jetbrains.services.amazonq.lsp.model | ||
|
||
import software.aws.toolkits.jetbrains.services.telemetry.ClientMetadata | ||
|
||
data class ExtendedClientMetadata( | ||
val aws: AwsMetadata, | ||
) | ||
|
||
data class AwsMetadata( | ||
val clientInfo: ClientInfoMetadata, | ||
) | ||
|
||
data class ClientInfoMetadata( | ||
val extension: ExtensionMetadata, | ||
val clientId: String, | ||
val version: String, | ||
val name: String, | ||
) | ||
|
||
data class ExtensionMetadata( | ||
val name: String, | ||
val version: String, | ||
) | ||
|
||
fun createExtendedClientMetadata(): ExtendedClientMetadata { | ||
val metadata = ClientMetadata.getDefault() | ||
return ExtendedClientMetadata( | ||
aws = AwsMetadata( | ||
clientInfo = ClientInfoMetadata( | ||
extension = ExtensionMetadata( | ||
name = metadata.awsProduct.toString(), | ||
version = metadata.awsVersion | ||
), | ||
clientId = metadata.clientId, | ||
version = metadata.parentProductVersion, | ||
name = metadata.parentProduct | ||
) | ||
) | ||
) | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
where does this 30 come from?
Uh oh!
There was an error while loading. Please reload this page.
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.
arbitrary -- saw your //comment about having a timeout and thought we should have something
can change to retry with backoff pattern or something else, just wasn't sure what was appropriate here.
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.
5-10s is probably good enough. if it doesn't spin up quickly we should kill server and retry, then fail after some # of attempts. can you log that as a separate task on the board?