Skip to content

Commit 2c828b3

Browse files
authored
fix(vscode): fix windows linage graph (#4857)
1 parent bdaba68 commit 2c828b3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

vscode/react/src/pages/lineage.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ function Lineage() {
9999
}
100100
// @ts-ignore
101101
const fileUri: string = activeFile.fileUri
102-
const filePath = URI.parse(fileUri).fsPath
103-
const model = models.find((m: Model) => m.full_path === filePath)
102+
const filePath = URI.file(fileUri).path
103+
const model = models.find(
104+
(m: Model) => URI.file(m.full_path).path === filePath,
105+
)
104106
if (model) {
105107
return model.name
106108
}
@@ -129,9 +131,9 @@ function Lineage() {
129131

130132
React.useEffect(() => {
131133
const handleChangeFocusedFile = (fileUri: { fileUri: string }) => {
132-
const full_path = URI.parse(fileUri.fileUri).fsPath
134+
const full_path = URI.parse(fileUri.fileUri).path
133135
const model = Object.values(modelsRecord).find(
134-
m => m.full_path === full_path,
136+
m => URI.file(m.full_path).path === full_path,
135137
)
136138
if (model) {
137139
setSelectedModel(model.name)

0 commit comments

Comments
 (0)