Fix duplicate response printing in interactive mode
The response was being printed twice: once during streaming and again after task completion. Removed the redundant print_smart() call since streaming already displays the response in real-time.
This commit is contained in:
@@ -58,14 +58,11 @@ pub async fn execute_task_with_retry<W: UiWriter>(
|
|||||||
};
|
};
|
||||||
|
|
||||||
match execution_result {
|
match execution_result {
|
||||||
Ok(result) => {
|
Ok(_) => {
|
||||||
if attempt > 1 {
|
if attempt > 1 {
|
||||||
output.print(&format!("✅ Request succeeded after {} attempts", attempt));
|
output.print(&format!("✅ Request succeeded after {} attempts", attempt));
|
||||||
}
|
}
|
||||||
// Only print response if it's not empty (streaming already displayed it)
|
// Response was already displayed during streaming - don't print again
|
||||||
if !result.response.trim().is_empty() {
|
|
||||||
output.print_smart(&result.response);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user