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

Function agent_write_file_bytes

ds4_agent.c:5818–5836  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5816 const char *p = text;
5817 while (p < end) {
5818 agent_history_mark mark = AGENT_HISTORY_MARK_NONE;
5819 size_t mark_len = 0;
5820 const char *m = agent_history_next_marker(p, end, &mark, &mark_len);
5821 if (!m) break;
5822 agent_history_ptrs_push(&marks, m, mark);
5823 const char *content = m + mark_len;
5824 agent_history_mark next_mark = AGENT_HISTORY_MARK_NONE;
5825 size_t next_len = 0;
5826 const char *next = agent_history_next_marker(content, end,
5827 &next_mark, &next_len);
5828 const char *content_end = next ? next : end;
5829 if (mark == AGENT_HISTORY_MARK_USER) {
5830 agent_history_ptrs_push(&all_users, m, mark);
5831 if (!agent_history_is_tool_user(content, content_end))
5832 agent_history_ptrs_push(&users, m, mark);
5833 }
5834 p = content_end;
5835 }
5836
5837 const char *start = end;
5838 if (tool_only) *tool_only = false;
5839 if (users.len > 0) {

Callers 1

agent_apply_file_spliceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected