diff --git a/lib/roast/cogs/agent/providers/pi/pi_invocation.rb b/lib/roast/cogs/agent/providers/pi/pi_invocation.rb index 8fe915b5..bbafb6d8 100644 --- a/lib/roast/cogs/agent/providers/pi/pi_invocation.rb +++ b/lib/roast/cogs/agent/providers/pi/pi_invocation.rb @@ -80,7 +80,7 @@ def run! raise PiAlreadyStartedError if started? @started = true - puts "[USER PROMPT] #{@prompt}" if @show_prompt + Event << { block: { header: "USER PROMPT", content: @prompt } } if @show_prompt @start_time_ms = (Process.clock_gettime(Process::CLOCK_MONOTONIC) * 1000).to_i _stdout, stderr, status = CommandRunner.execute( command_line, @@ -94,7 +94,7 @@ def run! @completed = true @result.success = true finalize_stats! - puts "[AGENT RESPONSE] #{@result.response}" if @show_response + Event << { block: { header: "AGENT RESPONSE", content: @result.response } } if @show_response else @failed = true @result.success = false diff --git a/test/examples/functional/roast_examples_test.rb b/test/examples/functional/roast_examples_test.rb index 1bf6a6dd..fbdf8d6b 100644 --- a/test/examples/functional/roast_examples_test.rb +++ b/test/examples/functional/roast_examples_test.rb @@ -675,13 +675,19 @@ class RoastExamplesTest < FunctionalTest # When show_progress is enabled (the default), text blocks are accumulated and printed # as a single unit, and [AGENT RESPONSE] is suppressed to avoid duplication expected_stdout = <<~STDOUT - [USER PROMPT] What is the world's largest lake? + [USER PROMPT] + ──────────────────────────────────────── + What is the world's largest lake? + ──────────────────────────────────────── Caspian spreads wide— Ancient waters vast and deep, World's largest lake gleams. - [AGENT RESPONSE] Caspian spreads wide— + [AGENT RESPONSE] + ──────────────────────────────────────── + Caspian spreads wide— Ancient waters vast and deep, World's largest lake gleams. + ──────────────────────────────────────── [AGENT STATS] Turns: 1 Duration: 0 seconds Cost (USD): $0.024634