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

Function renderer_code_line_append

ds4_agent.c:2268–2280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2266static size_t renderer_utf8_need(unsigned char c) {
2267 if (c < 0x80) return 1;
2268 if (c >= 0xc2 && c <= 0xdf) return 2;
2269 if (c >= 0xe0 && c <= 0xef) return 3;
2270 if (c >= 0xf0 && c <= 0xf4) return 4;
2271 return 1;
2272}
2273
2274static bool renderer_has_text_attrs(agent_token_renderer *r) {
2275 return r->in_think || r->md_bold || r->md_italic ||
2276 r->md_inline_code || r->md_code_block;
2277}
2278
2279static void renderer_set_text_attrs(agent_token_renderer *r) {
2280 if (!r->use_color) return;
2281 if (r->in_think) {
2282 renderer_set_grey(r);
2283 return;

Callers 1

renderer_code_byteFunction · 0.85

Calls 1

xreallocFunction · 0.70

Tested by

no test coverage detected