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

Function agent_parse_int_default

ds4_agent.c:5440–5450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5438 char *title;
5439} agent_session_list_item;
5440
5441static int agent_session_list_cmp_recent(const void *a, const void *b) {
5442 const agent_session_list_item *sa = a, *sb = b;
5443 uint64_t ta = sa->entry.last_used ? sa->entry.last_used : sa->entry.created_at;
5444 uint64_t tb = sb->entry.last_used ? sb->entry.last_used : sb->entry.created_at;
5445 if (ta < tb) return 1;
5446 if (ta > tb) return -1;
5447 return strcmp(sa->entry.sha, sb->entry.sha);
5448}
5449
5450static void agent_session_list_free(agent_session_list_item *v, int n) {
5451 for (int i = 0; i < n; i++) {
5452 ds4_kvstore_entry_free(&v[i].entry);
5453 free(v[i].title);

Callers 7

agent_tool_readFunction · 0.85
agent_tool_moreFunction · 0.85
agent_tool_searchFunction · 0.85
agent_tool_job_idFunction · 0.85
agent_tool_pidFunction · 0.85
agent_execute_tool_callFunction · 0.85
run_agentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected