MCPcopy Create free account
hub / github.com/antirez/ds4 / token_printer_write_char

Function token_printer_write_char

ds4_cli.c:324–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 1

token_printer_processFunction · 0.85

Calls 1

token_printer_set_greyFunction · 0.85

Tested by

no test coverage detected