| 322 | if (!p || !event || p->input_tokens <= 0) return; |
| 323 | const bool is_display = |
| 324 | strcmp(event, "prefill_display") == 0; |
| 325 | if (strcmp(event, "prefill_chunk") && !is_display) return; |
| 326 | if (is_display && !p->use_color) return; |
| 327 | |
| 328 | int processed = current - p->base_tokens; |
| 329 | if (processed < 0) processed = 0; |
| 330 | if (processed > p->input_tokens) processed = p->input_tokens; |
| 331 | double pct = 100.0 * (double)processed / (double)p->input_tokens; |
no test coverage detected