Normalize all file paths to posix format when presenting to AI or user

This commit is contained in:
Saoud Rizwan
2024-09-22 19:20:10 -04:00
parent 1602ecfe67
commit 69e681ebce
9 changed files with 112 additions and 35 deletions

View File

@@ -88,7 +88,7 @@ class WorkspaceTracker {
this.providerRef.deref()?.postMessageToWebview({
type: "workspaceUpdated",
filePaths: Array.from(this.filePaths).map((file) => {
const relativePath = path.relative(cwd, file)
const relativePath = path.relative(cwd, file).toPosix()
return file.endsWith("/") ? relativePath + "/" : relativePath
}),
})