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

Function agent_tool_read

ds4_agent.c:5728–5737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5726 uint32_t text_bytes = 0;
5727 char *text = NULL;
5728 char *title = NULL;
5729 bool ok = ds4_kvstore_read_header(fp, &hdr, &text_bytes) &&
5730 agent_kv_read_text(fp, text_bytes, &text, err, err_len);
5731 if (ok && (hdr.ext_flags & DS4_KVSTORE_EXT_SESSION_TITLE))
5732 ok = agent_kv_read_title_trailer(fp, &hdr, &title, err, err_len);
5733 fclose(fp);
5734 if (!ok) {
5735 if (!err[0]) snprintf(err, err_len, "failed to read session");
5736 free(title);
5737 free(text);
5738 free(path);
5739 return false;
5740 }

Callers 1

agent_execute_tool_callFunction · 0.85

Calls 4

agent_tool_arg_valueFunction · 0.85
agent_parse_bool_defaultFunction · 0.85
agent_parse_int_defaultFunction · 0.85
agent_read_rangeFunction · 0.85

Tested by

no test coverage detected