|
|
@@ -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.`
|