xonecas.io
64875
Mc

mini-coder / commit a20b8dd

fix: adjust shell preview max lines and fix lint warnings

xonecas2026-03-15 a20b8ddee3615d0cb22dc584e1285311c7ac389b parent f779f98

2 files changed

src/cli/tool-render.test.ts+5−5
@@ -123,7 +123,7 @@ describe("renderToolResult", () => {
123123 test("truncates shell previews by keeping head and tail when verbose is off", () => {
124124 captureStdout();
125125 const stdoutLines = Array.from(
126- { length: 8 },
126+ { length: 30 },
127127 (_, i) => `line-${i + 1}`,
128128 ).join("\n");
129129
@@ -142,10 +142,10 @@ describe("renderToolResult", () => {
142142
143143 const plain = stripAnsi(stdout);
144144 expect(plain).toContain("│ line-1");
145- expect(plain).toContain("│ line-2");
146- expect(plain).toContain("… +4 lines");
147- expect(plain).toContain("│ line-7");
148- expect(plain).toContain("│ line-8");
145+ expect(plain).toContain("│ line-10");
146+ expect(plain).toContain("… +10 lines");
147+ expect(plain).toContain("│ line-21");
148+ expect(plain).toContain("│ line-30");
149149 });
150150
151151 test("shows full shell previews when verbose is on", () => {
src/cli/tool-result-renderers.ts+2−2
@@ -165,7 +165,7 @@ function renderShellResult(
165165 label: "stderr",
166166 value: r.stderr,
167167 lineColor: c.red,
168- maxLines: verboseOutput ? Number.POSITIVE_INFINITY : 6,
168+ maxLines: verboseOutput ? Number.POSITIVE_INFINITY : 10,
169169 });
170170 if (
171171 shouldPreviewShellStdout({
@@ -179,7 +179,7 @@ function renderShellResult(
179179 label: "stdout",
180180 value: r.stdout,
181181 lineColor: c.dim,
182- maxLines: verboseOutput ? Number.POSITIVE_INFINITY : 4,
182+ maxLines: verboseOutput ? Number.POSITIVE_INFINITY : 20,
183183 });
184184 }