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

Function renderer_syntax_write

ds4_agent.c:2054–2068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2052static bool agent_bytes_partial_prefix_at(const char *p, const char *end,
2053 const char *prefix) {
2054 return bytes_is_partial_prefix(p, (size_t)(end - p), prefix);
2055}
2056
2057static void agent_glm_tool_parse(agent_dsml_parser *p) {
2058 static const char start[] = "<tool_call>";
2059 static const char close[] = "</tool_call>";
2060 static const char arg_key[] = "<arg_key>";
2061 static const char arg_key_close[] = "</arg_key>";
2062 static const char arg_value[] = "<arg_value>";
2063 static const char arg_value_close[] = "</arg_value>";
2064
2065 if (p->raw_len < sizeof(start) - 1 ||
2066 memcmp(p->raw, start, sizeof(start) - 1) != 0) {
2067 return;
2068 }
2069
2070 while (p->state == AGENT_DSML_STRUCTURAL ||
2071 p->state == AGENT_DSML_PARAM_VALUE)

Callers 1

Calls 2

agent_syntax_colorFunction · 0.85
renderer_writeFunction · 0.85

Tested by

no test coverage detected