File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
packages/amazonq/src/lsp/chat Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -651,7 +651,18 @@ export function registerMessageListeners(
651
651
)
652
652
653
653
languageClient . onNotification ( openFileDiffNotificationType . method , async ( params : OpenFileDiffParams ) => {
654
- const currentFileUri = vscode . Uri . parse ( params . originalFileUri )
654
+ // Handle both file:// URIs and raw file paths, ensuring proper Windows path handling
655
+ let currentFileUri : vscode . Uri
656
+
657
+ // Check if it's already a proper file:// URI
658
+ if ( params . originalFileUri . startsWith ( 'file://' ) ) {
659
+ currentFileUri = vscode . Uri . parse ( params . originalFileUri )
660
+ } else {
661
+ // Decode URL-encoded characters and treat as file path
662
+ const decodedPath = decodeURIComponent ( params . originalFileUri )
663
+ currentFileUri = vscode . Uri . file ( decodedPath )
664
+ }
665
+
655
666
const originalContent = params . originalFileContent ?? ''
656
667
const fileName = path . basename ( currentFileUri . fsPath )
657
668
You can’t perform that action at this time.
0 commit comments