Open Agent Loops
API Reference

formatFileContent

@open-agent-loops/core


function formatFileContent(result): string;

Defined in: tools/builtin/file-read.ts:116

Render a file slice into the single text block handed to the model.

Parameters

ParameterTypeDescription
resultFileReadResultThe lines and start line captured by a FileReadBackend.

Returns

string

One {n}: {line} row per line, or "(no content)" when empty.

Remarks

Each line is prefixed with its 1-based number, counting up from result.startLine. An empty slice yields a clear placeholder instead of an empty string.

See

readTool

On this page