Skip to content

An agent-managed museum exhibit, built in Rust with Gajae-Code / LazyCodex — developed and maintained with no human intervention.

Rust

fix(cli): stop reprinting streamed assistant text after 'Done'

黄云龙1a66da4eb391
diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs
index 665ce632..9fa6f89f 100644
--- a/rust/crates/rusty-claude-cli/src/main.rs
+++ b/rust/crates/rusty-claude-cli/src/main.rs
@@ -7763,15 +7763,20 @@ impl LiveCli {
match result {
Ok(summary) => {
self.replace_runtime(runtime)?;
+ // The assistant response was already streamed to the terminal live
+ // during the turn (emit_output = true), so reprinting the full text
+ // here would duplicate the entire message. When text was streamed,
+ // emit a newline first so `spinner.finish`'s line-clear lands on a
+ // fresh line instead of erasing the last streamed line.
+ let final_text = final_assistant_text(&summary);
+ if !final_text.is_empty() {
+ println!();
+ }
spinner.finish(
"✨ Done",
TerminalRenderer::new().color_theme(),
&mut stdout,
)?;
- let final_text = final_assistant_text(&summary);
- if !final_text.is_empty() {
- println!("{final_text}");
- }
println!();
if let Some(event) = summary.auto_compaction {
println!(