API Reference
formatEditResult
function formatEditResult(result): string;Defined in: tools/builtin/file-write.ts:119
Render an edit outcome into the single text block handed to the model.
Parameters
| Parameter | Type | Description |
|---|---|---|
result | FileEditResult | The path and replacement flag captured by a FileWriteBackend. |
Returns
string
"Edited {path}" on success, or a clear note when the target string was absent.
Remarks
A missing target string is NOT a tool error (the file was read fine) — it is surfaced in the content so the model can retry with a different string, the same way a non-zero shell exit is surfaced rather than thrown.