fix: Correct path resolution for .vite-port file in ClineProvider (#4007)

The ClineProvider was looking for the .vite-port file in the wrong location.
Updated the path resolution to correctly point to the project root where
the Vite development server creates the file.

Fixes: #4006

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
This commit is contained in:
KJ7LNW 2025-05-26 13:25:39 -07:00 committed by GitHub
parent e66136f1aa
commit 1e5bf74136
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -557,7 +557,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
try {
const fs = require("fs")
const path = require("path")
const portFilePath = path.resolve(__dirname, "../.vite-port")
const portFilePath = path.resolve(__dirname, "../../.vite-port")
if (fs.existsSync(portFilePath)) {
localPort = fs.readFileSync(portFilePath, "utf8").trim()