-
Notifications
You must be signed in to change notification settings - Fork 253
fix(amazonq): update diff view with syntax highlights and proper new file view #5679
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
fix(amazonq): update diff view with syntax highlights and proper new file view #5679
Conversation
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
…howDiffWithHighlighting # Conflicts: # plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImpl.kt # plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/model/aws/chat/FlareChatCommands.kt
val (leftContent, rightContent) = when { | ||
params.isDeleted -> { | ||
// For deleted files, show original on left, empty on right | ||
contentFactory.create(originalContent) to | ||
contentFactory.create(originalContent, virtualFile) to |
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.
create has an option for file type, so i think we can keep this in memory and avoid the temp file
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.
I tried that earlier and wasn't seeing the highlighting being applied. Agree that avoiding the temp file would be ideal. I'll try again
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.
i think you should also pass in the project as a parameter so it's taking dependencies into account?
Clicking the diff in the chat now shows syntax highlighting in the diff view

Q creating a new file now shows only the new file in the diff view

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