xonecas.io
64875
Mc

mini-coder / commit 8818339

feat(tui): show edit diffs in full

Exempt the edit tool body from display-only elision so diffs are
always visible; bash and read keep eliding.

xonecas2026-09-23 881833956340f8c6ab84bb551e6c275b92a94d74 parent 335726e

1 file changed

src/tui/tui.ts+4−1
@@ -36,6 +36,7 @@ const SPINNER_MS = 120;
3636 /**
3737 * Display-only elision for tool bodies, deliberately worded differently from
3838 * the model-facing `... output truncated ...` marker in `tools/bash.ts`.
39+ * `edit` is exempt: its diffs are always shown in full.
3940 */
4041 const MAX_BODY_ROWS = 12;
4142 const ELIDED_HEAD = 4;
@@ -447,7 +448,9 @@ class Tui {
447448 this.separator = true;
448449 if (call !== undefined) this.push(call);
449450 const width = Math.max(1, this.term.width - BODY_PREFIX.length);
450- const rows = bodyRows(resultLines(name, text, isError), width);
451+ const lines = resultLines(name, text, isError);
452+ // Diffs are shown in full; other tool bodies stay elided.
453+ const rows = name === "edit" ? renderRows(lines, width) : bodyRows(lines, width);
451454 for (let i = 0; i < rows.length; i++) {
452455 const prefix = isError && i === rows.length - 1 ? ERROR_PREFIX : BODY_PREFIX;
453456 this.push(prefix + rows[i]);