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

Function token_printer_write_text

ds4_cli.c:394–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392 size_t plen = strlen(prefix);
393 return n >= plen && memcmp(p, prefix, plen) == 0;
394}
395
396static bool bytes_is_partial_prefix(const char *p, size_t n, const char *prefix) {
397 size_t plen = strlen(prefix);
398 return n < plen && memcmp(prefix, p, n) == 0;
399}
400
401static void token_printer_set_grey(token_printer *p) {
402 if (p->use_color && !p->color_open) {
403 fputs("\x1b[90m", p->fp);
404 p->color_open = true;

Callers 3

print_generated_tokenFunction · 0.85
run_sampled_generationFunction · 0.85
run_chat_turnFunction · 0.85

Calls 1

token_printer_processFunction · 0.85

Tested by

no test coverage detected