diff --git a/src/ai/claude-executor.js b/src/ai/claude-executor.js index 1e827bc..0b347ee 100644 --- a/src/ai/claude-executor.js +++ b/src/ai/claude-executor.js @@ -115,9 +115,9 @@ async function runClaudePrompt(prompt, sourceDir, allowedTools = 'Read', context // Disable status manager - using simple JSON filtering for all agents now const statusManager = null; - // Setup progress indicator for clean output agents + // Setup progress indicator for clean output agents (unless disabled via flag) let progressIndicator = null; - if (useCleanOutput) { + if (useCleanOutput && !global.SHANNON_DISABLE_LOADER) { const agentType = description.includes('Pre-recon') ? 'pre-reconnaissance' : description.includes('Recon') ? 'reconnaissance' : description.includes('Report') ? 'report generation' : 'analysis'; @@ -216,10 +216,20 @@ async function runClaudePrompt(prompt, sourceDir, allowedTools = 'Read', context let messageCount = 0; + let lastHeartbeat = Date.now(); + const HEARTBEAT_INTERVAL = 30000; // 30 seconds + try { for await (const message of query({ prompt: fullPrompt, options })) { messageCount++; + // Periodic heartbeat for long-running agents (only when loader is disabled) + const now = Date.now(); + if (global.SHANNON_DISABLE_LOADER && now - lastHeartbeat > HEARTBEAT_INTERVAL) { + console.log(chalk.blue(` ⏱️ [${Math.floor((now - timer.startTime) / 1000)}s] ${description} running... (Turn ${turnCount})`)); + lastHeartbeat = now; + } + if (message.type === "assistant") { turnCount++; diff --git a/src/cli/ui.js b/src/cli/ui.js index 19540e1..b50123e 100644 --- a/src/cli/ui.js +++ b/src/cli/ui.js @@ -27,7 +27,8 @@ export function showHelp() { console.log(chalk.yellow.bold('OPTIONS:')); console.log(' --config YAML configuration file for authentication and testing parameters'); - console.log(' --pipeline-testing Use minimal prompts for fast pipeline testing (creates minimal deliverables)\n'); + console.log(' --pipeline-testing Use minimal prompts for fast pipeline testing (creates minimal deliverables)'); + console.log(' --disable-loader Disable the animated progress loader (useful when logs interfere with spinner)\n'); console.log(chalk.yellow.bold('DEVELOPER COMMANDS:')); console.log(' --run-phase Run all agents in a phase (parallel execution for 5x speedup)');