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

Function append_responses_usage_json

ds4_server.c:6448–6460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6446 if (!value_end || value_end > close) {
6447 free(name);
6448 free(key);
6449 buf_free(&args);
6450 return false;
6451 }
6452 char *raw_value = xstrndup(p, (size_t)(value_end - p));
6453 char *value = xstrdup(raw_value);
6454 ds4_tool_text_unescape(value, arg_value_end);
6455 tool_call_json_args_add(&args, key, value, "true");
6456 free(key);
6457 free(raw_value);
6458 free(value);
6459 p = value_end + strlen(arg_value_end);
6460 }
6461
6462 tool_call tc = {0};
6463 tc.name = name;

Callers 2

responses_sse_completedFunction · 0.85
responses_final_responseFunction · 0.85

Calls 2

clamp_usage_tokensFunction · 0.85
buf_printfFunction · 0.85

Tested by

no test coverage detected