@@ -164,6 +164,72 @@ describe("ui/conversation", () => {
164164 expect(lines.join("\n")).not.toContain('"command"');
165165 });
166166
167+ test("MCP tool-call previews honor verbose mode", () => {
168+ const args = {
169+ query: "routing",
170+ section: "guides",
171+ limit: 10,
172+ offset: 0,
173+ filter1: "alpha",
174+ filter2: "beta",
175+ filter3: "gamma",
176+ filter4: "delta",
177+ filter5: "epsilon",
178+ filter6: "zeta",
179+ filter7: "eta",
180+ filter8: "theta",
181+ };
182+
183+ const compactLines = collectRenderedLines(
184+ renderAssistantMessage(
185+ {
186+ content: [
187+ {
188+ type: "toolCall",
189+ id: "call-mcp",
190+ name: "docs__search",
191+ arguments: args,
192+ },
193+ ],
194+ },
195+ {
196+ showReasoning: true,
197+ verbose: false,
198+ theme: DEFAULT_THEME,
199+ cwd: "/tmp/project",
200+ previewWidth: 80,
201+ },
202+ ),
203+ );
204+ const verboseLines = collectRenderedLines(
205+ renderAssistantMessage(
206+ {
207+ content: [
208+ {
209+ type: "toolCall",
210+ id: "call-mcp",
211+ name: "docs__search",
212+ arguments: args,
213+ },
214+ ],
215+ },
216+ {
217+ showReasoning: true,
218+ verbose: true,
219+ theme: DEFAULT_THEME,
220+ cwd: "/tmp/project",
221+ previewWidth: 80,
222+ },
223+ ),
224+ );
225+
226+ expect(compactLines).toContain("│ docs__search ->");
227+ expect(compactLines.some((line) => line.includes("And "))).toBe(true);
228+ expect(compactLines.join("\n")).not.toContain('"query": "routing"');
229+ expect(verboseLines.join("\n")).toContain('"query": "routing"');
230+ expect(compactLines.length).toBeLessThan(verboseLines.length);
231+ });
232+
167233 test("shell tool results render structured stdout/stderr details without stderr labels or error styling", () => {
168234 const stdout = Array.from(
169235 { length: 12 },
@@ -426,4 +492,37 @@ describe("ui/conversation", () => {
426492 expect(lines.join("\n")).not.toContain('"files"');
427493 expect(lines.join("\n")).not.toContain('"kind"');
428494 });
495+
496+ test("MCP tool results honor verbose mode", () => {
497+ const output = Array.from(
498+ { length: 14 },
499+ (_, index) => `result ${index + 1}`,
500+ ).join("\n");
501+
502+ const compactLines = collectRenderedLines(
503+ renderToolResult("docs__search", { query: "routing" }, output, false, {
504+ showReasoning: true,
505+ verbose: false,
506+ theme: DEFAULT_THEME,
507+ cwd: "/tmp/project",
508+ previewWidth: 80,
509+ }),
510+ );
511+ const verboseLines = collectRenderedLines(
512+ renderToolResult("docs__search", { query: "routing" }, output, false, {
513+ showReasoning: true,
514+ verbose: true,
515+ theme: DEFAULT_THEME,
516+ cwd: "/tmp/project",
517+ previewWidth: 80,
518+ }),
519+ );
520+
521+ expect(compactLines).toContain("│ docs__search <-");
522+ expect(compactLines).toContain("│ result 14");
523+ expect(compactLines).toContain("│ And 6 lines more");
524+ expect(compactLines).not.toContain("│ result 1");
525+ expect(verboseLines).toContain("│ result 1");
526+ expect(compactLines.length).toBeLessThan(verboseLines.length);
527+ });
429528 });