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

Function agent_buf_append

ds4_agent.c:3554–3571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3552static void agent_tool_viz_restore_param_color(agent_stream_renderer *sr) {
3553 agent_tool_visualizer *v = &sr->viz;
3554 if (!v->active || !v->param_active || v->read_style) return;
3555 renderer_color(sr->renderer, agent_tool_param_color(v->param_kind));
3556}
3557
3558/* Stream one DSML parameter byte into the visualizer. The visualizer must not
3559 * wait for the whole parameter: large write/edit contents should show progress
3560 * as the model emits them, while still detecting the closing parameter tag. */
3561static void agent_tool_viz_param_value_byte(agent_stream_renderer *sr, char c) {
3562 agent_tool_visualizer *v = &sr->viz;
3563
3564 if (v->param_end_len || c == '<') {
3565 if (v->param_end_len == sizeof(v->param_end_tail)) {
3566 size_t keep = v->param_end_len;
3567 v->param_end_len = 0;
3568 for (size_t i = 0; i < keep; i++)
3569 agent_tool_viz_param_raw_byte(sr, v->param_end_tail[i]);
3570 if (c != '<') {
3571 agent_tool_viz_param_raw_byte(sr, c);
3572 return;
3573 }
3574 }

Callers 11

agent_buf_putsFunction · 0.85
agent_session_title_clipFunction · 0.85
agent_read_rangeFunction · 0.85
agent_search_emit_lineFunction · 0.85
agent_tail_appendFunction · 0.85
agent_bash_read_headFunction · 0.85
agent_worker_compactFunction · 0.85
build_footer_textFunction · 0.85

Calls 1

xreallocFunction · 0.70

Tested by

no test coverage detected