API Reference
formatFileContent
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
| Parameter | Type | Description |
|---|---|---|
result | FileReadResult | The 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.