@@ -80,7 +80,7 @@ export const LocalProjectContextServer =
8080
8181 lsp . workspace . onDidCreateFiles ( async event => {
8282 try {
83- const filePaths = event . files . map ( file => URI . parse ( file . uri ) . fsPath )
83+ const filePaths = event . files . map ( file => URI . file ( file . uri ) . fsPath )
8484 await localProjectContextController . updateIndexAndContextCommand ( filePaths , true )
8585 } catch ( error ) {
8686 logging . error ( `Error handling create event: ${ error } ` )
@@ -89,7 +89,7 @@ export const LocalProjectContextServer =
8989
9090 lsp . workspace . onDidDeleteFiles ( async event => {
9191 try {
92- const filePaths = event . files . map ( file => URI . parse ( file . uri ) . fsPath )
92+ const filePaths = event . files . map ( file => URI . file ( file . uri ) . fsPath )
9393 await localProjectContextController . updateIndexAndContextCommand ( filePaths , false )
9494 } catch ( error ) {
9595 logging . error ( `Error handling delete event: ${ error } ` )
@@ -98,8 +98,8 @@ export const LocalProjectContextServer =
9898
9999 lsp . workspace . onDidRenameFiles ( async event => {
100100 try {
101- const oldPaths = event . files . map ( file => URI . parse ( file . oldUri ) . fsPath )
102- const newPaths = event . files . map ( file => URI . parse ( file . newUri ) . fsPath )
101+ const oldPaths = event . files . map ( file => URI . file ( file . oldUri ) . fsPath )
102+ const newPaths = event . files . map ( file => URI . file ( file . newUri ) . fsPath )
103103
104104 await localProjectContextController . updateIndexAndContextCommand ( oldPaths , false )
105105 await localProjectContextController . updateIndexAndContextCommand ( newPaths , true )
@@ -110,7 +110,7 @@ export const LocalProjectContextServer =
110110
111111 lsp . onDidSaveTextDocument ( async event => {
112112 try {
113- const filePaths = [ URI . parse ( event . textDocument . uri ) . fsPath ]
113+ const filePaths = [ URI . file ( event . textDocument . uri ) . fsPath ]
114114 await localProjectContextController . updateIndex ( filePaths , 'update' )
115115 } catch ( error ) {
116116 logging . error ( `Error handling save event: ${ error } ` )
0 commit comments