-
Notifications
You must be signed in to change notification settings - Fork 253
feat(amazonq): clicking on changed file in Q chat opens up file diff in editor #5675
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
Conversation
Qodana Community for JVM2 new problems were found
💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
@@ -42,6 +46,9 @@ | |||
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.credentials.SsoProfileData | |||
import software.aws.toolkits.jetbrains.services.codewhisperer.customization.CodeWhispererModelConfigurator | |||
import software.aws.toolkits.jetbrains.settings.CodeWhispererSettings | |||
import software.aws.toolkits.resources.message |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
...munity/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImpl.kt
Fixed
Show fixed
Hide fixed
} | ||
} | ||
val diffRequest = SimpleDiffRequest( | ||
"$fileName ${message("aws.q.lsp.client.diff_message")}", |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
...munity/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImpl.kt
Fixed
Show fixed
Hide fixed
@@ -262,6 +269,45 @@ class AmazonQLanguageClientImpl(private val project: Project) : AmazonQLanguageC | |||
return CompletableFuture.completedFuture(Unit) | |||
} | |||
|
|||
override fun openFileDiff(params: OpenFileDiffParams): CompletableFuture<Unit> = | |||
CompletableFuture.supplyAsync({ | |||
ApplicationManager.getApplication().invokeLater { |
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.
can we follow the same pattern: #5663 (comment)?
LOG.warn { "Failed to open file diff: ${e.message}" } | ||
} | ||
} | ||
Unit |
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.
not needed?
@@ -262,6 +269,45 @@ class AmazonQLanguageClientImpl(private val project: Project) : AmazonQLanguageC | |||
return CompletableFuture.completedFuture(Unit) | |||
} | |||
|
|||
override fun openFileDiff(params: OpenFileDiffParams): CompletableFuture<Unit> = | |||
CompletableFuture.supplyAsync( |
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.
we should figure out how to move this onto coroutines
Handle aws/openFileDiff notifications.
When user clicks a filename in Q chat, the file diff opens up in the editor:

Types of changes
Description
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.