refactor: migrate remaining tool files from Bun.file() to Filesystem/stat modules (#14121)

This commit is contained in:
Dax
2026-02-18 19:24:21 -05:00
committed by GitHub
parent a624871ccd
commit bd52ce5640
4 changed files with 8 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ import DESCRIPTION from "./lsp.txt"
import { Instance } from "../project/instance"
import { pathToFileURL } from "url"
import { assertExternalDirectory } from "./external-directory"
import { Filesystem } from "../util/filesystem"
const operations = [
"goToDefinition",
@@ -47,7 +48,7 @@ export const LspTool = Tool.define("lsp", {
const relPath = path.relative(Instance.worktree, file)
const title = `${args.operation} ${relPath}:${args.line}:${args.character}`
const exists = await Bun.file(file).exists()
const exists = await Filesystem.exists(file)
if (!exists) {
throw new Error(`File not found: ${file}`)
}