Compact agent logs by default, verbose with POC_AGENT_VERBOSE
Skip full prompt logging and truncate tool results in normal mode. Logs now show: header, tool calls with one-line results, response text. Set POC_AGENT_VERBOSE=1 for full prompts and results. Makes agent logs scannable at a glance instead of walls of text. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
8714a15e1c
commit
f9e0c008d9
3 changed files with 11 additions and 4 deletions
|
|
@ -336,8 +336,10 @@ fn run_one_agent_inner(
|
|||
.map(|s| s.phase.clone()).collect();
|
||||
let step_phases_for_bail = step_phases.clone();
|
||||
|
||||
for (i, s) in agent_batch.steps.iter().enumerate() {
|
||||
log(&format!("=== PROMPT {}/{} ({}) ===\n\n{}", i + 1, n_steps, s.phase, s.prompt));
|
||||
if std::env::var("POC_AGENT_VERBOSE").is_ok() {
|
||||
for (i, s) in agent_batch.steps.iter().enumerate() {
|
||||
log(&format!("=== PROMPT {}/{} ({}) ===\n\n{}", i + 1, n_steps, s.phase, s.prompt));
|
||||
}
|
||||
}
|
||||
log("\n=== CALLING LLM ===");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue