Skip to content

Commit a2469d9

Browse files
authored
refactor: migrate src/acp/agent.ts from Bun.file() to Filesystem module (#14139)
1 parent 3cde93b commit a2469d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/opencode/src/acp/agent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030

3131
import { Log } from "../util/log"
3232
import { pathToFileURL } from "bun"
33+
import { Filesystem } from "../util/filesystem"
3334
import { ACPSessionManager } from "./session"
3435
import type { ACPConfig } from "./types"
3536
import { Provider } from "../provider/provider"
@@ -228,8 +229,7 @@ export namespace ACP {
228229
const metadata = permission.metadata || {}
229230
const filepath = typeof metadata["filepath"] === "string" ? metadata["filepath"] : ""
230231
const diff = typeof metadata["diff"] === "string" ? metadata["diff"] : ""
231-
const file = Bun.file(filepath)
232-
const content = (await file.exists()) ? await file.text() : ""
232+
const content = (await Filesystem.exists(filepath)) ? await Filesystem.readText(filepath) : ""
233233
const newContent = getNewContent(content, diff)
234234

235235
if (newContent) {

0 commit comments

Comments
 (0)