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

Function renderer_code_begin

ds4_agent.c:2378–2392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2376 agent_tool_calls_push(&p->calls, &p->current);
2377 p->parse_pos += close_len;
2378 p->state = AGENT_DSML_DONE;
2379 return;
2380 }
2381 if (agent_dsml_close_tag_at(p->raw + p->parse_pos, invoke, &close_len)) {
2382 agent_tool_calls_push(&p->calls, &p->current);
2383 p->parse_pos += close_len;
2384 continue;
2385 }
2386
2387 char *tag_end = strchr(p->raw + p->parse_pos, '>');
2388 if (!tag_end) return;
2389 size_t tag_len = (size_t)(tag_end - (p->raw + p->parse_pos)) + 1;
2390 char *tag = xstrndup(p->raw + p->parse_pos, tag_len);
2391
2392 if (agent_dsml_open_tag_is(tag, invoke)) {
2393 agent_tool_call_free(&p->current);
2394 p->current.name = agent_parse_attr(tag, "name");
2395 if (!p->current.name) {

Callers 1

Calls 2

renderer_reset_colorFunction · 0.85
agent_syntax_for_langFunction · 0.85

Tested by

no test coverage detected