diff --git a/src/Config.zig b/src/Config.zig index 601917a2f..6e7509679 100644 --- a/src/Config.zig +++ b/src/Config.zig @@ -200,7 +200,7 @@ const Commands = cli.Builder(.{ .{ .name = "base_url", .type = ?[:0]const u8 }, .{ .name = "system_prompt", .type = ?[:0]const u8 }, .{ .name = "self_heal", .type = bool }, - .{ .name = "interactive", .type = bool }, + .{ .name = "interactive", .short = 'i', .type = bool }, .{ .name = "task", .type = ?[]const u8 }, .{ .name = "task_attachments", .type = []const u8, .multiple = true }, .{ .name = "mcp", .type = bool }, diff --git a/src/agent/Agent.zig b/src/agent/Agent.zig index 2d12f5c08..e40bc2541 100644 --- a/src/agent/Agent.zig +++ b/src/agent/Agent.zig @@ -1059,7 +1059,11 @@ fn handleToolCall(ctx: *anyopaque, allocator: std.mem.Allocator, tool_name: []co self.terminal.printToolCall(tool_name, arguments); if (self.tool_executor.call(allocator, tool_name, arguments)) |output| { const capped = capToolOutput(allocator, output); - self.terminal.printToolResult(tool_name, capped); + // Only the user-explicit path (slash commands) should surface tool + // result bodies in the REPL. Agent-driven calls show only the call + // line; bodies are hidden unless `--verbosity verbose` (also needed + // by the benchmark harness which parses both lines). + if (self.terminal.verbosity == .verbose) self.terminal.printToolResult(tool_name, capped); return .{ .content = capped }; } else |err| { const msg = std.fmt.allocPrint(allocator, "Error: {s}", .{@errorName(err)}) catch "Error: tool execution failed"; diff --git a/src/cli.zig b/src/cli.zig index bf5c35aaf..825434352 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -552,8 +552,10 @@ pub fn Builder(comptime commands: anytype) type { // We allow both `--my-option` and `--my_option` variants; // assuming given `option` struct prefer snake_case for `name`. // Match an option. + const matches_short = comptime @hasField(@TypeOf(option), "short"); if (std.mem.eql(u8, option_name, "--" ++ option.name) or - std.mem.eql(u8, option_name, "--" ++ comptime toKebabCase(option.name))) + std.mem.eql(u8, option_name, "--" ++ comptime toKebabCase(option.name)) or + (matches_short and std.mem.eql(u8, option_name, "-" ++ [_]u8{option.short}))) { try parseValue(allocator, args, &@field(c, option.name), option); continue :iter_args;