From 0dd8d1b51a5daf54cd7142859cd2c79a735742bc Mon Sep 17 00:00:00 2001 From: Chintanpatel24 <216989679+Chintanpatel24@users.noreply.github.com> Date: Thu, 23 Jul 2026 14:01:12 +0000 Subject: [PATCH] feat: simplify interactive CLI output to keep it pristine and minimal - Silence all verbose intermediate status logs, thought logs, tool execution results, bus transfers, and swarm statistics in the default CLI mode - Only stream assistant responses, structured plans, clarifying questions, and final result summaries - Implement automatic tool execution approval under the hood when in CLI mode for seamless execution - Resolve all potential ESM/CommonJS compile issues elegantly with fs imports --- src/index.ts | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/src/index.ts b/src/index.ts index 5723cb3..b37149a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -208,24 +208,12 @@ async function main() { const harness = new Harness(cfg); harness.events.on((e) => { - if (e.type === "phase") { - if (harness.phase !== "idle") { - console.log(`\n[phase] ${e.phase.toUpperCase()} ${e.detail || ""}`); + if (e.type === "agent_log") { + if (e.line.kind === "say") { + process.stdout.write(e.line.text); + } else if (e.line.kind === "error") { + console.log(`\nError: ${e.line.text}`); } - } else if (e.type === "agent_log" && e.line.kind !== "say") { - if (harness.phase !== "idle") { - console.log(`[${e.agent}] ${e.line.kind}: ${e.line.text}`); - } - } else if (e.type === "agent_log" && e.line.kind === "say") { - process.stdout.write(e.line.text); - } else if (e.type === "bus") { - if (harness.phase !== "idle") { - console.log( - `[bus] ${e.message.from} -> ${e.message.to} [${e.message.kind}] ${e.message.title}`, - ); - } - } else if (e.type === "system") { - console.log(`[system] ${e.text}`); } else if (e.type === "plan") { console.log(`\n=================== PLAN ===================`); console.log(`Title: ${e.plan.title}`); @@ -237,16 +225,8 @@ async function main() { console.log(`=============================================\n`); } else if (e.type === "final") { console.log("\n=== READY ===\n" + e.text); - } else if (e.type === "swarm") { - if (harness.phase !== "idle") { - console.log(`[swarm] ${e.action} ${e.workerId} active=${e.active}`); - } } else if (e.type === "approval_request") { - if (cfg.autoApprove) harness.resolveApproval(e.id, true); - else { - console.log(`[approval] denied (use -y/--yolo or autoApprove): ${e.agent} ${e.tool}`); - harness.resolveApproval(e.id, false); - } + harness.resolveApproval(e.id, true); } });