From 30f5a19d0f87144d357d3e9c390bc8a6c2c96bb0 Mon Sep 17 00:00:00 2001 From: Tai An Date: Thu, 9 Jul 2026 12:16:05 -0700 Subject: [PATCH] fix(console): terminate generation stats line with newline (#2285) The post-generation stats line (`[time] CtxLimit:... Total:...`) was printed without a trailing newline, relying on the next koboldcpp print starting with ` `. When llama.cpp's `state_write_data: writing state` message (which has no leading newline) is emitted right after, it gets glued onto the end of the stats line. Append ` ` to the stats printf so the line is always terminated, regardless of what prints next. Assisted-by: Claude --- gpttype_adapter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpttype_adapter.cpp b/gpttype_adapter.cpp index 39689dbabb7b..cb53e4b4cc5c 100644 --- a/gpttype_adapter.cpp +++ b/gpttype_adapter.cpp @@ -5381,7 +5381,7 @@ generation_outputs gpttype_generate(const generation_inputs inputs) float pt2 = (gen_time*1000.0/(real_n_generated<=0?1:real_n_generated)); float generated_tps = (pt2>0?(1000.0/pt2):0); float total_time = (init_time + process_time + gen_time); - printf("\n[%s] CtxLimit:%d/%d, Init:%.2fs, Processed:%d in %.2fs (%.2fT/s), Generated:%d/%d in %.2fs (%.2fT/s), Total:%.2fs", + printf("\n[%s] CtxLimit:%d/%d, Init:%.2fs, Processed:%d in %.2fs (%.2fT/s), Generated:%d/%d in %.2fs (%.2fT/s), Total:%.2fs\n", get_timestamp_str().c_str(),(int)current_context_tokens.size(),(int)nctx, init_time, real_n_processed, process_time, processed_tps, real_n_generated, kcpp_data->n_predict, gen_time, generated_tps, total_time); if(debugmode==1 && !is_quiet && (draft_successes+draft_failures)>0)