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

Function worker_run_deferred_save

ds4_agent.c:8024–8035  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8022static pid_t agent_tool_pid(const agent_tool_call *call) {
8023 return (pid_t)agent_parse_int_default(agent_tool_arg_value(call, "pid"), 0, 0, INT_MAX);
8024}
8025
8026/* ============================================================================
8027 * Tool Dispatch
8028 * ============================================================================
8029 */
8030
8031/* Execute one parsed DSML tool call and return the text that will be appended as
8032 * the tool-role result. UI visualization already happened while streaming; this
8033 * function is only about side effects and the model-visible observation. */
8034static char *agent_execute_tool_call(agent_worker *w, const agent_tool_call *call) {
8035 agent_buf result = {0};
8036 if (!call->name) return xstrdup("Tool error: missing tool name\n");
8037
8038 if (!strcmp(call->name, "read")) return agent_tool_read(w, call);

Callers 1

worker_mainFunction · 0.85

Calls 4

agent_set_statusFunction · 0.85
agent_publishfFunction · 0.85

Tested by

no test coverage detected