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

Function sse_headers

ds4_server.c:4881–4892  ·  view source on GitHub ↗

Streaming is a translation state machine over the raw DS4 text. The model * may produce and DSML tool blocks; clients should receive those as * protocol-native reasoning/tool deltas, never as visible assistant text. */

Source from the content-addressed store, hash-verified

4879 return false;
4880 }
4881 /* instructions in the Responses API replaces any system message — for Codex
4882 * it carries the full agent system prompt. Prepend it so render produces a
4883 * standard system+chat layout. */
4884 if (instructions && instructions[0]) {
4885 chat_msg msg = {0};
4886 msg.role = xstrdup("system");
4887 msg.content = instructions;
4888 instructions = NULL;
4889 /* Insert at the head so it precedes the conversation. */
4890 chat_msgs_push(&msgs, msg);
4891 if (msgs.len > 1) {
4892 chat_msg tmp = msgs.v[msgs.len - 1];
4893 for (int i = msgs.len - 1; i > 0; i--) msgs.v[i] = msgs.v[i - 1];
4894 msgs.v[0] = tmp;
4895 }

Callers 3

server_progress_cbFunction · 0.85
generate_jobFunction · 0.85
test_cors_sse_headersFunction · 0.85

Calls 4

buf_putsFunction · 0.85
append_cors_headersFunction · 0.85
send_allFunction · 0.85
buf_freeFunction · 0.70

Tested by 1

test_cors_sse_headersFunction · 0.68