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

Function editor_hide

ds4_agent.c:9181–9195  ·  view source on GitHub ↗

Hide the live prompt before model output is written. In scroll-region mode * the output cursor was saved before the prompt was drawn, so restoring it is * enough to append more model/tool bytes without touching the prompt rows. */

Source from the content-addressed store, hash-verified

9179 } else {
9180 snprintf(line, sizeof(line),
9181 "output_path=%s (%zu bytes, %d lines)\n",
9182 job->path[0] ? job->path : "<unavailable>",
9183 job->bytes, display_lines);
9184 agent_buf_puts(&out, line);
9185 snprintf(line, sizeof(line), "<head -%d %s>\n",
9186 AGENT_BASH_HEAD_LINES, job->path);
9187 agent_buf_puts(&out, line);
9188 agent_buf_puts(&out, head);
9189 if (head[0] && head[strlen(head) - 1] != '\n') agent_buf_puts(&out, "\n");
9190 agent_buf_puts(&out, "</head>\n");
9191 }
9192 free(head);
9193 } else {
9194 int tail_lines = job->running ? AGENT_BASH_PROGRESS_TAIL_LINES :
9195 AGENT_BASH_FINAL_TAIL_LINES;
9196 char *tail = agent_bash_read_tail_lines(job, tail_lines);
9197 snprintf(line, sizeof(line),
9198 "output_path=%s (%zu bytes, %d lines)\n",

Callers 3

editor_stopFunction · 0.85
editor_set_prompt_statusFunction · 0.85
editor_write_asyncFunction · 0.85

Calls 4

linenoiseHideFunction · 0.85

Tested by

no test coverage detected