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

Function kv_cache_store_live_prefix_text

ds4_server.c:8706–8719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8704 while (m->tail) tool_memory_remove_entry_locked(m, m->tail);
8705 if (m->by_id) raxFree(m->by_id);
8706 if (m->by_block) raxFree(m->by_block);
8707 memset(m, 0, sizeof(*m));
8708}
8709
8710/* Single live protocol-tool state.
8711 *
8712 * This is not an implementation of durable remote conversation storage. It is
8713 * only an in-memory binding from protocol tool-call IDs to the current sampled
8714 * KV frontier. If it does not match, DS4 falls back to the same prefix and
8715 * disk-cache machinery used by chat/completions, or returns a clear error for
8716 * tool-result-only requests that have no replayable prefix. */
8717static void live_tool_state_clear_locked(live_tool_state *st) {
8718 if (!st) return;
8719 stop_list_clear(&st->call_ids);
8720 free(st->visible_text);
8721 st->visible_text = NULL;
8722 st->visible_len = 0;

Callers 2

kv_cache_store_currentFunction · 0.85

Calls 2

kv_cache_tool_map_hooksFunction · 0.85

Tested by

no test coverage detected