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

Function live_tool_state_clear_locked

ds4_server.c:7945–7953  ·  view source on GitHub ↗

Single live protocol-tool state. * * This is not an implementation of durable remote conversation storage. It is * only an in-memory binding from protocol tool-call IDs to the current sampled * KV frontier. If it does not match, DS4 falls back to the same prefix and * disk-cache machinery used by chat/completions, or returns a clear error for * tool-result-only requests that have no replay

Source from the content-addressed store, hash-verified

7943 ts->state = DSML_TOOL_DONE;
7944 return true;
7945 }
7946 if (raw_partial_any(raw, raw_len, ts->parse_pos, ts->tool_calls_end, ts->invoke_start)) return true;
7947 if (raw_full_lit(raw, raw_len, ts->parse_pos, ts->invoke_start)) {
7948 size_t before_pos = ts->parse_pos;
7949 dsml_tool_stream_state before_state = ts->state;
7950 if (!openai_tool_start_invoke(fd, s, r, id, ts, raw, raw_len)) return false;
7951 if (ts->parse_pos == before_pos && ts->state == before_state) return true;
7952 continue;
7953 }
7954 return openai_tool_stream_fail(ts);
7955 }
7956

Callers 5

live_tool_state_freeFunction · 0.85
responses_live_rememberFunction · 0.85
anthropic_live_rememberFunction · 0.85
responses_live_clearFunction · 0.85
anthropic_live_clearFunction · 0.85

Calls 1

stop_list_clearFunction · 0.85

Tested by

no test coverage detected