-
Notifications
You must be signed in to change notification settings - Fork 273
feat(amazonq): implement inlineCompletionWithReferences #5486
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
Closed
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
39f2f5b
add message and data classes
samgst-amazon 7204f2a
server config support for includeSuggestionsWithCodeReferences
samgst-amazon 7b41616
Update plugins/amazonq/shared/jetbrains-community/src/software/aws/to…
samgst-amazon 497cbdb
Merge branch 'feature/q-lsp' into samgst/q-lsp-aws-config
samgst-amazon 430bf1b
data classes
samgst-amazon 0b95441
send inlineCompletionParams to lsp
samgst-amazon dad393e
handler for aws/textDocument
samgst-amazon 8a93408
add to existing textDocumentServiceHandler
samgst-amazon fa5b08a
Merge branch 'feature/q-lsp' into samgst/q-lsp-inlineCompletion
samgst-amazon 37c88e3
detekt
samgst-amazon ae44899
code scan
samgst-amazon 4f62d74
didOpen captures already open files in IDE
samgst-amazon c9cdb9e
Merge branch 'samgst/q-lsp-didOpen-init' into samgst/q-lsp-inlineComp…
samgst-amazon a2afd32
add more listeners to handler
samgst-amazon ee72f6d
Merge branch 'feature/q-lsp' into samgst/q-lsp-inlineCompletion
samgst-amazon 8af0bb3
move call into codewhispererService
samgst-amazon e60ee13
add call
samgst-amazon 72d1c1f
triggerType passed through
samgst-amazon 9cfb452
Merge branch 'feature/q-lsp' into samgst/q-lsp-inlineCompletion
samgst-amazon bf77c91
ReadAction for param building
samgst-amazon 2ddd138
test
samgst-amazon 6ebef65
Merge branch 'feature/q-lsp' into samgst/q-lsp-inlineCompletion
samgst-amazon 7bf9e83
Merge branch 'feature/q-lsp' into samgst/q-lsp-inlineCompletion
samgst-amazon 8eca4ad
Merge branch 'feature/q-lsp' into samgst/q-lsp-inlineCompletion
samgst-amazon a5c4c1a
Merge branch 'feature/q-lsp' into samgst/q-lsp-inlineCompletion
samgst-amazon 87292a0
Merge branch 'main' into samgst/q-lsp-inlineCompletion
samgst-amazon 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
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
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
9 changes: 9 additions & 0 deletions
9
...toolkits/jetbrains/services/amazonq/lsp/model/aws/textDocument/InlineCompletionContext.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,9 @@ | ||
| // 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.aws.textDocument | ||
|
|
||
| data class InlineCompletionContext( | ||
| var triggerKind: InlineCompletionTriggerKind, | ||
| var selectedCompletionInfo: SelectedCompletionInfo? = null, | ||
| ) |
10 changes: 10 additions & 0 deletions
10
...ws/toolkits/jetbrains/services/amazonq/lsp/model/aws/textDocument/InlineCompletionItem.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,10 @@ | ||
| // 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.aws.textDocument | ||
|
|
||
| data class InlineCompletionItem( | ||
| var itemId: String, | ||
| var insertText: String, | ||
| var references: List<InlineCompletionReference>, | ||
| ) |
9 changes: 9 additions & 0 deletions
9
...tbrains/services/amazonq/lsp/model/aws/textDocument/InlineCompletionListWithReferences.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,9 @@ | ||
| // 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.aws.textDocument | ||
|
|
||
| data class InlineCompletionListWithReferences( | ||
| var items: List<InlineCompletionItem>, | ||
| var sessionId: String, | ||
| ) |
11 changes: 11 additions & 0 deletions
11
...olkits/jetbrains/services/amazonq/lsp/model/aws/textDocument/InlineCompletionReference.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,11 @@ | ||
| // 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.aws.textDocument | ||
|
|
||
| data class InlineCompletionReference( | ||
| var referenceName: String, | ||
| var referenceUrl: String, | ||
| var licenseName: String, | ||
| var position: InlineCompletionReferencePosition, | ||
| ) |
9 changes: 9 additions & 0 deletions
9
...etbrains/services/amazonq/lsp/model/aws/textDocument/InlineCompletionReferencePosition.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,9 @@ | ||
| // 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.aws.textDocument | ||
|
|
||
| data class InlineCompletionReferencePosition( | ||
| var startCharacter: Int = 0, | ||
| var endCharacter: Int = 0, | ||
| ) |
9 changes: 9 additions & 0 deletions
9
...kits/jetbrains/services/amazonq/lsp/model/aws/textDocument/InlineCompletionTriggerKind.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,9 @@ | ||
| // 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.aws.textDocument | ||
|
|
||
| enum class InlineCompletionTriggerKind(val value: Int) { | ||
| Invoke(0), | ||
| Automatic(1), | ||
|
||
| } | ||
10 changes: 10 additions & 0 deletions
10
...rains/services/amazonq/lsp/model/aws/textDocument/InlineCompletionWithReferencesParams.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,10 @@ | ||
| // 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.aws.textDocument | ||
|
|
||
| import org.eclipse.lsp4j.TextDocumentPositionAndWorkDoneProgressParams | ||
|
|
||
| data class InlineCompletionWithReferencesParams( | ||
| var context: InlineCompletionContext, | ||
| ) : TextDocumentPositionAndWorkDoneProgressParams() |
11 changes: 11 additions & 0 deletions
11
.../toolkits/jetbrains/services/amazonq/lsp/model/aws/textDocument/SelectedCompletionInfo.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,11 @@ | ||
| // 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.aws.textDocument | ||
|
|
||
| import org.eclipse.lsp4j.Range | ||
|
|
||
| data class SelectedCompletionInfo( | ||
| var text: String, | ||
| var range: Range, | ||
| ) |
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.
Uh oh!
There was an error while loading. Please reload this page.