Skip to content

fix(amazonq): Fix prompt file not opening in windows #5750

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 5 commits into from
May 22, 2025

Conversation

manodnyab
Copy link
Contributor

Types of changes

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

Description

File URI sent by the server is encoded. This is not recognized as a valid path by JB in Windows. Decoding the path to UTF-8 charset.

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.

@manodnyab manodnyab requested a review from a team as a code owner May 22, 2025 07:08
Copy link

github-actions bot commented May 22, 2025

Qodana Community for JVM

It 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
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Copy link
Contributor

@bryceitoc9 bryceitoc9 left a comment

Choose a reason for hiding this comment

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

Confirmed working on Windows

@@ -146,20 +148,20 @@ class AmazonQLanguageClientImpl(private val project: Project) : AmazonQLanguageC
if (params.uri.isNullOrEmpty()) {
return CompletableFuture.completedFuture(ShowDocumentResult(false))
}

val fileToOpen = URLDecoder.decode(params.uri, StandardCharsets.UTF_8.name())
Copy link
Contributor

Choose a reason for hiding this comment

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

please include inline comment why

@manodnyab manodnyab enabled auto-merge (squash) May 22, 2025 17:41
@manodnyab manodnyab disabled auto-merge May 22, 2025 18:00
@manodnyab manodnyab merged commit 1007aff into feature/q-lsp-chat May 22, 2025
14 of 16 checks passed
@manodnyab manodnyab deleted the manodnyb/buildforsspc branch May 22, 2025 18:17
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