diff --git a/vscode/react/src/pages/lineage.tsx b/vscode/react/src/pages/lineage.tsx index 546e1ad4bf..77f66fa85b 100644 --- a/vscode/react/src/pages/lineage.tsx +++ b/vscode/react/src/pages/lineage.tsx @@ -99,8 +99,10 @@ function Lineage() { } // @ts-ignore const fileUri: string = activeFile.fileUri - const filePath = URI.parse(fileUri).fsPath - const model = models.find((m: Model) => m.full_path === filePath) + const filePath = URI.file(fileUri).path + const model = models.find( + (m: Model) => URI.file(m.full_path).path === filePath, + ) if (model) { return model.name } @@ -129,9 +131,9 @@ function Lineage() { React.useEffect(() => { const handleChangeFocusedFile = (fileUri: { fileUri: string }) => { - const full_path = URI.parse(fileUri.fileUri).fsPath + const full_path = URI.parse(fileUri.fileUri).path const model = Object.values(modelsRecord).find( - m => m.full_path === full_path, + m => URI.file(m.full_path).path === full_path, ) if (model) { setSelectedModel(model.name)