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

@@ -5,6 +5,7 @@ import { Identifier } from "../id/id"
import { PermissionNext } from "../permission/next"
import type { Agent } from "../agent/agent"
import { Scheduler } from "../scheduler"
import { Filesystem } from "../util/filesystem"
export namespace Truncate {
export const MAX_LINES = 2000
@@ -91,7 +92,7 @@ export namespace Truncate {
const id = Identifier.ascending("tool")
const filepath = path.join(DIR, id)
await Bun.write(Bun.file(filepath), text)
await Filesystem.write(filepath, text)
const hint = hasTaskTool(agent)
? `The tool call succeeded but the output was truncated. Full output saved to: ${filepath}\nUse the Task tool to have explore agent process this file with Grep and Read (with offset/limit). Do NOT read the full file yourself - delegate to save context.`