| 71 | } |
| 72 | |
| 73 | export const toModelOutput = (output: Output, oldString: string, newString: string) => |
| 74 | [ |
| 75 | `Edited file successfully: ${output.files[0]?.file}`, |
| 76 | `Replacements: ${output.replacements}`, |
| 77 | "```diff", |
| 78 | ...previewLines(oldString, "-"), |
| 79 | ...previewLines(newString, "+"), |
| 80 | "```", |
| 81 | ].join("\n") |
| 82 | |
| 83 | /** Deferred V2 edit behavior and UX integrations remain visible at the model-facing seam. */ |
| 84 | // TODO: Port V1 fuzzy correction strategies only after exact-edit behavior is established: line-trimmed matching, block-anchor fallback, indentation correction, and similarity-threshold review. |